summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libmacaroons/files/libmacaroons-0.3.0-no-python.patch')
-rw-r--r--dev-libs/libmacaroons/files/libmacaroons-0.3.0-no-python.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/dev-libs/libmacaroons/files/libmacaroons-0.3.0-no-python.patch b/dev-libs/libmacaroons/files/libmacaroons-0.3.0-no-python.patch
new file mode 100644
index 000000000000..89293b707bd0
--- /dev/null
+++ b/dev-libs/libmacaroons/files/libmacaroons-0.3.0-no-python.patch
@@ -0,0 +1,91 @@
+
+ Disable Python by force (works only with Python 2.x).
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -30,13 +30,8 @@ AM_CPPFLAGS = $(SODIUM_CFLAGS)
+ AM_CFLAGS = -fvisibility=hidden $(SODIUM_CFLAGS) $(WANAL_CFLAGS)
+ AM_CXXFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden $(SODIUM_CFLAGS) $(WANAL_CXXFLAGS)
+
+-AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-bindings
+ TESTS_ENVIRONMENT = . $(abs_top_srcdir)/test/env.sh "${abs_top_srcdir}" "${abs_top_builddir}" "${VERSION}";
+
+-pyx_verbose = $(pyx_verbose_$(V))
+-pyx_verbose_ = $(pyx_verbose_$(AM_DEFAULT_VERBOSITY))
+-pyx_verbose_0 = @echo " PYX " $@;
+-
+ EXTRA_DIST =
+ EXTRA_DIST += README
+ EXTRA_DIST += LICENSE
+@@ -57,39 +52,3 @@ libmacaroons_la_LDFLAGS = -version-info 0:1:0
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libmacaroons.pc
+-
+-##################################### Tests ####################################
+-
+-EXTRA_DIST += test/env.sh
+-EXTRA_DIST += test/python-hmac-sanity-check
+-EXTRA_DIST += test/python-hmac-sanity-check.sh
+-EXTRA_DIST += test/readme.sh
+-
+-TESTS =
+-TESTS += test/python-hmac-sanity-check.sh
+-#TESTS += test/readme.sh
+-
+-#################################### Python ####################################
+-
+-pyexec_LTLIBRARIES =
+-if ENABLE_PYTHON_BINDINGS
+-pyexec_LTLIBRARIES += bindings/python/macaroons.la
+-endif
+-
+-EXTRA_DIST += bindings/python/macaroons.pyx
+-
+-bindings_python_macaroons_la_SOURCES = bindings/python/macaroons.c
+-bindings_python_macaroons_la_CPPFLAGS =
+-bindings_python_macaroons_la_CPPFLAGS += $(PYTHON_CPPFLAGS)
+-bindings_python_macaroons_la_CPPFLAGS += $(AM_CPPFLAGS)
+-bindings_python_macaroons_la_CPPFLAGS += $(CPPFLAGS)
+-bindings_python_macaroons_la_CFLAGS =
+-bindings_python_macaroons_la_CFLAGS += -fvisibility=default
+-bindings_python_macaroons_la_CFLAGS += -fno-strict-aliasing
+-bindings_python_macaroons_la_CFLAGS += $(CFLAGS)
+-bindings_python_macaroons_la_LIBADD =
+-bindings_python_macaroons_la_LIBADD += libmacaroons.la
+-bindings_python_macaroons_la_LIBADD += $(PYTHON_LDFLAGS)
+-bindings_python_macaroons_la_LDFLAGS = -module -avoid-version -export-symbols-regex initmacaroons $(AM_LDFLAGS) $(LDFLAGS)
+-bindings/python/macaroons.c: bindings/python/macaroons.pyx
+- $(pyx_verbose)cython bindings/python/macaroons.pyx
+--- a/configure.ac
++++ b/configure.ac
+@@ -11,7 +11,6 @@ m4_define([serial_tests], [
+ ])
+ AM_INIT_AUTOMAKE(foreign serial_tests subdir-objects dist-bzip2)
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+-AM_PATH_PYTHON([2.6])
+ LT_PREREQ([2.2])
+ LT_INIT
+ AC_CONFIG_SRCDIR([macaroons.h])
+@@ -35,13 +34,6 @@ AC_TYPE_SIZE_T
+ # Checks for library functions.
+
+ # Optional components
+-AC_ARG_ENABLE([python_bindings], [AS_HELP_STRING([--enable-python-bindings],
+- [build Python bindings @<:@default: no@:>@])],
+- [python_bindings=${enableval}], [python_bindings=no])
+-if test x"${python_bindings}" = xyes; then
+- AC_PYTHON_DEVEL([>= '2.6'])
+-fi
+-
+ AC_ARG_ENABLE([json_support], [AS_HELP_STRING([--enable-json-support],
+ [enable support for JSON macaroons @<:@default: no@:>@])],
+ [json_support=${enableval}], [json_support=no])
+@@ -69,7 +61,6 @@ Please install libjson to continue.
+ ----------------------------------------])])
+ fi
+
+-AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test x"${python_bindings}" = xyes])
+ AM_CONDITIONAL([ENABLE_JSON_SUPPORT], [test x"${json_support}" = xyes])
+
+ AH_BOTTOM([#include <custom-config.h>])