-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[krb5] Update portfile #38685
Closed
Closed
[krb5] Update portfile #38685
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,94 @@ | ||
vcpkg_download_distfile(ARCHIVE | ||
URLS "https://kerberos.org/dist/krb5/1.21/krb5-${VERSION}.tar.gz" | ||
FILENAME "krb5-${VERSION}.tar.gz" | ||
SHA512 4e09296b412383d53872661718dbfaa90201e0d85f69db48e57a8d4bd73c95a90c7ec7b6f0f325f6bc967f8d203b256b071c0191facf080aca0e2caec5d0ac49 | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO krb5/krb5 | ||
REF "krb5-${VERSION}-final" | ||
SHA512 184ef8645d7e17f30a8e3d4005364424d2095b3d0c96f26ecef0c2dd2f3a096a0dd40558ed113121483717e44f6af41e71be0e5e079c76a205535d0c11a2ea34 | ||
PATCHES relative_paths.patch | ||
) | ||
|
||
vcpkg_extract_source_archive( | ||
SOURCE_PATH | ||
ARCHIVE ${ARCHIVE} | ||
) | ||
if ("${VCPKG_TARGET_IS_OSX}") | ||
# Required for recent macOS and static build: https://mailman.mit.edu/pipermail/krbdev/2024-January/013653.html | ||
if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") | ||
set(LD_FLAGS "-framework Kerberos") | ||
endif () | ||
set(EXTRA_OPTIONS | ||
"--disable-nls" | ||
"--disable-silent-rules" | ||
"--without-system-verto" | ||
"--without-keyutils" | ||
) | ||
endif () | ||
|
||
vcpkg_configure_make( | ||
SOURCE_PATH "${SOURCE_PATH}/src" | ||
AUTOCONFIG | ||
OPTIONS | ||
"CFLAGS=-fcommon \$CFLAGS" | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
PROJECT_SUBPATH src | ||
AUTOCONFIG | ||
NO_ADDITIONAL_PATHS | ||
DETERMINE_BUILD_TRIPLET | ||
OPTIONS | ||
--disable-rpath | ||
"CFLAGS=-fcommon \$CFLAGS" | ||
"LDFLAGS=${LD_FLAGS}" | ||
${EXTRA_OPTIONS} | ||
) | ||
|
||
vcpkg_install_make() | ||
vcpkg_fixup_pkgconfig() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_copy_tools( | ||
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/bin" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin" | ||
TOOL_NAMES | ||
gss-client | ||
kadmin | ||
kdestroy | ||
kinit | ||
klist | ||
kpasswd | ||
kswitch | ||
ktutil | ||
kvno | ||
sclient | ||
sim_client | ||
uuclient | ||
compile_et | ||
k5srvutil | ||
krb5-config | ||
AUTO_CLEAN | ||
) | ||
|
||
vcpkg_copy_tools( | ||
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/sbin" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/sbin" | ||
TOOL_NAMES | ||
gss-server | ||
kadmind | ||
kdb5_util | ||
kprop | ||
kpropd | ||
kproplog | ||
krb5kdc | ||
sim_server | ||
sserver | ||
uuserver | ||
kadmin.local | ||
krb5-send-pr | ||
) | ||
|
||
# Required because AUTO_CLEAN doesn't work with sbin | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/sbin") | ||
|
||
# Empty directories | ||
file(REMOVE_RECURSE | ||
"${CURRENT_PACKAGES_DIR}/debug" | ||
"${CURRENT_PACKAGES_DIR}/share/man" | ||
"${CURRENT_PACKAGES_DIR}/var" | ||
) | ||
|
||
# Also empty when static | ||
if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/krb5") | ||
endif() | ||
|
||
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/cat5") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat7") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/krb5/cat8") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/krb5/") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/krb5/") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/var") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var") | ||
|
||
# remove due to absolute path error | ||
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") | ||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/NOTICE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | ||
"name": "krb5", | ||
"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/", | ||
"license": "MIT", | ||
"supports": "linux" | ||
"supports": "osx | (x64 & linux)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to disable building the tools on debug since they will be removed by
vcpkg_copy_tools
anyway?