Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7df1169
[vcpkg_fixup_pkgconfig] Large simplification, handle spaces in path.
ras0219 Aug 25, 2020
e1aee7b
[vcpkg] Update spaces end-to-end test to also use capitals
ras0219 Aug 25, 2020
ce6564d
[vcpkg_fixup_pkgconfig] Improve error messages and add filesystem sle…
ras0219 Aug 25, 2020
c1fa27b
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Aug 25, 2020
248359c
Merge remote-tracking branch 'origin/master' into dev/roschuma/pkgcon…
ras0219-msft Aug 26, 2020
2fb5b89
[nettle] Fix pkgconfig generation on Windows
ras0219-msft Aug 26, 2020
4db7f46
[gmp] Handle change in install_msbuild
ras0219-msft Aug 26, 2020
3bd3905
[vcpkg_fixup_pkgconfig] Handle spaces on non-Windows platforms
ras0219-msft Aug 26, 2020
cb56eda
[vcpkg_fixup_pkgconfig] Handle issue with win32 pkg-config double esc…
ras0219 Aug 27, 2020
0d6bfe4
Merge remote-tracking branch 'origin/master' into dev/roschuma/pkgcon…
BillyONeal Aug 27, 2020
ce7a48a
[vcpkg_fixup_pkgconfig] Ignore implicit libraries in .pc file (stdc++…
ras0219 Aug 28, 2020
250503c
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Aug 28, 2020
ba9df3c
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Sep 1, 2020
5891d70
[vcpkg_fixup_pkgconfig] Handle + and - in library names
ras0219-msft Sep 1, 2020
6cc5956
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Sep 1, 2020
edc8e6e
[vcpkg_fixup_pkgconfig] Process libname only for use in variables, no…
ras0219-msft Sep 1, 2020
41efa6f
[vcpkg_fixup_pkgconfig] Revert libname processing
ras0219-msft Sep 1, 2020
c60d880
[vcpkg_fixup_pkgconfig] Substitute {exec_prefix}/debug/ to just {exec…
ras0219-msft Sep 3, 2020
409e45c
[vcpkg_fixup_pkgconfig] Handle exec_prefix=${prefix}/debug
ras0219-msft Sep 4, 2020
59449bc
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Sep 5, 2020
89dc0fa
[mongo-c-driver][libbson] Write VERSION_CURRENT in portfile instead o…
ras0219-msft Sep 5, 2020
27ab233
[x265] Do not link libc++ in .pc file
ras0219-msft Sep 7, 2020
d2048de
[vcpkg_fixup_pkgconfig] Handle VCPKG_LIBRARY_LINKAGE to avoid needing…
ras0219-msft Sep 16, 2020
4d686f1
[vcpkg_fixup_pkgconfig] Remove detection of individual libraries
ras0219-msft Sep 23, 2020
96562b1
Merge branch 'master' of https://github.com/microsoft/vcpkg into HEAD
ras0219-msft Oct 6, 2020
646b92f
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Oct 8, 2020
53f75f0
Merge branch 'master' of https://github.com/microsoft/vcpkg into HEAD
ras0219-msft Oct 12, 2020
fb00768
[vcpkg_install_msbuild] Revert changes
ras0219-msft Oct 12, 2020
999bd92
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Oct 16, 2020
0411d82
[vcpkg_fixup_pkgconfig] Address CR comments
ras0219-msft Oct 16, 2020
3b25eaa
Merge branch 'master' of https://github.com/microsoft/vcpkg into HEAD
ras0219-msft Oct 22, 2020
2088987
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Oct 23, 2020
7697d0a
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Oct 28, 2020
e57db43
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Nov 25, 2020
1382ae3
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Nov 28, 2020
c539382
[vcpkg_fixup_pkgconfig] Address CR comments
ras0219-msft Nov 28, 2020
b620ba2
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Nov 30, 2020
48ccab8
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Dec 1, 2020
9a4ab14
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Dec 3, 2020
ef93146
[ceres] Disable building benchmarks
ras0219-msft Dec 5, 2020
60f62c2
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
ras0219-msft Dec 5, 2020
8192a0a
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Dec 7, 2020
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
21 changes: 11 additions & 10 deletions docs/maintainers/vcpkg_fixup_pkgconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Fix common paths in *.pc files and make everything relativ to $(prefix)
vcpkg_fixup_pkgconfig(
[RELEASE_FILES <PATHS>...]
[DEBUG_FILES <PATHS>...]
[SYSTEM_LIBRARIES <NAMES>...]
[IGNORE_FLAGS <FLAGS>]
[SKIP_CHECK]
)
```
Expand All @@ -22,21 +20,24 @@ Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURR
Specifies a list of files to apply the fixes for debug paths.
Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/

### SYSTEM_LIBRARIES
If the *.pc file contains system libraries outside vcpkg these need to be listed here.
VCPKG checks every -l flag for the existence of the required library within vcpkg.
### SKIP_CHECK
Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases.

### IGNORE_FLAGS
If the *.pc file contains flags in the lib field which are not libraries. These can be listed here
### SYSTEM_PACKAGES (deprecated)
This argument has been deprecated and has no effect.

### SKIP_CHECK
Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases.
### SYSTEM_LIBRARIES (deprecated)
This argument has been deprecated and has no effect.

### IGNORE_FLAGS (deprecated)
This argument has been deprecated and has no effect.

## Notes
Still work in progress. If there are more cases which can be handled here feel free to add them

## Examples
Just call `vcpkg_fixup_pkgconfig()` after any install step which installs *.pc files.

* [brotli](https://github.com/Microsoft/vcpkg/blob/master/ports/brotli/portfile.cmake)

## Source
[scripts/cmake/vcpkg_fixup_pkgconfig.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_pkgconfig.cmake)
2 changes: 2 additions & 0 deletions ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ vcpkg_configure_cmake(
-DBUILD_BENCHMARKS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARKS=OFF
-DPROVIDE_UNINSTALL_TARGET=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
-DLIB_SUFFIX=${LIB_SUFFIX}
)
Expand Down
2 changes: 1 addition & 1 deletion ports/libbson/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libbson
Version: 1.16.1
Port-Version: 1
Port-Version: 2
Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.
Homepage: https://github.com/mongodb/libbson
4 changes: 4 additions & 0 deletions ports/libbson/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents)
string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}")
string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}")

file(WRITE "${BUILD_VERSION}" ${SOURCE_PATH}/VERSION_CURRENT)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
Expand All @@ -31,6 +33,7 @@ vcpkg_configure_cmake(
-DENABLE_EXAMPLES=OFF
-DENABLE_STATIC=${ENABLE_STATIC}
-DBUILD_VERSION=${BUILD_VERSION}
-DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON
)

vcpkg_install_cmake()
Expand All @@ -44,6 +47,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-${PORT_POSTFIX} TARGET_PATH share/bson-${PORT_POSTFIX})
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver)

Expand Down
4 changes: 2 additions & 2 deletions ports/mongo-c-driver/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: mongo-c-driver
Version: 1.16.1-1
Port-Version: 1
Version: 1.16.1
Port-Version: 3
Build-Depends: libbson, openssl (!windows), zlib
Description: Client library written in C for MongoDB.
Homepage: https://github.com/mongodb/mongo-c-driver
Expand Down
3 changes: 3 additions & 0 deletions ports/mongo-c-driver/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents)
string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}")
string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}")

file(WRITE "${BUILD_VERSION}" ${SOURCE_PATH}/VERSION_CURRENT)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
Expand All @@ -55,6 +57,7 @@ vcpkg_configure_cmake(
-DENABLE_ZLIB=SYSTEM
-DENABLE_STATIC=${ENABLE_STATIC}
-DBUILD_VERSION=${BUILD_VERSION}
-DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON
${FEATURE_OPTIONS}
)

Expand Down
2 changes: 1 addition & 1 deletion ports/nettle/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: nettle
Version: 3.5.1
Port-Version: 4
Port-Version: 5
Homepage: https://git.lysator.liu.se/nettle/nettle
Description: Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
Build-Depends: gmp, vs-yasm (windows), yasm-tool-helper (windows)
4 changes: 2 additions & 2 deletions ports/nettle/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/lib")
set(includedir "\${prefix}/include")
set(LIBS -lnettle -lgmp)
set(LIBS "-lnettle -lgmp")
configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/nettle.pc" @ONLY)
set(HOGWEED -lhogweed)
set(LIBS -lnettle)
Expand All @@ -93,7 +93,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(exec_prefix "\${prefix}")
set(libdir "\${prefix}/lib")
set(includedir "\${prefix}/../include")
set(LIBS -lnettled -lgmpd)
set(LIBS "-lnettled -lgmpd")
configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/nettle.pc" @ONLY)
set(LIBS -lnettled)
set(HOGWEED -lhogweedd)
Expand Down
2 changes: 1 addition & 1 deletion ports/x265/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: x265
Version: 3.4
Port-Version: 1
Port-Version: 2
Homepage: https://github.com/videolan/x265
Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.
11 changes: 11 additions & 0 deletions ports/x265/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ if(VCPKG_TARGET_IS_MINGW AND ENABLE_SHARED)
endif()

if(UNIX)
foreach(FILE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc")
if(EXISTS "${FILE}")
file(READ "${FILE}" _contents)
string(REPLACE " -lstdc++" "" _contents "${_contents}")
string(REPLACE " -lc++" "" _contents "${_contents}")
string(REPLACE " -lgcc_s" "" _contents "${_contents}")
string(REPLACE " -lgcc" "" _contents "${_contents}")
string(REPLACE " -lrt" "" _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")
endif()
endforeach()
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES numa)
else()
vcpkg_fixup_pkgconfig()
Expand Down
12 changes: 12 additions & 0 deletions scripts/azure-pipelines/end-to-end-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ function Run-Vcpkg {
./vcpkg @testArgs
}

##### Test spaces in the path
Refresh-TestRoot
$CurrentTest = "zlib with spaces in path"
Write-Host $CurrentTest
./vcpkg install zlib "--triplet" $Triplet `
"--no-binarycaching" `
"--x-buildtrees-root=$TestingRoot/build Trees" `
"--x-install-root=$TestingRoot/instalL ed" `
"--x-packages-root=$TestingRoot/packaG es"
Throw-IfFailed

##### Binary caching tests
if (-not $IsLinux -and -not $IsMacOS) {
Refresh-TestRoot
# Test msbuild props and targets
Expand Down
Loading