summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-08-13 09:58:56 +0200
committerJeroen Roovers <jer@gentoo.org>2020-08-13 10:06:58 +0200
commit04014b1e2768aa4d0747c44b7a0c0b473f5a4e04 (patch)
tree50592c88f610a88187bd83cde30b9598f7837ded /app-pda/libplist
parentdev-perl/Email-MIME: Bump to version 1.949.0 (diff)
downloadgentoo-04014b1e2768aa4d0747c44b7a0c0b473f5a4e04.tar.gz
gentoo-04014b1e2768aa4d0747c44b7a0c0b473f5a4e04.tar.bz2
gentoo-04014b1e2768aa4d0747c44b7a0c0b473f5a4e04.zip
app-pda/libplist: Simplify configure test for fmin
https://github.com/libimobiledevice/libplist/pull/168 Package-Manager: Portage-3.0.2, Repoman-2.3.23 Bug: https://bugs.gentoo.org/736866 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'app-pda/libplist')
-rw-r--r--app-pda/libplist/files/libplist-2.2.0-fmin.patch34
-rw-r--r--app-pda/libplist/files/libplist-2.2.0-pkgconfig-lib.patch5
-rw-r--r--app-pda/libplist/libplist-2.2.0-r2.ebuild5
3 files changed, 40 insertions, 4 deletions
diff --git a/app-pda/libplist/files/libplist-2.2.0-fmin.patch b/app-pda/libplist/files/libplist-2.2.0-fmin.patch
new file mode 100644
index 000000000000..7b9bdc353268
--- /dev/null
+++ b/app-pda/libplist/files/libplist-2.2.0-fmin.patch
@@ -0,0 +1,34 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -79,19 +79,7 @@
+ esac
+ AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+
+-# Check if we need libm for fmin
+-CACHED_CFLAGS="$CFLAGS"
+-CFLAGS="-O0"
+-AC_CACHE_CHECK(if fmin is a builtin function, ac_cv_fmin_builtin,
+- AC_TRY_LINK([
+- #include <math.h>
+- #include <float.h>
+- ], [
+- double val = 3.1415f * 0.55555f;
+- double diff = fmin(val, DBL_MAX);
+- if (diff > 0) return 1;
+- ], ac_cv_fmin_builtin=yes, ac_cv_fmin_builtin=no))
+-CFLAGS="$CACHED_CFLAGS"
++AC_SEARCH_LIBS([fmin],[m])
+
+ # Check if struct tm has a tm_gmtoff member
+ AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
+@@ -153,10 +141,6 @@
+ AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS")
+ GLOBAL_LDFLAGS="$PTHREAD_LIBS"
+
+-if test "x$ac_cv_fmin_builtin" != "xyes"; then
+- GLOBAL_LDFLAGS+=" -lm"
+-fi
+-
+ AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],
+ [build debug message output code (default is no)]),
diff --git a/app-pda/libplist/files/libplist-2.2.0-pkgconfig-lib.patch b/app-pda/libplist/files/libplist-2.2.0-pkgconfig-lib.patch
index 30ef67798865..2a57d06074a3 100644
--- a/app-pda/libplist/files/libplist-2.2.0-pkgconfig-lib.patch
+++ b/app-pda/libplist/files/libplist-2.2.0-pkgconfig-lib.patch
@@ -1,6 +1,5 @@
-diff -Naur libplist/src/libplist-2.0.pc.in libplist-pcfile/src/libplist-2.0.pc.in
---- libplist/src/libplist-2.0.pc.in 2020-07-18 17:25:52.156222244 +0300
-+++ libplist-pcfile/src/libplist-2.0.pc.in 2020-07-18 17:26:32.752017958 +0300
+--- a/src/libplist-2.0.pc.in
++++ b/src/libplist-2.0.pc.in
@@ -6,5 +6,5 @@
Name: @PACKAGE_NAME@
Description: A library to handle Apple Property Lists whereas they are binary or XML
diff --git a/app-pda/libplist/libplist-2.2.0-r2.ebuild b/app-pda/libplist/libplist-2.2.0-r2.ebuild
index d7ac5a7b4a39..31d8621f1cee 100644
--- a/app-pda/libplist/libplist-2.2.0-r2.ebuild
+++ b/app-pda/libplist/libplist-2.2.0-r2.ebuild
@@ -26,7 +26,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DOCS=( AUTHORS NEWS README.md )
-PATCHES=( "${FILESDIR}"/libplist-2.2.0-pkgconfig-lib.patch )
+PATCHES=(
+ "${FILESDIR}"/libplist-2.2.0-fmin.patch
+ "${FILESDIR}"/libplist-2.2.0-pkgconfig-lib.patch
+)
BUILD_DIR="${S}_build"