summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-06-18 20:56:48 -0700
committerSam James <sam@gentoo.org>2022-06-20 03:21:08 +0100
commit3f4b2de7cbeb8d8cc0553f50333cd0681a9ccb39 (patch)
tree2cb28043e4e8fa543f6e092c7c888e286787c8e7 /dev-libs/libfstrcmp
parentdev-libs/libmpack: Fix build with rlibtool (diff)
downloadgentoo-3f4b2de7cbeb8d8cc0553f50333cd0681a9ccb39.tar.gz
gentoo-3f4b2de7cbeb8d8cc0553f50333cd0681a9ccb39.tar.bz2
gentoo-3f4b2de7cbeb8d8cc0553f50333cd0681a9ccb39.zip
dev-libs/libfstrcmp: Fix build with rlibtool
Bug: https://bugs.gentoo.org/778371 Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/25969 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libfstrcmp')
-rw-r--r--dev-libs/libfstrcmp/files/libfstrcmp-0.7-libtool.patch81
-rw-r--r--dev-libs/libfstrcmp/libfstrcmp-0.7-r2.ebuild48
2 files changed, 129 insertions, 0 deletions
diff --git a/dev-libs/libfstrcmp/files/libfstrcmp-0.7-libtool.patch b/dev-libs/libfstrcmp/files/libfstrcmp-0.7-libtool.patch
new file mode 100644
index 000000000000..4d893a5b2262
--- /dev/null
+++ b/dev-libs/libfstrcmp/files/libfstrcmp-0.7-libtool.patch
@@ -0,0 +1,81 @@
+https://bugs.gentoo.org/778371
+
+From: orbea <orbea@riseup.net>
+Date: Sat, 18 Jun 2022 20:49:52 -0700
+Subject: [PATCH] configure: Use LT_INIT to find libtool
+
+LT_INIT will generate libtool for the build which is required by
+rlibtool to determine if building shared or static libraries.
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -37,6 +37,11 @@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
++#
++# directory containing the build
++#
++top_builddir = @top_builddir@
++
+ #
+ # the name of the install program to use
+ #
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@ AC_PROG_CC
+ AC_CANONICAL_HOST
+ AC_GNU_SOURCE
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
++LT_INIT
+ AC_CHECK_PROGS(AR, ar)
+
+ AC_USE_SYSTEM_EXTENSIONS
+@@ -32,6 +32,8 @@ AC_ISC_POSIX
+ AC_OBJEXT
+ AC_EXEEXT
+
++AC_SUBST([top_builddir], [$abs_builddir])
++
+ dnl @synopsis AC_ADD_CFLAGS
+ dnl
+ dnl Add the given option to CFLAGS, if it doesn't break the compiler
+@@ -53,37 +55,6 @@ AC_ADD_CFLAGS(-Wshadow)
+ dnl! AC_ADD_CFLAGS(-Werror)
+ dnl! AC_ADD_CFLAGS([-Wl,--as-needed])
+
+-AC_CHECK_PROGS(LIBTOOL, libtool)
+-
+-if test -z "$LIBTOOL"
+-then
+- AC_MSG_RESULT([
+- You must have GNU Libtool installed to build fstrcmp.
+- Homepage: http://www.gnu.org/software/libtool/])
+- OK=no
+- if apt-get --version > /dev/null 2> /dev/null; then
+- AC_MSG_RESULT([
+- The following command may be used to install it:
+- sudo apt-get install libtool
+- ])
+- OK=yes
+- fi
+- if yum --version > /dev/null 2> /dev/null; then
+- AC_MSG_RESULT([
+- The following command may be used to install it:
+- sudo yum install libtool
+- ])
+- OK=yes
+- fi
+- if test "$OK" != "yes"; then
+- AC_MSG_RESULT([
+- If you are using a package based install, you will need the
+- libtool package.
+- ])
+- fi
+- exit 1
+-fi
+-
+ AC_CHECK_PROGS(GROFF, groff roff)
+ AC_CHECK_PROGS(SOELIM, gsoelim soelim)
+ AC_CHECK_PROGS(REFER, refer grefer)
diff --git a/dev-libs/libfstrcmp/libfstrcmp-0.7-r2.ebuild b/dev-libs/libfstrcmp/libfstrcmp-0.7-r2.ebuild
new file mode 100644
index 000000000000..16fc118311c8
--- /dev/null
+++ b/dev-libs/libfstrcmp/libfstrcmp-0.7-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Make fuzzy comparisons of strings and byte arrays"
+HOMEPAGE="http://fstrcmp.sourceforge.net/"
+
+LICENSE="GPL-3+"
+IUSE="doc static-libs test"
+SLOT="0"
+
+SRC_URI="http://fstrcmp.sourceforge.net/fstrcmp-0.7.D001.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/fstrcmp-0.7.D001"
+KEYWORDS="amd64 ~arm arm64 x86"
+
+DEPEND="
+ sys-apps/groff
+ doc? ( app-text/ghostscript-gpl )
+ test? ( app-text/ghostscript-gpl )
+"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libtool.patch # 778371
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_compile() {
+ emake all-bin
+ use doc && emake all-doc
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-bin install-include install-libdir install-man
+ find "${D}" -name '*.la' -delete || die
+ if ! use static-libs ; then
+ find "${D}" -name '*.a' -delete || die
+ fi
+ use doc && emake DESTDIR="${D}" install-doc
+ einstalldocs
+}