early-access version 2853
This commit is contained in:
62
externals/vcpkg/ports/apr/fix-configcmake.patch
vendored
Executable file
62
externals/vcpkg/ports/apr/fix-configcmake.patch
vendored
Executable file
@@ -0,0 +1,62 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b4632c3..0b86d12 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -259,27 +259,35 @@ SET(install_targets)
|
||||
SET(install_bin_pdb)
|
||||
|
||||
# libapr-1 is shared, apr-1 is static
|
||||
+IF(BUILD_SHARED_LIBS)
|
||||
ADD_LIBRARY(libapr-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libapr.rc)
|
||||
SET(install_targets ${install_targets} libapr-1)
|
||||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libapr-1.pdb)
|
||||
TARGET_LINK_LIBRARIES(libapr-1 ${APR_SYSTEM_LIBS})
|
||||
SET_TARGET_PROPERTIES(libapr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_EXPORT;WINNT")
|
||||
ADD_DEPENDENCIES(libapr-1 test_char_header)
|
||||
-
|
||||
+TARGET_INCLUDE_DIRECTORIES(libapr-1 INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+ELSE()
|
||||
ADD_LIBRARY(apr-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED})
|
||||
SET(install_targets ${install_targets} apr-1)
|
||||
TARGET_LINK_LIBRARIES(apr-1 ${APR_SYSTEM_LIBS})
|
||||
SET_TARGET_PROPERTIES(apr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;WINNT")
|
||||
ADD_DEPENDENCIES(apr-1 test_char_header)
|
||||
+TARGET_INCLUDE_DIRECTORIES(apr-1 INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+ENDIF()
|
||||
|
||||
# libaprapp-1 and aprapp-1 are static
|
||||
+IF(BUILD_SHARED_LIBS)
|
||||
ADD_LIBRARY(libaprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED})
|
||||
SET(install_targets ${install_targets} libaprapp-1)
|
||||
SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_APP;WINNT")
|
||||
-
|
||||
+TARGET_INCLUDE_DIRECTORIES(libaprapp-1 INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+ELSE()
|
||||
ADD_LIBRARY(aprapp-1 STATIC misc/win32/apr_app.c misc/win32/internal.c ${APR_PUBLIC_HEADERS_GENERATED})
|
||||
SET(install_targets ${install_targets} aprapp-1)
|
||||
SET_TARGET_PROPERTIES(aprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;APR_APP;WINNT")
|
||||
+TARGET_INCLUDE_DIRECTORIES(aprapp-1 INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+ENDIF()
|
||||
|
||||
IF(APR_BUILD_TESTAPR)
|
||||
ENABLE_TESTING()
|
||||
@@ -385,12 +393,18 @@ ENDIF (APR_BUILD_TESTAPR)
|
||||
|
||||
# Installation
|
||||
|
||||
-INSTALL(TARGETS ${install_targets}
|
||||
+INSTALL(TARGETS ${install_targets} EXPORT unofficial-apr-config
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
+INSTALL(EXPORT unofficial-apr-config
|
||||
+ NAMESPACE unofficial::apr::
|
||||
+ DESTINATION share/unofficial-apr
|
||||
+ FILE unofficial-apr-config.cmake
|
||||
+)
|
||||
+
|
||||
IF(INSTALL_PDB)
|
||||
INSTALL(FILES ${install_bin_pdb}
|
||||
DESTINATION bin
|
||||
87
externals/vcpkg/ports/apr/portfile.cmake
vendored
Executable file
87
externals/vcpkg/ports/apr/portfile.cmake
vendored
Executable file
@@ -0,0 +1,87 @@
|
||||
|
||||
set(VERSION 1.7.0)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2"
|
||||
FILENAME "apr-${VERSION}.tar.bz2"
|
||||
SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
fix-configcmake.patch
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
private-headers APR_INSTALL_PRIVATE_H
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-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)
|
||||
# There is no way to suppress installation of the headers in debug builds.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
else()
|
||||
# To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure".
|
||||
# The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C".
|
||||
# For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content):
|
||||
# set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu)
|
||||
# set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake)
|
||||
# set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET})
|
||||
# set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache)
|
||||
if(CONFIGURE_PARAMETER_1)
|
||||
message(STATUS "Configuring apr with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}")
|
||||
else()
|
||||
message(STATUS "Configuring apr")
|
||||
endif()
|
||||
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"--prefix=${CURRENT_INSTALLED_DIR}"
|
||||
"${CONFIGURE_PARAMETER_1}"
|
||||
"${CONFIGURE_PARAMETER_2}"
|
||||
"${CONFIGURE_PARAMETER_3}"
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc"
|
||||
"-lapr-\${APR_MAJOR_VERSION}" "-lapr-1"
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/apr-1.pc"
|
||||
"-lapr-\${APR_MAJOR_VERSION}" "-lapr-1"
|
||||
)
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread rt dl uuid crypt)
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "\"${CURRENT_INSTALLED_DIR}\"" "`dirname $0`/../../..")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "APR_SOURCE_DIR=\"${SOURCE_PATH}\"" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "APR_BUILD_DIR=\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\"" "")
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "\"${CURRENT_INSTALLED_DIR}/debug\"" "`dirname $0`/../../../..")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "APR_SOURCE_DIR=\"${SOURCE_PATH}\"" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "APR_BUILD_DIR=\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\"" "")
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
26
externals/vcpkg/ports/apr/vcpkg.json
vendored
Executable file
26
externals/vcpkg/ports/apr/vcpkg.json
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "apr",
|
||||
"version": "1.7.0",
|
||||
"port-version": 9,
|
||||
"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/",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"private-headers": {
|
||||
"description": "Install non-standard files required for building Apache httpd"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user