summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-04-08 06:48:32 +0100
committerSam James <sam@gentoo.org>2024-04-08 06:49:56 +0100
commitb935417e4654d43e89c5f8b08e67bac113afbeba (patch)
tree89274db4da6f47803a62fd2b97f503130b7f69c8 /media-sound
parentmedia-libs/netpbm: disable locale test on musl (diff)
downloadgentoo-b935417e4654d43e89c5f8b08e67bac113afbeba.tar.gz
gentoo-b935417e4654d43e89c5f8b08e67bac113afbeba.tar.bz2
gentoo-b935417e4654d43e89c5f8b08e67bac113afbeba.zip
media-sound/cdparanoia: EAPI 8, add pkg-config file
I'm porting media-sound/grip's ebuild to meson and it uses pkg-config to look for cdparanoia. Fedora have the patch I'm adding here to add a .pc file and it looks like it is upstream, just not in a release. Unfortunately, cdparanoia doesn't seem to have been migrated to xiph's gitlab. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/cdparanoia/cdparanoia-3.10.2-r8.ebuild68
-rw-r--r--media-sound/cdparanoia/files/cdparanoia-pkgconfig.patch84
2 files changed, 152 insertions, 0 deletions
diff --git a/media-sound/cdparanoia/cdparanoia-3.10.2-r8.ebuild b/media-sound/cdparanoia/cdparanoia-3.10.2-r8.ebuild
new file mode 100644
index 000000000000..5b851fbabf37
--- /dev/null
+++ b/media-sound/cdparanoia/cdparanoia-3.10.2-r8.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools libtool toolchain-funcs multilib-minimal
+
+MY_P="${PN}-III-$(ver_cut 2-3)"
+DESCRIPTION="An advanced CDDA reader with error correction"
+HOMEPAGE="https://www.xiph.org/paranoia"
+SRC_URI="
+ https://downloads.xiph.org/releases/${PN}/${MY_P}.src.tgz
+ https://dev.gentoo.org/~pacho/${PN}/${P}-patches.tar.xz
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+IDEPEND="app-eselect/eselect-cdparanoia"
+
+PATCHES=(
+ # Patches from previous patchset + Fedora + Debian
+ "${WORKDIR}"/patches
+ # bug #713740
+ "${FILESDIR}"/${PN}-missing-sys_types_h.patch
+ "${FILESDIR}"/cdparanoia-pkgconfig.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.guess config.guess || die
+ mv configure.sub config.sub || die
+
+ sed -i -e '/configure.\(guess\|sub\)/d' configure.in || die
+
+ mv configure.{in,ac} || die
+ eautoconf
+ elibtoolize
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ tc-export AR CC RANLIB
+ econf
+}
+
+multilib_src_compile() {
+ emake OPT="${CFLAGS} -I${S}/interface"
+ use static-libs && emake lib OPT="${CFLAGS} -I${S}/interface"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ mv "${ED}"/usr/bin/${PN}{,-paranoia} || die
+}
+
+pkg_postinst() {
+ eselect ${PN} update ifunset
+}
+
+pkg_postrm() {
+ eselect ${PN} update ifunset
+}
diff --git a/media-sound/cdparanoia/files/cdparanoia-pkgconfig.patch b/media-sound/cdparanoia/files/cdparanoia-pkgconfig.patch
new file mode 100644
index 000000000000..422a5caf0374
--- /dev/null
+++ b/media-sound/cdparanoia/files/cdparanoia-pkgconfig.patch
@@ -0,0 +1,84 @@
+https://src.fedoraproject.org/rpms/cdparanoia/blob/rawhide/f/cdparanoia-10.2-add-pkgconfig.patch
+
+From 5beb3983942ce92ea18a2a0f2e15f84fb25c27d8 Mon Sep 17 00:00:00 2001
+From: xiphmont <xiphmont@0101bb08-14d6-0310-b084-bc0e0c8e3800>
+Date: Fri, 11 Jun 2010 15:42:00 +0000
+Subject: [PATCH] Add pkgconfig file to cdparanoia; closes Trac #1706
+
+git-svn-id: https://svn.xiph.org/trunk/cdparanoia@17289 0101bb08-14d6-0310-b084-bc0e0c8e3800
+diff --git a/Makefile.in b/Makefile.in
+index d03ef85..f8bb5f8 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -3,7 +3,7 @@
+ # DO NOT EDIT BELOW! ##########################################################
+ # (unless, of course, you know what you are doing :) ##########################
+
+-VERSION=10.2
++VERSION=@VERSION@
+ VPATH=@srcdir@
+ srcdir=@srcdir@
+
+@@ -23,6 +23,7 @@ BINDIR=@bindir@
+ MANDIR=@mandir@
+ INCLUDEDIR=@includedir@
+ LIBDIR=@libdir@
++PKGCONFIGDIR=@libdir@/pkgconfig
+ PWD = $(shell pwd)
+
+ OFILES = main.o report.o header.o buffering_write.o cachetest.o
+@@ -85,6 +86,8 @@ install:
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so.0
+ ln -fs libcdda_paranoia.so.0.$(VERSION) \
+ $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so
++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PKGCONFIGDIR)
++ $(INSTALL) -m 0644 $(srcdir)/cdparanoia-3.pc $(DESTDIR)$(PKGCONFIGDIR)
+
+ cdparanoia: $(OFILES) $(LIBDEP)
+ $(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \
+@@ -104,6 +107,6 @@ distclean:
+ cd interface && $(MAKE) distclean
+ cd paranoia && $(MAKE) distclean
+ -rm -f cdparanoia *~ config.* *.o *.wav *.aifc *.raw test.file \
+- Makefile verify_test core gmon.out
++ Makefile verify_test core gmon.out cdparanoia-3.pc
+
+ .PHONY: all debug test lib slib install clean distclean
+diff --git a/configure.in b/configure.in
+index 3ad98ca..37d7576 100644
+--- a/configure.in
++++ b/configure.in
+@@ -3,6 +3,9 @@ AC_INIT(interface/interface.c)
+ cp $srcdir/configure.guess $srcdir/config.guess
+ cp $srcdir/configure.sub $srcdir/config.sub
+
++VERSION="10.2"
++AC_SUBST(VERSION)
++
+ AC_CANONICAL_HOST
+
+ if test -z "$CC"; then
+@@ -67,4 +70,4 @@ AC_SUBST(OPT)
+ AC_SUBST(DEBUG)
+ AC_SUBST(CC)
+
+-AC_OUTPUT(Makefile interface/Makefile paranoia/Makefile)
++AC_OUTPUT(Makefile interface/Makefile paranoia/Makefile cdparanoia-3.pc)
+diff --git a/cdparanoia-3.pc.in b/cdparanoia-3.pc.in
+new file mode 100644
+index 0000000..3a15099
+--- /dev/null
++++ b/cdparanoia-3.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: Cdparanoia III
++Description: Compact Disc Digital Audio (CDDA) Digital Audio Extraction (DAE) library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lcdda_interface -lcdda_paranoia
++Cflags: -I${includedir}
++