aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gsasl
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/gsasl
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/gsasl')
-rw-r--r--vcpkg/ports/gsasl/configure.patch32
-rw-r--r--vcpkg/ports/gsasl/portfile.cmake63
-rw-r--r--vcpkg/ports/gsasl/vcpkg.json21
3 files changed, 116 insertions, 0 deletions
diff --git a/vcpkg/ports/gsasl/configure.patch b/vcpkg/ports/gsasl/configure.patch
new file mode 100644
index 0000000..5ab408b
--- /dev/null
+++ b/vcpkg/ports/gsasl/configure.patch
@@ -0,0 +1,32 @@
+diff --git a/configure.ac b/configure.ac
+index 1a53887c..55b176f8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -482,6 +482,11 @@
+ AC_MSG_CHECKING([if GSSAPI should be used])
+ AC_MSG_RESULT($gssapi)
+ AM_CONDITIONAL(GSSAPI, test x$gssapi = xyes)
++
++AC_ARG_WITH(gsasl-tool, AS_HELP_STRING([--with-gsasl-tool], [Build gsasl tool]), gsasl_tool=$withval, gsasl_tool=no)
++AC_MSG_CHECKING([if gsasl tool should be built])
++AC_MSG_RESULT($gsasl_tool)
++AM_CONDITIONAL(BUILD_GSASL_TOOL, test x$gsasl_tool = xyes)
+
+ AC_ARG_ENABLE([gcc-warnings],
+ [AS_HELP_STRING([[--enable-gcc-warnings[=TYPE]]],
+diff --git a/Makefile.am b/Makefile.am
+index 016e0ed7..54121ff1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,7 +19,10 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-gssapi-impl=no
+
+ ACLOCAL_AMFLAGS = -I m4 -I lib/m4
+
+-SUBDIRS = lib po gl src examples tests doc
++if BUILD_GSASL_TOOL
++ MAYBE_GSASL_TOOL = src
++endif
++SUBDIRS = lib po gl $(MAYBE_GSASL_TOOL)
+
+ EXTRA_DIST = cfg.mk maint.mk CONTRIBUTING.md
+ EXTRA_DIST += m4/gnulib-cache.m4
diff --git a/vcpkg/ports/gsasl/portfile.cmake b/vcpkg/ports/gsasl/portfile.cmake
new file mode 100644
index 0000000..10f6250
--- /dev/null
+++ b/vcpkg/ports/gsasl/portfile.cmake
@@ -0,0 +1,63 @@
+vcpkg_download_distfile(ARCHIVE
+ URLS
+ "https://ftpmirror.gnu.org/gnu/gsasl/gsasl-${VERSION}.tar.gz"
+ "https://ftp.gnu.org/gnu/gsasl/gsasl-${VERSION}.tar.gz"
+ FILENAME "gsasl-${VERSION}.tar.gz"
+ SHA512 62fb4a9383392e4816a036f3e8f408c5161a10723e59f0a8f6df5f72101e0b644787f3b07a71c772628fc4f4050960c842c7500736edacd24313ef654e703bc9
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ configure.patch
+)
+
+if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ set(CPPFLAGS_WINDOWS_STATIC "CPPFLAGS=\$CPPFLAGS -DGSASL_STATIC=1")
+endif()
+
+if("tool" IN_LIST FEATURES)
+ vcpkg_list(APPEND FEATURE_OPTIONS --with-gsasl-tool)
+endif()
+
+set(ENV{AUTOPOINT} true)
+set(ENV{GTKDOCIZE} true)
+vcpkg_make_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTORECONF
+ OPTIONS
+ ${CPPFLAGS_WINDOWS_STATIC}
+ ${FEATURE_OPTIONS}
+ --disable-nls
+ --disable-gssapi
+)
+
+vcpkg_make_install()
+vcpkg_fixup_pkgconfig()
+vcpkg_copy_pdbs()
+
+if("tool" IN_LIST FEATURES)
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
+endif()
+
+if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gsasl.h" "defined GSASL_STATIC" "1")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+if("tool" IN_LIST FEATURES)
+ list(APPEND tool_license_file "${SOURCE_PATH}/COPYING")
+ set(tool_license_comment [[The GNU SASL Library is licensed under the GNU Lesser General Public License (LGPL) version 2.1 (or later).
+The command-line application is licensed under the GNU General Public License license version 3.0 (or later).]]
+)
+endif()
+
+vcpkg_install_copyright(
+ COMMENT "${tool_license_comment}"
+ FILE_LIST
+ "${SOURCE_PATH}/COPYING.LESSER"
+ ${tool_license_file}
+)
diff --git a/vcpkg/ports/gsasl/vcpkg.json b/vcpkg/ports/gsasl/vcpkg.json
new file mode 100644
index 0000000..d157d4d
--- /dev/null
+++ b/vcpkg/ports/gsasl/vcpkg.json
@@ -0,0 +1,21 @@
+{
+ "name": "gsasl",
+ "version": "2.2.2",
+ "port-version": 1,
+ "description": "Simple Authentication and Security Layer framework and a few common SASL mechanisms",
+ "homepage": "https://www.gnu.org/software/gsasl/",
+ "license": "LGPL-2.1-or-later",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "vcpkg-make",
+ "host": true
+ }
+ ],
+ "features": {
+ "tool": {
+ "description": "Build gsasl tool",
+ "license": "GPL-3.0-or-later"
+ }
+ }
+}