mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 02:33:07 +08:00
[pkgconf] Update to 1.8 (and a few extras; world rebuild) (#20243)
* [vcpkg/script/meson] add option NO_PKG_CONFIG to skip pkg-config setup * [vcpkg/script/pkgconfig] move vcpkg_find_acquire_program(PKGCONFIG) into the check section where it is used * [pkgconf] Update to 1.8.0 * version stuff * remove unused patch. * (CR) quote string * version update.
This commit is contained in:
parent
845a5fda11
commit
a4368eabea
@ -8,6 +8,7 @@ Configure Meson for Debug and Release builds of a project.
|
|||||||
```cmake
|
```cmake
|
||||||
vcpkg_configure_meson(
|
vcpkg_configure_meson(
|
||||||
SOURCE_PATH <${SOURCE_PATH}>
|
SOURCE_PATH <${SOURCE_PATH}>
|
||||||
|
[NO_PKG_CONFIG]
|
||||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||||
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
||||||
@ -28,6 +29,9 @@ Additional options passed to Meson during the Release configuration. These are i
|
|||||||
### OPTIONS_DEBUG
|
### OPTIONS_DEBUG
|
||||||
Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`.
|
Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`.
|
||||||
|
|
||||||
|
### NO_PKG_CONFIG
|
||||||
|
Disable pkg-config setup
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
This command supplies many common arguments to Meson. To see the full list, examine the source.
|
This command supplies many common arguments to Meson. To see the full list, examine the source.
|
||||||
|
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
diff --git a/libpkgconf.pc.in b/libpkgconf.pc.in
|
|
||||||
index d278136e3..ef0c7db5f 100644
|
|
||||||
--- a/libpkgconf.pc.in
|
|
||||||
+++ b/libpkgconf.pc.in
|
|
||||||
@@ -8,4 +8,4 @@ Description: a library for accessing and manipulating development framework conf
|
|
||||||
URL: http://github.com/pkgconf/pkgconf
|
|
||||||
Version: @PACKAGE_VERSION@
|
|
||||||
CFlags: -I${includedir}/pkgconf
|
|
||||||
-Libs: -L${libdir} -lpkgconf
|
|
||||||
+Libs: -L${libdir} -lpkgconf @build_static@
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index e7822b8da..8f7aa0075 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -45,6 +45,13 @@ cdata.set('abs_top_builddir', meson.build_root())
|
|
||||||
|
|
||||||
subdir('libpkgconf')
|
|
||||||
|
|
||||||
+libtype = get_option('default_library')
|
|
||||||
+if libtype == 'static'
|
|
||||||
+ build_static = '-DPKGCONFIG_IS_STATIC'
|
|
||||||
+else
|
|
||||||
+ build_static = ''
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
libpkgconf = library('pkgconf',
|
|
||||||
'libpkgconf/argvsplit.c',
|
|
||||||
'libpkgconf/audit.c',
|
|
||||||
@@ -60,7 +67,7 @@ libpkgconf = library('pkgconf',
|
|
||||||
'libpkgconf/pkg.c',
|
|
||||||
'libpkgconf/queue.c',
|
|
||||||
'libpkgconf/tuple.c',
|
|
||||||
- c_args: '-DLIBPKGCONF_EXPORT',
|
|
||||||
+ c_args: ['-DLIBPKGCONF_EXPORT', build_static],
|
|
||||||
install : true,
|
|
||||||
version : '3.0.0',
|
|
||||||
soversion : '3',
|
|
||||||
@@ -73,13 +80,16 @@ pkg.generate(libpkgconf,
|
|
||||||
url: 'http://github.com/pkgconf/pkgconf',
|
|
||||||
filebase : 'libpkgconf',
|
|
||||||
subdirs: ['pkgconf'],
|
|
||||||
+ extra_cflags : build_static
|
|
||||||
)
|
|
||||||
|
|
||||||
+
|
|
||||||
pkgconf_exe = executable('pkgconf',
|
|
||||||
'cli/main.c',
|
|
||||||
'cli/getopt_long.c',
|
|
||||||
'cli/renderer-msvc.c',
|
|
||||||
link_with : libpkgconf,
|
|
||||||
+ c_args: build_static,
|
|
||||||
install : true)
|
|
||||||
|
|
||||||
if get_option('tests')
|
|
@ -1,23 +1,27 @@
|
|||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO pkgconf/pkgconf
|
REPO pkgconf/pkgconf
|
||||||
REF 458101e787a47378d2fc74c64f649fd3a5f75e55
|
REF cef30268e1a3f79efd607c26abcf556aa314c9c4
|
||||||
SHA512 36a68c7f452752ddfa7f4740f77277bcea0c1c2c70d36d48e74ac3f77d082771253eb9b78fcd097f55cac425cecabab163123103452ddf16bff7280254c6a715
|
SHA512 ea03b81d01521201bdc471a39cdc8b13f9452f7cc78706d5c57056595f3e4e8a3562c022ebb72ce6444f2c7a8dfc778114814ef5064eaef770a70cc294c7f7ee
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES fix-static-builds.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_meson(
|
vcpkg_configure_meson(
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
|
NO_PKG_CONFIG
|
||||||
OPTIONS -Dtests=false
|
OPTIONS -Dtests=false
|
||||||
)
|
)
|
||||||
vcpkg_install_meson()
|
vcpkg_install_meson()
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig(SKIP_CHECK)
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/pkgconf/libpkgconf/libpkgconf-api.h" "#if defined(PKGCONFIG_IS_STATIC)" "#if 1")
|
||||||
|
endif()
|
||||||
|
|
||||||
vcpkg_copy_tools(TOOL_NAMES pkgconf AUTO_CLEAN)
|
vcpkg_copy_tools(TOOL_NAMES pkgconf AUTO_CLEAN)
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pkgconf",
|
"name": "pkgconf",
|
||||||
"version": "1.7.4",
|
"version": "1.8.0",
|
||||||
"description": "pkgconf is a program which helps to configure compiler and linker flags for development libraries. It is similar to pkg-config from freedesktop.org.",
|
"description": "pkgconf is a program which helps to configure compiler and linker flags for development libraries. It is similar to pkg-config from freedesktop.org.",
|
||||||
"homepage": "https://github.com/pkgconf/pkgconf",
|
"homepage": "https://github.com/pkgconf/pkgconf",
|
||||||
"supports": "!uwp"
|
"supports": "!uwp"
|
||||||
|
@ -7,6 +7,7 @@ Configure Meson for Debug and Release builds of a project.
|
|||||||
```cmake
|
```cmake
|
||||||
vcpkg_configure_meson(
|
vcpkg_configure_meson(
|
||||||
SOURCE_PATH <${SOURCE_PATH}>
|
SOURCE_PATH <${SOURCE_PATH}>
|
||||||
|
[NO_PKG_CONFIG]
|
||||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||||
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
||||||
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
||||||
@ -27,6 +28,9 @@ Additional options passed to Meson during the Release configuration. These are i
|
|||||||
### OPTIONS_DEBUG
|
### OPTIONS_DEBUG
|
||||||
Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`.
|
Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`.
|
||||||
|
|
||||||
|
### NO_PKG_CONFIG
|
||||||
|
Disable pkg-config setup
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
This command supplies many common arguments to Meson. To see the full list, examine the source.
|
This command supplies many common arguments to Meson. To see the full list, examine the source.
|
||||||
|
|
||||||
@ -368,7 +372,7 @@ endfunction()
|
|||||||
|
|
||||||
function(vcpkg_configure_meson)
|
function(vcpkg_configure_meson)
|
||||||
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
|
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
|
||||||
cmake_parse_arguments(PARSE_ARGV 0 _vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;ADDITIONAL_NATIVE_BINARIES;ADDITIONAL_CROSS_BINARIES")
|
cmake_parse_arguments(PARSE_ARGV 0 _vcm "NO_PKG_CONFIG" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;ADDITIONAL_NATIVE_BINARIES;ADDITIONAL_CROSS_BINARIES")
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||||
@ -448,12 +452,14 @@ function(vcpkg_configure_meson)
|
|||||||
list(APPEND _vcm_OPTIONS_DEBUG "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}']")
|
list(APPEND _vcm_OPTIONS_DEBUG "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}']")
|
||||||
list(APPEND _vcm_OPTIONS_RELEASE "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug']")
|
list(APPEND _vcm_OPTIONS_RELEASE "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug']")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PKGCONFIG)
|
if(NOT _vcm_NO_PKG_CONFIG)
|
||||||
get_filename_component(PKGCONFIG_PATH ${PKGCONFIG} DIRECTORY)
|
vcpkg_find_acquire_program(PKGCONFIG)
|
||||||
vcpkg_add_to_path("${PKGCONFIG_PATH}")
|
get_filename_component(PKGCONFIG_PATH ${PKGCONFIG} DIRECTORY)
|
||||||
set(PKGCONFIG_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig/")
|
vcpkg_add_to_path("${PKGCONFIG_PATH}")
|
||||||
|
set(PKGCONFIG_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig/")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(buildtypes)
|
set(buildtypes)
|
||||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||||
set(BUILDNAME DEBUG)
|
set(BUILDNAME DEBUG)
|
||||||
@ -492,13 +498,15 @@ function(vcpkg_configure_meson)
|
|||||||
message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}}")
|
message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}}")
|
||||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}")
|
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SUFFIX_${buildtype}}")
|
||||||
#setting up PKGCONFIG
|
#setting up PKGCONFIG
|
||||||
set(ENV{PKG_CONFIG} "${PKGCONFIG}") # Set via native file?
|
if(NOT _vcm_NO_PKG_CONFIG)
|
||||||
set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/${PATH_SUFFIX_${buildtype}}lib/pkgconfig/")
|
set(ENV{PKG_CONFIG} "${PKGCONFIG}") # Set via native file?
|
||||||
if(DEFINED ENV{PKG_CONFIG_PATH})
|
set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/${PATH_SUFFIX_${buildtype}}lib/pkgconfig/")
|
||||||
set(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE $ENV{PKG_CONFIG_PATH})
|
if(DEFINED ENV{PKG_CONFIG_PATH})
|
||||||
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}")
|
set(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE $ENV{PKG_CONFIG_PATH})
|
||||||
else()
|
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}")
|
||||||
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}")
|
else()
|
||||||
|
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
@ -518,12 +526,14 @@ function(vcpkg_configure_meson)
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}} done")
|
message(STATUS "Configuring ${TARGET_TRIPLET}-${SUFFIX_${buildtype}} done")
|
||||||
|
|
||||||
#Restore PKG_CONFIG_PATH
|
if(NOT _vcm_NO_PKG_CONFIG)
|
||||||
if(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype})
|
#Restore PKG_CONFIG_PATH
|
||||||
set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_${buildtype}}")
|
if(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype})
|
||||||
unset(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype})
|
set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_${buildtype}}")
|
||||||
else()
|
unset(BACKUP_ENV_PKG_CONFIG_PATH_${buildtype})
|
||||||
unset(ENV{PKG_CONFIG_PATH})
|
else()
|
||||||
|
unset(ENV{PKG_CONFIG_PATH})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
@ -113,9 +113,6 @@ function(vcpkg_fixup_pkgconfig)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PKGCONFIG)
|
|
||||||
debug_message("Using pkg-config from: ${PKGCONFIG}")
|
|
||||||
|
|
||||||
#Absolute Unix like paths
|
#Absolute Unix like paths
|
||||||
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}")
|
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}")
|
||||||
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}")
|
string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}")
|
||||||
@ -186,6 +183,8 @@ function(vcpkg_fixup_pkgconfig)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(NOT _vfpkg_SKIP_CHECK) # The check can only run after all files have been corrected!
|
if(NOT _vfpkg_SKIP_CHECK) # The check can only run after all files have been corrected!
|
||||||
|
vcpkg_find_acquire_program(PKGCONFIG)
|
||||||
|
debug_message("Using pkg-config from: ${PKGCONFIG}")
|
||||||
foreach(_file ${_vfpkg_${CONFIG}_FILES})
|
foreach(_file ${_vfpkg_${CONFIG}_FILES})
|
||||||
vcpkg_fixup_pkgconfig_check_files("${PKGCONFIG}" "${_file}" "${CONFIG}")
|
vcpkg_fixup_pkgconfig_check_files("${PKGCONFIG}" "${_file}" "${CONFIG}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -5093,7 +5093,7 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"pkgconf": {
|
"pkgconf": {
|
||||||
"baseline": "1.7.4",
|
"baseline": "1.8.0",
|
||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"platform-folders": {
|
"platform-folders": {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "a56de4007c52482253b4e052bc5551655711034c",
|
||||||
|
"version": "1.8.0",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "75fe71378e6521fe0e14a82218a9430c831b9809",
|
"git-tree": "75fe71378e6521fe0e14a82218a9430c831b9809",
|
||||||
"version": "1.7.4",
|
"version": "1.7.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user