2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch
|
|
|
|
, updateAutotoolsGnuConfigScriptsHook, autoreconfHook
|
|
|
|
, IOKit, Carbon
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "cdparanoia-III";
|
|
|
|
version = "10.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${version}.src.tgz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
|
|
|
|
};
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2022-05-18 14:49:53 +00:00
|
|
|
(fetchpatch {
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "0hq3lvfr0h1m3p0r33jij0s1aspiqlpy533rwv19zrfllb39qvr8";
|
|
|
|
# Our configure patch will subsume it, but we want our configure
|
|
|
|
# patch to be used on all platforms so we cannot just start where
|
|
|
|
# this leaves off.
|
|
|
|
excludes = [ "configure.in" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff";
|
|
|
|
sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad";
|
|
|
|
})
|
2022-05-18 14:49:53 +00:00
|
|
|
] ++ [
|
|
|
|
# Has to come after darwin patches
|
|
|
|
./fix_private_keyword.patch
|
|
|
|
# Order does not matter
|
|
|
|
./configure.patch
|
|
|
|
] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
updateAutotoolsGnuConfigScriptsHook
|
|
|
|
autoreconfHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
Carbon
|
|
|
|
IOKit
|
|
|
|
];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Build system reuses the same object file names for shared and static
|
|
|
|
# library. Occasionally fails in the middle:
|
|
|
|
# gcc -O2 -fsigned-char -g -O2 -c scan_devices.c
|
|
|
|
# rm -f *.o core *~ *.out
|
|
|
|
# gcc -O2 -fsigned-char -g -O2 -fpic -c scan_devices.c
|
|
|
|
# gcc -fpic -shared -o libcdda_interface.so.0.10.2 ... scan_devices.o ...
|
|
|
|
# scan_devices.o: file not recognized: file format not recognized
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://xiph.org/paranoia";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool and library for reading digital audio from CDs";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
|
|
|
platforms = platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "cdparanoia";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|