mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
libcdio-paranoia, new recipe (#2993)
This commit is contained in:
committed by
Scott McCreary
parent
dd15d6bf5e
commit
b3339e6b21
@@ -0,0 +1,92 @@
|
||||
SUMMARY="An advanced CDDA reader with error correction"
|
||||
DESCRIPTION="This is a port of xiph.org's cdda paranoia \
|
||||
https://www.xiph.org/paranoia/ to use libcdio for CDROM access. By doing \
|
||||
this, cdparanoia runs on platforms other than GNU/Linux."
|
||||
HOMEPAGE="https://www.gnu.org/software/libcdio/"
|
||||
COPYRIGHT="2012-2017 Rocky Bernstein
|
||||
Monty
|
||||
Robert Kaush"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/rocky/libcdio-paranoia/archive/release-10.2+0.94+2.tar.gz"
|
||||
CHECKSUM_SHA256="6cbd80c19bd79002e8a6b4d52c3379e822b84d83614087d2f9ff10d400c58e83"
|
||||
SOURCE_FILENAME="libcdio-paranoia-10.2+0.94+2.tar.gz"
|
||||
SOURCE_DIR="libcdio-paranoia-release-10.2-0.94-2"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
|
||||
PATCHES="libcdio_paranoia-10.2_0.94_2.patchset"
|
||||
fi
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
libVersion="2.0.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libcdio_paranoia$secondaryArchSuffix = $portVersion
|
||||
cmd:cd_paranoia$secondaryArchSuffix
|
||||
lib:libcdio_cdda$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcdio_paranoia$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcdio$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libcdio_paranoia${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcdio_cdda$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcdio_paranoia$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libcdio_paranoia$secondaryArchSuffix == $portVersion base
|
||||
devel:libcdio$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcdio$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libcdio_paranoia$secondaryArchSuffix \
|
||||
"$binDir"/cd-paranoia \
|
||||
"$libDir"/libcdio_cdda.so.$libVersion \
|
||||
"$libDir"/libcdio_paranoia.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./autogen.sh
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/lib*.la
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $documentationDir
|
||||
fi
|
||||
|
||||
prepareInstalledDevelLibs libcdio_cdda libcdio_paranoia
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
From 7585811a602b21d633657050cd1ed954af9c5f41 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 2 Sep 2018 13:16:51 +0200
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/lib/cdda_interface/utils.c b/lib/cdda_interface/utils.c
|
||||
index 9aed89d..a4350df 100644
|
||||
--- a/lib/cdda_interface/utils.c
|
||||
+++ b/lib/cdda_interface/utils.c
|
||||
@@ -178,6 +178,7 @@ gettime(struct timespec *ts) {
|
||||
#if defined(HAVE_CLOCK_GETTIME)
|
||||
/* Use clock_gettime if available, preferably using the monotonic clock.
|
||||
*/
|
||||
+ {
|
||||
static clockid_t clock = (clockid_t)-1;
|
||||
if ((int)clock == -1) clock = (clock_gettime(CLOCK_MONOTONIC, ts) < 0 ? CLOCK_REALTIME : CLOCK_MONOTONIC);
|
||||
ret = clock_gettime(clock, ts);
|
||||
@@ -202,4 +203,5 @@ gettime(struct timespec *ts) {
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
+ }
|
||||
}
|
||||
diff --git a/lib/paranoia/paranoia.c b/lib/paranoia/paranoia.c
|
||||
index 17a1139..f32fe48 100644
|
||||
--- a/lib/paranoia/paranoia.c
|
||||
+++ b/lib/paranoia/paranoia.c
|
||||
@@ -1400,6 +1400,7 @@ i_stage2_each(root_block *root, v_fragment_t *v,
|
||||
/* If this fragment has already been merged & freed, abort. */
|
||||
if (!v || !v->one) return(0);
|
||||
|
||||
+ {
|
||||
cdrom_paranoia_t *p=v->p;
|
||||
|
||||
/* "??? Why do we round down to an even dynoverlap?" Dynoverlap is
|
||||
@@ -2118,6 +2119,7 @@ i_stage2_each(root_block *root, v_fragment_t *v,
|
||||
|
||||
}
|
||||
} /* endif rv(root) */
|
||||
+ }
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/src/getopt.c b/src/getopt.c
|
||||
index 80c7cb2..dce7d6a 100644
|
||||
--- a/src/getopt.c
|
||||
+++ b/src/getopt.c
|
||||
@@ -877,6 +877,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
if (longopts == NULL)
|
||||
goto no_longs;
|
||||
|
||||
+ {
|
||||
char *nameend;
|
||||
const struct option *p;
|
||||
const struct option *pfound = NULL;
|
||||
@@ -1096,6 +1097,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
no_longs:
|
||||
d->__nextchar = NULL;
|
||||
return 'W'; /* Let the application handle it. */
|
||||
+ }
|
||||
}
|
||||
if (temp[1] == ':')
|
||||
{
|
||||
--
|
||||
2.16.4
|
||||
|
||||
Reference in New Issue
Block a user