summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-06-15 17:46:40 +0000
committerSam James <sam@gentoo.org>2024-05-09 02:29:44 +0100
commit5212104f35c7395828e18b4422cf186541a4f504 (patch)
treef4535dbe96b3d42a75157f7a0cef69ea8d37f667 /sys-libs
parentsys-fs/progsreiserfs: fix modern C issues in configure (sort of) (diff)
downloadgentoo-5212104f35c7395828e18b4422cf186541a4f504.tar.gz
gentoo-5212104f35c7395828e18b4422cf186541a4f504.tar.bz2
gentoo-5212104f35c7395828e18b4422cf186541a4f504.zip
sys-libs/libieee1284: Fix error: call to undeclared function outb_p
Closes: https://bugs.gentoo.org/898080 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31462 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch27
-rw-r--r--sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild53
2 files changed, 80 insertions, 0 deletions
diff --git a/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch b/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
new file mode 100644
index 000000000000..0eb7d1bf217b
--- /dev/null
+++ b/sys-libs/libieee1284/files/libieee1284-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
@@ -0,0 +1,27 @@
+Bug: https://bugs.gentoo.org/898080
+Also refer: https://bugs.gentoo.org/590094
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Thu, 15 Jun 2023 17:39:11 +0000
+Subject: [PATCH 1/1] access_io.c: don't blindly assume outb_p to be available
+
+outb_p is not available in musl libc, the condition using the fuction
+was if __i386__ or __x86_64__ was defined. This is not enough, for
+example when using musl libc both the conditions are meet but the
+function is not available. Hence the addtional check for __GLIBC__ being
+defined is added.
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/src/access_io.c
++++ b/src/access_io.c
+@@ -147,7 +147,7 @@ raw_outb (struct parport_internal *port, unsigned char val, unsigned long addr)
+ {
+ #if (defined(HAVE_LINUX) && defined(HAVE_SYS_IO_H)) || defined(HAVE_CYGWIN_9X) \
+ || defined(HAVE_OBSD_I386) || defined(HAVE_FBSD_I386)
+-#if defined(__i386__) || defined(__x86_64__) || defined(_MSC_VER)
++#if (defined(__i386__) || defined(__x86_64__)) && defined(__GLIBC__) || defined(_MSC_VER)
+ outb_p (val, (unsigned short)addr);
+ #else
+ outb (val, addr);
+--
+2.41.0
+
diff --git a/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild b/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild
new file mode 100644
index 000000000000..b7fc64b2ef0b
--- /dev/null
+++ b/sys-libs/libieee1284/libieee1284-0.2.11-r9.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Library to query devices using IEEE1284"
+HOMEPAGE="http://cyberelk.net/tim/software/libieee1284/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="doc static-libs"
+
+BDEPEND="doc? (
+ app-text/docbook-sgml-utils
+ >=app-text/docbook-sgml-dtd-4.1
+ app-text/docbook-dsssl-stylesheets
+ dev-perl/XML-RegExp
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2.11-don-t-blindly-assume-outb_p-to-be-available.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.{in,ac} || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ --without-python
+ $(use_enable static-libs static)
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc doc/interface*
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}