Files
2026-10-21 14:15:08 +00:00

69 lines
1.8 KiB
Python

import os
from lib.make import *
from lib import cpp
version("2.44.8")
description("a library that loads image data in various formats and stores it as linear buffers in memory")
maintainer("sisungo <[email protected]>")
source_url("https://download.gnome.org/sources/gdk-pixbuf/2.44/gdk-pixbuf-2.44.8.tar.xz")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("libjpeg-turbo-dev @target")
builddep("libtiff-dev @target")
builddep("libpng-dev @target")
builddep("glib-dev @target")
builddep("gobject-introspection @target")
builddep("shared-mime-info")
builddep("glib-tools")
builddep("libexpat")
def build():
cpp.meson_setup([
"--prefix=/",
f"--libdir={get_prefix('gdk-pixbuf')}/lib",
f"--includedir={get_prefix('gdk-pixbuf-dev')}/include",
"-Dpng=enabled",
"-Dtiff=enabled",
"-Djpeg=enabled",
"-Dgif=enabled",
"-Dglycin=disabled",
"-Dbuiltin_loaders=all",
"-Dintrospection=enabled",
"-Drelocatable=false",
"-Dman=false",
"-Dtests=false",
"-Dinstalled_tests=false",
"-Dthumbnailer=enabled",
])
cpp.meson_compile()
cpp.meson_install()
os.makedirs("lib/gdk-pixbuf-2.0/2.10.0", exist_ok=True)
with open("lib/gdk-pixbuf-2.0/2.10.0/loaders.cache", "wt+") as fd:
fd.write("# empty")
on_build(build)
package("gdk-pixbuf")
dep("libpng @same-arch")
dep("libglib @same-arch")
dep("libgobject @same-arch")
dep("libgmodule @same-arch")
dep("libgio @same-arch")
dep("libjpeg-turbo @same-arch")
dep("libtiff @same-arch")
cpp.use_auto_pack(["bin", "lib"])
package("gdk-pixbuf-dev")
dep("libpng-dev @same-arch")
dep("glib-dev @same-arch")
dep("libjpeg-turbo-dev @same-arch")
dep("libtiff-dev @same-arch")
dep("shared-mime-info")
dep("gdk-pixbuf (same)")
cpp.use_auto_pack(["dev"])