summaryrefslogtreecommitdiff
path: root/dev-libs/ustr/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/ustr/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/ustr/files')
-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
2 files changed, 77 insertions, 0 deletions
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