# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.utils import shell from cerbero.tools.libtool import LibtoolLibrary class Recipe(recipe.Recipe): name = 'gdk-pixbuf' version = '2.42.10' licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL btype = BuildType.MESON url = 'gnome://' tarball_checksum = 'ee9b6c75d13ba096907a2e3c6b27b61bcd17f5c7ebeab5a5b439d2f2e39fe44b' meson_options = {'docs' : 'false', 'man' : 'false', 'installed_tests' : 'false', 'builtin_loaders' : 'all', 'gio_sniffing' : 'false'} deps = ['libjpeg-turbo', 'glib', 'libpng', 'tiff', 'zlib' ] files_libs = ['libgdk_pixbuf-2.0'] files_bins = ['gdk-pixbuf-query-loaders', 'gdk-pixbuf-csource'] files_devel = ['%(libdir)s/pkgconfig/gdk-pixbuf-2.0.pc', 'include/gdk-pixbuf-2.0'] files_lang = ['gdk-pixbuf'] files_typelibs = ['GdkPixbuf-2.0'] def prepare(self): if self.config.platform == Platform.WINDOWS: # tar and bstar fail extracting files with symbolic links for this # file when running on Windows self.force_tarfile = True if self.config.target_platform == Platform.WINDOWS: self.meson_options['native_windows_loaders'] = 'false' if self.config.prefix_is_executable(): self.files_misc = ['%(libdir)s/gdk-pixbuf-2.0/2.10.0/loaders.cache'] def post_install (self): if self.config.platform == Platform.WINDOWS and\ self.config.target_platform == Platform.WINDOWS: cache = os.path.join(self.config.libdir, 'gdk-pixbuf-2.0', '2.10.0', 'loaders.cache') shell.replace(cache, {self.config.prefix: '../'}) lib = LibtoolLibrary('gdk_pixbuf-2.0', None, None, None, self.config.libdir, self.config.target_platform, deps=['gobject-2.0', 'gio-2.0', 'tiff', 'jpeg', 'png16']) lib.save() super().post_install()