Skip to content
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

[apr] bump to 1.7.5 and did some imporvements, availible from this version of the library. #40742

Merged
merged 18 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions ports/apr/fix-configcmake.patch

This file was deleted.

17 changes: 13 additions & 4 deletions ports/apr/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

set(VERSION 1.7.4)
set(VERSION 1.7.5)

vcpkg_download_distfile(ARCHIVE
URLS "https://archive.apache.org/dist/apr/apr-${VERSION}.tar.bz2"
FILENAME "apr-${VERSION}.tar.bz2"
SHA512 2342c997765ea2ca96eac158e5fd260232dba68fc41b90a79a7ba9b25c539fc217981867362090e0ebebe632289257c342275e3c5baedb698c474ef8f49a9dcd
SHA512 d8a7553642da0c81261ac3992536efd9d43ecb9154934ef1a10ae808d6a3ce8198b40433091d3a6d04f61e67c59426fb5276193a37e810ae4bc74a8a10fb651b
)

vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
fix-configcmake.patch
unglue.patch
)

Expand All @@ -20,17 +19,27 @@ if (VCPKG_TARGET_IS_WINDOWS)
private-headers APR_INSTALL_PRIVATE_H
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" APR_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" APR_BUILD_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DAPR_BUILD_STATIC=${APR_BUILD_STATIC}
-DAPR_BUILD_SHARED=${APR_BUILD_SHARED}
-DAPR_BUILD_TESTAPR=OFF
-DINSTALL_PDB=OFF
-DMIN_WINDOWS_VER=Windows7
-DAPR_HAVE_IPV6=ON
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-apr CONFIG_PATH share/unofficial-apr)
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/apr")
file(
INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-apr-config.cmake"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-apr"
)
# There is no way to suppress installation of the headers in debug builds.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

Expand Down
19 changes: 19 additions & 0 deletions ports/apr/unofficial-apr-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
message(WARNING "find_package(unofficial-apr) is deprecated.\nUse find_package(apr) instead")
include(CMakeFindDependencyMacro)
find_dependency(apr CONFIG)

if(TARGET apr::apr-1 AND NOT TARGET unofficial::apr::apr-1)
add_library(unofficial::apr::apr-1 INTERFACE IMPORTED)
target_link_libraries(unofficial::apr::apr-1 INTERFACE apr::apr-1)
elseif(TARGET apr::libapr-1 AND NOT TARGET unofficial::apr::libapr-1)
add_library(unofficial::apr::libapr-1 INTERFACE IMPORTED)
target_link_libraries(unofficial::apr::libapr-1 INTERFACE apr::libapr-1)
endif()

if(TARGET apr::aprapp-1 AND NOT TARGET unofficial::apr::aprapp-1)
add_library(unofficial::apr::aprapp-1 INTERFACE IMPORTED)
target_link_libraries(unofficial::apr::aprapp-1 INTERFACE apr::aprapp-1)
elseif(TARGET apr::libaprapp-1 AND NOT TARGET unofficial::apr::libaprapp-1)
add_library(unofficial::apr::libaprapp-1 INTERFACE IMPORTED)
target_link_libraries(unofficial::apr::libaprapp-1 INTERFACE apr::libaprapp-1)
endif()
2 changes: 1 addition & 1 deletion ports/apr/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apr",
"version": "1.7.4",
"version": "1.7.5",
"port-version": 1,
rinrab marked this conversation as resolved.
Show resolved Hide resolved
"description": "The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.",
"homepage": "https://apr.apache.org/",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/apr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e2490188142d70e69524fe5bf1a24aa827a9d3d2",
"version": "1.7.5",
"port-version": 1
},
{
"git-tree": "9e28cc50d8877ee9c7a70e3fac694e562b4833da",
"version": "1.7.4",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"port-version": 0
},
"apr": {
"baseline": "1.7.4",
"baseline": "1.7.5",
"port-version": 1
},
"apr-util": {
Expand Down