summaryrefslogtreecommitdiff
path: root/dev-libs/ustr
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/ustr')
-rw-r--r--dev-libs/ustr/Manifest9
-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.xml16
-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, 323 insertions, 0 deletions
diff --git a/dev-libs/ustr/Manifest b/dev-libs/ustr/Manifest
new file mode 100644
index 000000000000..d7af02860ca8
--- /dev/null
+++ b/dev-libs/ustr/Manifest
@@ -0,0 +1,9 @@
+AUX ustr-1.0.4-build-libs.patch 2058 SHA256 a9bc75555f33a86168ba25b09c570ddefb5341c5120266fa20ccfd3e788db4ba SHA512 122c38e4779526ae821341b10757454b28c35d59d99aee919d23f691fc06b019983467c5bdd0b8ca8d3e939e357e9bb588f61d4dd2ebb33235d720d637f20f86 WHIRLPOOL 9c7c13249d563d894fd182c79918b6864493ff3546befb68bda11415d16f20698fa08d401ccc8adfacefe3a2db3b16a06ff09039d6e9faa3503703a2b0a342a7
+AUX ustr-1.0.4-gcc_5-check.patch 1087 SHA256 e68b420be7595f99ac48379bf645bad3e939f1d842435e3931b503873f3c54ab SHA512 b669a40929cf45cb83aa5c738cb58676cc9c08ee6c84dd7c79352c6aaa7aa36526a0878e98d78b45cfe3c7f62e9b014fe9eaf01fb1b4b460658cfcb1e77d7dab WHIRLPOOL cee638bac514d57de6a492791a54b56372d84ab66e52ebb2b2877f3d64b2f73bfbde0e4eed4954563439cb1d2ae34accfd539eedbdd27c2b781aafed73251260
+DIST ustr-1.0.4.tar.bz2 233723 SHA256 3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4 SHA512 b7df6ca3a9f25ee6f5c9ab4325732d348de27c5e02ebff36a7d5706f56b2df994df35bd652825a28e27bbde731c6a5933248d99c670d192b1952e7534eec1510 WHIRLPOOL b37783d844e85c3bd7725ac92ca2c84f27f03914d5cf79da2a1c2e48f737d869c49763d1c1ed799cc117d7b414aa8792e6d5833e028521ffaf500735ad4084c2
+EBUILD ustr-1.0.4-r5.ebuild 1254 SHA256 a435e579d6f9a79a37d4a51a2d76571bbb0e0438b36cc702ffe79b3fd39631d2 SHA512 bd22aba048979830d93cc53d4fa8ebfcd025b83a14a3269fb36346d548f91d41e1610cca40fc92c30bbeaa17b6af1b3a014d1ec79e32da0b3f73bf4a8bfa1a2f WHIRLPOOL 476827b0a291baa90dc9ee73889e0776e5b9b135bc384713d4996f5130f9fa818a29eb349addde094b7dae587c02134b9a9d25e6c1bec161383b00423c35d67e
+EBUILD ustr-1.0.4-r7.ebuild 1779 SHA256 16dbce260ffd3e80ac2af8b72a8e66fb3ef046f2fcdffc1d947c57f2f385fd25 SHA512 88d4c68ee8c20f25d41235ab1aee8ce30511f0a9b8b545d1ccfcbedfb1aed42821f534fa71e1f21b54dd5238421ef09facc4d91806e9c338a106f07d38ed4814 WHIRLPOOL 5a820248c0c9956e51ef28249161d9d296fdab6847341a87bef1b0e1f25e935a0a67a849aa07358f4dae3e303a4ff1ea28c7d7433c7b9a4dfcd8b52484e33202
+EBUILD ustr-1.0.4-r8.ebuild 2059 SHA256 795587a7ee1d734e77560efe8376e4d96f4595b0507f5bcdea4bc3fe5059536d SHA512 4df9541b465d75818149fb6fe1df0d5aa07874295c1f8bb548db819d8efe8e3d9e3378793d45b3f4b6792384e671946de61b8db1e423353cf883158c319989b2 WHIRLPOOL 01d5d649be122d911767955f653b872c1546a600ee55def192b1d4f8e6901e6abc59b533a619c3a638344be066d553dffcb69ff6cea037795bdf4fe6490695dc
+MISC ChangeLog 4560 SHA256 3935ac0a792982f5be792b0eda7a69d68604a5d407c4fed146e76a0d048d6990 SHA512 9d30d7763361ff7e39e231c896503bdaa943f47a69ad322e993c031de802125875a2bbfec086900c224e23ad28e79ca70eb1f0e7dc4483c237fcfccf5679491e WHIRLPOOL 40d56941b01e9eaef12d8aa83d5a74f720d24e72d9b1c8ba7b994a3b4b430cdfef689627e87692a8dc1bf211647767a194a77a187e3ff81128d425af3c1be7ed
+MISC ChangeLog-2015 2471 SHA256 036dc588a3139866469aaec5fe0c7fe02525936ac42e1ac95e42a1183ad911ec SHA512 b28cab020696002d48eaba2c606ebe3814a0cf7c134e664e9619333fa9f82acd775ea880d414864f1b8db2428cb63bdbff6ccbb35b1c556ba3c46de4bdfeafd3 WHIRLPOOL 3b66c5d3d55dd78fec05fad0563bdacc72b32914efbfd9f717e05fdfc66250140578650ac840f4847c6c1a835370450ea35b858230478ba6e78d9bbb0f4c9898
+MISC metadata.xml 525 SHA256 2757c2384bdfba67fafa5780aead6901a4302c74b915fb2dd06c714bfddb33cf SHA512 29eeec1073b67bf0fcc11f30b9ee0f41db40fb976937e6b6397e80d1019856cf2e08da8da956c6bbe34ac1d48323b2521d7b57dfbf3e379bfe6ed1aa90aada14 WHIRLPOOL c5a1eeaa0a850ff6bff94221bdb4afb95ff0fd1a9e7dffff07e2b7cd2ee493c6e5cb9ca7be5f04dce7ff43df794d69658bd05f7b36bd3ff29f75e8cd97468140
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..524aa433671f
--- /dev/null
+++ b/dev-libs/ustr/metadata.xml
@@ -0,0 +1,16 @@
+<?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>
+ <description>Maintainer. Assign bugs to him</description>
+</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..65f80d287502
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r5.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 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..2219f8892293
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r7.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 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..0a00eb5d697d
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r8.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2016 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
+}