about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/aften
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-08 17:57:14 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 11:31:47 +0000
commitee7984efa14902a2ddd820c937457667a4f40c6a (patch)
treec9c1d046733cefe5e21fdd8a52104175d47b2443 /nixpkgs/pkgs/development/libraries/aften
parentffc9d4ba381da62fd08b361bacd1e71e2a3d934d (diff)
parentb3c692172e5b5241b028a98e1977f9fb12eeaf42 (diff)
downloadnixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.gz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.bz2
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.lz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.xz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.zst
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.zip
Merge commit 'b3c692172e5b5241b028a98e1977f9fb12eeaf42'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aften')
-rw-r--r--nixpkgs/pkgs/development/libraries/aften/default.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch25
2 files changed, 35 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aften/default.nix b/nixpkgs/pkgs/development/libraries/aften/default.nix
index 1ae5ffb17ad3..488c5b6e729a 100644
--- a/nixpkgs/pkgs/development/libraries/aften/default.nix
+++ b/nixpkgs/pkgs/development/libraries/aften/default.nix
@@ -8,14 +8,21 @@ stdenv.mkDerivation rec {
     sha256 = "02hc5x9vkgng1v9bzvza9985ifrjd7fjr7nlpvazp4mv6dr89k47";
   };
 
+  patches = [
+    # Add fallback for missing SIMD functions on ARM
+    # Source https://github.com/Homebrew/homebrew-core/blob/cad412c7fb4b64925f821fcc9ac5f16a2c40f32d/Formula/aften.rb
+    ./simd-fallback.patch
+  ];
+
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = [ "-DSHARED=ON" ];
 
-  meta = {
+  meta = with lib; {
     description = "An audio encoder which generates compressed audio streams based on ATSC A/52 specification";
     homepage = "http://aften.sourceforge.net/";
-    license = lib.licenses.lgpl2;
-    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
+    license = licenses.lgpl21Only;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ angustrau ];
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch b/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch
new file mode 100644
index 000000000000..cdc961a7f5df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch
@@ -0,0 +1,25 @@
+From dca9c03930d669233258c114e914a01f7c0aeb05 Mon Sep 17 00:00:00 2001
+From: jbr79 <jbr79@ef0d8562-5c19-0410-972e-841db63a069c>
+Date: Wed, 24 Sep 2008 22:02:59 +0000
+Subject: [PATCH] add fallback function for apply_simd_restrictions() on
+ non-x86/ppc
+
+git-svn-id: https://aften.svn.sourceforge.net/svnroot/aften@766 ef0d8562-5c19-0410-972e-841db63a069c
+---
+ libaften/cpu_caps.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h
+index b7c6159..4db11f7 100644
+--- a/libaften/cpu_caps.h
++++ b/libaften/cpu_caps.h
+@@ -26,6 +26,7 @@
+ #include "ppc_cpu_caps.h"
+ #else
+ static inline void cpu_caps_detect(void){}
++static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){}
+ #endif
+
+ #endif /* CPU_CAPS_H */
+--
+2.24.3 (Apple Git-128)
\ No newline at end of file