50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
import shutil
|
|
|
|
from lib.make import *
|
|
from lib import cpp, arch
|
|
|
|
|
|
version("1.86.0")
|
|
description("to describe the APIs and collect them in a uniform, machine readable format")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_url("https://gitlab.gnome.org/GNOME/gobject-introspection/-/archive/1.86.0/gobject-introspection-1.86.0.tar.gz")
|
|
|
|
builddep("shortcut/meson")
|
|
builddep("shortcut/c")
|
|
builddep("glib-dev @target")
|
|
builddep("setuptools.py @target")
|
|
builddep("libpython-dev @target")
|
|
builddep("flex")
|
|
builddep("bison")
|
|
builddep("libexpat @target")
|
|
|
|
|
|
def build():
|
|
cpp.meson_setup([
|
|
f"--prefix={get_prefix('gobject-introspection')}",
|
|
f"-Dgir_dir_prefix=/lib/{arch.get_target()}/include/gir",
|
|
"-Dcairo=disabled",
|
|
"-Dpython=/bin/python3",
|
|
"-Dtests=false",
|
|
])
|
|
cpp.meson_compile()
|
|
cpp.meson_install()
|
|
|
|
on_build(build)
|
|
|
|
|
|
def pack(composer):
|
|
composer.add_dir("include")
|
|
composer.add_dir("share")
|
|
composer.add_dir("bin")
|
|
composer.add_dir("lib")
|
|
shutil.rmtree(f"{composer.workdir}/bundle/lib/{arch.get_target()}")
|
|
composer.add_dir(f"lib/{arch.get_target()}/include/gir", "include/gir")
|
|
|
|
package("gobject-introspection")
|
|
dep("python @same-arch")
|
|
dep("setuptools.py @same-arch")
|
|
dep("glib-dev @same-arch")
|
|
on_pack(pack)
|
|
|