2020-12-09 04:25:41 +01:00
|
|
|
{ lib, stdenv, fetchurl, gnu-config, IOKit, Carbon }:
|
2005-01-19 22:02:19 +01:00
|
|
|
|
2011-07-25 15:52:36 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-20 12:34:30 +02:00
|
|
|
pname = "cdparanoia-III";
|
|
|
|
version = "10.2";
|
2015-04-09 02:42:58 +02:00
|
|
|
|
2005-01-19 22:02:19 +01:00
|
|
|
src = fetchurl {
|
2021-06-20 12:34:30 +02:00
|
|
|
url = "https://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${version}.src.tgz";
|
2011-07-25 15:52:36 +02:00
|
|
|
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
|
2005-01-19 22:02:19 +01:00
|
|
|
};
|
2014-12-17 19:11:30 +01:00
|
|
|
|
2021-01-15 14:21:58 +01:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2015-04-09 02:42:58 +02:00
|
|
|
(fetchurl {
|
|
|
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch";
|
2017-02-27 11:25:49 +01:00
|
|
|
sha256 = "1n86kzm2ssl8fdf5wlhp6ncb2bf6b9xlb5vg0mhc85r69prqzjiy";
|
2015-04-09 02:42:58 +02:00
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff";
|
2017-02-27 11:25:49 +01:00
|
|
|
sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad";
|
2015-04-09 02:42:58 +02:00
|
|
|
})
|
2021-01-15 14:21:58 +01:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch
|
2018-03-13 15:07:49 +01:00
|
|
|
++ [./fix_private_keyword.patch];
|
2015-04-09 02:42:58 +02:00
|
|
|
|
2021-01-15 14:21:58 +01:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [
|
2016-01-04 00:49:09 +01:00
|
|
|
Carbon
|
|
|
|
IOKit
|
|
|
|
];
|
|
|
|
|
2017-03-10 18:39:40 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2020-12-09 04:25:41 +01:00
|
|
|
preConfigure = ''
|
|
|
|
unset CC
|
|
|
|
'' + lib.optionalString (!stdenv.hostPlatform.isx86) ''
|
2017-03-10 18:39:40 +01:00
|
|
|
cp ${gnu-config}/config.sub configure.sub
|
|
|
|
cp ${gnu-config}/config.guess configure.guess
|
|
|
|
'';
|
|
|
|
|
2021-10-22 11:41:40 +02: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-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://xiph.org/paranoia";
|
2011-07-25 15:52:36 +02:00
|
|
|
description = "A tool and library for reading digital audio from CDs";
|
2018-08-23 00:04:35 +02:00
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
|
|
|
platforms = platforms.unix;
|
2008-01-30 20:49:42 +01:00
|
|
|
};
|
2005-01-19 22:02:19 +01:00
|
|
|
}
|