summaryrefslogtreecommitdiff
path: root/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch')
-rw-r--r--net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch b/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch
new file mode 100644
index 000000000000..522610f9fb57
--- /dev/null
+++ b/net-irc/epic5/files/epic5-1.1.2-libarchive-automagic.patch
@@ -0,0 +1,53 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Prevent libarchive check from being automagic.
+
+--- a/configure.in
++++ b/configure.in
+@@ -231,22 +231,28 @@
+ dnl XXX I don't understand why this is even necessary.
+-have_libarchive=""
+-orig_LIBS="$LIBS"
+-AC_CHECK_LIB(archive, archive_read_new, [LIBS="$LIBS -larchive"])
+-AC_MSG_CHECKING(whether libarchive works the way I expect)
+-AC_TRY_LINK([#include <archive.h>], [
+- struct archive *x;
+- const char *s = "bogus.zip";
+- x = archive_read_new();
+- archive_read_support_format_all(x);
+- archive_read_open_file(x, s, 10240);
+-], have_libarchive="yes")
+-if test "x$have_libarchive" = "x"; then
+- LIBS="$orig_LIBS"
+- AC_MSG_RESULT(no)
+-else
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_LIBARCHIVE)
+-fi
++AC_ARG_WITH([libarchive], [AS_HELP_STRING([--without-libarchive], [Disable libarchive support.])],
++ [], [with_libarchive=maybe])
++AS_IF([test "x$with_libarchive" != "xno"],
++ [
++ have_libarchive=""
++ orig_LIBS="$LIBS"
++ AC_CHECK_LIB(archive, archive_read_new, [LIBS="$LIBS -larchive"])
++ AC_MSG_CHECKING(whether libarchive works the way I expect)
++ AC_TRY_LINK([#include <archive.h>], [
++ struct archive *x;
++ const char *s = "bogus.zip";
++ x = archive_read_new();
++ archive_read_support_format_all(x);
++ archive_read_open_file(x, s, 10240);
++ ], have_libarchive="yes")
++ if test "x$have_libarchive" = "x"; then
++ LIBS="$orig_LIBS"
++ AC_MSG_RESULT(no)
++ AS_IF([test "x$with_libarchive" = "xyes"],
++ [AC_MSG_ERROR([--with-libarchive was specified but libarchive could not be found. Please do not specify --with-libarchive or install libarchive.])])
++ else
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_LIBARCHIVE)
++ fi])
+
+ dnl -----
+ AC_ARG_WITH(ssl,
+