summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-09-13 11:14:45 +0800
committerIan Delaney <idella4@gentoo.org>2015-09-13 11:14:45 +0800
commit7dea6f8820f36bf389e6315044bea7507553bed0 (patch)
treec49862b9e2993c02b7edaf58d47bfc542c6585b0 /dev-libs/ustr
parentnet-firewall/arno-iptables-firewall: bump, request sourced from bug #559858 (diff)
downloadgentoo-7dea6f8820f36bf389e6315044bea7507553bed0.tar.gz
gentoo-7dea6f8820f36bf389e6315044bea7507553bed0.tar.bz2
gentoo-7dea6f8820f36bf389e6315044bea7507553bed0.zip
dev-libs/ustr: revbump; patch and ebuild submitted in bug #556452
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-libs/ustr')
-rw-r--r--dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch28
-rw-r--r--dev-libs/ustr/ustr-1.0.4-r6.ebuild61
2 files changed, 89 insertions, 0 deletions
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/ustr-1.0.4-r6.ebuild b/dev-libs/ustr/ustr-1.0.4-r6.ebuild
new file mode 100644
index 000000000000..249168bfae46
--- /dev/null
+++ b/dev-libs/ustr/ustr-1.0.4-r6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/ustr/ustr-1.0.4-r3.ebuild,v 1.4 2014/01/14 13:58:01 ago Exp $
+
+EAPI=5
+
+inherit multilib-build toolchain-funcs eutils
+
+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=""
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc_5-check.patch"
+ multilib_copy_sources
+}
+
+ustr_make() {
+ emake "$@" \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ prefix="${EPREFIX}/usr" \
+ SHRDIR="/usr/share/${P}" \
+ HIDE= || die
+}
+
+ustr_install() {
+ cd "${BUILD_DIR}" || die
+
+ 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= || die
+}
+
+src_compile() {
+ multilib_foreach_abi ustr_make all-shared
+}
+
+multilib_src_test() {
+ multilib_foreach_abi ustr_make check
+}
+
+src_install() {
+ multilib_foreach_abi ustr_install install-multilib-linux
+ dodoc ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO
+}