mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
353 lines
11 KiB
Bash
353 lines
11 KiB
Bash
SUMMARY="GLib is a cross-platform software utility library"
|
|
DESCRIPTION="GLib is a cross-platform software utility library that began as \
|
|
part of the GTK+ project. However, before releasing version 2 of GTK+, the \
|
|
project's developers decided to separate non-GUI-specific code from the GTK+ \
|
|
platform, thus creating GLib as a separate product. GLib was released as a \
|
|
separate library so other developers, those who did not make use of the \
|
|
GUI-related portions of GTK+, could make use of the non-GUI portions of the \
|
|
library without the overhead of depending on the entire GUI library.
|
|
Since GLib is a cross-platform library, applications using it to interface \
|
|
with the operating system are usually portable across different operating systems \
|
|
without major changes."
|
|
HOMEPAGE="https://www.gtk.org/"
|
|
COPYRIGHT="1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
1991-2003 Free Software Foundation, Inc.
|
|
1997-2006 University of Cambridge.
|
|
1998-2001, 2003-2010 Red Hat, Inc.
|
|
2007-2009 Nokia Corporation
|
|
2008, 2010 Oracle and/or its affiliates, Inc. All rights
|
|
2008-2010 Codethink Limited
|
|
2008-2010 Collabora Ltd.
|
|
1995-2010 Several others"
|
|
LICENSE="GNU LGPL v2"
|
|
REVISION="4"
|
|
SOURCE_URI="https://gitlab.gnome.org/GNOME/glib/-/archive/$portVersion/glib-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="e9c311a25abb5717fb83f0f3a36daddc039e61fe37cea61cad4d0e455a6cdca0"
|
|
SOURCE_DIR="glib-$portVersion"
|
|
PATCHES="glib2-$portVersion.patchset"
|
|
srvGitRev2="0854af0fdb6d527a8d1999835ac2c5059976c210"
|
|
SOURCE_URI_2="https://gitlab.gnome.org/GNOME/gvdb/-/archive/0854af0fdb6d527a8d1999835ac2c5059976c210/gvdb-$srvGitRev2.tar.gz"
|
|
CHECKSUM_SHA256_2="08352e54e8216d9001820c627c62858585465b51dc557cc22f0f4770ed182ebd"
|
|
SOURCE_DIR_2="gvdb-$srvGitRev2"
|
|
PACKAGE_VERSION_gi="1.81.2"
|
|
SOURCE_URI_3="http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/${PACKAGE_VERSION_gi%.*}/gobject-introspection-$PACKAGE_VERSION_gi.tar.xz"
|
|
CHECKSUM_SHA256_3="ec973bf5c2c2e69d14642df38e508c24ae91a254b6c38d2828022c71f2a144e0"
|
|
SOURCE_DIR_3="gobject-introspection-$PACKAGE_VERSION_gi"
|
|
PATCHES_3="glib2-$portVersion-source3.patchset"
|
|
|
|
ARCHITECTURES="ALL !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
libVersion="0.8100.0"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
libGiVersion="1.0.0"
|
|
libGiVersionCompat="$libGiVersion compat >= ${libGiVersion%%.*}"
|
|
|
|
pythonVersion=3.10
|
|
pythonPackage=python${pythonVersion//.}
|
|
pythonModuleDir="python$pythonVersion/vendor-packages"
|
|
|
|
PROVIDES="
|
|
glib2$secondaryArchSuffix = $portVersion
|
|
cmd:gapplication$commandSuffix
|
|
cmd:gdbus$commandSuffix
|
|
cmd:gi_compile_repository$commandSuffix
|
|
cmd:gi_decompile_typelib$commandSuffix
|
|
cmd:gi_inspect_typelib$commandSuffix
|
|
cmd:gio$commandSuffix
|
|
cmd:gio_querymodules$commandSuffix
|
|
cmd:glib_compile_resources$commandSuffix
|
|
cmd:glib_compile_schemas$commandSuffix
|
|
cmd:glib_gettextize$commandSuffix
|
|
cmd:gsettings$commandSuffix
|
|
lib:libgio_2.0$secondaryArchSuffix = $libVersionCompat
|
|
lib:libgirepository_2.0$secondaryArchSuffix = $libVersionCompat
|
|
lib:libglib_2.0$secondaryArchSuffix = $libVersionCompat
|
|
lib:libgmodule_2.0$secondaryArchSuffix = $libVersionCompat
|
|
lib:libgobject_2.0$secondaryArchSuffix = $libVersionCompat
|
|
lib:libgthread_2.0$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libffi$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libpcre2_8$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
glib2${secondaryArchSuffix}_devel = $portVersion compat >= 0
|
|
cmd:gdbus_codegen$commandSuffix
|
|
cmd:glib_genmarshal$commandSuffix
|
|
cmd:glib_mkenums$commandSuffix
|
|
cmd:gobject_query$commandSuffix
|
|
cmd:gresource$commandSuffix
|
|
cmd:gtester$commandSuffix
|
|
cmd:gtester_report$commandSuffix
|
|
devel:libgio_2.0$secondaryArchSuffix = $libVersionCompat
|
|
devel:libgirepository_2.0$secondaryArchSuffix = $libVersionCompat
|
|
devel:libglib_2.0$secondaryArchSuffix = $libVersionCompat
|
|
devel:libgmodule_2.0$secondaryArchSuffix = $libVersionCompat
|
|
devel:libgobject_2.0$secondaryArchSuffix = $libVersionCompat
|
|
devel:libgthread_2.0$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
glib2$secondaryArchSuffix == $portVersion base
|
|
haiku$secondaryArchSuffix
|
|
packaging_$pythonPackage
|
|
cmd:perl
|
|
cmd:python$pythonVersion
|
|
devel:libffi$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libintl$secondaryArchSuffix
|
|
devel:libpcre2_8$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
"
|
|
|
|
PACKAGE_NAME_gi="gobject_introspection$secondaryArchSuffix"
|
|
# PACKAGE_VERSION_gi see above
|
|
|
|
SUMMARY_gi="Introspection system for GObject-based libraries"
|
|
DESCRIPTION_gi="GObject introspection is a middleware layer between C libraries \
|
|
(using GObject) and language bindings. The C library can be scanned at \
|
|
compile time and generate a metadata file, in addition to the actual native \
|
|
C library. Then at runtime, language bindings can read this metadata and \
|
|
automatically provide bindings to call into the C library."
|
|
PROVIDES_gi="
|
|
gobject_introspection$secondaryArchSuffix = $PACKAGE_VERSION_gi
|
|
cmd:g_ir_annotation_tool$commandSuffix = $PACKAGE_VERSION_gi
|
|
cmd:g_ir_compiler$commandSuffix = $PACKAGE_VERSION_gi
|
|
cmd:g_ir_generate$commandSuffix = $PACKAGE_VERSION_gi
|
|
cmd:g_ir_inspect$commandSuffix = $PACKAGE_VERSION_gi
|
|
cmd:g_ir_scanner$commandSuffix = $PACKAGE_VERSION_gi
|
|
lib:libgirepository_1.0$secondaryArchSuffix = $libGiVersionCompat
|
|
"
|
|
REQUIRES_gi="
|
|
glib2$secondaryArchSuffix == $portVersion base
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
lib:libffi$secondaryArchSuffix
|
|
"
|
|
REPLACES_gi="
|
|
glib2${secondaryArchSuffix}_gir_tools
|
|
"
|
|
|
|
PACKAGE_NAME_gi_devel="gobject_introspection${secondaryArchSuffix}_devel"
|
|
PACKAGE_VERSION_gi_devel=$PACKAGE_VERSION_gi
|
|
|
|
SUMMARY_gi_devel="$SUMMARY_gi (development files)"
|
|
DESCRIPTION_gi_devel="$DESCRIPTION_gi"
|
|
PROVIDES_gi_devel="
|
|
gobject_introspection${secondaryArchSuffix}_devel = $PACKAGE_VERSION_gi
|
|
devel:libgirepository_1.0$secondaryArchSuffix = $libGiVersionCompat
|
|
"
|
|
REQUIRES_gi_devel="
|
|
gobject_introspection$secondaryArchSuffix == $PACKAGE_VERSION_gi base
|
|
devel:libffi$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
devel:libpcre2_8$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libffi$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libintl$secondaryArchSuffix
|
|
devel:libpcre2_8$secondaryArchSuffix
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
packaging_$pythonPackage
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:bison
|
|
cmd:flex
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:meson
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
cmd:which
|
|
"
|
|
|
|
defineDebugInfoPackage glib2$secondaryArchSuffix \
|
|
$commandBinDir/gapplication \
|
|
$commandBinDir/gdbus \
|
|
$commandBinDir/gi-compile-repository \
|
|
$commandBinDir/gi-decompile-typelib \
|
|
$commandBinDir/gi-inspect-typelib \
|
|
$commandBinDir/gio \
|
|
$commandBinDir/gio-querymodules \
|
|
$commandBinDir/glib-compile-resources \
|
|
$commandBinDir/glib-compile-schemas \
|
|
$commandBinDir/gsettings \
|
|
$(getPackagePrefix devel)/bin/gobject-query \
|
|
$(getPackagePrefix devel)/bin/gresource \
|
|
$(getPackagePrefix devel)/bin/gtester \
|
|
$(getPackagePrefix gi)/bin/g-ir-compiler \
|
|
$(getPackagePrefix gi)/bin/g-ir-generate \
|
|
$(getPackagePrefix gi)/bin/g-ir-inspect \
|
|
$libDir/libgio-2.0.so.$libVersion \
|
|
$(getPackagePrefix gi)/$relativeLibDir/libgirepository-1.0.so.$libGiVersion \
|
|
$libDir/libgirepository-2.0.so.$libVersion \
|
|
$libDir/libglib-2.0.so.$libVersion \
|
|
$libDir/libgmodule-2.0.so.$libVersion \
|
|
$libDir/libgobject-2.0.so.$libVersion \
|
|
$libDir/libgthread-2.0.so.$libVersion
|
|
|
|
PATCH()
|
|
{
|
|
cd $sourceDir3
|
|
sed -i -e "s|'gobject-introspection'|\'$pythonModuleDir\'|" \
|
|
tools/g-ir-tool-template.in
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
rm -rf subprojects/gvdb
|
|
ln -s $sourceDir2 subprojects/gvdb
|
|
|
|
export CFLAGS="-D_BSD_SOURCE"
|
|
export LDFLAGS="-lbsd -lgnu -lnetwork"
|
|
export PATH=$PATH:$commandBinDir
|
|
export LIBRARY_PATH=$LIBRARY_PATH:$libDir
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$libDir/pkgconfig
|
|
|
|
meson setup \
|
|
--buildtype=debugoptimized \
|
|
--prefix=$prefix \
|
|
--bindir=$commandBinDir \
|
|
--datadir=$dataDir \
|
|
--includedir=$includeDir \
|
|
--libdir=$libDir \
|
|
--localedir=$dataDir/locale \
|
|
-D tests=false \
|
|
-D glib_debug=disabled \
|
|
-D introspection=disabled \
|
|
build
|
|
meson compile -C build
|
|
meson install --no-rebuild -C build
|
|
|
|
cd $sourceDir3
|
|
meson setup \
|
|
--buildtype=debugoptimized \
|
|
--prefix=$prefix \
|
|
--bindir=$commandBinDir \
|
|
--datadir=$dataDir \
|
|
--includedir=$includeDir \
|
|
--libdir=$libDir \
|
|
-D python.bytecompile=1 \
|
|
-D python.install_env="prefix" \
|
|
-D python.platlibdir=$prefix/lib/$pythonModuleDir \
|
|
-D gir_dir_prefix=$dataDir \
|
|
build
|
|
meson compile -C build
|
|
meson install --no-rebuild -C build
|
|
|
|
cd $sourceDir
|
|
meson setup \
|
|
--reconfigure \
|
|
--buildtype=debugoptimized \
|
|
--prefix=$prefix \
|
|
--bindir=$commandBinDir \
|
|
--datadir=$dataDir \
|
|
--includedir=$includeDir \
|
|
--libdir=$libDir \
|
|
--localedir=$dataDir/locale \
|
|
-D gir_dir_prefix=$dataDir \
|
|
-D tests=false \
|
|
-D glib_debug=disabled \
|
|
-D introspection=enabled \
|
|
build
|
|
PATH="$prefix/bin:$PATH" LD_LIBRARY_PATH="$prefix/lib:$LD_LIBRARY_PATH" \
|
|
meson compile -C build
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
meson install --no-rebuild -C build
|
|
|
|
# also install gobject-introspection again (needed when skipping the build)
|
|
cd $sourceDir3
|
|
meson install --no-rebuild -C build
|
|
|
|
# we are not linux
|
|
rm -f $libDir/gio-launch-desktop
|
|
|
|
# *.gir files, don't point to the main glib2 package data directory
|
|
sed -i -e "s|girdir=$dataDir/gir-1.0|girdir=\${datadir}/gir-1.0|g" \
|
|
$libDir/pkgconfig/gobject-introspection-1.0.pc \
|
|
$libDir/pkgconfig/gobject-introspection-no-export-1.0.pc \
|
|
$libDir/pkgconfig/girepository-2.0.pc
|
|
|
|
prepareInstalledDevelLibs \
|
|
libgio-2.0 \
|
|
libgirepository-1.0 \
|
|
libgirepository-2.0 \
|
|
libglib-2.0 \
|
|
libgmodule-2.0 \
|
|
libgobject-2.0 \
|
|
libgthread-2.0
|
|
|
|
# move the glibconfig header into devel as well
|
|
mv $libDir/glib-2.0 $developLibDir
|
|
|
|
fixPkgconfig
|
|
|
|
# gi_devel package
|
|
packageEntries gi_devel \
|
|
$developLibDir/libgirepository-1.0.so* \
|
|
$developLibDir/pkgconfig/gobject-introspection-*1.0.pc \
|
|
$includeDir/gobject-introspection-1.0 \
|
|
$dataDir/aclocal/introspection.m4
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$commandBinDir/gdbus-codegen \
|
|
$commandBinDir/glib-genmarshal \
|
|
$commandBinDir/glib-mkenums \
|
|
$commandBinDir/gobject-query \
|
|
$commandBinDir/gresource \
|
|
$commandBinDir/gtester \
|
|
$commandBinDir/gtester-report \
|
|
$dataDir/aclocal \
|
|
$dataDir/gir-1.0
|
|
|
|
# gi package
|
|
packageEntries gi \
|
|
$commandBinDir/g-ir-annotation-tool \
|
|
$commandBinDir/g-ir-compiler \
|
|
$commandBinDir/g-ir-generate \
|
|
$commandBinDir/g-ir-inspect \
|
|
$commandBinDir/g-ir-scanner \
|
|
$libDir/libgirepository-1.0.so* \
|
|
$libDir/girepository-1.0 \
|
|
$dataDir/gobject-introspection-1.0 \
|
|
$manDir \
|
|
$prefix/lib/python$pythonVersion
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# Ok: 316
|
|
# Fail: 31
|
|
# Skipped: 6
|
|
# Timeout: 2
|
|
|
|
meson test --no-rebuild -C build
|
|
}
|