aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Wróbel <me@dawidwrobel.com>2021-09-17 17:21:33 +0200
committerGitHub <noreply@github.com>2021-09-17 08:21:33 -0700
commit57ab68daf6e2019007b754084a2abc8e48aaf401 (patch)
tree43097a561fba854f5631d33367f8f8857031004a
parent66dc12b3fa1863bf60afe75f2cfdd41298e52ee5 (diff)
downloadvcpkg-57ab68daf6e2019007b754084a2abc8e48aaf401.tar.gz
vcpkg-57ab68daf6e2019007b754084a2abc8e48aaf401.zip
[ECM] fix FindCanberra for static builds (#20213)
* [ECM] fix FindCanberra for static builds Also remove dangling do-not-override-custom-clang-format-files.patch * [ECM] use current spec * [ECM] wrap paths in quotes * [ECM] update versions
-rw-r--r--ports/ecm/do-not-override-custom-clang-format-files.patch33
-rw-r--r--ports/ecm/fix_canberra.patch39
-rw-r--r--ports/ecm/portfile.cmake15
-rw-r--r--ports/ecm/vcpkg.json13
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/e-/ecm.json5
6 files changed, 65 insertions, 42 deletions
diff --git a/ports/ecm/do-not-override-custom-clang-format-files.patch b/ports/ecm/do-not-override-custom-clang-format-files.patch
deleted file mode 100644
index 4e7f4e286..000000000
--- a/ports/ecm/do-not-override-custom-clang-format-files.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0d5ed9bb9117f6526691b3572bf85090efbeed4a Mon Sep 17 00:00:00 2001
-From: Alexander Lohnau <alexander.lohnau@gmx.de>
-Date: Sat, 30 Jan 2021 13:44:07 +0100
-Subject: [PATCH] KDEClangFormat: Do not override custom clang-format files
-
----
- kde-modules/KDEClangFormat.cmake | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/kde-modules/KDEClangFormat.cmake b/kde-modules/KDEClangFormat.cmake
-index 6cdbd2b5..995f03ad 100644
---- a/kde-modules/KDEClangFormat.cmake
-+++ b/kde-modules/KDEClangFormat.cmake
-@@ -35,7 +35,18 @@ find_program(KDE_CLANG_FORMAT_EXECUTABLE clang-format)
-
- # instantiate our clang-format file, must be in source directory for tooling if we have the tool
- if(KDE_CLANG_FORMAT_EXECUTABLE)
-- configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format @ONLY)
-+ set(CLANG_FORMAT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format)
-+ if (EXISTS ${CLANG_FORMAT_FILE})
-+ file(READ ${CLANG_FORMAT_FILE} CLANG_FORMAT_CONTENTS LIMIT 128)
-+ string(FIND "${CLANG_FORMAT_CONTENTS}" "SPDX-FileCopyrightText: 2019 Christoph Cullmann" matchres)
-+ if(${matchres} EQUAL -1)
-+ message(WARNING "The .clang-format file already exists. Please remove it in order to use the file provided by ECM")
-+ else()
-+ configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CLANG_FORMAT_FILE} @ONLY)
-+ endif()
-+ else()
-+ configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CLANG_FORMAT_FILE} @ONLY)
-+ endif()
- endif()
-
- # formatting target
diff --git a/ports/ecm/fix_canberra.patch b/ports/ecm/fix_canberra.patch
new file mode 100644
index 000000000..dcfcaba6f
--- /dev/null
+++ b/ports/ecm/fix_canberra.patch
@@ -0,0 +1,39 @@
+From 203c65c562453385e3ffc4485844b15e80b93107 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
+Date: Fri, 17 Sep 2021 00:07:08 +0200
+Subject: [PATCH] FindCanberra: link against target provided by pkgconfig
+
+target_link_libraries() against the target generated by
+pkg_check_modules() so that the additional linker options are not
+lost, such as the additional libraries to link against when
+building statically.
+
+BUG: 442555
+---
+ find-modules/FindCanberra.cmake | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/find-modules/FindCanberra.cmake b/find-modules/FindCanberra.cmake
+index c54adf99..f9561118 100644
+--- a/find-modules/FindCanberra.cmake
++++ b/find-modules/FindCanberra.cmake
+@@ -34,7 +34,7 @@ Since 5.56.0.
+ #]=======================================================================]
+
+ find_package(PkgConfig QUIET)
+-pkg_check_modules(PC_Canberra libcanberra QUIET)
++pkg_check_modules(PC_Canberra REQUIRED IMPORTED_TARGET libcanberra QUIET)
+
+ find_library(Canberra_LIBRARIES
+ NAMES canberra
+@@ -66,6 +66,7 @@ if(Canberra_FOUND AND NOT TARGET Canberra::Canberra)
+ INTERFACE_COMPILE_OPTIONS "${PC_Canberra_CFLAGS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Canberra_INCLUDE_DIRS}"
+ )
++ target_link_libraries(Canberra::Canberra INTERFACE PkgConfig::PC_Canberra)
+ endif()
+
+ mark_as_advanced(Canberra_LIBRARIES Canberra_INCLUDE_DIRS Canberra_VERSION)
+--
+GitLab
+
diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake
index 5d07071eb..53acd4d8d 100644
--- a/ports/ecm/portfile.cmake
+++ b/ports/ecm/portfile.cmake
@@ -4,11 +4,12 @@ vcpkg_from_github(
REF v5.84.0
SHA512 d49397bcf0d49a95c86c9d9a4e653015ee8b3ef1261b2842439bba7ff3363ac06351fa2df4035c2cb36397d2fc64375a14966ada29f231df51ba26d8e196d6ef
HEAD_REF master
+ PATCHES
+ fix_canberra.patch
)
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
@@ -16,14 +17,14 @@ vcpkg_configure_cmake(
-DBUILD_TESTING=OFF
)
-vcpkg_install_cmake()
+vcpkg_cmake_install()
# Remove debug files
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
-file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL "${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
# Allow empty include directory
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
diff --git a/ports/ecm/vcpkg.json b/ports/ecm/vcpkg.json
index 3f081e37a..bc120806e 100644
--- a/ports/ecm/vcpkg.json
+++ b/ports/ecm/vcpkg.json
@@ -1,6 +1,17 @@
{
"name": "ecm",
"version": "5.84.0",
+ "port-version": 1,
"description": "Extra CMake Modules (ECM), extra modules and scripts for CMake",
- "homepage": "https://github.com/KDE/extra-cmake-modules"
+ "homepage": "https://github.com/KDE/extra-cmake-modules",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
}
diff --git a/versions/baseline.json b/versions/baseline.json
index e2ee6155d..2905c3109 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1910,7 +1910,7 @@
},
"ecm": {
"baseline": "5.84.0",
- "port-version": 0
+ "port-version": 1
},
"ecos": {
"baseline": "2.0.8",
diff --git a/versions/e-/ecm.json b/versions/e-/ecm.json
index 4befe9d8f..5ce5bb02b 100644
--- a/versions/e-/ecm.json
+++ b/versions/e-/ecm.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "5832b19b778f60eb0fb24654e0c8b665f0f8fb20",
+ "version": "5.84.0",
+ "port-version": 1
+ },
+ {
"git-tree": "9cd1bc0ab97889acb8839e22ec43d13bc7c97ed0",
"version": "5.84.0",
"port-version": 0