aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libassuan
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libassuan
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libassuan')
-rw-r--r--vcpkg/ports/libassuan/cross-tools.patch27
-rw-r--r--vcpkg/ports/libassuan/portfile.cmake58
-rw-r--r--vcpkg/ports/libassuan/vcpkg.json19
3 files changed, 104 insertions, 0 deletions
diff --git a/vcpkg/ports/libassuan/cross-tools.patch b/vcpkg/ports/libassuan/cross-tools.patch
new file mode 100644
index 0000000..c805f62
--- /dev/null
+++ b/vcpkg/ports/libassuan/cross-tools.patch
@@ -0,0 +1,27 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6b9a46d..5156865 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -19,6 +19,13 @@
+ # SPDX-License-Identifier: LGPL-2.1+
+ ## Process this file with automake to produce Makefile.in
+
++# Building host tools for native triplet, or not at all
++CPPFLAGS_FOR_BUILD = $(CPPFLAGS)
++CFLAGS_FOR_BUILD = $(CFLAGS)
++LDFLAGS_FOR_BUILD = $(LDFLAGS)
++# Using native tools, either this build or from host triplet
++HOST_TOOLS_PREFIX ?= .
++
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libassuan.pc
+
+@@ -152,6 +159,6 @@ mkheader: mkheader.c Makefile
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \
+ $(LDFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
+
+-assuan.h: assuan.h.in mkheader$(EXEEXT_FOR_BUILD) $(parts_of_assuan_h)
+- ./mkheader$(EXEEXT_FOR_BUILD) $(host_os) $(srcdir)/assuan.h.in \
++assuan.h: assuan.h.in $(HOST_TOOLS_PREFIX)/mkheader$(EXEEXT_FOR_BUILD) $(parts_of_assuan_h)
++ $(HOST_TOOLS_PREFIX)/mkheader$(EXEEXT_FOR_BUILD) $(host_os) $(srcdir)/assuan.h.in \
+ $(PACKAGE_VERSION) $(VERSION_NUMBER) >$@
diff --git a/vcpkg/ports/libassuan/portfile.cmake b/vcpkg/ports/libassuan/portfile.cmake
new file mode 100644
index 0000000..814cc01
--- /dev/null
+++ b/vcpkg/ports/libassuan/portfile.cmake
@@ -0,0 +1,58 @@
+vcpkg_download_distfile(tarball
+ URLS
+ "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-${VERSION}.tar.bz2"
+ "https://mirrors.dotsrc.org/gcrypt/libassuan/libassuan-${VERSION}.tar.bz2"
+ "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libassuan/libassuan-${VERSION}.tar.bz2"
+ FILENAME "libassuan-${VERSION}.tar.bz2"
+ SHA512 a591eda350ecbf4fe8568b5087f69830df31f36ec67e2a50672aacea9bee16020f374a0bface459aeac1897c048072415ab5962a97034ce6fa413100b2a427fb
+)
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${tarball}"
+ PATCHES
+ cross-tools.patch
+)
+
+if(VCPKG_CROSSCOMPILING)
+ set(ENV{HOST_TOOLS_PREFIX} "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}")
+endif()
+
+set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/libgpg-error/aclocal/\"")
+vcpkg_make_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTORECONF
+ OPTIONS
+ --disable-doc
+ OPTIONS_RELEASE
+ "GPG_ERROR_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config gpg-error"
+ "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config"
+ OPTIONS_DEBUG
+ "GPG_ERROR_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config gpg-error"
+ "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config"
+)
+
+vcpkg_make_install()
+vcpkg_fixup_pkgconfig()
+vcpkg_copy_pdbs()
+
+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/libassuan-config" "${install_prefix}" "`dirname $0`/../../..")
+if(NOT VCPKG_BUILD_TYPE)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/libassuan-config" "${install_prefix}" "`dirname $0`/../../../..")
+endif()
+
+if(NOT VCPKG_CROSSCOMPILING)
+ file(INSTALL
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/mkheader${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}"
+ USE_SOURCE_PERMISSIONS
+ )
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.LIB")
diff --git a/vcpkg/ports/libassuan/vcpkg.json b/vcpkg/ports/libassuan/vcpkg.json
new file mode 100644
index 0000000..dace4a2
--- /dev/null
+++ b/vcpkg/ports/libassuan/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "libassuan",
+ "version": "3.0.2",
+ "description": "A library implementing the so-called Assuan protocol",
+ "homepage": "https://gnupg.org/software/libassuan/index.html",
+ "license": "LGPL-2.1-or-later",
+ "supports": "!windows | mingw",
+ "dependencies": [
+ {
+ "name": "libassuan",
+ "host": true
+ },
+ "libgpg-error",
+ {
+ "name": "vcpkg-make",
+ "host": true
+ }
+ ]
+}