From 031fd1f7f87e97962beab38febc7f2a9e4845501 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 3 May 2014 12:24:38 +0200 Subject: php-pecl-geoip: upstream patch for old auto* version (rhel <= 6) --- geoip-build.patch | 33 +++++++++++++++++++++++++++++++++ php-pecl-geoip.spec | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 geoip-build.patch diff --git a/geoip-build.patch b/geoip-build.patch new file mode 100644 index 0000000..3179499 --- /dev/null +++ b/geoip-build.patch @@ -0,0 +1,33 @@ +Index: config.m4 +=================================================================== +--- config.m4 (révision 333463) ++++ config.m4 (copie de travail) +@@ -43,7 +43,7 @@ + + PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, + [ +- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $GEOIP_DIR/lib, GEOIP_SHARED_LIBADD) ++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $GEOIP_DIR/$PHP_LIBDIR, GEOIP_SHARED_LIBADD) + AC_DEFINE(HAVE_GEOIPLIB,1,[ ]) + ],[ + AC_MSG_ERROR([wrong geoip lib version or lib not found]) +@@ -95,8 +95,7 @@ + AC_CHECK_DECL(GEOIP_NETSPEED_EDITION_REV1, + [ + MIN_GEOIP_VERSION=1004008 +- ],[ +- ],[ ++ ],[],[ + #include + ]) + +@@ -104,8 +103,7 @@ + AC_CHECK_DECL(GEOIP_ACCURACYRADIUS_EDITION, + [ + MIN_GEOIP_VERSION=1005000 +- ],[ +- ],[ ++ ],[],[ + #include + ]) + diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec index 6d3acf7..b8b2068 100644 --- a/php-pecl-geoip.spec +++ b/php-pecl-geoip.spec @@ -21,6 +21,9 @@ License: PHP URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# http://svn.php.net/viewvc?view=revision&revision=333464 +Patch0: geoip-build.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: GeoIP-devel BuildRequires: %{?scl_prefix}php-devel @@ -71,6 +74,7 @@ database mv %{pecl_name}-%{version} NTS cd NTS +%patch0 -p0 -b .svn extver=$(sed -n '/#define PHP_GEOIP_VERSION/{s/.* "//;s/".*$//;p}' php_geoip.h) if test "x${extver}" != "x%{version}"; then @@ -180,6 +184,7 @@ fi %changelog * Sat May 03 2014 Remi Collet - 1.1.0-1 - Update to 1.1.0 (beta) +- upstream patch for old auto* version (rhel <= 6) * Wed Apr 9 2014 Remi Collet - 1.0.8-8 - add numerical prefix to extension configuration file -- cgit