* refresh patches
  * glib 2.30 adds a dependency on libffi; add host build to libffi Makefile
  * fix gettext dependency in HOST_BUILD_DEPENDS. add a note that host
    build deps do not respect BUILD_NLS. (Aside: I believe these
    dependencies aren't truly sufficient; gettext has to be installed on
    the host for glib to build. This is likely worth fixing, but I believe
    was an issue before this change.)

Signed-off-by: Andy Leiserson <[email protected]>
---
  libs/glib2/Makefile                                |   20 +++++++-------
  libs/glib2/patches/001-automake-compat.patch       |    4 +--
  .../patches/002-missing-gthread-include.patch      |   10 -------
  libs/glib2/patches/010-move-iconv-to-libs.patch    |    7 ++---
  .../patches/020-no-docs-tests-translations.patch   |   28 ++++++--------------
  libs/glib2/patches/030-fix-libelf-detection.patch  |   23 ++++++++++++++++
  libs/glib2/patches/040-fix-configure.patch         |   23 ++++++++++++++++
  libs/libffi/Makefile                               |    2 ++
  8 files changed, 73 insertions(+), 44 deletions(-)
  delete mode 100644 libs/glib2/patches/002-missing-gthread-include.patch
  create mode 100644 libs/glib2/patches/030-fix-libelf-detection.patch
  create mode 100644 libs/glib2/patches/040-fix-configure.patch

diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile
index 750b197..435eb86 100644
--- a/libs/glib2/Makefile
+++ b/libs/glib2/Makefile
@@ -1,5 +1,5 @@
  #
-# Copyright (C) 2007-2011 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
  #
  # This is free software, licensed under the GNU General Public License v2.
  # See /LICENSE for more information.
@@ -8,17 +8,19 @@
  include $(TOPDIR)/rules.mk
  
  PKG_NAME:=glib2
-PKG_VERSION:=2.26.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.32.3
+PKG_RELEASE:=1
  
-PKG_SOURCE:=glib-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.26
-PKG_MD5SUM:=17535accceef55bcb17a74d73f9c2aef
+PKG_SOURCE_URL:=@GNOME/glib/2.32/
+PKG_SHA256SUM:=b65ceb462807e4a2f91c95e4293ce6bbefca308cb44a1407bcfdd9e40363ff4d
  
  PKG_FIXUP:=autoreconf
-PKG_BUILD_DEPENDS:=glib2/host libpthread zlib
-HOST_BUILD_DEPENDS:=gettext/host libiconv/host
+PKG_BUILD_DEPENDS:=glib2/host
+# Note that this uses the libintl/libiconv stubs for the host build regardless
+# of BUILD_NLS.
+HOST_BUILD_DEPENDS:=libintl/host libiconv/host libffi/host
  PKG_INSTALL:=1
  
  HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
@@ -30,7 +32,7 @@ include $(INCLUDE_DIR)/nls.mk
  define Package/glib2
    SECTION:=libs
    CATEGORY:=Libraries
-  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread
+  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi
    TITLE:=glib 2.0
    URL:=http://www.gtk.org/
  endef
diff --git a/libs/glib2/patches/001-automake-compat.patch 
b/libs/glib2/patches/001-automake-compat.patch
index aa6833a..840d973 100644
--- a/libs/glib2/patches/001-automake-compat.patch
+++ b/libs/glib2/patches/001-automake-compat.patch
@@ -1,10 +1,10 @@
  --- a/configure.ac
  +++ b/configure.ac
-@@ -2741,7 +2741,8 @@ dnl **************************
+@@ -2589,7 +2589,8 @@ dnl **************************
   dnl *** Checks for gtk-doc ***
   dnl **************************
   
--GTK_DOC_CHECK([1.15])
+-GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
  +AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
  +AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [false])
   
