Skip to content

Commit

Permalink
[libgnutls] Fix build errors (#34275)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Oct 6, 2023
1 parent 06f9283 commit 33e2a9f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
18 changes: 13 additions & 5 deletions ports/libgnutls/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}

string(REGEX REPLACE "^([0-9]*[.][0-9]*)[.].*" "\\1" GNUTLS_BRANCH "${VERSION}")
vcpkg_download_distfile(tarball
URLS
Expand Down Expand Up @@ -28,8 +26,18 @@ if ("openssl" IN_LIST FEATURES)
vcpkg_list(APPEND options "--enable-openssl-compatibility")
endif()

if(VCPKG_TARGET_IS_OSX)
vcpkg_list(APPEND options "LDFLAGS=\$LDFLAGS -framework CoreFoundation")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_list(APPEND options "LIBS=\$LIBS -liconv -lcharset") # for libunistring
endif()

if(VCPKG_CROSSCOMPILING)
vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
set(ccas "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
cmake_path(GET ccas PARENT_PATH ccas_dir)
vcpkg_add_to_path("${ccas_dir}")
cmake_path(GET ccas FILENAME ccas_command)
vcpkg_list(APPEND options "CCAS=${ccas_command}")
endif()

set(ENV{GTKDOCIZE} true) # true, the program
Expand All @@ -42,7 +50,6 @@ vcpkg_configure_make(
--disable-guile
--disable-libdane
--disable-maintainer-mode
--disable-silent-rules
--disable-rpath
--disable-tests
--with-brotli=no
Expand All @@ -57,6 +64,7 @@ vcpkg_configure_make(
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

Expand Down
10 changes: 8 additions & 2 deletions ports/libgnutls/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libgnutls",
"version": "3.8.1",
"port-version": 1,
"description": "A secure communications library implementing the SSL, TLS and DTLS protocols.",
"homepage": "https://www.gnutls.org/",
"license": null,
Expand All @@ -11,20 +12,25 @@
"libtasn1",
"libunistring",
"nettle",
{
"name": "vcpkg-cmake-get-vars",
"host": true,
"platform": "!native"
},
"zlib"
],
"features": {
"nls": {
"description": "Enable native language support.",
"dependencies": [
"gettext",
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
}
},
"gettext-libintl"
]
},
"openssl": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4206,7 +4206,7 @@
},
"libgnutls": {
"baseline": "3.8.1",
"port-version": 0
"port-version": 1
},
"libgo": {
"baseline": "3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libgnutls.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cdcde91b6757c786647f9bfafef1e0f02591a859",
"version": "3.8.1",
"port-version": 1
},
{
"git-tree": "7818d88f0b76ec5775b8bc6269ebf22d9aea466d",
"version": "3.8.1",
Expand Down

0 comments on commit 33e2a9f

Please sign in to comment.