diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-01-22 09:42:31 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-01-22 09:42:31 +0100 |
commit | 0335e5a22639cad17cee8b8001a4806e429a3b9c (patch) | |
tree | 34437001299df2cb7fbd911f71028d7c9785a6f8 /ssdeep.patch |
php-pecl-ssdeep: 1.0.3 new package
Diffstat (limited to 'ssdeep.patch')
-rw-r--r-- | ssdeep.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/ssdeep.patch b/ssdeep.patch new file mode 100644 index 0000000..ed37070 --- /dev/null +++ b/ssdeep.patch @@ -0,0 +1,84 @@ +From 8c82ad02f89aa46ff772e676fda83d31e58fc8e8 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Wed, 22 Jan 2014 09:06:11 +0100 +Subject: [PATCH] Improves libfuzzy detection - honour --with-libdir option + +Allow to use --with-ssdeep=/usr, and find: +- lib in /usr/lib64 +- inc in /usr/include +--- + ax_libssdeep.m4 | 37 ++++++++++++++++++------------------- + 1 file changed, 18 insertions(+), 19 deletions(-) + +diff --git a/ax_libssdeep.m4 b/ax_libssdeep.m4 +index 93561f9..d948f99 100644 +--- a/ax_libssdeep.m4 ++++ b/ax_libssdeep.m4 +@@ -28,6 +28,7 @@ AC_DEFUN([AX_SSDEEP], [ + + SSDEEP_LIB_NAME="fuzzy" + SSDEEP_LIB_FILENAME="lib$SSDEEP_LIB_NAME.$LIB_EXTENSION" ++ SSDEEP_LIBDIR=${PHP_LIBDIR-lib} + + if test -z "$withssdeep" -o "$withssdeep" = "yes"; then + for i in /usr/lib /usr/local/lib; do +@@ -40,16 +41,16 @@ AC_DEFUN([AX_SSDEEP], [ + fi + elif test "$withssdeep" = "no"; then + AC_MSG_ERROR(["Cannot build whilst ssdeep is disabled."]) ++ elif test -f "$withssdeep/$SSDEEP_LIB_FILENAME"; then ++ SSDEEP_LIB_DIR="$withssdeep" ++ elif test -f "$withssdeep/$SSDEEP_LIBDIR/$SSDEEP_LIB_FILENAME"; then ++ SSDEEP_LIB_DIR="$withssdeep/$SSDEEP_LIBDIR" ++ elif test -f "$withssdeep/$SSDEEP_LIB_FILENAME"; then ++ SSDEEP_LIB_DIR="$withssdeep" ++ elif test -f "$withssdeep/.libs/$SSDEEP_LIB_FILENAME"; then ++ SSDEEP_LIB_DIR="$withssdeep/.libs/" + else +- if test -f "$withssdeep/$SSDEEP_LIB_FILENAME"; then +- SSDEEP_LIB_DIR="$withssdeep" +- else +- if test -f "$withssdeep/.libs/$SSDEEP_LIB_FILENAME"; then +- SSDEEP_LIB_DIR="$withssdeep/.libs/" +- else +- AC_MSG_ERROR(["Could not find ssdeep library '$withssdeep/.libs/$SSDEEP_LIB_FILENAME'. Try specifying the path to the ssdeep build directory."]) +- fi +- fi ++ AC_MSG_ERROR(["Could not find ssdeep library '$withssdeep/.libs/$SSDEEP_LIB_FILENAME'. Try specifying the path to the ssdeep build directory."]) + fi + + SSDEEP_LIBDIR="-L$SSDEEP_LIB_DIR" +@@ -65,22 +66,20 @@ AC_DEFUN([AX_SSDEEP], [ + if test "$SSDEEP_INCLUDEDIR" = ""; then + AC_MSG_ERROR(["Could not find ssdeep '$SSDEEP_LIB_NAME.h' header file. Try specifying the path to the ssdeep build directory."]) + fi ++ elif test -f "$withssdeep/../$SSDEEP_LIB_NAME.h"; then ++ SSDEEP_INCLUDEDIR="$withssdeep/../" ++ elif test -f "$withssdeep/include/$SSDEEP_LIB_NAME.h"; then ++ SSDEEP_INCLUDEDIR="$withssdeep/include/" ++ elif test -f "$withssdeep/$SSDEEP_LIB_NAME.h"; then ++ SSDEEP_INCLUDEDIR="$withssdeep" + else +- if test -f "$withssdeep/../$SSDEEP_LIB_NAME.h"; then +- SSDEEP_INCLUDEDIR="$withssdeep/../" +- else +- if test -f "$withssdeep/$SSDEEP_LIB_NAME.h"; then +- SSDEEP_INCLUDEDIR="$withssdeep" +- else +- AC_MSG_ERROR(["Could not find ssdeep '$SSDEEP_LIB_NAME.h' header file. Try specifying the path to the ssdeep build directory."]) +- fi +- fi ++ AC_MSG_ERROR(["Could not find ssdeep '$SSDEEP_LIB_NAME.h' header file. Try specifying the path to the ssdeep build directory."]) + fi + + SSDEEP_INCLUDEDIR_NO_FLAG="$SSDEEP_INCLUDEDIR" + SSDEEP_INCLUDEDIR="-I$SSDEEP_INCLUDEDIR" + +- AC_MSG_RESULT([$SSDEEP_LIB_DIR]) ++ AC_MSG_RESULT([$SSDEEP_LIB_DIR, $SSDEEP_INCLUDEDIR_NO_FLAG]) + + AC_DEFINE([SSDEEP_ENABLED], [1], [Enables ssdeep]) + +-- +1.8.4.3 + |