[eog/f18] Explicitly link with libm
Kalev Lember
kalev at fedoraproject.org
Wed Sep 19 20:29:40 UTC 2012
commit 429491a5ca613ef2e910d63f1fd742d2bf14d82c
Author: Kalev Lember <kalevlember at gmail.com>
Date: Wed Sep 19 22:02:18 2012 +0200
Explicitly link with libm
eog-link-with-libm.patch | 216 ++++++++++++++++++++++++++++++++++++++++++++++
eog.spec | 3 +
2 files changed, 219 insertions(+), 0 deletions(-)
---
diff --git a/eog-link-with-libm.patch b/eog-link-with-libm.patch
new file mode 100644
index 0000000..36dd660
--- /dev/null
+++ b/eog-link-with-libm.patch
@@ -0,0 +1,216 @@
+diff -urN eog-3.5.92.orig/configure.ac eog-3.5.92/configure.ac
+--- eog-3.5.92.orig/configure.ac 2012-09-07 18:49:10.000000000 +0200
++++ eog-3.5.92/configure.ac 2012-09-19 22:10:55.323809810 +0200
+@@ -119,6 +119,13 @@
+ fi
+
+ # ***************
++# libm (required)
++# ***************
++
++AC_CHECK_LIBM
++AC_SUBST(LIBM)
++
++# ***************
+ # ZLIB (required)
+ # ***************
+
+diff -urN eog-3.5.92.orig/configure eog-3.5.92/configure
+--- eog-3.5.92.orig/configure 2012-09-19 22:10:38.305211643 +0200
++++ eog-3.5.92/configure 2012-09-19 22:11:01.244669958 +0200
+@@ -674,6 +674,7 @@
+ HAVE_EXIF_TRUE
+ EXIF_LIBS
+ EXIF_CFLAGS
++LIBM
+ HAVE_INTROSPECTION_FALSE
+ HAVE_INTROSPECTION_TRUE
+ INTROSPECTION_MAKEFILE
+@@ -14879,6 +14880,144 @@
+ fi
+
+ # ***************
++# libm (required)
++# ***************
++
++LIBM=
++case $host in
++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
++ # These system don't have libm, or don't need it
++ ;;
++*-ncr-sysv4.3*)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
++$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
++if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmw $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 _mwvalidcheckl ();
++int
++main ()
++{
++return _mwvalidcheckl ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_mw__mwvalidcheckl=yes
++else
++ ac_cv_lib_mw__mwvalidcheckl=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_mw__mwvalidcheckl" >&5
++$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
++if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
++ LIBM="-lmw"
++fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
++$as_echo_n "checking for cos in -lm... " >&6; }
++if ${ac_cv_lib_m_cos+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lm $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 cos ();
++int
++main ()
++{
++return cos ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_m_cos=yes
++else
++ ac_cv_lib_m_cos=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_m_cos" >&5
++$as_echo "$ac_cv_lib_m_cos" >&6; }
++if test "x$ac_cv_lib_m_cos" = xyes; then :
++ LIBM="$LIBM -lm"
++fi
++
++ ;;
++*)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
++$as_echo_n "checking for cos in -lm... " >&6; }
++if ${ac_cv_lib_m_cos+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lm $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 cos ();
++int
++main ()
++{
++return cos ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_m_cos=yes
++else
++ ac_cv_lib_m_cos=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_m_cos" >&5
++$as_echo "$ac_cv_lib_m_cos" >&6; }
++if test "x$ac_cv_lib_m_cos" = xyes; then :
++ LIBM="-lm"
++fi
++
++ ;;
++esac
++
++
++
++
++# ***************
+ # ZLIB (required)
+ # ***************
+
+diff -urN eog-3.5.92.orig/src/Makefile.am eog-3.5.92/src/Makefile.am
+--- eog-3.5.92.orig/src/Makefile.am 2012-08-12 16:50:31.000000000 +0200
++++ eog-3.5.92/src/Makefile.am 2012-09-19 22:10:55.323809810 +0200
+@@ -150,7 +150,8 @@
+ $(WARN_CFLAGS)
+
+ libeog_la_LIBADD = \
+- $(EOG_LIBS)
++ $(EOG_LIBS) \
++ $(LIBM)
+
+ if HAVE_LCMS
+ libeog_la_CFLAGS += \
+diff -urN eog-3.5.92.orig/src/Makefile.in eog-3.5.92/src/Makefile.in
+--- eog-3.5.92.orig/src/Makefile.in 2012-09-19 22:10:40.678155628 +0200
++++ eog-3.5.92/src/Makefile.in 2012-09-19 22:11:03.603614231 +0200
+@@ -92,7 +92,8 @@
+ LTLIBRARIES = $(noinst_LTLIBRARIES)
+ am__DEPENDENCIES_1 =
+ @HAVE_LCMS_TRUE at am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+-libeog_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
++libeog_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
++ $(am__DEPENDENCIES_2)
+ am__libeog_la_SOURCES_DIST = eog-application.c \
+ eog-application-activatable.c eog-clipboard-handler.c \
+ eog-close-confirmation-dialog.c eog-debug.c eog-dialog.c \
+@@ -339,6 +340,7 @@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
+ LIBJPEG = @LIBJPEG@
++LIBM = @LIBM@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+@@ -520,7 +522,7 @@
+ -DLIBDIR=\""$(libdir)"\"
+
+ libeog_la_CFLAGS = $(EOG_CFLAGS) $(WARN_CFLAGS) $(am__append_5)
+-libeog_la_LIBADD = $(EOG_LIBS) $(am__append_6)
++libeog_la_LIBADD = $(EOG_LIBS) $(LIBM) $(am__append_6)
+ libeog_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
+ eog_SOURCES = main.c
+ eog_CFLAGS = \
diff --git a/eog.spec b/eog.spec
index b564a1a..d7fc314 100644
--- a/eog.spec
+++ b/eog.spec
@@ -12,6 +12,8 @@ Release: 1%{?dist}
URL: http://projects.gnome.org/eog/
#VCS: git:git://git.gnome.org/eog
Source: http://download.gnome.org/sources/eog/3.5/%{name}-%{version}.tar.xz
+# https://bugzilla.gnome.org/show_bug.cgi?id=684401
+Patch0: eog-link-with-libm.patch
# The GFDL has an "or later version" clause embedded inside the license.
# There is no need to add the + here.
License: GPLv2+ and GFDL
@@ -65,6 +67,7 @@ functionality to eog.
%prep
%setup -q
+%patch0 -p1 -b .libm
%build
%configure --disable-scrollkeeper
More information about the scm-commits
mailing list