mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 01:10:55 +08:00
[krb5] Add windows (#38706)
Take elements from this PR: #38685 - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. --------- Co-authored-by: Sharadh Rajaraman <sharadh@cuno.io> Co-authored-by: Sharadh Rajaraman <3754080+sharadhr@users.noreply.github.com> Co-authored-by: WangWeiLin-MV <156736127+WangWeiLin-MV@users.noreply.github.com>
This commit is contained in:
parent
382e321ae0
commit
71befd7c15
@ -1,24 +1,92 @@
|
|||||||
vcpkg_download_distfile(ARCHIVE
|
|
||||||
URLS "https://kerberos.org/dist/krb5/1.21/krb5-${VERSION}.tar.gz"
|
vcpkg_from_github(
|
||||||
FILENAME "krb5-${VERSION}.tar.gz"
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
SHA512 4e09296b412383d53872661718dbfaa90201e0d85f69db48e57a8d4bd73c95a90c7ec7b6f0f325f6bc967f8d203b256b071c0191facf080aca0e2caec5d0ac49
|
REPO krb5/krb5
|
||||||
|
REF krb5-${VERSION}-final
|
||||||
|
SHA512 184ef8645d7e17f30a8e3d4005364424d2095b3d0c96f26ecef0c2dd2f3a096a0dd40558ed113121483717e44f6af41e71be0e5e079c76a205535d0c11a2ea34
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
relative_paths.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_extract_source_archive(
|
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||||
SOURCE_PATH
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES)
|
||||||
ARCHIVE ${ARCHIVE}
|
vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
|
||||||
)
|
vcpkg_find_acquire_program(PERL)
|
||||||
|
get_filename_component(PERL_PATH "${PERL}" DIRECTORY)
|
||||||
|
vcpkg_add_to_path("${PERL_PATH}")
|
||||||
|
vcpkg_build_nmake(
|
||||||
|
SOURCE_PATH "${SOURCE_PATH}/src"
|
||||||
|
PROJECT_NAME Makefile.in
|
||||||
|
TARGET prep-windows
|
||||||
|
)
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
||||||
|
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
||||||
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug")
|
||||||
|
vcpkg_install_nmake(
|
||||||
|
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
|
||||||
|
PROJECT_NAME "Makefile"
|
||||||
|
OPTIONS
|
||||||
|
"NO_LEASH=1"
|
||||||
|
OPTIONS_RELEASE
|
||||||
|
"KRB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}"
|
||||||
|
OPTIONS_DEBUG
|
||||||
|
"KRB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug"
|
||||||
|
)
|
||||||
|
set(tools
|
||||||
|
ccapiserver
|
||||||
|
gss-client
|
||||||
|
gss-server
|
||||||
|
kcpytkt
|
||||||
|
kdeltkt
|
||||||
|
kdestroy
|
||||||
|
kfwcpcc
|
||||||
|
kinit
|
||||||
|
klist
|
||||||
|
kpasswd
|
||||||
|
kswitch
|
||||||
|
kvno
|
||||||
|
mit2ms
|
||||||
|
ms2mit
|
||||||
|
)
|
||||||
|
vcpkg_copy_tools(
|
||||||
|
TOOL_NAMES ${tools}
|
||||||
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
|
||||||
|
AUTO_CLEAN
|
||||||
|
)
|
||||||
|
foreach(tool_name ${tools})
|
||||||
|
list(APPEND debug_tools_to_remove "${CURRENT_PACKAGES_DIR}/debug/bin/${tool_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||||
|
endforeach()
|
||||||
|
file(REMOVE ${debug_tools_to_remove})
|
||||||
|
|
||||||
vcpkg_configure_make(
|
set(WINDOWS_PC_FILES
|
||||||
SOURCE_PATH "${SOURCE_PATH}/src"
|
krb5-gssapi
|
||||||
AUTOCONFIG
|
krb5
|
||||||
OPTIONS
|
mit-krb5-gssapi
|
||||||
"CFLAGS=-fcommon \$CFLAGS"
|
mit-krb5
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_make()
|
foreach (PC_FILE ${WINDOWS_PC_FILES})
|
||||||
|
configure_file("${CURRENT_PORT_DIR}/windows_pc_files/${PC_FILE}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PC_FILE}.pc" @ONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||||
|
foreach (PC_FILE ${WINDOWS_PC_FILES})
|
||||||
|
configure_file("${CURRENT_PORT_DIR}/windows_pc_files/${PC_FILE}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PC_FILE}.pc" @ONLY)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
vcpkg_configure_make(
|
||||||
|
SOURCE_PATH "${SOURCE_PATH}/src"
|
||||||
|
AUTOCONFIG
|
||||||
|
OPTIONS
|
||||||
|
"CFLAGS=-fcommon \$CFLAGS"
|
||||||
|
)
|
||||||
|
vcpkg_install_make()
|
||||||
|
endif()
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat1")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat1")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat5")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat5")
|
||||||
@ -29,9 +97,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/krb5/")
|
|||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/var")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/var")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var")
|
||||||
|
|
||||||
# remove due to absolute path error
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/NOTICE")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/krb5/bin/compile_et")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/krb5/bin/krb5-config")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/krb5/debug/")
|
|
||||||
|
|
||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/doc/copyright.rst")
|
|
||||||
|
35
ports/krb5/relative_paths.patch
Normal file
35
ports/krb5/relative_paths.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/src/build-tools/krb5-config.in b/src/build-tools/krb5-config.in
|
||||||
|
index 8e6eb8660..89a401dab 100755
|
||||||
|
--- a/src/build-tools/krb5-config.in
|
||||||
|
+++ b/src/build-tools/krb5-config.in
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
# Configurable parameters set by autoconf
|
||||||
|
version_string="Kerberos 5 release @KRB5_VERSION@"
|
||||||
|
|
||||||
|
-prefix=@prefix@
|
||||||
|
+prefix='$(pwd)/../../../'
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
includedir=@includedir@
|
||||||
|
libdir=@libdir@
|
||||||
|
@@ -39,7 +39,7 @@ PTHREAD_CFLAGS='@PTHREAD_CFLAGS@'
|
||||||
|
DL_LIB='@DL_LIB@'
|
||||||
|
DEFCCNAME='@DEFCCNAME@'
|
||||||
|
DEFKTNAME='@DEFKTNAME@'
|
||||||
|
-DEFCKTNAME='@DEFCKTNAME@'
|
||||||
|
+DEFCKTNAME='$(pwd)/../../../var/krb5/user/%{euid}/client.keytab'
|
||||||
|
|
||||||
|
LIBS='@LIBS@'
|
||||||
|
GEN_LIB=@GEN_LIB@
|
||||||
|
diff --git a/src/util/et/compile_et.sh b/src/util/et/compile_et.sh
|
||||||
|
index f17ddba71..6a98a8bab 100755
|
||||||
|
--- a/src/util/et/compile_et.sh
|
||||||
|
+++ b/src/util/et/compile_et.sh
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
#
|
||||||
|
#
|
||||||
|
AWK=@AWK@
|
||||||
|
-DIR=@DIR@
|
||||||
|
+DIR='$(pwd)/../../../share/et'
|
||||||
|
|
||||||
|
usage="usage: $0 [ -d scriptDir ] [ --textdomain domain [ --localedir dir ] ]"
|
||||||
|
usage="$usage inputfile.et"
|
@ -1,8 +1,15 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||||
"name": "krb5",
|
"name": "krb5",
|
||||||
"version": "1.21.2",
|
"version": "1.21.2",
|
||||||
"description": "Network authentication protocol",
|
"port-version": 1,
|
||||||
|
"description": [
|
||||||
|
"Kerberos is a network authentication protocol.",
|
||||||
|
"It is designed to provide strong authentication for client/server applications by using secret-key cryptography.",
|
||||||
|
"A free implementation of this protocol is available from the Massachusetts Institute of Technology.",
|
||||||
|
"Kerberos is available in many commercial products as well."
|
||||||
|
],
|
||||||
"homepage": "https://web.mit.edu/kerberos/",
|
"homepage": "https://web.mit.edu/kerberos/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"supports": "linux"
|
"supports": "linux | (x64 & !static & !uwp & windows)"
|
||||||
}
|
}
|
||||||
|
10
ports/krb5/windows_pc_files/krb5-gssapi.pc.in
Normal file
10
ports/krb5/windows_pc_files/krb5-gssapi.pc.in
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
prefix=${pcfiledir}/../..
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
vendor=MIT
|
||||||
|
|
||||||
|
Name: krb5-gssapi
|
||||||
|
Description: Kerberos implementation of the GSSAPI
|
||||||
|
Version: @VERSION@
|
||||||
|
Requires: mit-krb5-gssapi
|
14
ports/krb5/windows_pc_files/krb5.pc.in
Normal file
14
ports/krb5/windows_pc_files/krb5.pc.in
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
prefix=${pcfiledir}/../..
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
vendor=MIT
|
||||||
|
|
||||||
|
defccname=FILE:/tmp/krb5cc_%{uid}
|
||||||
|
defktname=FILE:/etc/krb5.keytab
|
||||||
|
defcktname=FILE:${prefix}/var/krb5/user/%{euid}/client.keytab
|
||||||
|
|
||||||
|
Name: krb5
|
||||||
|
Description: An implementation of Kerberos network authentication
|
||||||
|
Version: @VERSION@
|
||||||
|
Requires: mit-krb5
|
11
ports/krb5/windows_pc_files/mit-krb5-gssapi.pc.in
Normal file
11
ports/krb5/windows_pc_files/mit-krb5-gssapi.pc.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
prefix=${pcfiledir}/../..
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: mit-krb5-gssapi
|
||||||
|
Description: Kerberos implementation of the GSSAPI
|
||||||
|
Version: @VERSION@
|
||||||
|
Requires.private: mit-krb5
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
Libs: -L${libdir} -lgssapi64
|
15
ports/krb5/windows_pc_files/mit-krb5.pc.in
Normal file
15
ports/krb5/windows_pc_files/mit-krb5.pc.in
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
prefix=${pcfiledir}/../..
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
defccname=FILE:/tmp/krb5cc_%{uid}
|
||||||
|
defktname=FILE:/etc/krb5.keytab
|
||||||
|
defcktname=FILE:${prefix}/var/krb5/user/%{euid}/client.keytab
|
||||||
|
|
||||||
|
Name: mit-krb5
|
||||||
|
Description: An implementation of Kerberos network authentication
|
||||||
|
Version: @VERSION@
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
Libs: -L${libdir} -lkrb5_64 -lkrbcc64 -lxpprof64 -lkfwlogon -lcomerr64 -lk5sprt64
|
||||||
|
Libs.private: -lk5sprt64
|
@ -4054,7 +4054,7 @@
|
|||||||
},
|
},
|
||||||
"krb5": {
|
"krb5": {
|
||||||
"baseline": "1.21.2",
|
"baseline": "1.21.2",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"ktx": {
|
"ktx": {
|
||||||
"baseline": "4.3.1",
|
"baseline": "4.3.1",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "ea9bd42d5123185ac2cc46bf6eb1db73990de124",
|
||||||
|
"version": "1.21.2",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "287bac02bb53283b043688050edd9d02e0b039c7",
|
"git-tree": "287bac02bb53283b043688050edd9d02e0b039c7",
|
||||||
"version": "1.21.2",
|
"version": "1.21.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user