Browse Source

update gtk3

zrythm
alex 3 years ago committed by Alexandros Theodotou
parent
commit
e05f3bb1a9
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 7
      cerbero/build/build.py
  2. 1
      config/windows.config
  3. 16
      recipes/atk.recipe
  4. 61
      recipes/cairo.recipe
  5. 8
      recipes/fftw.recipe
  6. 66
      recipes/gtk3.recipe
  7. 33
      recipes/gtk3/0001-meson-Fix-post-install-when-cross-compiling-to-Windo.patch
  8. 13
      recipes/libepoxy.recipe
  9. 6
      recipes/zrythm.recipe

7
cerbero/build/build.py

@ -884,7 +884,9 @@ class Meson (Build, ModifyEnvBase) : @@ -884,7 +884,9 @@ class Meson (Build, ModifyEnvBase) :
props[key] += value
# We do not use cmake dependency files, speed up the build by disabling it
binaries = {'cmake': ['false']}
#binaries = {'cmake': ['false']}
binaries = {'cmake': '\'cmake\''}
#'exe_wrapper': '\'wine\''}
# Get qmake and moc paths
if self.config.qt5_qmake_path:
binaries['qmake'] = [self.config.qt5_qmake_path]
@ -977,7 +979,8 @@ class Meson (Build, ModifyEnvBase) : @@ -977,7 +979,8 @@ class Meson (Build, ModifyEnvBase) :
# Tell meson to not use a native compiler for anything
false = ['false']
# We do not use cmake dependency files, speed up the build by disabling it
extra_binaries = 'cmake = {}'.format(str(false))
#extra_binaries = 'cmake = {}'.format(str(false))
extra_binaries = ''
contents = MESON_FILE_TPL.format(
system=self.config.platform,
cpu=self.config.arch,

1
config/windows.config

@ -34,7 +34,6 @@ mingw_env_for_build_system = dict() @@ -34,7 +34,6 @@ mingw_env_for_build_system = dict()
msvc_env_for_toolchain = dict()
msvc_env_for_build_system = dict()
if platform == Platform.WINDOWS:
separator = ';'
if target_arch == Architecture.X86:

16
recipes/atk.recipe

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'atk'
version = '2.36.0'
licenses = [License.LGPLv2Plus]
stype = SourceType.TARBALL
btype = BuildType.MESON
url = 'gnome://'
tarball_checksum = 'fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788'
deps = ['glib']
files_libs = ['libatk-1.0']
files_devel = ['include/atk-1.0', 'lib/pkgconfig/atk.pc']
files_lang = ['atk10']
files_typelibs = ['Atk-1.0']

61
recipes/cairo.recipe

@ -3,63 +3,14 @@ @@ -3,63 +3,14 @@
class Recipe(recipe.Recipe):
name = 'cairo'
version = '1.14.12'
version = '1.16.0'
#btype = BuildType.MESON
stype = SourceType.TARBALL
url = 'https://cairographics.org/releases/cairo-%(version)s.tar.xz'
tarball_checksum = '8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16'
tarball_checksum = '5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331'
#tarball_name = '%(name)s-meson-%(version)s.zip'
#tarball_is_bomb = False
# Either LGPL-2.1+ or MPL-1.1
licenses = [License.LGPLv2_1Plus, {License.MPLv1_1: ['COPYING-MPL-1.1']}]
autoreconf = True
autoreconf_sh = 'NOCONFIGURE=1 ./autogen.sh'
deps = ['glib', 'libpng', 'zlib', 'pixman', 'fontconfig', 'freetype']
patches = ['cairo/0001-Fix-compilation-with-Android-s-bionic-libc.patch',
'cairo/0001-Disable-building-of-the-tests.patch',
'cairo/0001-build-disable-failing-compile-link-checks-on-any-std.patch',
'cairo/0001-win32-Make-font-dc-thread-local.patch',
]
files_libs = ['libcairo', 'libcairo-gobject', 'libcairo-script-interpreter']
files_devel = [
'lib/pkgconfig/cairo-fc.pc',
'lib/pkgconfig/cairo.pc',
'lib/pkgconfig/cairo-ps.pc',
'lib/pkgconfig/cairo-ft.pc',
'lib/pkgconfig/cairo-pdf.pc',
'lib/pkgconfig/cairo-svg.pc',
'lib/pkgconfig/cairo-gobject.pc',
'lib/pkgconfig/cairo-png.pc',
'include/cairo',
]
platform_files_devel = {
Platform.WINDOWS: [ 'lib/pkgconfig/cairo-win32-font.pc',
'lib/pkgconfig/cairo-win32.pc'],
Platform.DARWIN: ['lib/pkgconfig/cairo-quartz-font.pc',
'lib/pkgconfig/cairo-quartz-image.pc',
'lib/pkgconfig/cairo-quartz.pc']
}
# Skipping because it requires a display and documented as randomly failing
make_check = None
def prepare(self):
# extra flags needed for gcc 4.9
if self.config.target_distro == Distro.ARCH:
self.append_env('CFLAGS', '-fno-lto')
self.append_env('CXXFLAGS', '-fno-lto')
self.append_env('CPPFLAGS', '-fno-lto')
if self.config.variants.x11:
self.files_devel += ['lib/pkgconfig/cairo-xlib-xrender.pc',
'lib/pkgconfig/cairo-xlib.pc']
else:
self.configure_options += '--without-x '
if self.config.target_platform == Platform.DARWIN:
self.configure_options += ' --enable-quartz-font --enable-quartz-image'
elif self.config.target_platform == Platform.ANDROID:
v = DistroVersion.get_android_api_version(self.config.target_distro_version)
if self.config.target_arch in [Architecture.ARM, Architecture.ARMv7, Architecture.X86] and v < 21:
# FIXME: HACK to make projects using mmap compile with NDK 16
# we fail to compile with -D_FILE_OFFSET_BITS=64
# because we don't use clang and we use a platform < 21 (Lollipop)
# See $NDK_ROOT/sysroot/usr/include/sys/mman.h as one example
self.set_env('ac_cv_func_mmap', 'no')
deps = ['glib', 'libpng', 'pixman', 'fontconfig', 'freetype']

8
recipes/fftw.recipe

@ -6,14 +6,16 @@ class Recipe(recipe.Recipe): @@ -6,14 +6,16 @@ class Recipe(recipe.Recipe):
version = '3.3.8'
stype = SourceType.TARBALL
url = 'ftp://ftp.fftw.org/pub/fftw/fftw-3.3.8.tar.gz'
tarball_checksum = 'eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094'
tarball_checksum = '6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303'
licenses = [{License.BSD_like: ['COPYING']}]
files_libs = ['libfftw3', 'libfftw3f']
files_devel = ['include/speex', 'lib/pkgconfig/speex.pc']
#files_libs = ['libfftw3', 'libfftw3f']
#files_devel = ['include/speex', 'lib/pkgconfig/speex.pc']
autoreconf = True
def prepare(self):
if self.config.target_platform == Platform.ANDROID:
self.autoreconf = True
self.configure_options += ' --enable-threads --enable-float'

66
recipes/gtk3.recipe

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from cerbero.tools.libtool import LibtoolLibrary
class Recipe(recipe.Recipe):
name = 'gtk3'
version = '3.24.22'
stype = SourceType.TARBALL
url = 'https://download.gnome.org/sources/gtk+/%(maj_ver)s/gtk+-%(version)s.tar.xz'
tarball_dirname = 'gtk+-%(version)s'
tarball_checksum = 'bf18a4a5dff28a7b02aaef1b949c2d09c96c18387eddab152bb4cd55a5b67dda'
licenses = [License.LGPLv2Plus]
btype = BuildType.MESON
meson_options = {'installed_tests': False, 'builtin_immodules': 'yes'}
deps = ['glib', 'gdk-pixbuf', 'libepoxy', 'atk', 'cairo', 'pango',
'fribidi', 'freetype', 'harfbuzz']
patches = ['gtk3/0001-meson-Fix-post-install-when-cross-compiling-to-Windo.patch']
files_libs = ['libgailutil-3', 'libgdk-3', 'libgtk-3']
files_bins = ['gtk-update-icon-cache', 'gtk-query-immodules-3.0', 'gtk-launch']
files_misc = [
'share/themes/Default/gtk-3.0',
'share/themes/Emacs/gtk-3.0',
'lib/gtk-3.0/3.0.0/printbackends',
]
platform_files_misc = {
Platform.DARWIN: ['share/themes/Mac/gtk-3.0'],
}
files_devel = [
'bin/gtk-query-settings%(bext)s',
'bin/gtk-builder-tool%(bext)s',
'bin/gtk-encode-symbolic-svg%(bext)s',
'bin/gtk3-demo%(bext)s',
'bin/gtk3-demo-application%(bext)s',
'bin/gtk3-icon-browser%(bext)s',
'bin/gtk3-widget-factory%(bext)s',
'lib/pkgconfig/gail-3.0.pc',
'lib/pkgconfig/gdk-3.0.pc',
'lib/pkgconfig/gtk+-3.0.pc',
'include/gail-3.0',
'include/gtk-3.0',
'share/applications/gtk3-demo.desktop',
'share/applications/gtk3-icon-browser.desktop',
'share/applications/gtk3-widget-factory.desktop',
'share/icons/hicolor',
'share/aclocal/gtk-3.0.m4',
'share/gettext/its/gtkbuilder.its',
'share/gettext/its/gtkbuilder.loc',
'share/gtk-3.0/gtkbuilder.rng',
]
platform_files_devel = {
Platform.WINDOWS: ['lib/pkgconfig/gtk+-win32-3.0.pc', 'lib/pkgconfig/gdk-win32-3.0.pc'],
Platform.DARWIN: ['lib/pkgconfig/gtk+-quartz-3.0.pc', 'lib/pkgconfig/gdk-quartz-3.0.pc'],
}
files_lang = ['gtk30']
files_typelibs = ['Gdk-3.0', 'Gtk-3.0']
platform_files_typelibs = {
Platform.WINDOWS: ['GdkWin32-3.0'],
}
def prepare(self):
if self.config.target_platform not in [Platform.DARWIN, Platform.WINDOWS]:
raise InvalidRecipeError(self, "gtk3 recipe only supports macOS and Windows");

33
recipes/gtk3/0001-meson-Fix-post-install-when-cross-compiling-to-Windo.patch

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
From c57a575a906ecc8d8f1b92271b523969944778a2 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Sun, 30 Aug 2020 07:33:45 +0530
Subject: [PATCH] meson: Fix post-install when cross-compiling to Windows
FIXME:
1. os.name == 'nt' branch is wrong
2. Should also use exe-wrapper also (needs new meson feature)
---
build-aux/meson/post-install.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/build-aux/meson/post-install.py b/build-aux/meson/post-install.py
index e302a6e..7bd25d2 100644
--- a/build-aux/meson/post-install.py
+++ b/build-aux/meson/post-install.py
@@ -12,7 +12,13 @@ if 'DESTDIR' not in os.environ:
gtk_libdir = sys.argv[4]
gtk_datadir = sys.argv[5]
gtk_query_immodules = os.path.join(gtk_bindir, 'gtk-query-immodules-' + gtk_api_version)
+ if not os.path.isfile(gtk_query_immodules):
+ if os.path.isfile(gtk_query_immodules + '.exe'):
+ gtk_query_immodules += '.exe'
gtk_update_icon_cache = os.path.join(gtk_bindir, 'gtk-update-icon-cache')
+ if not os.path.isfile(gtk_update_icon_cache):
+ if os.path.isfile(gtk_update_icon_cache + '.exe'):
+ gtk_update_icon_cache += '.exe'
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
--
2.26.2

13
recipes/libepoxy.recipe

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'libepoxy'
version = '1.5.4'
licenses = [{License.MIT: ['COPYING']}]
stype = SourceType.TARBALL
btype = BuildType.MESON
url = 'https://github.com/anholt/%(name)s/releases/download/%(version)s/%(name)s-%(version)s.tar.xz'
tarball_checksum = '0bd2cc681dfeffdef739cb29913f8c3caa47a88a451fd2bc6e606c02997289d2'
files_libs = ['libepoxy']
files_devel = ['include/epoxy', 'lib/pkgconfig/epoxy.pc']

6
recipes/zrythm.recipe

@ -3,16 +3,16 @@ @@ -3,16 +3,16 @@
from cerbero.build.build import modify_environment
class Recipe(recipe.Recipe):
version = '65b7528e1'
version = '48240150e'
name = 'zrythm'
licenses = [License.GPLv3Plus]
btype = BuildType.MESON
stype = SourceType.TARBALL
#configure_options = ' --enable-static --disable-frontend --disable-decoder'
url = 'https://git.zrythm.org/cgit/zrythm/snapshot/zrythm-%(version)s.tar.gz'
tarball_checksum = '55c87823b90042cc169cdf6a515526a640b6bb55e014db4e69645cb02a250c06'
tarball_checksum = '6a926b25367fc4ecac0443c772a3581a96404a443dbac6a65286f6df7c9a6021'
deps = ['libyaml', 'libsndfile', 'libsamplerate']
deps = ['cairo', 'libyaml', 'libsndfile', 'libsamplerate', 'fftw']
meson_options = {'manpage': 'false', }

Loading…
Cancel
Save