summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/faad2/APKBUILD12
-rw-r--r--user/faad2/fix-ensure-libraries-versioned.patch50
-rw-r--r--user/faad2/fix-x86-lrintf.patch11
3 files changed, 69 insertions, 4 deletions
diff --git a/user/faad2/APKBUILD b/user/faad2/APKBUILD
index 14b2ea7cc..aec7e58ac 100644
--- a/user/faad2/APKBUILD
+++ b/user/faad2/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer:
pkgname=faad2
pkgver=2.10.1_git20230904
-pkgrel=0
+pkgrel=1
pkgdesc="ISO AAC audio decoder"
url="https://www.audiocoding.com/"
arch="all"
@@ -11,7 +11,10 @@ depends=""
makedepends="cmake"
subpackages="$pkgname-dev $pkgname-doc"
#source="$pkgname-$pkgver.tar.gz::https://github.com/knik0/faad2/archive/$pkgver.tar.gz"
-source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.gz"
+source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.gz
+ fix-x86-lrintf.patch
+ fix-ensure-libraries-versioned.patch
+ "
# secfixes:
# 2.8.8-r1:
@@ -40,7 +43,6 @@ build() {
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-Bbuild
make -C build
@@ -57,4 +59,6 @@ doc() {
"$subpkgdir"/usr/share/doc/$pkgname
}
-sha512sums="5ec65a70ebbb5dbb5e0bffa47499f8bb9436c28ce9a8947e9cede92bbb2441117bac01216989888956e245589c9db572dad17cc47d47ae908709e4e57a7f84b9 faad2-2.10.1_git20230904.tar.gz"
+sha512sums="5ec65a70ebbb5dbb5e0bffa47499f8bb9436c28ce9a8947e9cede92bbb2441117bac01216989888956e245589c9db572dad17cc47d47ae908709e4e57a7f84b9 faad2-2.10.1_git20230904.tar.gz
+2b83d5bf4d4136a4d53536cfd2f4d62174e3660f4a7f39bcedca516ae26a98f3b573db91fb689b20aa26a0d0968745944927c7898ea79bc7a5321971fe92a481 fix-x86-lrintf.patch
+b30727cd1b422a820b30747b3374815b5568a0554945d344aaa4e95502add5d956fed0d1aea451bd97ef704272c8c65c7ec33afe7cbea4b642f7991a135cdc93 fix-ensure-libraries-versioned.patch"
diff --git a/user/faad2/fix-ensure-libraries-versioned.patch b/user/faad2/fix-ensure-libraries-versioned.patch
new file mode 100644
index 000000000..ae0150f46
--- /dev/null
+++ b/user/faad2/fix-ensure-libraries-versioned.patch
@@ -0,0 +1,50 @@
+From 3a593d3efc5cf1db5f4c8914768ea1ea70cbcde5 Mon Sep 17 00:00:00 2001
+From: Eugene Kliuchnikov <eustas.ru@gmail.com>
+Date: Fri, 13 Oct 2023 08:52:31 +0200
+Subject: [PATCH] Add vesion to linked libraries (#181)
+
+---
+ CMakeLists.txt | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 31270436..6b4d4d84 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,11 +34,20 @@ endif()
+
+ set(CAPTURE_PACKAGE_VERSION "[ \\t]*\"PACKAGE_VERSION\"[ \\t]*:[ \\t]\"(.*)\"")
+ file(STRINGS "properties.json" _faad_version_line REGEX "${CAPTURE_PACKAGE_VERSION}")
+-message("${_faad_version_line}")
+ string(REGEX REPLACE "${CAPTURE_PACKAGE_VERSION}" "\\1" FAAD_VERSION "${_faad_version_line}")
++string(REPLACE "\." ";" FAAD_VERSION_PARTS ${FAAD_VERSION})
++list(GET FAAD_VERSION_PARTS 0 FAAD_VERSION_MAJOR)
++list(GET FAAD_VERSION_PARTS 1 FAAD_VERSION_MINOR)
++list(GET FAAD_VERSION_PARTS 2 FAAD_VERSION_PATCH)
++# Semantic -> library version
++# NB(eustas): likely that will be always OK; if not, we could read "overrides" from properties.json
++math(EXPR FAAD_ABI_VERSION_CURRENT "${FAAD_VERSION_MAJOR} + ${FAAD_VERSION_MINOR}")
++set(FAAD_ABI_VERSION_AGE "${FAAD_VERSION_MINOR}")
++set(FAAD_ABI_VERSION_REVISION "${FAAD_VERSION_PATCH}")
++set(FAAD_ABI_COMPATIBILITY "${FAAD_VERSION_MAJOR}")
+
+ message(STATUS "FAAD PACKAGE_VERSION: ${FAAD_VERSION}")
+-mark_as_advanced(FAAD_VERSION)
++mark_as_advanced(FAAD_VERSION FAAD_ABI_COMPATIBILITY FAAD_ABI_VERSION_AGE FAAD_ABI_VERSION_REVISION)
+
+ file(READ include/faad.h.in FAAD_H_SRC)
+ string(REGEX REPLACE "@VERSION@" "${FAAD_VERSION}" FAAD_H_SRC ${FAAD_H_SRC})
+@@ -187,6 +196,13 @@ endfunction()
+
+ transform_pc_file("libfaad/faad2.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/faad2.pc" "${FAAD_VERSION}")
+
++foreach(LIB faad faad_drm faad_fixed faad_drm_fixed)
++ set_target_properties(${LIB} PROPERTIES
++ VERSION "${FAAD_ABI_COMPATIBILITY}.${FAAD_ABI_VERSION_AGE}.${FAAD_ABI_VERSION_REVISION}"
++ SOVERSION "${FAAD_ABI_COMPATIBILITY}"
++ )
++endforeach()
++
+ # CLI
+
+ add_executable(faad_cli ${FAAD_SOURCES})
diff --git a/user/faad2/fix-x86-lrintf.patch b/user/faad2/fix-x86-lrintf.patch
new file mode 100644
index 000000000..b0038b756
--- /dev/null
+++ b/user/faad2/fix-x86-lrintf.patch
@@ -0,0 +1,11 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2023-10-24 21:00:08.223699531 +0000
++++ b/CMakeLists.txt 2023-10-24 21:00:30.200223679 +0000
+@@ -60,6 +60,7 @@
+ set(FAAD_DEFINES
+ APPLY_DRC
+ HAVE_INTTYPES_H=1
++ HAVE_LRINTF=1
+ HAVE_MEMCPY=1
+ HAVE_STRING_H=1
+ HAVE_STRINGS_H=1