Skip to content

Commit

Permalink
Merge pull request #1003 from Audibene-GMBH/rewrite-pixman-to-use-mes…
Browse files Browse the repository at this point in the history
…on-PER-257

Rewrite pixman to use meson for the builds
  • Loading branch information
danyeaw authored Jul 5, 2023
2 parents 1b3c28a + acd93bf commit af1a7f0
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions gvsbuild/projects/pixman.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import os
from gvsbuild.utils.base_builders import Meson

from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add


@project_add
class Pixman(Tarball, Project):
class Pixman(Tarball, Meson):
def __init__(self):
Project.__init__(
self,
Expand All @@ -32,23 +32,14 @@ def __init__(self):
lastversion_even=True,
archive_url="http://cairographics.org/releases/pixman-{version}.tar.gz",
hash="ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e",
dependencies=["ninja", "meson"],
)

def build(self):
optimizations = "SSE2=on SSSE3=on" + (
" MMX=off" if self.builder.x64 else " MMX=on"
)

add_path = os.path.join(self.builder.opts.msys_dir, "usr", "bin")

self.exec_vs(
f"make -f Makefile.win32 pixman CFG=%(configuration)s {optimizations}",
add_path=add_path,
enable_mmx = "disabled" if self.builder.x64 else "enabled"
Meson.build(
self,
meson_params=f"-Dsse2=enabled -Dssse3=enabled -Dmmx={enable_mmx} -Dtests=disabled",
)

self.install(r".\pixman\%(configuration)s\pixman-1.lib lib")

self.install(r".\pixman\pixman.h include\pixman-1")
self.install(r".\pixman\pixman-version.h include\pixman-1")

self.install(r".\COPYING share\doc\pixman")

0 comments on commit af1a7f0

Please sign in to comment.