summaryrefslogtreecommitdiff
path: root/dev-libs/zlog
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/zlog')
-rw-r--r--dev-libs/zlog/Manifest6
-rw-r--r--dev-libs/zlog/files/zlog-testsuite-flags.patch22
-rw-r--r--dev-libs/zlog/files/zlog_no_werr.patch11
-rw-r--r--dev-libs/zlog/metadata.xml11
-rw-r--r--dev-libs/zlog/zlog-1.2.12-r1.ebuild32
-rw-r--r--dev-libs/zlog/zlog-1.2.12.ebuild31
6 files changed, 113 insertions, 0 deletions
diff --git a/dev-libs/zlog/Manifest b/dev-libs/zlog/Manifest
new file mode 100644
index 000000000000..36424960f715
--- /dev/null
+++ b/dev-libs/zlog/Manifest
@@ -0,0 +1,6 @@
+AUX zlog-testsuite-flags.patch 599 BLAKE2B d94678371fb64eaf64d48c0d6980cde20bc9ccd3f0865a02c8f0374af553ff8db25601c5bd548e8f83bea1be80f8da2444669be621a4546710643c9d70e326ad SHA512 003c62b10274102dcec16c4064ff8cd93767bd34ac8c56e71cc07dec7d24a07e380341324f6d19141f43e6d8bffc3f4678a7b7ac493341e83bc237ab069ff164
+AUX zlog_no_werr.patch 497 BLAKE2B 506c3709043fa5d64475011dac251598d3d153bfdeb61947badc2d0937bbf62342370df3afba8e86a536ceb395376b311c7f5ea4f625ad24c2ef5b5c510492cd SHA512 5f5d343824a4d8ba02ce7e588b5e6a7aaf5465c1e76d1b26aa4f412d34d5a61d33a307d4d0521220267eaf883cb90ac382fb849fe406375f04c2a1ae9050c77f
+DIST zlog-v1.2.12.tar.gz 120048 BLAKE2B e9f48d8ee3e0bfc14674e96426f9343c27e0f666541b017a438800a6707bb158ca79f564e6cb10d953e4bff6dc839d76a3d3fc0f54c128bfb4b00e5fc86dbecf SHA512 4e1d773f33f9202702bb5e80f4dcc6f8ab28480a8515ad8b9562ee68703c065c2f18113124535c7163e240013ad121a6ce311a0fc04ac6c32971509ec33615ec
+EBUILD zlog-1.2.12-r1.ebuild 719 BLAKE2B e4f403206a4368f222208845079bc7ccb5ffb7f0cfe358797818afb96bb1754cf81ca714c63a0c300c36d04422870d835208d3ff153164b6c718cabdb5d1fc21 SHA512 9ec4eb07a9e20251fe1c92c938f72fc7ba7804cb7fcf0bb9e8b8aa9c4ed9c17824e15a46f17c319d465da2f1ee944f1abde035af6a1a8207bc74ab5e1a992b48
+EBUILD zlog-1.2.12.ebuild 625 BLAKE2B c6ae9a810dd1e34c941d93d12180a1c6e2a0a562a2cb173e2b6ca6bafc1a6def63fe36cb20afc824864c694d32b94cf52feec08469523344ecfbb47afba79571 SHA512 0bb1dd33dcf297c647c66da1f1d3bfab3574045ea5eba044f27a7972305769619ca2d6fdf8f9b1323de2c241c6f86b466b025535e99a89a1d383f8efd8196dbc
+MISC metadata.xml 343 BLAKE2B cacb9dd07a85e4fa26b7fa703ea340117be968590c91b6e243d34642a38e6af506cc9d6d39c48250ffd288fa8dce7296cd02d37b7d5620af4d8d1edc74806af9 SHA512 1332dbac3769edb28e8c4241821fe5977619ae93b7fe29c58759ed4305b1a28cd51dd4a4d74b4d7db086bf6383e2f771b0e79804434ccd5ff6353e0d1b8d0f61
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
new file mode 100644
index 000000000000..b01325db09d0
--- /dev/null
+++ b/dev-libs/zlog/files/zlog_no_werr.patch
@@ -0,0 +1,11 @@
+--- 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')
+ OPTIMIZATION?=-O2
+-WARNINGS=-Wall -Werror -Wstrict-prototypes -fwrapv
++WARNINGS=-Wall -Wstrict-prototypes -fwrapv
+ DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC -pthread $(CFLAGS) $(WARNINGS) $(DEBUG)
+ REAL_LDFLAGS=$(LDFLAGS) -pthread
diff --git a/dev-libs/zlog/metadata.xml b/dev-libs/zlog/metadata.xml
new file mode 100644
index 000000000000..af68f28d59c1
--- /dev/null
+++ b/dev-libs/zlog/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>klausman@gentoo.org</email>
+ <name>Tobias Klausmann</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">HardySimpson/zlog</remote-id>
+ </upstream>
+</pkgmetadata>
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
+}
diff --git a/dev-libs/zlog/zlog-1.2.12.ebuild b/dev-libs/zlog/zlog-1.2.12.ebuild
new file mode 100644
index 000000000000..be45a805faac
--- /dev/null
+++ b/dev-libs/zlog/zlog-1.2.12.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default_src_prepare
+ epatch "${FILESDIR}/zlog_no_werr.patch"
+}
+
+src_test () {
+ emake test || die "Tests failed."
+}
+
+src_install() {
+ emake PREFIX="${D}/usr" install
+}