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

[many ports]Add vcpkg_fixup_pkgconfig #19721

Merged
merged 5 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 7 additions & 6 deletions ports/c-ares/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ vcpkg_from_github(
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCARES_STATIC=${BUILD_STATIC}
-DCARES_SHARED=${BUILD_SHARED}
Expand All @@ -22,14 +21,16 @@ vcpkg_configure_cmake(
-DCARES_BUILD_CONTAINER_TESTS=OFF
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c-ares)
vcpkg_cmake_install()

vcpkg_copy_pdbs()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/c-ares)
vcpkg_fixup_pkgconfig()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ares.h
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/ares.h"
"#ifdef CARES_STATICLIB" "#if 1"
)
endif()
Expand Down
15 changes: 13 additions & 2 deletions ports/c-ares/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"name": "c-ares",
"version": "1.17.2",
"version-semver": "1.17.2",
"port-version": 1,
"description": "A C library for asynchronous DNS requests",
"homepage": "https://github.com/c-ares/c-ares",
"supports": "!uwp"
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
5 changes: 0 additions & 5 deletions ports/libepoxy/CONTROL

This file was deleted.

12 changes: 8 additions & 4 deletions ports/libepoxy/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ endif()

vcpkg_configure_meson(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${OPTIONS} -Dtests=false
OPTIONS
${OPTIONS}
-Dtests=false
)
vcpkg_install_meson()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig)
vcpkg_fixup_pkgconfig()

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/pkgconfig")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig")

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
10 changes: 10 additions & 0 deletions ports/libepoxy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "libepoxy",
"version-semver": "1.5.5",
"port-version": 1,
"description": "Epoxy is a library for handling OpenGL function pointer management for you",
"homepage": "https://github.com/anholt/libepoxy",
"dependencies": [
"tool-meson"
]
}
11 changes: 6 additions & 5 deletions ports/physfs/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ vcpkg_extract_source_archive_ex(
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED)

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC}
-DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED}
-DPHYSFS_BUILD_TEST=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_pkgconfig()

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
8 changes: 6 additions & 2 deletions ports/physfs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "physfs",
"version-string": "3.0.2",
"port-version": 5,
"version-semver": "3.0.2",
"port-version": 6,
"description": "a library to provide abstract access to various archives",
"homepage": "https://icculus.org/physfs/",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
"zlib"
]
}
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@
},
"c-ares": {
"baseline": "1.17.2",
"port-version": 0
"port-version": 1
},
"c4core": {
"baseline": "2021-07-18",
Expand Down Expand Up @@ -3174,7 +3174,7 @@
},
"libepoxy": {
"baseline": "1.5.5",
"port-version": 0
"port-version": 1
},
"libevent": {
"baseline": "2.1.12",
Expand Down Expand Up @@ -4910,7 +4910,7 @@
},
"physfs": {
"baseline": "3.0.2",
"port-version": 5
"port-version": 6
},
"physx": {
"baseline": "4.1.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/c-ares.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d434c999ea00b87bfbee3d79ddc6fc1b6f12d7fe",
"version-semver": "1.17.2",
"port-version": 1
},
{
"git-tree": "4a8a471e681a33c8dde0a209900ac24a2e8e7f72",
"version": "1.17.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libepoxy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "66e28966117a23b6e9ac6cba7e71ecad8a2803ea",
"version-semver": "1.5.5",
"port-version": 1
},
{
"git-tree": "5a4765be1ed914881477e17b993d7e8df3ef67f0",
"version-string": "1.5.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/physfs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "17d9ad3560e379cc51921a51982f4d31d106f1ed",
"version-semver": "3.0.2",
"port-version": 6
},
{
"git-tree": "5976d673e48ec47164efd0ea8ec86728f0e259be",
"version-string": "3.0.2",
Expand Down