aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Wróbel <me@dawidwrobel.com>2021-09-28 03:19:43 +0300
committerGitHub <noreply@github.com>2021-09-27 17:19:43 -0700
commit8c7e42e5aff3ba57d6995ceaeee25263374a40e3 (patch)
tree28bb5c0119b7a2af40ee42b36036fc19fb33a678
parent6bbee1c30022d33ccf9d9003cdeb55aecb6016fa (diff)
downloadvcpkg-8c7e42e5aff3ba57d6995ceaeee25263374a40e3.tar.gz
vcpkg-8c7e42e5aff3ba57d6995ceaeee25263374a40e3.zip
[libcanberra] new port (#19816)
* [libcanberra] new port * [libcanberra] add libvorbis depnendency * [libcanberra] update versions * [libcanberra] fix macOS build * [libcanberra] only support mac and linux * [libcanberra] update versions * [libcanberra] patch pkgconfig on macOS * [libcanberra] update versions * [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 * [libcanberra] update versions * [libcanberra] fix .pc.in token expansion * [libcanberra] update versions
-rw-r--r--ports/libcanberra/macos_fix.patch14
-rw-r--r--ports/libcanberra/macos_pkgconfig.patch12
-rw-r--r--ports/libcanberra/portfile.cmake69
-rw-r--r--ports/libcanberra/vcpkg.json10
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/l-/libcanberra.json9
6 files changed, 118 insertions, 0 deletions
diff --git a/ports/libcanberra/macos_fix.patch b/ports/libcanberra/macos_fix.patch
new file mode 100644
index 000000000..e7f9016e7
--- /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/macos_pkgconfig.patch b/ports/libcanberra/macos_pkgconfig.patch
new file mode 100644
index 000000000..7179e5b67
--- /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
new file mode 100644
index 000000000..49095e63a
--- /dev/null
+++ b/ports/libcanberra/portfile.cmake
@@ -0,0 +1,69 @@
+vcpkg_fail_port_install(ON_TARGET "Windows" "UWP")
+set(VERSION 0.30)
+set(PATCHES)
+
+if(VCPKG_TARGET_IS_OSX)
+ list(APPEND PATCHES macos_fix.patch macos_pkgconfig.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}-${VERSION}.tar.xz"
+ SHA512 f7543582122256826cd01d0f5673e1e58d979941a93906400182305463d6166855cb51f35c56d807a56dc20b7a64f7ce4391368d24990c1b70782a7d0b4429c2
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ REF ${VERSION}
+ PATCHES ${PATCHES}
+)
+
+set(EXTRA_CPPFLAGS)
+set(EXTRA_LDFLAGS)
+
+#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(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)
+vcpkg_configure_make(
+ AUTOCONFIG
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ --disable-gtk-doc
+ --disable-lynx
+ --disable-silent-rules
+ ${EXTRA_CPPFLAGS}
+ ${EXTRA_LDFLAGS}
+)
+
+vcpkg_install_make()
+
+if(VCPKG_TARGET_IS_OSX)
+ 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()
+
+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)
diff --git a/ports/libcanberra/vcpkg.json b/ports/libcanberra/vcpkg.json
new file mode 100644
index 000000000..1e914c142
--- /dev/null
+++ b/ports/libcanberra/vcpkg.json
@@ -0,0 +1,10 @@
+{
+ "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/",
+ "supports": "!(windows | uwp)",
+ "dependencies": [
+ "libvorbis"
+ ]
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index 0d3073791..931b866e9 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3240,6 +3240,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 000000000..8a3cc523c
--- /dev/null
+++ b/versions/l-/libcanberra.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "9332e8b3945451a2776337d41c54c7200d187a28",
+ "version": "0.30",
+ "port-version": 0
+ }
+ ]
+}