From a1f1e3e691b2018c4866b52d0ba2a7aaa49d2410 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 6 Jul 2017 10:27:39 +0200 Subject: dev-libs/volume_key: Initital commit. Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- .../files/volume_key-0.3.9-config.h.diff | 27 +++++++++++ .../files/volume_key-0.3.9-find_python.patch | 56 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 dev-libs/volume_key/files/volume_key-0.3.9-config.h.diff create mode 100644 dev-libs/volume_key/files/volume_key-0.3.9-find_python.patch (limited to 'dev-libs/volume_key/files') diff --git a/dev-libs/volume_key/files/volume_key-0.3.9-config.h.diff b/dev-libs/volume_key/files/volume_key-0.3.9-config.h.diff new file mode 100644 index 000000000000..138e92ee8f62 --- /dev/null +++ b/dev-libs/volume_key/files/volume_key-0.3.9-config.h.diff @@ -0,0 +1,27 @@ +From 8f8698aba19b501f01285e9eec5c18231fc6bcea Mon Sep 17 00:00:00 2001 +From: Vratislav Podzimek +Date: Tue, 6 Jan 2015 13:06:52 +0100 +Subject: Do not include config.h in libvolume_key.h + +The library's header file distributed in the devel package cannot include +the config.h file that is only available during build otherwise it's not +possible to use the library outside of the volume_key build process. + +Signed-off-by: Vratislav Podzimek + +diff --git a/lib/libvolume_key.h b/lib/libvolume_key.h +index 657b626..513f923 100644 +--- a/lib/libvolume_key.h ++++ b/lib/libvolume_key.h +@@ -18,8 +18,6 @@ Author: Miloslav Trmač */ + #ifndef LIBVOLUME_KEY_H__ + #define LIBVOLUME_KEY_H__ + +-#include +- + #include + #include + +-- +cgit v0.10.2 + diff --git a/dev-libs/volume_key/files/volume_key-0.3.9-find_python.patch b/dev-libs/volume_key/files/volume_key-0.3.9-find_python.patch new file mode 100644 index 000000000000..00ca74fdc785 --- /dev/null +++ b/dev-libs/volume_key/files/volume_key-0.3.9-find_python.patch @@ -0,0 +1,56 @@ +From 67fbdb6133b6d37548250514eeaf8a4e239e4768 Mon Sep 17 00:00:00 2001 +From: Lars Wendler +Date: Mon, 22 May 2017 14:29:44 +0200 +Subject: [PATCH] Use pkgconfig to find python + +otherwise linkage and include of python fails if python is not in +default (python$(PYTHON_VERSION)) location. +--- + Makefile.am | 4 ++-- + configure.ac | 8 +++++++- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 4569bbf..445a64c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,7 +20,7 @@ ACLOCAL_AMFLAGS = -I m4 + AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \ + $(libcryptsetup_CFLAGS) $(nss_CFLAGS) + LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' +-PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION) ++PYTHON_CPPFLAGS = $(PYTHON_CFLAGS) + + ## Targets + SUBDIRS = po +@@ -65,7 +65,7 @@ lib_libvolume_key_la_LIBADD = $(blkid_LIBS) $(glib_LIBS) $(GPGME_LIBS) \ + python__volume_key_la_SOURCES = python/volume_key_wrap.c + python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) + python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) +-python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \ ++python__volume_key_la_LIBADD = lib/libvolume_key.la $(PYTHON_LIBS) \ + $(glib_LIBS) $(nss_LIBS) + + src_volume_key_SOURCES = src/volume_key.c +diff --git a/configure.ac b/configure.ac +index 5dbb326..71e407e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -28,7 +28,13 @@ AC_PROG_CC + AM_PROG_CC_C_O + AM_PROG_AR + LT_INIT([disable-static]) +-AM_PATH_PYTHON ++ ++PKG_CHECK_MODULES([PYTHON], [python], [has_python=yes], []) ++AS_IF([test "x$has_python" = "xyes"], [ ++ AM_PATH_PYTHON ++ AC_SUBST([PYTHON_CFLAGS]) ++ AC_SUBST([PYTHON_LIBS]) ++]) + + dnl Not gpg2, it cannot receive passphrases from gpgme + AC_PATH_PROG([GPG], [gpg]) +-- +2.13.0 + -- cgit v1.2.3-65-gdbad