[GraphicsMagick/el5] workaround el5 libltdl borkage

Rex Dieter rdieter at fedoraproject.org
Tue Oct 16 20:59:49 UTC 2012


commit 3ba621897cfd6214b52f8d4eb7e3a8824949d651
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Tue Oct 16 15:59:02 2012 -0500

    workaround el5 libltdl borkage

 GraphicsMagick-1.3.17-ltdl_convenience.patch |  110 ++++++++++++++++++++++++++
 GraphicsMagick.spec                          |    5 +-
 2 files changed, 114 insertions(+), 1 deletions(-)
---
diff --git a/GraphicsMagick-1.3.17-ltdl_convenience.patch b/GraphicsMagick-1.3.17-ltdl_convenience.patch
new file mode 100644
index 0000000..234ee7e
--- /dev/null
+++ b/GraphicsMagick-1.3.17-ltdl_convenience.patch
@@ -0,0 +1,110 @@
+
+# HG changeset patch
+# User Bob Friesenhahn <bfriesen at GraphicsMagick.org>
+# Date 1349919868 18000
+# Node ID 714a6ec19d599d9701d3892c8068575d5f3ee8ef
+# Parent  6ad656a90076e878fcc3253f9b80f441b28afcfd
+Request installable libltdl rather than convenience.
+
+--- a/configure	Wed Oct 10 02:35:05 2012 +0000
++++ b/configure	Wed Oct 10 20:44:28 2012 -0500
+@@ -19532,14 +19532,78 @@
+ 
+ case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+   ,yes,no,no,)
+-	case $enable_ltdl_convenience in
+-  no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;;
+-  "") enable_ltdl_convenience=yes
+-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+-esac
+-LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+-LTDLDEPS=$LIBLTDL
+-LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
++	if test -f $prefix/lib/libltdl.la; then
++  lt_save_LDFLAGS="$LDFLAGS"
++  LDFLAGS="-L$prefix/lib $LDFLAGS"
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
++$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
++if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lltdl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char lt_dlinit ();
++int
++main ()
++{
++return lt_dlinit ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ltdl_lt_dlinit=yes
++else
++  ac_cv_lib_ltdl_lt_dlinit=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
++$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
++if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
++  lt_lib_ltdl=yes
++fi
++
++  LDFLAGS="$lt_save_LDFLAGS"
++  if test x"${lt_lib_ltdl-no}" = xyes; then
++    if test x"$enable_ltdl_install" != xyes; then
++      # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not overwriting libltdl at $prefix, force with \`--enable-ltdl-install'" >&5
++$as_echo "$as_me: WARNING: not overwriting libltdl at $prefix, force with \`--enable-ltdl-install'" >&2;}
++      enable_ltdl_install=no
++    fi
++  elif test x"$enable_ltdl_install" = xno; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libltdl not installed, but installation disabled" >&5
++$as_echo "$as_me: WARNING: libltdl not installed, but installation disabled" >&2;}
++  fi
++fi
++
++# If configure.ac declared an installable ltdl, and the user didn't override
++# with --disable-ltdl-install, we will install the shipped libltdl.
++case $enable_ltdl_install in
++  no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
++      LIBLTDL="-lltdl"
++      LTDLDEPS=
++      LTDLINCL=
++      ;;
++  *)  enable_ltdl_install=yes
++      ac_configure_args="$ac_configure_args --enable-ltdl-install"
++      LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
++      LTDLDEPS=$LIBLTDL
++      LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
++      ;;
++esac
+ 
+ 
+ 
+diff -r 6ad656a90076 -r 714a6ec19d59 configure.ac
+--- a/configure.ac	Wed Oct 10 02:35:05 2012 +0000
++++ b/configure.ac	Wed Oct 10 20:44:28 2012 -0500
+@@ -413,7 +413,7 @@
+ 
+ # Configure libltdl
+ LT_CONFIG_LTDL_DIR([ltdl])
+-LTDL_INIT([convenience nonrecursive])
++LTDL_INIT([nonrecursive installable])
+ # Substitute INCLTDL and LIBLTDL in the Makefiles
+ #AC_SUBST(INCLTDL)
+ #AC_SUBST(LIBLTDL)
+
diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec
index a2537c8..b6722c6 100644
--- a/GraphicsMagick.spec
+++ b/GraphicsMagick.spec
@@ -32,6 +32,7 @@ Patch1: GraphicsMagick-1.3.16-multilib.patch
 Patch50: GraphicsMagick-1.3.14-perl_linkage.patch
 
 ## upstream patches
+Patch100: GraphicsMagick-1.3.17-ltdl_convenience.patch 
 
 BuildRequires: bzip2-devel
 BuildRequires: freetype-devel
@@ -123,6 +124,9 @@ however.
 
 %patch1 -p1 -b .multilib
 %patch50 -p1 -b .perl_linkage
+%if 0%{?el5} 
+%patch100 -p1 -R -b .ltdl_convenience
+%endif
 
 iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8
 mv -f ChangeLog.utf8 ChangeLog
@@ -134,7 +138,6 @@ sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
 
 sed -i -e "s|BrowseDelegateDefault=.*|BrowseDelegateDefault=\'xdg-open\'|" configure
 
-
 %build
 %configure --enable-shared --disable-static \
            --without-included-ltdl \


More information about the scm-commits mailing list