git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #131666 from angustrau/aften
commit2f2ae8de2782d7dbd303a8fa70e8b7b6774978a1 authorSandro <sandro.jaeckel@gmail.com> dateTue 10 Aug 2021, 10:30 (5 years ago) parent394381f99717c1
2 files changed+35−3
pkgs/development/libraries/aften/default.nix+10−3 pkgs/development/libraries/aften/simd-fallback.patch+25
pkgs/development/libraries/aften/default.nix+10−3
@@ -8,14 +8,21 @@ stdenv.mkDerivation rec {
88 sha256 = "02hc5x9vkgng1v9bzvza9985ifrjd7fjr7nlpvazp4mv6dr89k47";
99 };
1010
11+ patches = [
12+ # Add fallback for missing SIMD functions on ARM
13+ # Source https://github.com/Homebrew/homebrew-core/blob/cad412c7fb4b64925f821fcc9ac5f16a2c40f32d/Formula/aften.rb
14+ ./simd-fallback.patch
15+ ];
16+
1117 nativeBuildInputs = [ cmake ];
1218
1319 cmakeFlags = [ "-DSHARED=ON" ];
1420
15− meta = {
21+ meta = with lib; {
1622 description = "An audio encoder which generates compressed audio streams based on ATSC A/52 specification";
1723 homepage = "http://aften.sourceforge.net/";
18− license = lib.licenses.lgpl2;
19− platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
24+ license = licenses.lgpl21Only;
25+ platforms = platforms.unix;
26+ maintainers = with maintainers; [ angustrau ];
2027 };
2128}
pkgs/development/libraries/aften/simd-fallback.patchnew file+25
@@ -0,0 +1,25 @@
1+From dca9c03930d669233258c114e914a01f7c0aeb05 Mon Sep 17 00:00:00 2001
2+From: jbr79 <jbr79@ef0d8562-5c19-0410-972e-841db63a069c>
3+Date: Wed, 24 Sep 2008 22:02:59 +0000
4+Subject: [PATCH] add fallback function for apply_simd_restrictions() on
5+ non-x86/ppc
6+
7+git-svn-id: https://aften.svn.sourceforge.net/svnroot/aften@766 ef0d8562-5c19-0410-972e-841db63a069c
8+---
9+ libaften/cpu_caps.h | 1 +
10+ 1 file changed, 1 insertion(+)
11+
12+diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h
13+index b7c6159..4db11f7 100644
14+--- a/libaften/cpu_caps.h
15++++ b/libaften/cpu_caps.h
16+@@ -26,6 +26,7 @@
17+ #include "ppc_cpu_caps.h"
18+ #else
19+ static inline void cpu_caps_detect(void){}
20++static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){}
21+ #endif
22+
23+ #endif /* CPU_CAPS_H */
24+--
25+2.24.3 (Apple Git-128)