aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fdk-aac
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/fdk-aac
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/fdk-aac')
-rw-r--r--vcpkg/ports/fdk-aac/cxx-linkage-pkgconfig.patch20
-rw-r--r--vcpkg/ports/fdk-aac/portfile.cmake45
-rw-r--r--vcpkg/ports/fdk-aac/vcpkg.json24
3 files changed, 89 insertions, 0 deletions
diff --git a/vcpkg/ports/fdk-aac/cxx-linkage-pkgconfig.patch b/vcpkg/ports/fdk-aac/cxx-linkage-pkgconfig.patch
new file mode 100644
index 0000000..4f8bdd1
--- /dev/null
+++ b/vcpkg/ports/fdk-aac/cxx-linkage-pkgconfig.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4db8c7e..da3297c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -528,6 +528,15 @@ if(FDK_AAC_INSTALL_PKGCONFIG_MODULE)
+ set(LIBS_PUBLIC "-lm")
+ endif()
+ endif()
++ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
++ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
++ continue()
++ elseif(EXISTS "${lib}")
++ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
++ else()
++ string(APPEND LIBS_PRIVATE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
++ endif()
++ endforeach()
+ configure_file(fdk-aac.pc.in fdk-aac.pc @ONLY)
+ install(
+ FILES
diff --git a/vcpkg/ports/fdk-aac/portfile.cmake b/vcpkg/ports/fdk-aac/portfile.cmake
new file mode 100644
index 0000000..5fb6485
--- /dev/null
+++ b/vcpkg/ports/fdk-aac/portfile.cmake
@@ -0,0 +1,45 @@
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
+ FEATURES
+ he-aac HE_AAC
+)
+
+set(legal_notes "NOTICE")
+if(HE_AAC)
+ vcpkg_from_github(
+ REPO mstorsjo/fdk-aac
+ REF v2.0.2
+ SHA512 616207e85035d1659a2b7808ca6ec02ef53c1c4b39eb280fe861f82a4cf548e5db2ac381c496bad37dfc2b8c6677fe704d9fd8449e43d1f93d3e636239e0191b
+ HEAD_REF master
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES
+ cxx-linkage-pkgconfig.patch
+ )
+else()
+ list(PREPEND legal_notes "README.fedora")
+ vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.freedesktop.org/
+ REPO wtaymans/fdk-aac-stripped
+ REF 529b87452cd33d45e1d0a5066d20b64f10b38845 # corresponds to v2.0.2 tag in mstorsjo/fdk-aac GitHub repository
+ HEAD_REF stripped4
+ SHA512 0c37f8fd1bd0e817d2b3970138bef5b2a7a3150ab1a772273c8f5cba09be04afa2f31780f0ea063dd786a71844aa4cb5821349a4bcc5ebe70e827c3561eda2a9
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES
+ cxx-linkage-pkgconfig.patch
+ )
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_PROGRAMS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+vcpkg_fixup_pkgconfig()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+list(TRANSFORM legal_notes PREPEND "${SOURCE_PATH}/")
+vcpkg_install_copyright(FILE_LIST ${legal_notes})
diff --git a/vcpkg/ports/fdk-aac/vcpkg.json b/vcpkg/ports/fdk-aac/vcpkg.json
new file mode 100644
index 0000000..bc2eb0a
--- /dev/null
+++ b/vcpkg/ports/fdk-aac/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "fdk-aac",
+ "version-semver": "2.0.2",
+ "port-version": 4,
+ "description": "A standalone Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android. Uses a fork without HE-AAC, HE-AACv2, or xHE-AAC support to avoid patent licensing and GPL compatibility issues when built without the he-aac option.",
+ "homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped",
+ "license": "FDK-AAC",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "he-aac": {
+ "description": "Support patent-encumbered HE-AAC, HE-AACv2, and xHE-AAC codec profiles. Do not distribute binaries with this option without the relevant patent licenses if you are in a jurisdiction that recognizes software patents. Might not be compatible with the GPL depending on legal interpretation. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112",
+ "supports": "!android"
+ }
+ }
+}