Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/zlog/files/, dev-libs/zlog/
Date: Wed, 14 Feb 2018 01:16:23
Message-Id: 1518570963.c0ba5645432154bc20651cdb83eaccf9679b550a.chutzpah@gentoo
1 commit: c0ba5645432154bc20651cdb83eaccf9679b550a
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 14 01:16:03 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 14 01:16:03 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0ba5645
7
8 dev-libs/zlog: Revbump to 1.2.12-r1, handle libdir properly #628732
9
10 Also random QA fixes, make sure we are using the right compiler, CFLAGS
11 gets passed around properly, use eapply and PATCHES since it's already
12 EAPI=6.
13
14 Closes: https://bugs.gentoo.org/628732
15 Package-Manager: Portage-2.3.24, Repoman-2.3.6
16
17 dev-libs/zlog/files/zlog-testsuite-flags.patch | 22 ++++++++++++++++++
18 dev-libs/zlog/files/zlog_no_werr.patch | 4 ++--
19 dev-libs/zlog/zlog-1.2.12-r1.ebuild | 32 ++++++++++++++++++++++++++
20 3 files changed, 56 insertions(+), 2 deletions(-)
21
22 diff --git a/dev-libs/zlog/files/zlog-testsuite-flags.patch b/dev-libs/zlog/files/zlog-testsuite-flags.patch
23 new file mode 100644
24 index 00000000000..4ce0a4b6d16
25 --- /dev/null
26 +++ b/dev-libs/zlog/files/zlog-testsuite-flags.patch
27 @@ -0,0 +1,22 @@
28 +--- zlog-1.2.12.orig/test/makefile 2013-09-25 04:38:42.000000000 -0700
29 ++++ zlog-1.2.12/test/makefile 2018-02-13 16:59:33.812131188 -0800
30 +@@ -1,3 +1,6 @@
31 ++CFLAGS := -O2 -g
32 ++CC := gcc
33 ++
34 + exe = \
35 + test_tmp \
36 + test_buf \
37 +@@ -24,10 +27,10 @@
38 + all : $(exe)
39 +
40 + $(exe) : %:%.o
41 +- gcc -O2 -g -o $@ $^ -L../src -lzlog -lpthread -Wl,-rpath ../src
42 ++ $(CC) $(CFLAGS) -o $@ $^ -L../src -lzlog -lpthread -Wl,-rpath ../src
43 +
44 + .c.o :
45 +- gcc -O2 -g -Wall -D_GNU_SOURCE -o $@ -c $< -I. -I../src
46 ++ $(CC) $(CLFAGS) -Wall -D_GNU_SOURCE -o $@ -c $< -I. -I../src
47 +
48 + clean :
49 + rm -f press.log* *.o $(exe)
50
51 diff --git a/dev-libs/zlog/files/zlog_no_werr.patch b/dev-libs/zlog/files/zlog_no_werr.patch
52 index 6cb2e870867..b01325db09d 100644
53 --- a/dev-libs/zlog/files/zlog_no_werr.patch
54 +++ b/dev-libs/zlog/files/zlog_no_werr.patch
55 @@ -1,5 +1,5 @@
56 ---- src/makefile.orig 2016-08-11 10:40:49.466873499 +0200
57 -+++ src/makefile 2016-08-11 10:40:59.626762850 +0200
58 +--- a/src/makefile 2016-08-11 10:40:49.466873499 +0200
59 ++++ b/src/makefile 2016-08-11 10:40:59.626762850 +0200
60 @@ -32,7 +32,7 @@
61 # Fallback to gcc when $CC is not in $PATH.
62 CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
63
64 diff --git a/dev-libs/zlog/zlog-1.2.12-r1.ebuild b/dev-libs/zlog/zlog-1.2.12-r1.ebuild
65 new file mode 100644
66 index 00000000000..cd97f558f0b
67 --- /dev/null
68 +++ b/dev-libs/zlog/zlog-1.2.12-r1.ebuild
69 @@ -0,0 +1,32 @@
70 +# Copyright 1999-2018 Gentoo Foundation
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=6
74 +
75 +inherit toolchain-funcs
76 +
77 +DESCRIPTION="A reliable, thread safe, clear-model, pure C logging library."
78 +HOMEPAGE="http://hardysimpson.github.io/zlog/"
79 +SRC_URI="https://github.com/HardySimpson/${PN}/archive/${PV}.tar.gz -> ${PN}-v${PV}.tar.gz"
80 +
81 +LICENSE="LGPL-2"
82 +SLOT="0"
83 +KEYWORDS="~amd64 ~x86"
84 +IUSE="test"
85 +
86 +PATCHES=(
87 + "${FILESDIR}/zlog_no_werr.patch"
88 + "${FILESDIR}/zlog-testsuite-flags.patch"
89 +)
90 +
91 +src_compile() {
92 + emake CC="$(tc-getCC)"
93 +}
94 +
95 +src_test () {
96 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" test || die "Tests failed."
97 +}
98 +
99 +src_install() {
100 + emake LIBRARY_PATH="$(get_libdir)" PREFIX="${D}/usr" install
101 +}