From 182d7a4fe2afe1631e27430e2fc0545149035f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 08:57:37 +0200 Subject: [PATCH 01/12] [libcanberra] new port --- ports/libcanberra/portfile.cmake | 31 +++++++++++++++++++++++++++++++ ports/libcanberra/vcpkg.json | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 ports/libcanberra/portfile.cmake create mode 100644 ports/libcanberra/vcpkg.json diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake new file mode 100644 index 00000000000000..b4882422b6f65b --- /dev/null +++ b/ports/libcanberra/portfile.cmake @@ -0,0 +1,31 @@ +set(VERSION 0.30) + +vcpkg_download_distfile(ARCHIVE + URLS "http://0pointer.de/lennart/projects/${PORT}/${PORT}-${VERSION}.tar.xz" + FILENAME "${PORT}-0.30.tar.xz" + SHA512 f7543582122256826cd01d0f5673e1e58d979941a93906400182305463d6166855cb51f35c56d807a56dc20b7a64f7ce4391368d24990c1b70782a7d0b4429c2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF ${VERSION} +) + +set(ENV{GTKDOCIZE} true) +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + --disable-gtk-doc + --enable-gtk-doc=no + --disable-lynx + --disable-silent-rules +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LGPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libcanberra/vcpkg.json b/ports/libcanberra/vcpkg.json new file mode 100644 index 00000000000000..cf673e65359c69 --- /dev/null +++ b/ports/libcanberra/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libcanberra", + "version": "0.30", + "description": "An implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops", + "homepage": "http://0pointer.de/lennart/projects/libcanberra/", + "dependencies": [ + ] +} From ebe47c9cd10f4658580635c07cd1c8fe2d53ef3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 09:03:51 +0200 Subject: [PATCH 02/12] [libcanberra] add libvorbis depnendency --- ports/libcanberra/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libcanberra/vcpkg.json b/ports/libcanberra/vcpkg.json index cf673e65359c69..170a080443a5d9 100644 --- a/ports/libcanberra/vcpkg.json +++ b/ports/libcanberra/vcpkg.json @@ -4,5 +4,6 @@ "description": "An implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops", "homepage": "http://0pointer.de/lennart/projects/libcanberra/", "dependencies": [ + "libvorbis" ] } From 30cf926031e6fc751c42bfe396fee96f6ff1750f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 10:09:03 +0200 Subject: [PATCH 03/12] [libcanberra] update versions --- versions/baseline.json | 4 ++++ versions/l-/libcanberra.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/l-/libcanberra.json diff --git a/versions/baseline.json b/versions/baseline.json index 22e0a1d2fd7a1b..99d15244c88189 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3224,6 +3224,10 @@ "baseline": "1.16.1", "port-version": 3 }, + "libcanberra": { + "baseline": "0.30", + "port-version": 0 + }, "libcbor": { "baseline": "0.8.0", "port-version": 1 diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json new file mode 100644 index 00000000000000..866e37b9b9c42f --- /dev/null +++ b/versions/l-/libcanberra.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "fbbdc377caacd33ccd99189d5aebf62f3a44de12", + "version": "0.30", + "port-version": 0 + } + ] +} From 69ace477ec8750c5e143cefc88767b7956ffb11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 17:01:44 +0200 Subject: [PATCH 04/12] [libcanberra] fix macOS build --- ports/libcanberra/macos_fix.patch | 14 +++++++++++++ ports/libcanberra/portfile.cmake | 34 +++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 ports/libcanberra/macos_fix.patch diff --git a/ports/libcanberra/macos_fix.patch b/ports/libcanberra/macos_fix.patch new file mode 100644 index 00000000000000..e7f9016e721c3a --- /dev/null +++ b/ports/libcanberra/macos_fix.patch @@ -0,0 +1,14 @@ +diff --git a/configure.ac b/configure.ac +index f68602d..1451747 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -115,8 +115,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ + AC_SUBST([WARNINGFLAGS], $with_cflags) + + CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ +- -Wl,--as-needed \ +- -Wl,--gc-sections]) ++]) + AC_SUBST([GCLDFLAGS], $with_ldflags) + + #### libtool stuff #### diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index b4882422b6f65b..f86539083883a6 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -1,8 +1,19 @@ set(VERSION 0.30) +set(PATCHES) + +if(VCPKG_TARGET_IS_OSX) + list(APPEND PATCHES macos_fix.patch) +endif() + +if(VCPKG_TARGET_IS_OSX) + message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with brew install automake libtool") +else() + message("${PORT} currently requires the following libraries from the system package manager:\n automake\n libtool\n\nThey can be installed with apt-get install automake libtool") +endif() vcpkg_download_distfile(ARCHIVE URLS "http://0pointer.de/lennart/projects/${PORT}/${PORT}-${VERSION}.tar.xz" - FILENAME "${PORT}-0.30.tar.xz" + FILENAME "${PORT}-${VERSION}.tar.xz" SHA512 f7543582122256826cd01d0f5673e1e58d979941a93906400182305463d6166855cb51f35c56d807a56dc20b7a64f7ce4391368d24990c1b70782a7d0b4429c2 ) @@ -10,17 +21,34 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE "${ARCHIVE}" REF ${VERSION} + PATCHES ${PATCHES} ) +#libltdl fixes +if(VCPKG_TARGET_IS_OSX) + execute_process( + COMMAND brew --prefix libtool + OUTPUT_VARIABLE BREW_LIBTOOL_PATH + ) + string(STRIP ${BREW_LIBTOOL_PATH} BREW_LIBTOOL_PATH) + + set(EXTRA_LDFLAGS "LDFLAGS=-L${BREW_LIBTOOL_PATH}/lib/") + set(EXTRA_CPPFLAGS "CPPFLAGS=-I${BREW_LIBTOOL_PATH}/include/") +else() + set(EXTRA_CPPFLAGS) + set(EXTRA_LDFLAGS) +endif() + set(ENV{GTKDOCIZE} true) vcpkg_configure_make( AUTOCONFIG SOURCE_PATH "${SOURCE_PATH}" OPTIONS --disable-gtk-doc - --enable-gtk-doc=no --disable-lynx --disable-silent-rules + ${EXTRA_CPPFLAGS} + ${EXTRA_LDFLAGS} ) vcpkg_install_make() @@ -28,4 +56,6 @@ vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") # empty folder + file(INSTALL "${SOURCE_PATH}/LGPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) From bb3bebb977b89c1b2d244f8540980560746ba6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 17:53:17 +0200 Subject: [PATCH 05/12] [libcanberra] only support mac and linux --- ports/libcanberra/portfile.cmake | 1 + ports/libcanberra/vcpkg.json | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index f86539083883a6..87d8870f850f2a 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -1,3 +1,4 @@ +vcpkg_fail_port_install(ON_TARGET "Windows" "UWP") set(VERSION 0.30) set(PATCHES) diff --git a/ports/libcanberra/vcpkg.json b/ports/libcanberra/vcpkg.json index 170a080443a5d9..1e914c1429a385 100644 --- a/ports/libcanberra/vcpkg.json +++ b/ports/libcanberra/vcpkg.json @@ -3,6 +3,7 @@ "version": "0.30", "description": "An implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops", "homepage": "http://0pointer.de/lennart/projects/libcanberra/", + "supports": "!(windows | uwp)", "dependencies": [ "libvorbis" ] From 44e620430b977a34d330d8f448721551c7af2ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Tue, 31 Aug 2021 17:53:59 +0200 Subject: [PATCH 06/12] [libcanberra] update versions --- versions/l-/libcanberra.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json index 866e37b9b9c42f..f13212b3b447c7 100644 --- a/versions/l-/libcanberra.json +++ b/versions/l-/libcanberra.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fbbdc377caacd33ccd99189d5aebf62f3a44de12", + "git-tree": "0f5197a0d1c561d05c1c73217ab35253e0ca9c1d", "version": "0.30", "port-version": 0 } From e0ac04365bdd2ac56236172cd244c70f24aae0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 1 Sep 2021 11:28:14 +0200 Subject: [PATCH 07/12] [libcanberra] patch pkgconfig on macOS --- ports/libcanberra/macos_pkgconfig.patch | 12 ++++++++++++ ports/libcanberra/portfile.cmake | 20 ++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 ports/libcanberra/macos_pkgconfig.patch diff --git a/ports/libcanberra/macos_pkgconfig.patch b/ports/libcanberra/macos_pkgconfig.patch new file mode 100644 index 00000000000000..7179e5b673f2d3 --- /dev/null +++ b/ports/libcanberra/macos_pkgconfig.patch @@ -0,0 +1,12 @@ +diff --git a/libcanberra.pc.in b/libcanberra.pc.in +index 0a5c7a1..91a9e39 100644 +--- a/libcanberra.pc.in ++++ b/libcanberra.pc.in +@@ -7,5 +7,7 @@ Name: libcanberra + Description: Event Sound API + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lcanberra @PTHREAD_LIBS@ ++Libs.private: @LIBS_PRIVATE@ + Cflags: -D_REENTRANT -I${includedir} ++Cflags.private: @CFLAGS_PRIVATE@ + Requires: diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index 87d8870f850f2a..1dec6214ca364f 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -3,7 +3,7 @@ set(VERSION 0.30) set(PATCHES) if(VCPKG_TARGET_IS_OSX) - list(APPEND PATCHES macos_fix.patch) + list(APPEND PATCHES macos_fix.patch macos_pkgconfig.patch) endif() if(VCPKG_TARGET_IS_OSX) @@ -25,6 +25,9 @@ vcpkg_extract_source_archive_ex( PATCHES ${PATCHES} ) +set(EXTRA_CPPFLAGS) +set(EXTRA_LDFLAGS) + #libltdl fixes if(VCPKG_TARGET_IS_OSX) execute_process( @@ -33,11 +36,10 @@ if(VCPKG_TARGET_IS_OSX) ) string(STRIP ${BREW_LIBTOOL_PATH} BREW_LIBTOOL_PATH) - set(EXTRA_LDFLAGS "LDFLAGS=-L${BREW_LIBTOOL_PATH}/lib/") - set(EXTRA_CPPFLAGS "CPPFLAGS=-I${BREW_LIBTOOL_PATH}/include/") -else() - set(EXTRA_CPPFLAGS) - set(EXTRA_LDFLAGS) + set(LIBS_PRIVATE "-L${BREW_LIBTOOL_PATH}/lib -lltdl") + set(CFLAGS_PRIVATE "-I${BREW_LIBTOOL_PATH}/include") + set(EXTRA_LDFLAGS "LDFLAGS=${LIBS_PRIVATE}") + set(EXTRA_CPPFLAGS "CPPFLAGS=${CFLAGS_PRIVATE}") endif() set(ENV{GTKDOCIZE} true) @@ -53,6 +55,12 @@ vcpkg_configure_make( ) vcpkg_install_make() + +if(VCPKG_TARGET_IS_OSX) + configure_file("${SOURCE_PATH}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY) + configure_file("${SOURCE_PATH}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY) +endif() + vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() From f5fb1c55d2b7f7ca2d88ee8900ac2d94716ca45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 1 Sep 2021 11:41:49 +0200 Subject: [PATCH 08/12] [libcanberra] update versions --- versions/l-/libcanberra.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json index f13212b3b447c7..f43880b250059a 100644 --- a/versions/l-/libcanberra.json +++ b/versions/l-/libcanberra.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0f5197a0d1c561d05c1c73217ab35253e0ca9c1d", + "git-tree": "9256fc8e98fedc751d0c54f0c6720d2bd8fcb704", "version": "0.30", "port-version": 0 } From 53132641a355fd2389e2dba75461cf37e1bb721b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 1 Sep 2021 11:51:35 +0200 Subject: [PATCH 09/12] [libcanberra] unix-only port, remove vcpkg_copy_pdbs() diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index 1dec6214c..b4d75f77e 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -62,7 +62,6 @@ if(VCPKG_TARGET_IS_OSX) endif() vcpkg_fixup_pkgconfig() -vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") # empty folder --- ports/libcanberra/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index 1dec6214ca364f..b4d75f77e2d963 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -62,7 +62,6 @@ if(VCPKG_TARGET_IS_OSX) endif() vcpkg_fixup_pkgconfig() -vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") # empty folder From fc654bee1710915d64295b37625894b1430f5133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 1 Sep 2021 11:51:58 +0200 Subject: [PATCH 10/12] [libcanberra] update versions --- versions/l-/libcanberra.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json index f43880b250059a..60b03e147efb9e 100644 --- a/versions/l-/libcanberra.json +++ b/versions/l-/libcanberra.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9256fc8e98fedc751d0c54f0c6720d2bd8fcb704", + "git-tree": "f4ab210cbf1d8f60f6ab10c12969c4d5f72bcb72", "version": "0.30", "port-version": 0 } From bee9d9dc7c60fcc15b62c8a6fd1693aefcc9115c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Fri, 17 Sep 2021 00:30:25 +0200 Subject: [PATCH 11/12] [libcanberra] fix .pc.in token expansion --- ports/libcanberra/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libcanberra/portfile.cmake b/ports/libcanberra/portfile.cmake index b4d75f77e2d963..49095e63a30fa0 100644 --- a/ports/libcanberra/portfile.cmake +++ b/ports/libcanberra/portfile.cmake @@ -57,8 +57,8 @@ vcpkg_configure_make( vcpkg_install_make() if(VCPKG_TARGET_IS_OSX) - configure_file("${SOURCE_PATH}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY) - configure_file("${SOURCE_PATH}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY) + configure_file("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY) + configure_file("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY) endif() vcpkg_fixup_pkgconfig() From 79733f8a1f3c789964291be04407279ecfd1c25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Fri, 17 Sep 2021 00:30:42 +0200 Subject: [PATCH 12/12] [libcanberra] update versions --- versions/l-/libcanberra.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libcanberra.json b/versions/l-/libcanberra.json index 60b03e147efb9e..8a3cc523c62d9f 100644 --- a/versions/l-/libcanberra.json +++ b/versions/l-/libcanberra.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f4ab210cbf1d8f60f6ab10c12969c4d5f72bcb72", + "git-tree": "9332e8b3945451a2776337d41c54c7200d187a28", "version": "0.30", "port-version": 0 }