summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-01 04:43:51 +0100
committerSam James <sam@gentoo.org>2024-06-01 04:43:51 +0100
commit9200fde5b926191737a8380a08cffa2998013945 (patch)
treee552b14a9f82ac21b043a07f34ef1609860fc6c4 /media-libs/libcddb
parentdev-vcs/git: drop 2.45.0, 2.45.1 (diff)
downloadgentoo-9200fde5b926191737a8380a08cffa2998013945.tar.gz
gentoo-9200fde5b926191737a8380a08cffa2998013945.tar.bz2
gentoo-9200fde5b926191737a8380a08cffa2998013945.zip
media-libs/libcddb: EAPI 8, fix modern C issue
Closes: https://bugs.gentoo.org/919280 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libcddb')
-rw-r--r--media-libs/libcddb/files/libcddb-1.3.2-c99.patch14
-rw-r--r--media-libs/libcddb/libcddb-1.3.2-r2.ebuild63
2 files changed, 77 insertions, 0 deletions
diff --git a/media-libs/libcddb/files/libcddb-1.3.2-c99.patch b/media-libs/libcddb/files/libcddb-1.3.2-c99.patch
new file mode 100644
index 000000000000..20f7b3d8ea3f
--- /dev/null
+++ b/media-libs/libcddb/files/libcddb-1.3.2-c99.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/919280
+https://src.fedoraproject.org/rpms/libcddb/blob/rawhide/f/pointer-types.patch
+--- a/lib/cddb_net.c
++++ b/lib/cddb_net.c
+@@ -329,7 +329,7 @@
+ default:
+ /* we got connected, check error condition */
+ l = sizeof(rv);
+- getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &rv, &l);
++ getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &rv, (socklen_t * restrict)&l);
+ if (rv) {
+ /* something went wrong, simulate normal connect behaviour */
+ errno = rv;
+
diff --git a/media-libs/libcddb/libcddb-1.3.2-r2.ebuild b/media-libs/libcddb/libcddb-1.3.2-r2.ebuild
new file mode 100644
index 000000000000..63506b46fe3b
--- /dev/null
+++ b/media-libs/libcddb/libcddb-1.3.2-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Library for accessing a CDDB server"
+HOMEPAGE="https://libcddb.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-text/doxygen )"
+
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/cddb/version.h )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-c99.patch
+)
+
+src_prepare() {
+ default
+ # Required for CONFIG_SHELL != bash (bug #528012)
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --without-cdio
+ $(use_enable static-libs static)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if use doc ; then
+ cd "${S}"/doc || die
+ doxygen doxygen.conf || die
+ fi
+}
+
+multilib_src_install_all() {
+ default
+
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ if use doc ; then
+ docinto html
+ dodoc "${S}"/doc/html/*
+ fi
+}