[gsasl] Add new port (#39247)

This commit is contained in:
talregev 2024-06-27 00:49:46 +03:00 committed by GitHub
parent 2f7e9e11f2
commit 67f5654fe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/lib/src/gsasl.h b/lib/src/gsasl.h
index 1b5072c2..999555f6 100644
--- a/lib/src/gsasl.h
+++ b/lib/src/gsasl.h
@@ -33,7 +33,9 @@
# include <stdio.h> /* FILE */
# include <stddef.h> /* size_t */
+#ifndef _WIN32
# include <unistd.h> /* ssize_t */
+#endif
/* Get version symbols. */
# include <gsasl-version.h>

View File

@ -0,0 +1,41 @@
vcpkg_download_distfile(ARCHIVE
URLS
"https://ftp.gnu.org/gnu/gsasl/gsasl-${VERSION}.tar.gz"
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsasl/gsasl-${VERSION}.tar.gz"
FILENAME "gsasl-${VERSION}.tar.gz"
SHA512 161b8a315862a79807ba067c5ae840175b0d8ec14806aceafc3f92d571713b94d1b8c1a5b188c47bf94a79b9a1f133065f96b087baa5e7f360ae7fb8336381ab
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
remove-tests-examples-docs.patch
fix-windows-compilation.patch
)
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(CPPFLAGS_WINDOWS_STATIC "CPPFLAGS=\$CPPFLAGS -DGSASL_STATIC=1")
endif()
set(ENV{AUTOPOINT} true)
set(ENV{GTKDOCIZE} true)
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
${CPPFLAGS_WINDOWS_STATIC}
--disable-nls
--disable-gssapi
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
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")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -0,0 +1,13 @@
diff --git a/Makefile.am b/Makefile.am
index 04c2ece7..9b8fe573 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ 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
+SUBDIRS = lib po gl src
EXTRA_DIST = cfg.mk maint.mk CONTRIBUTING.md
EXTRA_DIST += build-aux/git2cl

8
ports/gsasl/vcpkg.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "gsasl",
"version": "2.2.1",
"description": "Simple Authentication and Security Layer framework and a few common SASL mechanisms",
"homepage": "https://www.gnu.org/software/gsasl/",
"license": "GPL-3.0-or-later",
"supports": "!uwp"
}

View File

@ -3216,6 +3216,10 @@
"baseline": "0.4.0",
"port-version": 2
},
"gsasl": {
"baseline": "2.2.1",
"port-version": 0
},
"gsl": {
"baseline": "2.8",
"port-version": 0

9
versions/g-/gsasl.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "dcc32ace8afcb1566629880f303a56870c7e4e19",
"version": "2.2.1",
"port-version": 0
}
]
}