summaryrefslogtreecommitdiff
path: root/media-libs/libifp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-15 00:13:03 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-15 00:13:03 +0000
commit770d63f36dbe1722e0ff9ab55eeca49986f01527 (patch)
treebe9aae0ef5001e4669f914ac9ad9b4eaa4db8500 /media-libs/libifp
parent4fda045f90a4e301329bddb766e2e12a0b4401de (diff)
gentoo auto-resync : 15:02:2025 - 00:13:02HEADmaster
Diffstat (limited to 'media-libs/libifp')
-rw-r--r--media-libs/libifp/Manifest3
-rw-r--r--media-libs/libifp/files/libifp-1.0.0.2-c23.patch25
-rw-r--r--media-libs/libifp/files/libifp-1.0.0.2-configure.patch50
-rw-r--r--media-libs/libifp/libifp-1.0.0.2-r2.ebuild63
4 files changed, 141 insertions, 0 deletions
diff --git a/media-libs/libifp/Manifest b/media-libs/libifp/Manifest
index 367f251f44c1..59b9a921d724 100644
--- a/media-libs/libifp/Manifest
+++ b/media-libs/libifp/Manifest
@@ -1,3 +1,6 @@
+AUX libifp-1.0.0.2-c23.patch 901 BLAKE2B d9e25a870b012c1ceb8afa4cdca8aa5b30bb1161a41551476066bc22cda414b4ced3cf0d120556be063af6e9793d0d2d065aca7c27e4f110b891c8823a350377 SHA512 f942c548029e84884fef0372c3c57541532248fd07ac5c5f08a68051aa684a4da80f6f229cedb79531582645d1e499156c8c9ea7e5e5f29d31b9e9637ce2bec1
+AUX libifp-1.0.0.2-configure.patch 1615 BLAKE2B 706c8d7fd67703b2645cca6ba4798d51b5ba13924ca496ea6b20bccc347c8ab34717477ce982228a28fc239ea7e12f35a23656d4f34e09b5a91290c385a24812 SHA512 794be206d08aa12b1cdb21a2a8e3fe4991a7135a107d6349751f2fadeb012c36dfd1de306c9771334649b7f431e07ac94a0c4095b2f4235894f9de8ab81e16c8
DIST libifp-1.0.0.2.tar.gz 358550 BLAKE2B 3d9e9d82d0147286d3c577bfcc43d2052b643dd3e86c8770fc6dc56047f8c7923e4e04b6463cf895e552be423f887df48d6741173deaf165aa62d2e64ec1332c SHA512 538ddcf0be4bf7427a7f8ebb60ec77f22b69aa26055fc279f884bd82bae4e32267c79ac37f4dcf9970806e520549bc93dbf0aa2501c9c4fc699a6855e757a331
EBUILD libifp-1.0.0.2-r1.ebuild 1328 BLAKE2B a5ffea0ab83909aedb9b531758794b7bf1b83c982d85ec9b2630ce5b7b4f7e386dd6f9453758c3e49c94c303f13b0783aa87be8e5ffe6146ba77cdd831e80c34 SHA512 b1d45bc2345c8d904ed8e2f5a73b4502b6e567ce2981c52d23065bd41f2dba399774e4ae244c8138147c783cba4ca2bba28f1e5bdeb81d71ece61b61fea60a85
+EBUILD libifp-1.0.0.2-r2.ebuild 1478 BLAKE2B 2054893a08c6eeeef5ee564ec7ad098d9c19db9f7584ade74454c964356af0a475d84fdd4a0418b0c1c9417d8d9c6ba07825d4bdf9ddb2181be3a0113a710f00 SHA512 1282294df75a2de6343a87857cad618ccdb26cee8741bba0f8a34902ce10dde6ecb40ffa6cc8c2147c8e6073415081bf22fa3695107af9875b069db6d1a55f8a
MISC metadata.xml 334 BLAKE2B 00a5f3566dd9ed71559805df3136b7617cbd494a2c80dffd2dd27a9cb55ab72c6ea29b55e89b7f10fac5845a9368b6a284c2d41d96f25ea6c8a8193475a79985 SHA512 836dfdf939f178daad4a0c71ed1d0e93f8e5618eab5cef82d5494022a92988ae54294f5188826f43b17c4e4a15cec03b714f627baa9d57c4db79a7bd5038b45f
diff --git a/media-libs/libifp/files/libifp-1.0.0.2-c23.patch b/media-libs/libifp/files/libifp-1.0.0.2-c23.patch
new file mode 100644
index 000000000000..c185aa362311
--- /dev/null
+++ b/media-libs/libifp/files/libifp-1.0.0.2-c23.patch
@@ -0,0 +1,25 @@
+Fix incompatible function pointer types
+https://bugs.gentoo.org/880943
+--- a/src/ifp_os_libusb.c 2025-02-13 17:01:02.998513717 +0400
++++ b/src/ifp_os_libusb.c 2025-02-13 17:06:29.903489348 +0400
+@@ -20,8 +20,8 @@
+ char * ob, int max_o, const char * ib, int max_i)
+ {
+ int i=0, e=0;
+- char const * ibb = (char const *)ib;
++ char * ibb = (char *) ib; //strip const qualifier for iconv
+ char * obb = (char *)ob;
+ size_t i_n = max_i;
+ size_t o_n = max_o;
+ iconv_t ICONV;
+--- a/src/userfile.c 2025-02-13 17:01:02.998513717 +0400
++++ b/src/userfile.c 2025-02-13 17:03:31.117230875 +0400
+@@ -947,7 +947,7 @@
+ return i;
+ }
+
+-int file_compare_fts(const FTSENT * const*p1, const FTSENT * const*p2)
++int file_compare_fts(const FTSENT const **p1, const FTSENT const **p2)
+ {
+ if (p1 == NULL) { ifp_err("p1 shouldn't be NULL"); return 0; }
+ if (p2 == NULL) { ifp_err("p2 shouldn't be NULL"); return 0; }
diff --git a/media-libs/libifp/files/libifp-1.0.0.2-configure.patch b/media-libs/libifp/files/libifp-1.0.0.2-configure.patch
new file mode 100644
index 000000000000..76961f4a76f3
--- /dev/null
+++ b/media-libs/libifp/files/libifp-1.0.0.2-configure.patch
@@ -0,0 +1,50 @@
+Fix implicit declaration to autoconf.
+Introduce dependency on pkgconf to deal with hardcoded paths in CFLAGS
+https://bugs.gentoo.org/899824
+--- a/configure.in
++++ b/configure.ac
+@@ -1,9 +1,9 @@
+-AC_INIT(configure.in)
++AC_INIT
++AC_CONFIG_SRCDIR([configure.ac])
+
+ #The automake documentation says this is a no-no, but I don't understand
+ #what the alternative is.
+ #Commented out until I can find out what the portable alternative is.
+-CFLAGS="-g -O2 -Wall -W -Wno-unused-parameter"
+ ##CFLAGS="-g -O2 -Wall -W"
+
+ AM_INIT_AUTOMAKE(libifp, 1.0.0.2)
+@@ -12,6 +12,7 @@
+ AC_PROG_LIBTOOL
+ AC_C_BIGENDIAN
+ AC_SUBST(LIBTOOL_DEPS)
++PKG_PROG_PKG_CONFIG
+
+ dnl AC_DEFINE(IFP_AUTOCONF)
+
+@@ -22,10 +23,14 @@
+ AC_MSG_CHECKING([libusb])
+ AC_ARG_WITH(libusb,
+ AC_HELP_STRING([--with-libusb=PATH],[libusb path (default /usr)]),
+- ac_libusb=$enableval, ac_libusb=no)
++ ac_libusb=$withval, ac_libusb=no)
+ if test "x${ac_libusb}" != "xno" ; then
+ case ${with_libusb} in
+ "" | "yes" | "YES")
++ PKG_CHECK_MODULES([LIBUSB],[libusb],,[AC_MSG_ERROR([Cannot detect libusb])])
++ CFLAGS+=" $LIBUSB_CFLAGS"
++ CPPFLAGS+=" $LIBUSB_CFLAGS"
++ LDFLAGS+=" $LIBUSB_LDFLAGS"
+ ;;
+ "no" | "NO")
+ use_libusb=false
+@@ -93,7 +98,7 @@
+ AC_MSG_CHECKING([kernel source code])
+ AC_ARG_WITH(kmodule,
+ AC_HELP_STRING([--with-kmodule=to/kernel/src], [build as linux kernel module [[default=no]]]),
+- ac_kmodule=$enableval, ac_kmodule=no)
++ ac_kmodule=$withval, ac_kmodule=no)
+ if test "x$ac_kmodule" != "xno" ; then
+ #echo "enableval is $enableval, with_kmodule is $with_kmodule"
+ if test "x$with_kmodule" = "xyes" ; then
diff --git a/media-libs/libifp/libifp-1.0.0.2-r2.ebuild b/media-libs/libifp/libifp-1.0.0.2-r2.ebuild
new file mode 100644
index 000000000000..5cc5bc19b307
--- /dev/null
+++ b/media-libs/libifp/libifp-1.0.0.2-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="General-purpose library for iRiver's iFP portable audio players"
+HOMEPAGE="https://ifp-driver.sourceforge.net/libifp/"
+SRC_URI="https://downloads.sourceforge.net/ifp-driver/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="doc examples static-libs"
+
+RDEPEND="virtual/libusb:0"
+DEPEND="${RDEPEND}
+ doc? ( >=app-text/doxygen-1.3.7 )
+ elibc_musl? ( sys-libs/fts-standalone:= )"
+BDEPEND="${DEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-configure.patch"
+ "${FILESDIR}/${P}-c23.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ use doc || export have_doxygen=no
+ use elibc_musl && append-ldflags -lfts # 713650
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable examples) \
+ --with-libusb \
+ --without-kmodule
+}
+
+src_test() { :; } # hardware dependant wrt #318597
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${D}" -name '*.la' -exec rm -f {} + || die
+
+ # clean /usr/bin after installation
+ # by moving examples to examples dir
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins "${S}"/examples/simple.c "${S}"/examples/ifpline.c
+ mv "${D}"/usr/bin/{simple,ifpline} "${D}"/usr/share/${PN}/examples || die
+ else
+ rm -f "${D}"/usr/bin/{simple,ifpline} || die
+ fi
+
+ use doc && dodoc README ChangeLog TODO
+}