summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2018-02-13 17:16:03 -0800
committerPatrick McLean <chutzpah@gentoo.org>2018-02-13 17:16:03 -0800
commitc0ba5645432154bc20651cdb83eaccf9679b550a (patch)
tree4d754b66d89a08291052262460bac4d025463c5d /dev-libs/zlog
parentmedia-fonts/open-sans: Restore old stable (diff)
downloadgentoo-c0ba5645432154bc20651cdb83eaccf9679b550a.tar.gz
gentoo-c0ba5645432154bc20651cdb83eaccf9679b550a.tar.bz2
gentoo-c0ba5645432154bc20651cdb83eaccf9679b550a.zip
dev-libs/zlog: Revbump to 1.2.12-r1, handle libdir properly #628732
Also random QA fixes, make sure we are using the right compiler, CFLAGS gets passed around properly, use eapply and PATCHES since it's already EAPI=6. Closes: https://bugs.gentoo.org/628732 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-libs/zlog')
-rw-r--r--dev-libs/zlog/files/zlog-testsuite-flags.patch22
-rw-r--r--dev-libs/zlog/files/zlog_no_werr.patch4
-rw-r--r--dev-libs/zlog/zlog-1.2.12-r1.ebuild32
3 files changed, 56 insertions, 2 deletions
diff --git a/dev-libs/zlog/files/zlog-testsuite-flags.patch b/dev-libs/zlog/files/zlog-testsuite-flags.patch
new file mode 100644
index 000000000000..4ce0a4b6d16c
--- /dev/null
+++ b/dev-libs/zlog/files/zlog-testsuite-flags.patch
@@ -0,0 +1,22 @@
+--- zlog-1.2.12.orig/test/makefile 2013-09-25 04:38:42.000000000 -0700
++++ zlog-1.2.12/test/makefile 2018-02-13 16:59:33.812131188 -0800
+@@ -1,3 +1,6 @@
++CFLAGS := -O2 -g
++CC := gcc
++
+ exe = \
+ test_tmp \
+ test_buf \
+@@ -24,10 +27,10 @@
+ all : $(exe)
+
+ $(exe) : %:%.o
+- gcc -O2 -g -o $@ $^ -L../src -lzlog -lpthread -Wl,-rpath ../src
++ $(CC) $(CFLAGS) -o $@ $^ -L../src -lzlog -lpthread -Wl,-rpath ../src
+
+ .c.o :
+- gcc -O2 -g -Wall -D_GNU_SOURCE -o $@ -c $< -I. -I../src
++ $(CC) $(CLFAGS) -Wall -D_GNU_SOURCE -o $@ -c $< -I. -I../src
+
+ clean :
+ rm -f press.log* *.o $(exe)
diff --git a/dev-libs/zlog/files/zlog_no_werr.patch b/dev-libs/zlog/files/zlog_no_werr.patch
index 6cb2e8708672..b01325db09d0 100644
--- a/dev-libs/zlog/files/zlog_no_werr.patch
+++ b/dev-libs/zlog/files/zlog_no_werr.patch
@@ -1,5 +1,5 @@
---- src/makefile.orig 2016-08-11 10:40:49.466873499 +0200
-+++ src/makefile 2016-08-11 10:40:59.626762850 +0200
+--- a/src/makefile 2016-08-11 10:40:49.466873499 +0200
++++ b/src/makefile 2016-08-11 10:40:59.626762850 +0200
@@ -32,7 +32,7 @@
# Fallback to gcc when $CC is not in $PATH.
CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
diff --git a/dev-libs/zlog/zlog-1.2.12-r1.ebuild b/dev-libs/zlog/zlog-1.2.12-r1.ebuild
new file mode 100644
index 000000000000..cd97f558f0b0
--- /dev/null
+++ b/dev-libs/zlog/zlog-1.2.12-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="A reliable, thread safe, clear-model, pure C logging library."
+HOMEPAGE="http://hardysimpson.github.io/zlog/"
+SRC_URI="https://github.com/HardySimpson/${PN}/archive/${PV}.tar.gz -> ${PN}-v${PV}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+PATCHES=(
+ "${FILESDIR}/zlog_no_werr.patch"
+ "${FILESDIR}/zlog-testsuite-flags.patch"
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_test () {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" test || die "Tests failed."
+}
+
+src_install() {
+ emake LIBRARY_PATH="$(get_libdir)" PREFIX="${D}/usr" install
+}