chiark / gitweb /
glib: Avoid defining invalid RTLD_* constants
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 17 Dec 2015 23:33:24 +0000 (18:33 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 17 Dec 2015 23:33:52 +0000 (18:33 -0500)
packages/glib/build.sh
packages/glib/gmodule-gmodule-dl.c.patch [new file with mode: 0644]

index 58295654a6fc85ac0964a220131c13adbf49d3cf..68c7f427ff50c23aa85d0b62a82be29cd29abbbe 100755 (executable)
@@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://developer.gnome.org/glib/
 TERMUX_PKG_DESCRIPTION="Library providing core building blocks for libraries and applications written in C"
 _TERMUX_GLIB_MAJOR_VERSION=2.46
 TERMUX_PKG_VERSION=${_TERMUX_GLIB_MAJOR_VERSION}.2
+TERMUX_PKG_BUILD_REVISION=1
 TERMUX_PKG_SRCURL=http://ftp.gnome.org/pub/gnome/sources/glib/${_TERMUX_GLIB_MAJOR_VERSION}/glib-${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_DEPENDS="libffi, pcre"
 
diff --git a/packages/glib/gmodule-gmodule-dl.c.patch b/packages/glib/gmodule-gmodule-dl.c.patch
new file mode 100644 (file)
index 0000000..1856db4
--- /dev/null
@@ -0,0 +1,21 @@
+diff -u -r ../glib-2.46.2/gmodule/gmodule-dl.c ./gmodule/gmodule-dl.c
+--- ../glib-2.46.2/gmodule/gmodule-dl.c        2014-10-04 20:08:22.000000000 -0400
++++ ./gmodule/gmodule-dl.c     2015-12-17 18:28:32.091292946 -0500
+@@ -57,6 +57,9 @@
+  * RTLD_GLOBAL - the external symbols defined in the library will be made
+  *             available to subsequently loaded libraries.
+  */
++#ifndef __ANDROID__
++/* On Android the RTLD_* constants are enum values, so they
++   cannot be checked with ifdef, and values are different. */
+ #ifndef       RTLD_LAZY
+ #define       RTLD_LAZY       1
+ #endif        /* RTLD_LAZY */
+@@ -70,6 +73,7 @@
+ #ifndef       RTLD_GLOBAL
+ #define       RTLD_GLOBAL     0
+ #endif        /* RTLD_GLOBAL */
++#endif
+ /* --- functions --- */