changeset 1709:b32558e52428

don't remove the "-no-undefined" flag, but provide clean bugfixes instead for packages exiv2 and xine-lib
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 27 Mar 2011 18:14:08 +0200
parents d3c23d0cf3f7
children d3bf5db5a40f
files src/exiv2-r2472.patch src/exiv2.mk src/xine-lib-2-fix-no-undefined.patch src/xine-lib.mk
diffstat 4 files changed, 83 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/exiv2-r2472.patch	Sun Mar 27 18:14:08 2011 +0200
@@ -0,0 +1,41 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+This patch has been taken from:
+http://dev.exiv2.org/issues/767
+
+Index: trunk/config/configure.ac
+===================================================================
+--- trunk/config/configure.ac	(revision 2471)
++++ trunk/config/configure.ac	(revision 2472)
+@@ -31,12 +31,6 @@
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_CANONICAL_HOST
+-# Add flag for DLL on Windows
+-case "$host_os" in
+-*mingw* | *cygwin*)
+-    LDFLAGS="$LDFLAGS -no-undefined"
+-    ;;
+-esac
+ 
+ # ---------------------------------------------------------------------------
+ # i18n support
+@@ -204,6 +198,17 @@
+ fi
+ AC_SUBST(EXV_LIB_STATIC)
+ 
++# Add flag for DLL on Windows
++#
++# This must happen after all other configure checks, because
++# the "-no-undefined" flag is only for libtool and may not be
++# passed to GCC by accident.
++case "$host_os" in
++*mingw* | *cygwin*)
++    LDFLAGS="$LDFLAGS -no-undefined"
++    ;;
++esac
++
+ # ---------------------------------------------------------------------------
+ # Create output files.
+ # ---------------------------------------------------------------------------
--- a/src/exiv2.mk	Sun Mar 27 15:53:15 2011 +0200
+++ b/src/exiv2.mk	Sun Mar 27 18:14:08 2011 +0200
@@ -20,9 +20,10 @@
 endef
 
 define $(PKG)_BUILD
+    # rebuild configure script as one of the patches modifies configure.ac
+    $(MAKE) -C '$(1)/config' -f config.make
     # wine confuses the cross-compiling detection, so set it explicitly
     $(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
-    $(SED) -i 's/ -no-undefined//;' '$(1)/configure'
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
         --disable-shared \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xine-lib-2-fix-no-undefined.patch	Sun Mar 27 18:14:08 2011 +0200
@@ -0,0 +1,38 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+This patch has been taken from:
+https://bugs.xine-project.org/show_bug.cgi?id=411
+
+diff --git a/configure.ac b/configure.ac
+index dc53a73..90f23a8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -281,7 +281,6 @@ case "$host_os" in
+       GOOM_LIBS="-liberty"
+       LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS"
+     fi
+-    LDFLAGS="-no-undefined $LDFLAGS"
+     ;;
+ esac
+ AC_SUBST(GOOM_LIBS)
+@@ -2877,6 +2876,19 @@ mv -f libtool.tmp libtool
+ chmod +x libtool
+ 
+ dnl ---------------------------------------------
++dnl Libtool flag for Windows:
++dnl
++dnl The "-no-undefined" flag must be added after all other
++dnl configure checks, because it is only for libtool and
++dnl must not be passed to GCC by accident.
++dnl ---------------------------------------------
++case "$host_os" in
++  mingw* | cygwin*)
++    LDFLAGS="-no-undefined $LDFLAGS"
++    ;;
++esac
++
++dnl ---------------------------------------------
+ dnl Some infos:
+ dnl ---------------------------------------------
+ 
--- a/src/xine-lib.mk	Sun Mar 27 15:53:15 2011 +0200
+++ b/src/xine-lib.mk	Sun Mar 27 18:14:08 2011 +0200
@@ -20,7 +20,8 @@
 endef
 
 define $(PKG)_BUILD
-    $(SED) -i 's/-no-undefined//;' '$(1)/configure'
+    # rebuild configure script as one of the patches modifies configure.ac
+    cd '$(1)' && ./autogen.sh
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
         --prefix='$(PREFIX)/$(TARGET)' \