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

[zstd] No debug postfix. No renaming of CMake config files. #22822

Merged
merged 14 commits into from
Feb 16, 2022
4 changes: 2 additions & 2 deletions ports/blosc/0001-find-deps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ index 7db4bb9..ba20ba6 100644
+
+find_library(
+ ZSTD_LIBRARY_DEBUG
+ NAMES zstdd
+ NAMES zstd zstd_static NAMES_PER_DIR
+ PATHS ${_prefix_path}/debug/lib
+ NO_DEFAULT_PATH
+)
+
+find_library(
+ ZSTD_LIBRARY_RELEASE
+ NAMES zstd
+ NAMES zstd zstd_static NAMES_PER_DIR
+ PATHS ${_prefix_path}/lib
+ NO_DEFAULT_PATH
+)
Expand Down
2 changes: 1 addition & 1 deletion ports/blosc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "blosc",
"version-string": "1.18.1",
"port-version": 3,
"port-version": 4,
"description": "A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`",
"homepage": "https://github.com/Blosc/c-blosc",
"dependencies": [
Expand Down
6 changes: 0 additions & 6 deletions ports/boost-iostreams/b2-options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ if("zstd" IN_LIST FEATURES)
list(APPEND B2_OPTIONS
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
)
# Overwride debug library name
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND B2_OPTIONS
-sZSTD_NAME=zstdd
)
endif()
PhoebeHui marked this conversation as resolved.
Show resolved Hide resolved
list(APPEND B2_OPTIONS
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
)
Expand Down
1 change: 1 addition & 0 deletions ports/boost-iostreams/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "boost-iostreams",
"version": "1.78.0",
"port-version": 1,
"description": "Boost iostreams module",
"homepage": "https://github.com/boostorg/iostreams",
"supports": "!uwp",
Expand Down
3 changes: 1 addition & 2 deletions ports/elfutils/configure.ac.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ index 5a2dc373e..b1928831e 100644
+eu_ZIPLIB(lzma,LZMA,[lzma lzmad],lzma_auto_decoder,[LZMA (xz)])
AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""])
AC_SUBST([LIBLZMA])
-eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)])
+eu_ZIPLIB(zstd,ZSTD,[zstd zstdd zstd_static zstd_staticd],ZSTD_decompress,[ZSTD (zst)])
eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)])
AS_IF([test "x$with_zstd" = xyes], [LIBZSTD="libzstd"], [LIBLZSTD=""])
AC_SUBST([LIBZSTD])
-zip_LIBS="$LIBS"
Expand Down
2 changes: 1 addition & 1 deletion ports/elfutils/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elfutils",
"version-string": "0.182",
"port-version": 2,
"port-version": 3,
"description": "elfutils is a collection of utilities and libraries to read, create and modify ELF binary files, find and handle DWARF debug data, symbols, thread state and stacktraces for processes and core files on GNU/Linux.",
"homepage": "https://sourceware.org/elfutils/",
"supports": "!windows",
Expand Down
2 changes: 1 addition & 1 deletion ports/libwandio/configure.lib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ index 4579fbb3d..f6be008c8 100644
AS_IF([test "x$with_zstd" != "xno"],
[
- AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no)
+ AC_SEARCH_LIBS(ZSTD_createDStream, [zstd zstdd], have_zstd=yes, have_zstd=no)
+ AC_SEARCH_LIBS(ZSTD_createDStream, [zstd zstd_static], have_zstd=yes, have_zstd=no)
+ # AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no)
], [have_zstd=no])

