commit:     62601511e80a9c080934c2f74ff2ebd15faefab2
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat May  5 15:33:53 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat May  5 15:34:24 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62601511

dev-libs/grok: Fix build with glibc-2.26, bug 638372

Also fix libdir, bug 628048
This still needs stabilization together with glibc-2.26.

Closes: https://bugs.gentoo.org/628048
Bug: https://bugs.gentoo.org/638372
Package-Manager: Portage-2.3.33, Repoman-2.3.9

 dev-libs/grok/files/grok-0.9.2-libdir.patch   | 28 +++++++++++++++++
 dev-libs/grok/files/grok-0.9.2-libtirpc.patch | 21 +++++++++++++
 dev-libs/grok/grok-0.9.2-r2.ebuild            | 45 +++++++++++++++++++++++++++
 3 files changed, 94 insertions(+)

diff --git a/dev-libs/grok/files/grok-0.9.2-libdir.patch 
b/dev-libs/grok/files/grok-0.9.2-libdir.patch
new file mode 100644
index 00000000000..06b19555cde
--- /dev/null
+++ b/dev-libs/grok/files/grok-0.9.2-libdir.patch
@@ -0,0 +1,28 @@
+diff -ruN grok-0.9.2.orig/Makefile grok-0.9.2/Makefile
+--- grok-0.9.2.orig/Makefile   2018-05-05 17:26:35.451938040 +0200
++++ grok-0.9.2/Makefile        2018-05-05 17:29:03.414780593 +0200
+@@ -93,12 +93,12 @@
+ 
+ install: libgrok.$(LIBSUFFIX) grok discogrok $(GROKHEADER)
+       install -d $(DESTDIR)$(PREFIX)/bin
+-      install -d $(DESTDIR)$(PREFIX)/lib
++      install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
+       install -d $(DESTDIR)$(PREFIX)/include
+       install -m 755 grok $(DESTDIR)$(PREFIX)/bin
+       install -m 755 discogrok $(DESTDIR)$(PREFIX)/bin
+-      install -m 644 libgrok.$(LIBSUFFIX) $(DESTDIR)$(PREFIX)/lib
+-      ln -s libgrok.$(LIBSUFFIX) 
$(DESTDIR)$(PREFIX)/lib/libgrok.$(LIBSUFFIX).1
++      install -m 644 libgrok.$(LIBSUFFIX) $(DESTDIR)$(PREFIX)/$(LIBDIR)
++      ln -s libgrok.$(LIBSUFFIX) 
$(DESTDIR)$(PREFIX)/$(LIBDIR)/libgrok.$(LIBSUFFIX).1
+       for header in $(GROKHEADER); do \
+               install -m 644 $$header $(DESTDIR)$(PREFIX)/include; \
+       done 
+@@ -109,7 +109,7 @@
+ uninstall:
+       rm -f $(DESTDIR)$(PREFIX)/bin/grok
+       rm -f $(DESTDIR)$(PREFIX)/bin/discogrok
+-      rm -f $(DESTDIR)$(PREFIX)/lib/libgrok.$(LIBSUFFIX)
++      rm -f $(DESTDIR)$(PREFIX)/$(LIBDIR)/libgrok.$(LIBSUFFIX)
+       for header in $(GROKHEADER); do \
+               rm -f $(DESTDIR)$(PREFIX)/include/$$header; \
+       done 

diff --git a/dev-libs/grok/files/grok-0.9.2-libtirpc.patch 
b/dev-libs/grok/files/grok-0.9.2-libtirpc.patch
new file mode 100644
index 00000000000..0e91d9fed12
--- /dev/null
+++ b/dev-libs/grok/files/grok-0.9.2-libtirpc.patch
@@ -0,0 +1,21 @@
+diff -ruN grok-0.9.2.orig/Makefile grok-0.9.2/Makefile
+--- grok-0.9.2.orig/Makefile   2018-05-05 17:22:33.122558130 +0200
++++ grok-0.9.2/Makefile        2018-05-05 17:24:29.554221133 +0200
+@@ -25,7 +25,7 @@
+ GPERF?=/usr/bin/gperf
+ endif
+ 
+-LIBS=-lpcre -levent -rdynamic -ltokyocabinet
++LIBS=-lpcre -levent -rdynamic -ltokyocabinet -ltirpc
+ 
+ # For linux, we need libdl for dlopen()
+ # On FreeBSD, comment this line out.
+@@ -55,7 +55,7 @@
+ #LDFLAGS+=-L/usr/local/lib
+ 
+ # Platform so we know what to dlopen
+-CFLAGS+=-DPLATFORM_$(PLATFORM)
++CFLAGS+=-DPLATFORM_$(PLATFORM) -I/usr/include/tirpc
+ # Uncomment to totally disable logging features
+ #CFLAGS+=-DNOLOGGING
+ 

diff --git a/dev-libs/grok/grok-0.9.2-r2.ebuild 
b/dev-libs/grok/grok-0.9.2-r2.ebuild
new file mode 100644
index 00000000000..4b6318f2f6b
--- /dev/null
+++ b/dev-libs/grok/grok-0.9.2-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="DRY and RAD for regular expressions"
+HOMEPAGE="https://github.com/jordansissel/grok 
https://code.google.com/p/semicomplete/wiki/Grok";
+SRC_URI="https://github.com/jordansissel/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
+
+IUSE=""
+
+CDEPEND="
+       dev-db/tokyocabinet
+       >=dev-libs/libevent-1.3:=
+       >=dev-libs/libpcre-7.6
+       >=net-libs/rpcsvc-proto-1
+       net-libs/libtirpc
+"
+
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+               >=dev-util/gperf-3.1"
+
+PATCHES=(
+       "${FILESDIR}"/grok-0.9.2-Makefile.patch
+       "${FILESDIR}"/0.9.2-build-with-pcre-lt-8.34.patch
+       "${FILESDIR}"/grok-0.9.2-build-with-gperf-3.1.patch
+       "${FILESDIR}"/grok-0.9.2-libtirpc.patch
+       "${FILESDIR}"/grok-0.9.2-libdir.patch
+)
+
+src_prepare() {
+       default
+       tc-export CC
+}
+
+src_install() {
+       LIBDIR=$(get_libdir) default
+}

Reply via email to