diff --git a/libs/glib2/patches/002-missing-gthread-include.patch 
b/libs/glib2/patches/002-missing-gthread-include.patch
deleted file mode 100644
index 8def409..0000000
--- a/libs/glib2/patches/002-missing-gthread-include.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/glib/gatomic.c
-+++ b/glib/gatomic.c
-@@ -881,6 +881,7 @@ g_atomic_pointer_compare_and_exchange (v
- #endif /* DEFINE_WITH_WIN32_INTERLOCKED */
- 
- #ifdef DEFINE_WITH_MUTEXES
-+#include "gthread.h"
- /* We have to use the slow, but safe locking method */
- static GMutex *g_atomic_mutex; 
- 
diff --git a/libs/glib2/patches/010-move-iconv-to-libs.patch 
b/libs/glib2/patches/010-move-iconv-to-libs.patch
index 89b3fea..2b44b73 100644
--- a/libs/glib2/patches/010-move-iconv-to-libs.patch
+++ b/libs/glib2/patches/010-move-iconv-to-libs.patch
@@ -1,10 +1,11 @@
  --- a/glib-2.0.pc.in
  +++ b/glib-2.0.pc.in
-@@ -10,6 +10,5 @@ glib_mkenums=glib-mkenums
- Name: GLib
+@@ -11,6 +11,6 @@ Name: GLib
   Description: C Utility Library
   Version: @VERSION@
+ Requires.private: @PCRE_REQUIRES@
  -Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
--Libs.private: @ICONV_LIBS@
+-Libs.private: @G_THREAD_LIBS@ @G_LIBS_EXTRA@ @PCRE_LIBS@ @INTLLIBS@ 
@ICONV_LIBS@
  +Libs: -L${libdir} -lglib-2.0 @INTLLIBS@ @ICONV_LIBS@
++Libs.private: @G_THREAD_LIBS@ @G_LIBS_EXTRA@ @PCRE_LIBS@
   Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include 
@GLIB_EXTRA_CFLAGS@
diff --git a/libs/glib2/patches/020-no-docs-tests-translations.patch 
b/libs/glib2/patches/020-no-docs-tests-translations.patch
index 0460640..c52e9e7 100644
--- a/libs/glib2/patches/020-no-docs-tests-translations.patch
+++ b/libs/glib2/patches/020-no-docs-tests-translations.patch
@@ -1,9 +1,9 @@
  --- a/configure.ac
  +++ b/configure.ac
-@@ -3737,18 +3737,6 @@ gio/fen/Makefile
- gio/fam/Makefile
+@@ -3571,19 +3571,6 @@ gio/fam/Makefile
   gio/win32/Makefile
   gio/tests/Makefile
+ gio/tests/gdbus-object-manager-example/Makefile
  -po/Makefile.in
  -docs/Makefile
  -docs/reference/Makefile
@@ -12,6 +12,7 @@
  -docs/reference/gobject/Makefile
  -docs/reference/gobject/version.xml
  -docs/reference/gio/Makefile
+-docs/reference/gio/gdbus-object-manager-example/Makefile
  -docs/reference/gio/version.xml
  -tests/Makefile
  -tests/gobject/Makefile
@@ -21,7 +22,7 @@
   
  --- a/gio/Makefile.am
  +++ b/gio/Makefile.am
-@@ -264,8 +264,6 @@ giowin32include_HEADERS = \
+@@ -323,8 +323,6 @@ giowin32include_HEADERS = \
   
   endif
   
@@ -32,8 +33,8 @@
        gasynchelper.c          \
  --- a/glib/Makefile.am
  +++ b/glib/Makefile.am
-@@ -48,9 +48,9 @@ else
- gatomic_c = gatomic.c
+@@ -35,9 +35,9 @@ else
+ MAYBE_PCRE = pcre 
   endif
   
  -SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
@@ -53,24 +54,11 @@
  -SUBDIRS = . tests
  +SUBDIRS = .
   
+ BUILT_SOURCES=
   CLEANFILES=
- 
---- a/gthread/Makefile.am
-+++ b/gthread/Makefile.am
-@@ -1,8 +1,8 @@
- ## Process this file with automake to produce Makefile.in
- include $(top_srcdir)/Makefile.decl
- 
--SUBDIRS = . tests
--DIST_SUBDIRS = tests
-+SUBDIRS = .
-+DIST_SUBDIRS = 
- 
- AM_CPPFLAGS =                                 \
-       $(glib_INCLUDES)                \
  --- a/Makefile.am
  +++ b/Makefile.am
-@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
+@@ -6,7 +6,7 @@ include $(top_srcdir)/Makefile.decl
   
   ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
   
diff --git a/libs/glib2/patches/030-fix-libelf-detection.patch 
b/libs/glib2/patches/030-fix-libelf-detection.patch
new file mode 100644
index 0000000..ef7bb13
--- /dev/null
+++ b/libs/glib2/patches/030-fix-libelf-detection.patch
@@ -0,0 +1,23 @@
+As of r32559, the OpenWrt build installs the libelf library and header, but
+doesn't install the pkgconfig file. This patch fixes the glib autoconf test to
+properly detect this state as a broken libelf install. Older OpenWrt glib
+builds did not use libelf.
+--- a/configure.ac
++++ b/configure.ac
+@@ -1820,9 +1820,13 @@ PKG_CHECK_MODULES([LIBELF], [libelf], [h
+ 
+ if test $have_libelf = maybe; then
+   glib_save_LIBS=$LIBS
+-  AC_CHECK_LIB([elf], [elf_begin], , [have_libelf=no])
+-  AC_CHECK_LIB([elf], [elf_getshdrstrndx], , [have_libelf=no])
+-  AC_CHECK_LIB([elf], [elf_getshdrnum], , [have_libelf=no])
++  dnl Setting have_elf*=yes when these tests succeed prevents autoconf from
++  dnl taking the default action of setting HAVE_LIBELF (which, if set, makes
++  dnl the build proceed assuming libelf is available even if some of these
++  dnl tests fail.
++  AC_CHECK_LIB([elf], [elf_begin], [have_elf_begin=yes], [have_libelf=no])
++  AC_CHECK_LIB([elf], [elf_getshdrstrndx], [have_elf_getshdrstrndx=yes], 
[have_libelf=no])
++  AC_CHECK_LIB([elf], [elf_getshdrnum], [have_elf_getshdrnum=yes], 
[have_libelf=no])
+   AC_CHECK_HEADER([libelf.h], , [have_libelf=no])
+   LIBS=$glib_save_LIBS
+ 
diff --git a/libs/glib2/patches/040-fix-configure.patch 
b/libs/glib2/patches/040-fix-configure.patch
new file mode 100644
index 0000000..addacb1
--- /dev/null
+++ b/libs/glib2/patches/040-fix-configure.patch
@@ -0,0 +1,23 @@
+Change conditional to use AS_IF, so important prereqs of AC_CHECK_HEADER are
+executed regardless of the conditional result. See
+http://lists.gnu.org/archive/html/bug-autoconf/2012-04/msg00029.html
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -457,14 +457,14 @@ dnl
+ dnl zlib support
+ dnl
+ PKG_CHECK_MODULES([ZLIB], [zlib], [found_zlib=yes], [found_zlib=no])
+-if test "x$found_zlib" = "xno" ; then
++AS_IF([test "x$found_zlib" = "xno"], [
+   AC_CHECK_LIB(z, inflate, [AC_CHECK_HEADER(zlib.h, found_zlib=yes)])
+   if test "x$found_zlib" = "xno" ; then
+     AC_MSG_ERROR([*** Working zlib library and headers not found ***])
+   fi
+   ZLIB_LIBS='-lz'
+   AC_SUBST(ZLIB_LIBS)
+-fi
++])
+ 
+ PKG_CHECK_MODULES(LIBFFI, [libffi >= 3.0.0])
+ AC_SUBST(LIBFFI_CFLAGS)
diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile
index e6bd7a6..e0b04ca 100644
--- a/libs/libffi/Makefile
+++ b/libs/libffi/Makefile
@@ -18,6 +18,7 @@ PKG_MD5SUM:=79390673f5d07a8fb342bc09b5055b6f
  PKG_FIXUP:=autoreconf
  PKG_INSTALL:=1
  
+include $(INCLUDE_DIR)/host-build.mk
  include $(INCLUDE_DIR)/package.mk
  
  define Package/libffi
@@ -71,4 +72,5 @@ define Package/libffi/install
                $(1)/usr/lib/
  endef
  
+$(eval $(call HostBuild))
  $(eval $(call BuildPackage,libffi))
-- 
1.7.10.4

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to