Expand Down
2 changes: 1 addition & 1 deletion ports/libwandio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libwandio",
"version-string": "4.2.1",
"port-version": 4,
"port-version": 5,
"description": "C library for simple and efficient file IO.",
"homepage": "https://github.com/wanduow/wandio",
"supports": "!windows",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ diff --git a/configure.json b/configure.json
index 50d69b740..7149e6803 100644
--- a/configure.json
+++ b/configure.json
@@ -182,7 +182,10 @@
@@ -182,7 +182,9 @@
},
"sources": [
{ "type": "pkgConfig", "args": "libzstd >= 1.3" },
- "-lzstd"
+ "-lzstd",
+ "-lzstdd",
+ "-lzstd -pthread",
+ "-lzstdd -pthread"
+ "-lzstd_static",
+ "-lzstd -pthread"
]
},
"dbus": {
4 changes: 2 additions & 2 deletions ports/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
patches/icu.patch #Help configure find static icu builds in vcpkg on windows
patches/xlib.patch #Patches Xlib check to actually use Pkgconfig instead of makeSpec only
patches/egl.patch #Fix egl detection logic.
patches/zstdd.patch #Fix detection of zstd in debug builds
patches/zstd.patch #Fix detection of static zstd
patches/mysql_plugin_include.patch #Fix include path of mysql plugin
patches/mysql-configure.patch #Fix mysql project
patches/cocoa.patch #Fix missing include on macOS Monterrey, https://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/platforms/cocoa?id=dece6f5840463ae2ddf927d65eb1b3680e34a547
Expand Down Expand Up @@ -217,7 +217,7 @@ find_library(EXPAT_DEBUG NAMES expat PATHS "${CURRENT_INSTALLED_DIR}/debug/lib"

#Dependent libraries
find_library(ZSTD_RELEASE NAMES zstd zstd_static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(ZSTD_DEBUG NAMES zstdd zstd_staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(ZSTD_DEBUG NAMES zstd zstd_static PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(BZ2_RELEASE bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(BZ2_DEBUG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(SSL_RELEASE ssl ssleay32 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qt5-base",
"version-semver": "5.15.2",
"port-version": 19,
"port-version": 20,
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"dependencies": [
Expand Down
30 changes: 9 additions & 21 deletions ports/zstd/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,28 @@ vcpkg_cmake_configure(
-DZSTD_BUILD_PROGRAMS=0
-DZSTD_BUILD_TESTS=0
-DZSTD_BUILD_CONTRIB=0
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d) # this is against the maintainer guidelines.
# Removing it probably requires a vcpkg-cmake-wrapper.cmake to correct downstreams FindZSTD.cmake
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/zstd)

# This enables find_package(ZSTD) and find_package(zstd) to find zstd on Linux(case sensitive filesystems)
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstdConfig.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstd-config.cmake")
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstdConfigVersion.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/zstd-config-version.cmake")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(static_suffix "_static")
else()
set(static_suffix "")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libzstd.pc")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd${static_suffix}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd_static")
if(NOT DEFINED VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd_static")
endif()
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstd${static_suffix}d")
endif()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
foreach(HEADER zdict.h zstd.h zstd_errors.h)
foreach(HEADER IN ITEMS zdict.h zstd.h zstd_errors.h)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${HEADER}" "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" )
endforeach()
endif()

file(COPY "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(COPY "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "ZSTD is dual licensed - see LICENSE and COPYING files\n")
file(READ "${SOURCE_PATH}/LICENSE" bsd)
file(READ "${SOURCE_PATH}/COPYING" gpl)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "ZSTD is dual licensed under BSD and GPLv2.\n\n${bsd}\n\n${gpl}")
2 changes: 2 additions & 0 deletions ports/zstd/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "zstd",
"version": "1.5.2",
"port-version": 1,
"description": "Zstandard - Fast real-time compression algorithm",
"homepage": "https://facebook.github.io/zstd/",
"license": "BSD-3-Clause OR GPL-2.0-only",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/blosc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5e7f0e3e67fb0324c9fc1f4a8ade03acb575d76c",
"version-string": "1.18.1",
"port-version": 4
},
{
"git-tree": "a9ae0480271a2db8d001d389b4c62af49ea50770",
"version-string": "1.18.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boost-iostreams.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e23d8d78c5a33ee92fc1ec70db8125db72032a2",
"version": "1.78.0",
"port-version": 1
},
{
"git-tree": "7e240f9d647c1142b5b61c9a635e3aa186756802",
"version": "1.78.0",
Expand Down
12 changes: 6 additions & 6 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@
},
"blosc": {
"baseline": "1.18.1",
"port-version": 3
"port-version": 4
},
"boinc": {
"baseline": "7.18.1",
Expand Down Expand Up @@ -766,7 +766,7 @@
},
"boost-iostreams": {
"baseline": "1.78.0",
"port-version": 0
"port-version": 1
},
"boost-iterator": {
"baseline": "1.78.0",
Expand Down Expand Up @@ -2010,7 +2010,7 @@
},
"elfutils": {
"baseline": "0.182",
"port-version": 2
"port-version": 3
},
"embree2": {
"baseline": "2.17.7",
Expand Down Expand Up @@ -4078,7 +4078,7 @@
},
"libwandio": {
"baseline": "4.2.1",
"port-version": 4
"port-version": 5
},
"libwebm": {
"baseline": "1.0.0.28",
Expand Down Expand Up @@ -5582,7 +5582,7 @@
},
"qt5-base": {
"baseline": "5.15.2",
"port-version": 19
"port-version": 20
},
"qt5-canvas3d": {
"baseline": "0",
Expand Down Expand Up @@ -7530,7 +7530,7 @@
},
"zstd": {
"baseline": "1.5.2",
"port-version": 0
"port-version": 1
},
"zstr": {
"baseline": "1.0.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/elfutils.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "eef2e7af38b084d165b9759a7f976c04ffacffcf",
"version-string": "0.182",
"port-version": 3
},
{
"git-tree": "9aa4fefa61893cd4b37c0f1a2f16ab255ab0c4bf",
"version-string": "0.182",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libwandio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f2cb5a33d38426869722cbe4aba5af2d408b76cd",
"version-string": "4.2.1",
"port-version": 5
},
{
"git-tree": "ffa2cfbc601c2a9a2fdcbc20f44b312597952ec6",
"version-string": "4.2.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3ff4907f1894358802178deb37c2eea5b426294c",
"version-semver": "5.15.2",
"port-version": 20
},
{
"git-tree": "5a9c2b85fd5f62bb1b52f18c4628b0e08d765dd4",
"version-semver": "5.15.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/z-/zstd.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "94cdffbdf7b197e504a25f1e51525e93e0f7b79f",
"version": "1.5.2",
"port-version": 1
},
{
"git-tree": "4e0feee1fa5d2c318aa16702dc6c89d9301a8ddb",
"version": "1.5.2",
Expand Down