summaryrefslogtreecommitdiff
path: root/dev-libs/ustr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/ustr
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/ustr')
-rw-r--r--dev-libs/ustr/Manifest7
-rw-r--r--dev-libs/ustr/files/ustr-1.0.4-build-libs.patch49
-rw-r--r--dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch28
-rw-r--r--dev-libs/ustr/metadata.xml15
-rw-r--r--dev-libs/ustr/ustr-1.0.4-r5.ebuild65
-rw-r--r--dev-libs/ustr/ustr-1.0.4-r7.ebuild73
-rw-r--r--dev-libs/ustr/ustr-1.0.4-r8.ebuild83
7 files changed, 320 insertions, 0 deletions
diff --git a/dev-libs/ustr/Manifest b/dev-libs/ustr/Manifest
new file mode 100644
index 000000000000..94666685a250
--- /dev/null
+++ b/dev-libs/ustr/Manifest
@@ -0,0 +1,7 @@
+AUX ustr-1.0.4-build-libs.patch 2058 BLAKE2B 93162c8a35b892dd55a5334bbbfc718be959d597f969fdf1a712b49e490d04510268dad927ecdd2c9333eeb39c9091240887bb59b9b69a7e6e7887654c4676dc SHA512 122c38e4779526ae821341b10757454b28c35d59d99aee919d23f691fc06b019983467c5bdd0b8ca8d3e939e357e9bb588f61d4dd2ebb33235d720d637f20f86
+AUX ustr-1.0.4-gcc_5-check.patch 1087 BLAKE2B bd0414477fa789f5f6c3ef5292bd5b58f7fa8c396a739752c3fc5c4e8b456912273c5ab5fce6cc4a71830c003ac5c8e43d371177f2ed07abe3e614cff8bffb69 SHA512 b669a40929cf45cb83aa5c738cb58676cc9c08ee6c84dd7c79352c6aaa7aa36526a0878e98d78b45cfe3c7f62e9b014fe9eaf01fb1b4b460658cfcb1e77d7dab
+DIST ustr-1.0.4.tar.bz2 233723 BLAKE2B 47fd489cadda1487eb131b9a21148d4b21ad46320f5177a0f3c2b2e156a5756918e269053363d47608661a47d8969b8c505192edea316edbd9fc17649d8dbc91 SHA512 b7df6ca3a9f25ee6f5c9ab4325732d348de27c5e02ebff36a7d5706f56b2df994df35bd652825a28e27bbde731c6a5933248d99c670d192b1952e7534eec1510
+EBUILD ustr-1.0.4-r5.ebuild 1255 BLAKE2B 8920416abdc8636b05b95573dba65bc88f7fc22d30c6deac8b3916a7f2fc59be42e0d437a8c81ba8af393a645d3ea6a01d7f060f1025a1aeede3c64fd60f1aaf SHA512 5275fb21937faafd1c03a4fddb9c568ba44d8db15ff6faa56293f0a38df42ba9412c444bef4da57700a76c6992592addb4ec1e87a8bbfa71476bc5bd9202faeb
+EBUILD ustr-1.0.4-r7.ebuild 1780 BLAKE2B 1ca34aca9a83d64f43729eb1c1eb5f85e640dd861d71c0b83e771067cfea7c39e2885fdb802b67a31618c00e7835baa6cb3ec21c8820b3909591a55b239f15d1 SHA512 68ae97b187d6a67e4ac54f0493f1e957d26a4fda38214c4ad34b1111b8936d09a953911d03ce058e8877133a1206195a4506c92bcb89d61ce7c7f3097d764ec6
+EBUILD ustr-1.0.4-r8.ebuild 2058 BLAKE2B 9e59a44c3468d4ca5da7bcf1bfc7dfaf8c4e4ddadd71a4a2a1fb527a2ab24b4d1e74cab0ecf8c08404c417ea66d86e7b345553150797063eea0748a7b1169eae SHA512 42d520b0307873fb899eb237a66c8f04a126cd067b501ac948b22743b80808272e84b7a9c6d04c0979d0032b02efb0326a999c85609e971e41a052392992dfe6
+MISC metadata.xml 466 BLAKE2B 3c10f26ba9da9a631117b49d33763b8b4a4c137e25a388e49a0bfb3d4c4f53a69dc2fd230a76c9d82065f9b5990628789ff8433ac604a8d9e8dd50b3dd0b77a9 SHA512 cc4ceffec16d6ab3a009059bfa704477860f34e0124c2ec9edbcf306edd28aad431f0eaa67d74f57d2a5654db345beb5150116863d80037c96360a3414c505e2
diff --git a/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch b/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch
new file mode 100644
index 000000000000..79fe818c8edf
--- /dev/null
+++ b/dev-libs/ustr/files/ustr-1.0.4-build-libs.patch
@@ -0,0 +1,49 @@
+make static lib build/install controllable so we can disable it by default
+
+punt the -debug lib variants ... if people want debug libs, they can rebuild
+the package using their desired build settings.
+
+--- a/Makefile
++++ b/Makefile
+@@ -291,8 +291,10 @@
+ OPT_LIB_SHARED = libustr-$(VERS_BSO).so.$(VERS_ESO)
+ OPT_LIB_STATIC = libustr.a
+
+-LIB_SHARED = $(DBG_LIB_SHARED) $(OPT_LIB_SHARED)
+-LIB_STATIC = $(DBG_LIB_STATIC) $(OPT_LIB_STATIC)
++LIB_SHARED = $(OPT_LIB_SHARED)
++ifeq ($(USE_STATIC),yes)
++LIB_STATIC = $(OPT_LIB_STATIC)
++endif
+
+ DEPS_NONC_ALL = $(SRC_HDRS) $(SRC_SRCS_H)
+ DEPS_C_ALL = $(SRC_HDRS)
+@@ -388,17 +390,14 @@
+ install -d $(DESTDIR)$(bindir)
+ install -d $(DESTDIR)$(libdir)/pkgconfig
+ $(HIDE)echo Installing files
++ifeq ($(USE_STATIC),yes)
+ install -m 644 -t $(DESTDIR)$(libdir) $(LIB_STATIC)
++endif
+ install -m 755 -t $(DESTDIR)$(libdir) $(LIB_SHARED)
+ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
+ ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME)
+ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
+ ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV)
+- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
+- ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME)
+- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
+- ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV)
+- $(LDCONFIG) -n $(DESTDIR)$(libdir)
+ install -pm 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS)
+ install -pm 644 -t $(DESTDIR)$(SHRDIR) $(SRC_SRCS)
+ install -pm 644 -t $(DESTDIR)$(SHRDIR) $(XSRC_SRCS)
+@@ -406,7 +406,7 @@ endif
+ install -pm 644 -t $(DESTDIR)$(mandir)/man1 $(MAN_PAGES_1)
+ install -pm 644 -t $(DESTDIR)$(mandir)/man3 $(MAN_PAGES_3)
+ install -m 755 -t $(DESTDIR)$(bindir) ustr-import
+- install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc ustr-debug.pc
++ install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc
+
+ ustr-import-multilib: ustr-import-multilib.in
+ sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@
diff --git a/dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch b/dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch
new file mode 100644
index 000000000000..aaed1503030a
--- /dev/null
+++ b/dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch
@@ -0,0 +1,28 @@
+--- a/ustr-conf.h.in 2007-10-22 08:00:55.000000000 +0200
++++ b/ustr-conf.h.in 2015-09-10 12:24:34.998796842 +0200
+@@ -4,13 +4,24 @@
+ /* this is the custom version for the library itself, for everyone else
+ * ustr-import generates one depending on the options. */
+
++/* If this is GCC with major version 5 and up, the default C standard
++ * has changed from C89 to C99 so the old inline behaviour must be
++ * restored:
++ */
++#if defined(__GNUC__) \
++ && (__GNUC__ > 4) \
++ && defined(__STDC_VERSION__) \
++ && (__STDC_VERSION__ >= 199901L)
++# define inline inline __attribute__ ((gnu_inline))
++#endif /* GCC greater than major version 4 and not -std=c89 set */
++
+ /* The default is now to link against libc. */
+ #ifndef USTR_CONF_INCLUDE_CODEONLY_HEADERS
+ #define USTR_CONF_INCLUDE_CODEONLY_HEADERS 0
+ #endif
+
+ /* We can't: if defined(__GLIBC__) && (!defined(_GNU_SOURCE) || !_GNU_SOURCE)
+- * because by the time we've included a libc header it's too late. */
++ * because by the time we've included a libc header it's too late. */
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE 1
+ #endif
diff --git a/dev-libs/ustr/metadata.xml b/dev-libs/ustr/metadata.xml
new file mode 100644
index 000000000000..36a48162dc54
--- /dev/null
+++ b/dev-libs/ustr/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>yamakuzure@gmx.net</email>
+ <name>Sven Eden</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+<use>
+ <flag name="ustr-import">Install ustr-import developer program and source code for bundling.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-libs/ustr/ustr-1.0.4-r5.ebuild b/dev-libs/ustr/ustr-1.0.4-r5.ebuild
new file mode 100644
index 000000000000..dc3c5bb1983d
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Low-overhead managed string library for C"
+HOMEPAGE="http://www.and.org/ustr/"
+SRC_URI="ftp://ftp.and.org/pub/james/ustr/${PV}/${P}.tar.bz2"
+
+LICENSE="|| ( BSD-2 MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+DOCS=(ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ustr-conf.h
+ /usr/include/ustr-conf-debug.h
+)
+
+src_prepare() {
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ SHRDIR="/usr/share/${P}" \
+ HIDE= \
+ all-shared
+}
+
+multilib_src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ mandir="/usr/share/man" \
+ SHRDIR="/usr/share/${P}" \
+ DOCSHRDIR="/usr/share/doc/${PF}" \
+ HIDE= \
+ install
+}
+
+multilib_src_test() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ SHRDIR="/usr/share/${P}" \
+ HIDE= \
+ check
+}
diff --git a/dev-libs/ustr/ustr-1.0.4-r7.ebuild b/dev-libs/ustr/ustr-1.0.4-r7.ebuild
new file mode 100644
index 000000000000..0d4f3ece9d89
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r7.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Low-overhead managed string library for C"
+HOMEPAGE="http://www.and.org/ustr/"
+SRC_URI="ftp://ftp.and.org/pub/james/ustr/${PV}/${P}.tar.bz2"
+
+LICENSE="|| ( BSD-2 MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~x86"
+
+DOCS=(ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ustr-conf.h
+ /usr/include/ustr-conf-debug.h
+)
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc_5-check.patch"
+ multilib_copy_sources
+}
+
+_emake() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ mandir="${EPREFIX}/usr/share/man" \
+ SHRDIR="${EPREFIX}/usr/share/${P}" \
+ DOCSHRDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ HIDE= \
+ "$@"
+}
+
+multilib_src_configure() {
+ # The included configure tests require execution.
+
+ # We require vsnprintf everywhere as it's in POSIX.
+ printf '#!/bin/sh\necho 0\n' > autoconf_vsnprintf
+ chmod a+rx autoconf_vsnprintf
+
+ # Always use stdint.h as it's in POSIX.
+ sed -i '/have_stdint_h=0/s:=0:=1:' Makefile || die
+
+ # Figure out the size of size_t.
+ printf '#include <sys/types.h>\nint main() { char buf[sizeof(size_t) - 8]; }\n' > sizet_test.c
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c sizet_test.c 2>/dev/null
+ printf '#!/bin/sh\necho %s\n' $(( $? == 0 )) > autoconf_64b
+ chmod a+rx autoconf_64b
+
+ # Generate the config file now to avoid bad makefile deps.
+ _emake ustr-import
+}
+
+multilib_src_compile() {
+ _emake all-shared
+}
+
+multilib_src_install() {
+ _emake DESTDIR="${D}" install
+}
+
+multilib_src_test() {
+ _emake check
+}
diff --git a/dev-libs/ustr/ustr-1.0.4-r8.ebuild b/dev-libs/ustr/ustr-1.0.4-r8.ebuild
new file mode 100644
index 000000000000..6fb52670f3b5
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r8.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Low-overhead managed string library for C"
+HOMEPAGE="http://www.and.org/ustr/"
+SRC_URI="ftp://ftp.and.org/pub/james/ustr/${PV}/${P}.tar.bz2"
+
+LICENSE="|| ( BSD-2 MIT LGPL-2 )"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
+IUSE="static-libs ustr-import"
+
+DOCS=(ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ustr-conf.h
+ /usr/include/ustr-conf-debug.h
+)
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc_5-check.patch"
+ epatch "${FILESDIR}/${PN}-1.0.4-build-libs.patch"
+ multilib_copy_sources
+}
+
+_emake() {
+ emake \
+ USE_STATIC=$(usex static-libs) \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ mandir="${EPREFIX}/usr/share/man" \
+ SHRDIR="${EPREFIX}/usr/share/${P}" \
+ DOCSHRDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ HIDE= \
+ "$@"
+}
+
+multilib_src_configure() {
+ # The included configure tests require execution.
+
+ # We require vsnprintf everywhere as it's in POSIX.
+ printf '#!/bin/sh\necho 0\n' > autoconf_vsnprintf
+ chmod a+rx autoconf_vsnprintf
+
+ # Always use stdint.h as it's in POSIX.
+ sed -i '/have_stdint_h=0/s:=0:=1:' Makefile || die
+
+ # Figure out the size of size_t.
+ printf '#include <sys/types.h>\nint main() { char buf[sizeof(size_t) - 8]; }\n' > sizet_test.c
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -c sizet_test.c 2>/dev/null
+ printf '#!/bin/sh\necho %s\n' $(( $? == 0 )) > autoconf_64b
+ chmod a+rx autoconf_64b
+
+ # Generate the config file now to avoid bad makefile deps.
+ _emake ustr-import
+}
+
+multilib_src_compile() {
+ _emake all-shared
+}
+
+multilib_src_install() {
+ _emake DESTDIR="${D}" install
+
+ if ! use ustr-import ; then
+ rm -r \
+ "${ED}/usr/bin/ustr-import" \
+ "${ED}/usr/share/man/man1/ustr-import.1" \
+ "${ED}/usr/share/${P}" || die
+ fi
+}
+
+multilib_src_test() {
+ _emake check
+}