Skip to content

Commit

Permalink
Manually add pc files for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev committed May 16, 2024
1 parent c082c3e commit cea0796
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ports/curl/dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ index 049ac34..cc0fe19 100644
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(KRB5 REQUIRED krb5 krb5-gssapi)
+ list(APPEND CURL_LIBS ${KRB5_LINK_LIBRARIES} resolv)
+ set(HAVE_GSSAPI_GSSAPI_H ON)
+ set(HAVE_GSSAPI_GSSAPI_GENERIC_H ON)
+ set(HAVE_GSSAPI_GSSAPI_KRB5_H ON)
+ check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
+ check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
+ check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
+ set(HAVE_GSSAPI ON)
+ elseif(0)
find_package(GSS)
Expand Down
2 changes: 1 addition & 1 deletion ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "curl",
"version": "8.7.1",
"port-version": 3,
"port-version": 4,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
Expand Down
74 changes: 74 additions & 0 deletions ports/krb5/pc_files_for_windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
diff --git a/src/build-tools/krb5-gssapi.pc b/src/build-tools/krb5-gssapi.pc
new file mode 100644
index 000000000..7f25b6c55
--- /dev/null
+++ b/src/build-tools/krb5-gssapi.pc
@@ -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: 1.21.2
+Requires: mit-krb5-gssapi
diff --git a/src/build-tools/krb5.pc b/src/build-tools/krb5.pc
new file mode 100644
index 000000000..ab10fb7c6
--- /dev/null
+++ b/src/build-tools/krb5.pc
@@ -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: 1.21.2
+Requires: mit-krb5
diff --git a/src/build-tools/mit-krb5-gssapi.pc b/src/build-tools/mit-krb5-gssapi.pc
new file mode 100644
index 000000000..58b600fee
--- /dev/null
+++ b/src/build-tools/mit-krb5-gssapi.pc
@@ -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: 1.21.2
+Requires.private: mit-krb5
+Cflags: -I${includedir}
+Libs: -L${libdir} -lgssapi64
diff --git a/src/build-tools/mit-krb5.pc b/src/build-tools/mit-krb5.pc
new file mode 100644
index 000000000..23312a899
--- /dev/null
+++ b/src/build-tools/mit-krb5.pc
@@ -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: 1.21.2
+Cflags: -I${includedir}
+Libs: -L${libdir} -lkrb5_64 -lkrbcc64 -lxpprof64 -lkfwlogon -lcomerr64 -lk5sprt64
+Libs.private: -lk5sprt64
23 changes: 23 additions & 0 deletions ports/krb5/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

set(windows_patches "")
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(windows_patches "pc_files_for_windows.patch")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO krb5/krb5
Expand All @@ -6,6 +12,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
relative_paths.patch
${windows_patches}
)

if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
Expand Down Expand Up @@ -57,6 +64,22 @@ if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
list(APPEND debug_tools_to_remove "${CURRENT_PACKAGES_DIR}/debug/bin/${tool_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
endforeach()
file(REMOVE ${debug_tools_to_remove})
file(COPY
"${SOURCE_PATH}/src/build-tools/krb5.pc"
"${SOURCE_PATH}/src/build-tools/mit-krb5.pc"
"${SOURCE_PATH}/src/build-tools/krb5-gssapi.pc"
"${SOURCE_PATH}/src/build-tools/mit-krb5-gssapi.pc"
DESTINATION
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig"
)
file(COPY
"${SOURCE_PATH}/src/build-tools/krb5.pc"
"${SOURCE_PATH}/src/build-tools/mit-krb5.pc"
"${SOURCE_PATH}/src/build-tools/krb5-gssapi.pc"
"${SOURCE_PATH}/src/build-tools/mit-krb5-gssapi.pc"
DESTINATION
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig"
)
else()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}/src"
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@
},
"curl": {
"baseline": "8.7.1",
"port-version": 3
"port-version": 4
},
"curlpp": {
"baseline": "2018-06-15",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/curl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b4bb2eebd5ee68f83687ea77c4f0ac56effafb41",
"version": "8.7.1",
"port-version": 4
},
{
"git-tree": "32945fcb82088dc4055db602b3ebe95f67f04326",
"version": "8.7.1",
Expand Down
2 changes: 1 addition & 1 deletion versions/k-/krb5.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "a8a474eab6293bd8c42d2c297c0bf2b6d9ddd5cb",
"git-tree": "2b7cd160686d3fd02150ca83b56039eb7f81520b",
"version": "1.21.2",
"port-version": 1
},
Expand Down

0 comments on commit cea0796

Please sign in to comment.