aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gpgme
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/gpgme')
-rw-r--r--vcpkg/ports/gpgme/disable-docs.patch13
-rw-r--r--vcpkg/ports/gpgme/portfile.cmake56
-rw-r--r--vcpkg/ports/gpgme/vcpkg.json16
3 files changed, 85 insertions, 0 deletions
diff --git a/vcpkg/ports/gpgme/disable-docs.patch b/vcpkg/ports/gpgme/disable-docs.patch
new file mode 100644
index 0000000..b45ca6e
--- /dev/null
+++ b/vcpkg/ports/gpgme/disable-docs.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index 1772d69..9bf9863 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -45,7 +45,7 @@ else
+ tests =
+ endif
+
+-SUBDIRS = src ${tests} doc lang
++SUBDIRS = src ${tests} lang
+
+ # Fix the version of the spec file.
+ dist-hook: gen-ChangeLog
diff --git a/vcpkg/ports/gpgme/portfile.cmake b/vcpkg/ports/gpgme/portfile.cmake
new file mode 100644
index 0000000..ab8656f
--- /dev/null
+++ b/vcpkg/ports/gpgme/portfile.cmake
@@ -0,0 +1,56 @@
+vcpkg_download_distfile(tarball
+ URLS "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
+ "https://gnupg.org/ftp/gcrypt/gpgme/gpgme-${VERSION}.tar.bz2"
+ FILENAME "gpgme-${VERSION}.tar.bz2"
+ SHA512 ee58dc2a4273c740d5b9ef13cc655d5e600ddddd137fb85a781c31e8854829283b4ce241d7810a963d9a125d603213600f37e7d0c1ce3b3cf1b935e62cf60777
+)
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${tarball}"
+ PATCHES
+ disable-docs.patch
+ )
+
+vcpkg_make_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTORECONF
+ OPTIONS
+ --disable-gpgconf-test
+ --disable-gpg-test
+ --disable-gpgsm-test
+ --disable-g13-test
+ GPG_ERROR_CONFIG=/ # fake absolute path; gpgrt-config is used instead
+ OPTIONS_RELEASE
+ "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config"
+ OPTIONS_DEBUG
+ "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config"
+)
+
+vcpkg_make_install()
+vcpkg_copy_pdbs()
+
+# This port doesn't support the windows-only glib integration.
+file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gpgme-glib.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gpgme-glib.pc")
+vcpkg_fixup_pkgconfig()
+
+set(install_prefix "${CURRENT_INSTALLED_DIR}")
+if(VCPKG_HOST_IS_WINDOWS)
+ string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" install_prefix "${install_prefix}")
+endif()
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/gpgme-config" "${install_prefix}" "`dirname $0`/../../..")
+if(NOT VCPKG_BUILD_TYPE)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/gpgme-config" "${install_prefix}" "`dirname $0`/../../../..")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(COMMENT [[
+The library is distributed under the terms of the GNU Lesser General Public License (LGPL).
+The helper programs are distributed under the terms of the GNU General Public License (GPL).
+There are additional notices about contributions that require these additional notices are distributed.
+]]
+ FILE_LIST
+ "${SOURCE_PATH}/COPYING.LESSER"
+ "${SOURCE_PATH}/COPYING"
+ "${SOURCE_PATH}/LICENSES"
+)
diff --git a/vcpkg/ports/gpgme/vcpkg.json b/vcpkg/ports/gpgme/vcpkg.json
new file mode 100644
index 0000000..079cfad
--- /dev/null
+++ b/vcpkg/ports/gpgme/vcpkg.json
@@ -0,0 +1,16 @@
+{
+ "name": "gpgme",
+ "version": "2.0.0",
+ "description": "A library designed to make access to GnuPG easier for applications",
+ "homepage": "https://gnupg.org/software/gpgme/",
+ "license": null,
+ "supports": "!windows | mingw",
+ "dependencies": [
+ "libassuan",
+ "libgpg-error",
+ {
+ "name": "vcpkg-make",
+ "host": true
+ }
+ ]
+}