mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
glib2: bump version
This commit is contained in:
185
dev-libs/glib/glib2-2.57.1.recipe
Normal file
185
dev-libs/glib/glib2-2.57.1.recipe
Normal file
@@ -0,0 +1,185 @@
|
||||
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="1"
|
||||
SOURCE_URI="https://gitlab.gnome.org/GNOME/glib/-/archive/$portVersion/glib-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="73c10a1927c79d8c318bba9ad6f7bc96ff187013ee19377b3e82f684958b2c2c"
|
||||
SOURCE_DIR="glib-$portVersion"
|
||||
PATCHES="glib2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.5701.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
glib2$secondaryArchSuffix = $portVersion
|
||||
cmd:gapplication$secondaryArchSuffix
|
||||
cmd:gdbus$secondaryArchSuffix
|
||||
cmd:gdbus_codegen$secondaryArchSuffix
|
||||
cmd:gio$secondaryArchSuffix
|
||||
cmd:gio_querymodules$secondaryArchSuffix
|
||||
cmd:glib_compile_resources$secondaryArchSuffix
|
||||
cmd:glib_compile_schemas$secondaryArchSuffix
|
||||
cmd:gresource$secondaryArchSuffix
|
||||
cmd:gsettings$secondaryArchSuffix
|
||||
lib:libgio_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
|
||||
gettext$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libffi$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpcre$secondaryArchSuffix >= 1
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
glib2${secondaryArchSuffix}_devel = $portVersion compat >= 0
|
||||
cmd:glib_genmarshal$secondaryArchSuffix
|
||||
cmd:glib_gettextize$secondaryArchSuffix
|
||||
cmd:glib_mkenums$secondaryArchSuffix
|
||||
cmd:gobject_query$secondaryArchSuffix
|
||||
cmd:gtester$secondaryArchSuffix
|
||||
cmd:gtester_report$secondaryArchSuffix
|
||||
devel:libgio_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
|
||||
cmd:perl
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libffi$secondaryArchSuffix
|
||||
lib:libpcre$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:libpcre$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libpcre$secondaryArchSuffix >= 1
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python
|
||||
cmd:which
|
||||
"
|
||||
|
||||
defineDebugInfoPackage glib2$secondaryArchSuffix \
|
||||
$binDir/gapplication \
|
||||
$binDir/gdbus \
|
||||
$binDir/gio \
|
||||
$binDir/gio-querymodules \
|
||||
$binDir/glib-compile-resources \
|
||||
$binDir/glib-compile-schemas \
|
||||
$binDir/gresource \
|
||||
$binDir/gsettings \
|
||||
$libDir/libgio-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
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./autogen.sh CFLAGS=-D_BSD_SOURCE
|
||||
|
||||
# There seem to be a problem with libtool, and without this some libraries
|
||||
# would not be found during the build.
|
||||
mkdir -p gobject/.libs gio/.libs
|
||||
ln -sf ../../glib/.libs gobject/.libs/lib
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# remove libtool library files
|
||||
rm $libDir/lib*.la
|
||||
|
||||
prepareInstalledDevelLibs libgio-2.0 \
|
||||
libglib-2.0 \
|
||||
libgmodule-2.0 \
|
||||
libgobject-2.0 \
|
||||
libgthread-2.0
|
||||
fixPkgconfig
|
||||
|
||||
# The libtool files reference other libraries using the wrong paths, which
|
||||
# creates a lot of confusion. Fix them so correct paths are used.
|
||||
local develPackageName="${portName}_devel-$portFullVersion"
|
||||
local packageLinksDir=$(dirname $portPackageLinksDir)
|
||||
local ffiLinksDir="$packageLinksDir/${develPackageName}/devel~libffi$secondaryArchSuffix/$relativeDevelopLibDir"
|
||||
sed -i -e "s,^\(Libs.private.*\)-L.* \(-l.*\)$,\1-L$ffiLinksDir \2," \
|
||||
$developLibDir/pkgconfig/gobject-2.0.pc
|
||||
local zlibLinksDir="$packageLinksDir/${develPackageName}/devel~libz$secondaryArchSuffix/$relativeDevelopLibDir"
|
||||
sed -i -e "s,^\(Libs.private.*\)-L.* \(-l.*\)$,\1-L$zlibLinksDir \2," \
|
||||
$developLibDir/pkgconfig/gio-2.0.pc
|
||||
|
||||
|
||||
# move the glibconfig header into devel as well
|
||||
mv $libDir/glib-2.0 $developLibDir
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$binDir/glib-genmarshal \
|
||||
$binDir/glib-gettextize \
|
||||
$binDir/glib-mkenums \
|
||||
$binDir/gobject-query \
|
||||
$binDir/gtester \
|
||||
$binDir/gtester-report
|
||||
|
||||
rm $libDir/charset.alias
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
271
dev-libs/glib/patches/glib2-2.57.1.patchset
Normal file
271
dev-libs/glib/patches/glib2-2.57.1.patchset
Normal file
@@ -0,0 +1,271 @@
|
||||
From 7e32998baec6df434328f70f173fafacc18c6dd8 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 19 Dec 2015 14:51:01 +0000
|
||||
Subject: glib_compile_schemas: links against gio, gobject and gmodule.
|
||||
|
||||
Otherwise build fails on Haiku.
|
||||
|
||||
diff --git a/gio/Makefile.am b/gio/Makefile.am
|
||||
index df4f240..b03e662 100644
|
||||
--- a/gio/Makefile.am
|
||||
+++ b/gio/Makefile.am
|
||||
@@ -827,7 +827,11 @@ gio_querymodules_LDADD = libgio-2.0.la \
|
||||
gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
|
||||
$(AM_V_GEN) $(srcdir)/data-to-c.py $(top_srcdir)/glib/gconstructor.h gconstructor_code $@
|
||||
|
||||
-glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
|
||||
+glib_compile_schemas_LDADD = libgio-2.0.la \
|
||||
+ $(top_builddir)/gobject/libgobject-2.0.la \
|
||||
+ $(top_builddir)/gmodule/libgmodule-2.0.la \
|
||||
+ $(top_builddir)/glib/libglib-2.0.la \
|
||||
+ $(NULL)
|
||||
glib_compile_schemas_SOURCES = \
|
||||
gconstructor_as_data.h \
|
||||
gvdb/gvdb-format.h \
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
From 4bcc596453ac15edd806a032ccb5dfd5c29d2e07 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 19 Dec 2015 14:59:42 +0000
|
||||
Subject: configure.ac: on Haiku
|
||||
|
||||
* don't use -pthread
|
||||
* use -lbe -lroot as thread related libs.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7afeb87..dc3297c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -158,6 +158,9 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
case $host in
|
||||
+ *-*-haiku*)
|
||||
+ LIBS="-lnetwork $LIBS"
|
||||
+ ;;
|
||||
*-*-linux*)
|
||||
glib_os_linux=yes
|
||||
;;
|
||||
@@ -2014,8 +2017,8 @@ AS_IF([ test x"$have_threads" = xposix], [
|
||||
# One of them does for most gcc versions and some other platforms/compilers
|
||||
# too and could be considered as the canonical way to go.
|
||||
case $host in
|
||||
- *-*-cygwin*|*-*-darwin*)
|
||||
- # skip cygwin and darwin -pthread or -pthreads test
|
||||
+ *-*-cygwin*|*-*-darwin*|*-*-haiku*)
|
||||
+ # skip cygwin, darwin and haiku -pthread or -pthreads test
|
||||
;;
|
||||
*-solaris*)
|
||||
# These compiler/linker flags work with both Sun Studio and gcc
|
||||
@@ -2180,6 +2183,15 @@ if test "x$G_THREAD_LIBS" = xerror; then
|
||||
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
|
||||
fi
|
||||
|
||||
+case $host in
|
||||
+ *-*-haiku*)
|
||||
+ G_THREAD_LIBS="-lbe -lroot"
|
||||
+ G_THREAD_LIBS_EXTRA="-L\$(top_builddir_full)/.libs"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
AC_MSG_CHECKING(thread related libraries)
|
||||
AC_MSG_RESULT($G_THREAD_LIBS)
|
||||
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
From 341186eabe3ed50649a987eb965307c0297fcc71 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 29 Jul 2017 12:13:00 +0200
|
||||
Subject: g_dbus_message_print: use B_PRIiDEV on Haiku
|
||||
|
||||
because Haiku doesn't define major() and minor()
|
||||
|
||||
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
|
||||
index be001ae..c8919a6 100644
|
||||
--- a/gio/gdbusmessage.c
|
||||
+++ b/gio/gdbusmessage.c
|
||||
@@ -33,8 +33,12 @@
|
||||
#elif MAJOR_IN_SYSMACROS
|
||||
#include <sys/sysmacros.h>
|
||||
#else
|
||||
+#ifdef __HAIKU__
|
||||
+#include <SupportDefs.h>
|
||||
+#else
|
||||
#define MAJOR_MINOR_NOT_FOUND 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#include "gdbusutils.h"
|
||||
#include "gdbusmessage.h"
|
||||
@@ -3480,8 +3484,14 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
if (fstat (fds[n], &statbuf) == 0)
|
||||
{
|
||||
#ifndef MAJOR_MINOR_NOT_FOUND
|
||||
+#ifdef __HAIKU__
|
||||
+ g_string_append_printf (fs, "%s" "dev=%" B_PRIiDEV, fs->len > 0 ? "," : "",
|
||||
+ statbuf.st_dev);
|
||||
+#else
|
||||
+
|
||||
g_string_append_printf (fs, "%s" "dev=%d:%d", fs->len > 0 ? "," : "",
|
||||
(gint) major (statbuf.st_dev), (gint) minor (statbuf.st_dev));
|
||||
+#endif
|
||||
#endif
|
||||
g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "",
|
||||
(guint) statbuf.st_mode);
|
||||
@@ -3492,9 +3502,14 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "",
|
||||
(guint) statbuf.st_gid);
|
||||
#ifndef MAJOR_MINOR_NOT_FOUND
|
||||
+#ifdef __HAIKU__
|
||||
+ g_string_append_printf (fs, "%s" "rdev=%" B_PRIiDEV, fs->len > 0 ? "," : "",
|
||||
+ statbuf.st_rdev);
|
||||
+#else
|
||||
g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "",
|
||||
(gint) major (statbuf.st_rdev), (gint) minor (statbuf.st_rdev));
|
||||
#endif
|
||||
+#endif
|
||||
g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
|
||||
(guint64) statbuf.st_size);
|
||||
g_string_append_printf (fs, "%s" "atime=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
From f74032ca4ed380fb856ea8b9d9215b37d19fd6b7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 29 Jul 2017 12:19:31 +0200
|
||||
Subject: gunixmounts.c: on Haiku
|
||||
|
||||
* define get_mtab_minitor_file() and _g_get_unix_mounts()
|
||||
* like Inerix, _g_get_unix_mount_points() calls _g_get_unix_mounts().
|
||||
|
||||
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
|
||||
index f2db27e..abf4c3d 100644
|
||||
--- a/gio/gunixmounts.c
|
||||
+++ b/gio/gunixmounts.c
|
||||
@@ -920,7 +920,18 @@ _g_get_unix_mounts (void)
|
||||
|
||||
return return_list;
|
||||
}
|
||||
+#elif defined(__HAIKU__)
|
||||
+static char *
|
||||
+get_mtab_monitor_file (void)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
|
||||
+static GList *
|
||||
+_g_get_unix_mounts (void)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
/* Common code {{{2 */
|
||||
#else
|
||||
#error No _g_get_unix_mounts() implementation for system
|
||||
@@ -1436,8 +1447,8 @@ _g_get_unix_mount_points (void)
|
||||
|
||||
return g_list_reverse (return_list);
|
||||
}
|
||||
-/* Interix {{{2 */
|
||||
-#elif defined(__INTERIX)
|
||||
+/* Interix, Haiku {{{2 */
|
||||
+#elif defined(__INTERIX) || defined(__HAIKU__)
|
||||
static GList *
|
||||
_g_get_unix_mount_points (void)
|
||||
{
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
From 08798a44def0f879a9baac4212635e2e3c272d4b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 29 Jul 2017 12:32:14 +0200
|
||||
Subject: glib/gutils.c: on Haiku define load_user_special_dirs()
|
||||
|
||||
use find_directory() from SupportDefs.h
|
||||
|
||||
diff --git a/glib/gutils.c b/glib/gutils.c
|
||||
index 5813b22..5b294a6 100644
|
||||
--- a/glib/gutils.c
|
||||
+++ b/glib/gutils.c
|
||||
@@ -70,6 +70,10 @@
|
||||
#include "gwin32.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <FindDirectory.h>
|
||||
+#include <fs_info.h>
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* SECTION:misc_utils
|
||||
@@ -1451,6 +1455,35 @@ load_user_special_dirs (void)
|
||||
g_user_special_dirs[G_USER_DIRECTORY_VIDEOS] = find_folder (kMovieDocumentsFolderType);
|
||||
}
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+static void
|
||||
+load_user_special_dirs (void)
|
||||
+{
|
||||
+ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+
|
||||
+ dev_t volume = dev_for_path("/boot");
|
||||
+ if (find_directory(B_DESKTOP_DIRECTORY, volume, false, path, sizeof(path))
|
||||
+ == B_OK) {
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DESKTOP] = g_strdup(path);
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DOWNLOAD] = g_strdup(path);
|
||||
+ } else {
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DOCUMENTS] = NULL;
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DESKTOP] = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (find_directory(B_USER_DIRECTORY, volume, false, path, sizeof(path))
|
||||
+ == B_OK) {
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DOCUMENTS] = g_strdup(path);
|
||||
+ } else
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_DOWNLOAD] = NULL;
|
||||
+
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_MUSIC] = NULL;
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_PICTURES] = NULL;
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_PUBLIC_SHARE] = NULL;
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_TEMPLATES] = NULL;
|
||||
+ g_user_special_dirs[G_USER_DIRECTORY_VIDEOS] = NULL;
|
||||
+}
|
||||
+
|
||||
#elif defined(G_OS_WIN32)
|
||||
|
||||
static void
|
||||
--
|
||||
2.16.4
|
||||
|
||||
|
||||
From ace3f32944f4b09de46d290fac3bbc0a3484406a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 20 Sep 2017 18:09:43 +0200
|
||||
Subject: configure.ac: define G_OS_HAIKU
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index dc3297c..387286a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3348,6 +3348,10 @@ g_pid_format="\"$glib_pid_format\""
|
||||
g_pollfd_format="\"$glib_pollfd_format\""
|
||||
|
||||
case $host in
|
||||
+ *-*-haiku*)
|
||||
+ glib_os="#define G_OS_UNIX
|
||||
+#define G_OS_HAIKU"
|
||||
+ ;;
|
||||
*-*-cygwin*)
|
||||
glib_os="#define G_OS_UNIX
|
||||
#define G_PLATFORM_WIN32
|
||||
--
|
||||
2.16.4
|
||||
|
||||
Reference in New Issue
Block a user