mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
glib2: added recipe for version 2.46.2.
This commit is contained in:
153
dev-libs/glib/glib2-2.46.2.recipe
Normal file
153
dev-libs/glib/glib2-2.46.2.recipe
Normal file
@@ -0,0 +1,153 @@
|
||||
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="http://www.gtk.org/"
|
||||
SOURCE_URI="http://ftp.gnome.org/pub/gnome/sources/glib/2.46/glib-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db"
|
||||
LICENSE="GNU LGPL v2"
|
||||
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"
|
||||
|
||||
REVISION="1"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
glib2$secondaryArchSuffix = $portVersion compat >= 2
|
||||
cmd:gapplication$secondaryArchSuffix
|
||||
cmd:gdbus$secondaryArchSuffix
|
||||
cmd:gdbus_codegen$secondaryArchSuffix
|
||||
cmd:gio_querymodules$secondaryArchSuffix
|
||||
cmd:glib_compile_resources$secondaryArchSuffix
|
||||
cmd:glib_compile_schemas$secondaryArchSuffix
|
||||
cmd:glib_genmarshal$secondaryArchSuffix
|
||||
cmd:glib_gettextize$secondaryArchSuffix
|
||||
cmd:glib_mkenums$secondaryArchSuffix
|
||||
cmd:gobject_query$secondaryArchSuffix
|
||||
cmd:gresource$secondaryArchSuffix
|
||||
cmd:gsettings$secondaryArchSuffix
|
||||
cmd:gtester$secondaryArchSuffix
|
||||
cmd:gtester_report$secondaryArchSuffix
|
||||
lib:libgio_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
lib:libglib_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
lib:libgmodule_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
lib:libgobject_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
lib:libgthread_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
gettext$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libffi$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python
|
||||
"
|
||||
|
||||
PATCHES="glib2-$portVersion.patchset"
|
||||
|
||||
SOURCE_DIR="glib-$portVersion"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
runConfigure ./configure 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
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
|
||||
PROVIDES_devel="
|
||||
glib2${secondaryArchSuffix}_devel = $portVersion compat >= 0
|
||||
devel:libgio_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
devel:libglib_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
devel:libgmodule_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
devel:libgobject_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
devel:libgthread_2.0$secondaryArchSuffix = 0.4600.2 compat >= 0
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
glib2$secondaryArchSuffix == $portVersion base
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
211
dev-libs/glib/patches/glib2-2.46.2.patchset
Normal file
211
dev-libs/glib/patches/glib2-2.46.2.patchset
Normal file
@@ -0,0 +1,211 @@
|
||||
From 5aa9cb0c6bf9ce1deb8eca9eb171c5f66561f868 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 17 Jun 2014 19:57:08 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
based on patch from 2.38.1
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 51048f4..594e325 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -149,6 +149,10 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
case $host in
|
||||
+ *-*-haiku*)
|
||||
+ glib_os_haiku=yes
|
||||
+ LIBS="-lnetwork $LIBS"
|
||||
+ ;;
|
||||
*-*-linux*)
|
||||
glib_os_linux=yes
|
||||
;;
|
||||
@@ -193,6 +197,7 @@ AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
|
||||
AM_CONDITIONAL(OS_WIN32_X64, [test "$LIB_EXE_MACHINE_FLAG" = "X64"])
|
||||
AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
|
||||
AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
|
||||
+AM_CONDITIONAL(OS_HAIKU, [test "$glib_os_haiku" = "yes"])
|
||||
AM_CONDITIONAL(OS_CARBON, [test "$glib_have_carbon" = "yes"])
|
||||
AM_CONDITIONAL(OS_COCOA, [test "$glib_have_cocoa" = "yes"])
|
||||
|
||||
@@ -1945,8 +1950,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
|
||||
@@ -2111,6 +2116,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)
|
||||
|
||||
diff --git a/gio/Makefile.am b/gio/Makefile.am
|
||||
index b7f91cc..80ee9ff 100644
|
||||
--- a/gio/Makefile.am
|
||||
+++ b/gio/Makefile.am
|
||||
@@ -726,7 +726,11 @@ gio_querymodules_LDADD = libgio-2.0.la \
|
||||
gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
|
||||
$(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
|
||||
|
||||
-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 \
|
||||
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
|
||||
index d9d8f37..c604606 100644
|
||||
--- a/gio/gdbusmessage.c
|
||||
+++ b/gio/gdbusmessage.c
|
||||
@@ -33,6 +33,9 @@
|
||||
#elif MAJOR_IN_SYSMACROS
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
+#ifdef __HAIKU__
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
|
||||
#include "gdbusutils.h"
|
||||
#include "gdbusmessage.h"
|
||||
@@ -3474,8 +3477,13 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
fs = g_string_new (NULL);
|
||||
if (fstat (fds[n], &statbuf) == 0)
|
||||
{
|
||||
+#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 ? "," : "",
|
||||
major (statbuf.st_dev), minor (statbuf.st_dev));
|
||||
+#endif
|
||||
g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "",
|
||||
statbuf.st_mode);
|
||||
g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
|
||||
@@ -3484,8 +3492,13 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
(guint) statbuf.st_uid);
|
||||
g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "",
|
||||
(guint) statbuf.st_gid);
|
||||
+#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 ? "," : "",
|
||||
major (statbuf.st_rdev), minor (statbuf.st_rdev));
|
||||
+#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 ? "," : "",
|
||||
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
|
||||
index 2e2ff5e..dddcadc 100644
|
||||
--- a/gio/gunixmounts.c
|
||||
+++ b/gio/gunixmounts.c
|
||||
@@ -712,7 +712,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
|
||||
@@ -1111,7 +1122,7 @@ _g_get_unix_mount_points (void)
|
||||
return g_list_reverse (return_list);
|
||||
}
|
||||
/* Interix {{{2 */
|
||||
-#elif defined(__INTERIX)
|
||||
+#elif defined(__INTERIX) || defined(__HAIKU__)
|
||||
static GList *
|
||||
_g_get_unix_mount_points (void)
|
||||
{
|
||||
diff --git a/glib/gutils.c b/glib/gutils.c
|
||||
index 360a4d5..4cbd53b 100644
|
||||
--- a/glib/gutils.c
|
||||
+++ b/glib/gutils.c
|
||||
@@ -74,6 +74,11 @@
|
||||
#include "gwin32.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <FindDirectory.h>
|
||||
+#include <fs_info.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
/**
|
||||
* SECTION:misc_utils
|
||||
@@ -366,7 +371,7 @@ g_find_program_in_path (const gchar *program)
|
||||
}
|
||||
|
||||
path = g_getenv ("PATH");
|
||||
-#if defined(G_OS_UNIX)
|
||||
+#ifdef G_OS_UNIX
|
||||
if (path == NULL)
|
||||
{
|
||||
/* There is no 'PATH' in the environment. The default
|
||||
@@ -1404,6 +1409,34 @@ 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.2.2
|
||||
|
||||
Reference in New Issue
Block a user