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

[pkg-config] new port #17487

Closed
wants to merge 4 commits into from
Closed
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
42 changes: 42 additions & 0 deletions ports/pkg-config/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Tool build no library or includes

vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/
OUT_SOURCE_PATH SOURCE_PATH
REPO pkg-config/pkg-config
REF edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b #v0.29.2
SHA512 537bace09ff183ec793587fc7cf091d75cd5ec34efc1261227de70a15631f40558528f19dbe9e3f2eb8bc24bed21003a01c7766c849ae498031c0c1ae322e314
HEAD_REF master
)

# Remove if GLIB installs a *.pc file or keep it to make it independent of pkg-config itself
set(GLIBS "-lglib-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0")
if(VCPKG_TARGET_IS_WINDOWS)
set(ZLIB_LIBS_DEBUG "-L${CURRENT_INSTALLED_DIR}/debug/lib -lzlibd")
set(ZLIB_LIBS_RELEASE "-L${CURRENT_INSTALLED_DIR}/lib -lzlib")
set(GLIB_LIBS_DEBUG "-L${CURRENT_INSTALLED_DIR}/debug/lib ${GLIBS} -lzlibd")
set(GLIB_LIBS_RELEASE "-L${CURRENT_INSTALLED_DIR}/lib ${GLIBS} -lzlib")
else()
set(ZLIB_LIBS_DEBUG "-L${CURRENT_INSTALLED_DIR}/debug/lib -lz")
set(ZLIB_LIBS_RELEASE "-L${CURRENT_INSTALLED_DIR}/lib -lz")
set(GLIB_LIBS_DEBUG "-L${CURRENT_INSTALLED_DIR}/debug/lib ${GLIBS} -lz -pthread")
set(GLIB_LIBS_RELEASE "-L${CURRENT_INSTALLED_DIR}/lib ${GLIBS} -lz -pthread")
endif()

set(ENV{GLIB_CFLAGS} "-I${CURRENT_INSTALLED_DIR}/include")
set(ENV{ZLIB_CFLAGS} "-I${CURRENT_INSTALLED_DIR}/include")
# set(VCPKG_BUILD_TYPE release) # We theoretically only need the release version. Lets build debug just for testing
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
AUTOCONFIG
CONFIG_DEPENDENT_ENVIRONMENT GLIB_LIBS ZLIB_LIBS
)
vcpkg_install_make()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug) # no need for debug tools

vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin)

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
12 changes: 12 additions & 0 deletions ports/pkg-config/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "pkg-config",
"version": "0.29.2",
"description": "pkg-config is a script to make putting together all the build flags when compiling/linking a lot easier.",
"homepage": "https://gitlab.freedesktop.org/pkg-config/pkg-config",
"dependencies": [
{
"name": "glib",
"default-features": false
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4760,6 +4760,10 @@
"baseline": "0.38.4",
"port-version": 2
},
"pkg-config": {
"baseline": "0.29.2",
"port-version": 0
},
"platform-folders": {
"baseline": "4.0.0",
"port-version": 6
Expand Down
9 changes: 9 additions & 0 deletions versions/p-/pkg-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "bcec8ed859f17a83cf9edb5de0f20a2925047386",
"version": "0.29.2",
"port-version": 0
}
]
}