From 05ef92e53a325aabd51bd7820a46d1359a53de2e Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Thu, 6 Apr 2017 22:35:12 +0200 Subject: [PATCH] gpgme: enable Qt 5 bindings --- pkgs/development/libraries/gpgme/default.nix | 6 ++++-- .../libraries/gpgme/gpgme_libsuffix.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/gpgme/gpgme_libsuffix.patch diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 5601a8854ef1..36d90604a826 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan }: +{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan, qt5 }: stdenv.mkDerivation rec { name = "gpgme-1.9.0"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "info" ]; outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool - propagatedBuildInputs = [ libgpgerror glib libassuan pth ]; + propagatedBuildInputs = [ libgpgerror glib libassuan pth qt5.qtbase ]; nativeBuildInputs = [ pkgconfig gnupg ]; @@ -19,6 +19,8 @@ stdenv.mkDerivation rec { "--enable-fixed-path=${gnupg}/bin" ]; + patches = [ ./gpgme_libsuffix.patch ]; + # https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html NIX_CFLAGS_COMPILE = with stdenv; lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; diff --git a/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch b/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch new file mode 100644 index 000000000000..4abc2757cf6f --- /dev/null +++ b/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch @@ -0,0 +1,12 @@ +diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in +index 928d19f..cbe9713 100644 (file) +--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in ++++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in +@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED) + + set_target_properties(Gpgmepp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" +- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" ++ INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@" + IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so" + )