mirror of https://github.com/microsoft/vcpkg.git
[gsasl] Switch to vcpkg-make, add feature tool (#44866)
This commit is contained in:
parent
48a0cef9ea
commit
20c3f04d6a
|
|
@ -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
|
||||
|
|
@ -1,35 +1,46 @@
|
|||
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"
|
||||
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsasl/gsasl-${VERSION}.tar.gz"
|
||||
FILENAME "gsasl-${VERSION}.tar.gz"
|
||||
SHA512 62fb4a9383392e4816a036f3e8f408c5161a10723e59f0a8f6df5f72101e0b644787f3b07a71c772628fc4f4050960c842c7500736edacd24313ef654e703bc9
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
remove-tests-examples-docs.patch
|
||||
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_configure_make(
|
||||
vcpkg_make_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
AUTORECONF
|
||||
OPTIONS
|
||||
${CPPFLAGS_WINDOWS_STATIC}
|
||||
${FEATURE_OPTIONS}
|
||||
--disable-nls
|
||||
--disable-gssapi
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
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")
|
||||
|
|
@ -37,4 +48,16 @@ endif()
|
|||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
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}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 016e0ed7..54121ff1 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 += m4/gnulib-cache.m4
|
||||
|
|
@ -1,8 +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": "GPL-3.0-or-later",
|
||||
"supports": "!uwp"
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3358,7 +3358,7 @@
|
|||
},
|
||||
"gsasl": {
|
||||
"baseline": "2.2.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"gsl": {
|
||||
"baseline": "2.8",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "18fe18bbc9a1426b7257d67c2ab4c909169969ea",
|
||||
"version": "2.2.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "8c54763f38e6f62fb778c480113c89ade94b85e6",
|
||||
"version": "2.2.2",
|
||||
|
|
|
|||
Loading…
Reference in New Issue