mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[pkgconf] Add new port (#17488)
* add new port pkgconf * version stuff * reformat manifest * update version * add supports field * version stuff again
This commit is contained in:
parent
ee8c444d4d
commit
7ab13e4d69
54
ports/pkgconf/fix-static-builds.patch
Normal file
54
ports/pkgconf/fix-static-builds.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
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')
|
23
ports/pkgconf/portfile.cmake
Normal file
23
ports/pkgconf/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO pkgconf/pkgconf
|
||||||
|
REF 458101e787a47378d2fc74c64f649fd3a5f75e55
|
||||||
|
SHA512 36a68c7f452752ddfa7f4740f77277bcea0c1c2c70d36d48e74ac3f77d082771253eb9b78fcd097f55cac425cecabab163123103452ddf16bff7280254c6a715
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES fix-static-builds.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_configure_meson(
|
||||||
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
|
OPTIONS -Dtests=false
|
||||||
|
)
|
||||||
|
vcpkg_install_meson()
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
|
|
||||||
|
vcpkg_copy_tools(TOOL_NAMES pkgconf AUTO_CLEAN)
|
||||||
|
|
||||||
|
# Handle copyright
|
||||||
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
7
ports/pkgconf/vcpkg.json
Normal file
7
ports/pkgconf/vcpkg.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "pkgconf",
|
||||||
|
"version": "1.7.4",
|
||||||
|
"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",
|
||||||
|
"supports": "!uwp"
|
||||||
|
}
|
@ -4760,6 +4760,10 @@
|
|||||||
"baseline": "0.40.0",
|
"baseline": "0.40.0",
|
||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
|
"pkgconf": {
|
||||||
|
"baseline": "1.7.4",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
"platform-folders": {
|
"platform-folders": {
|
||||||
"baseline": "4.0.0",
|
"baseline": "4.0.0",
|
||||||
"port-version": 6
|
"port-version": 6
|
||||||
|
9
versions/p-/pkgconf.json
Normal file
9
versions/p-/pkgconf.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "75fe71378e6521fe0e14a82218a9430c831b9809",
|
||||||
|
"version": "1.7.4",
|
||||||
|
"port-version": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user