diff options
Diffstat (limited to 'dev-libs/libmba')
-rw-r--r-- | dev-libs/libmba/Manifest | 7 | ||||
-rw-r--r-- | dev-libs/libmba/files/libmba-0.9.1-glibc-2.20.patch | 34 | ||||
-rw-r--r-- | dev-libs/libmba/files/libmba-0.9.1-qa.patch | 96 | ||||
-rw-r--r-- | dev-libs/libmba/libmba-0.9.1-r3.ebuild | 40 | ||||
-rw-r--r-- | dev-libs/libmba/metadata.xml | 5 |
5 files changed, 182 insertions, 0 deletions
diff --git a/dev-libs/libmba/Manifest b/dev-libs/libmba/Manifest new file mode 100644 index 000000000000..a72ee507a2b0 --- /dev/null +++ b/dev-libs/libmba/Manifest @@ -0,0 +1,7 @@ +AUX libmba-0.9.1-glibc-2.20.patch 1039 SHA256 72c0f0d02a464b0e3588e98710ab81e5cccbd6fb0427802a2ba67f769db95058 SHA512 b0d0ea1425dd4dbba685eee62609f0627c4d8a579a566d52d1c7f333a92109cf700faaba8ed0f0697d08409feb14ceb5bebf9a799c23e9de1aef388ba1ba4b95 WHIRLPOOL 4d0bc564626dd3939966c8dc4a6ee57058c608c5edae811a5f363db5e4eaa353b59e5a6ef1f8bd130c540097213591ff6cd6a073135a4f14b6178402f2f5f466 +AUX libmba-0.9.1-qa.patch 2927 SHA256 cfe43906d41d1f7a7868c94cbd4bcf39989bed22bf6ed9fc95806133ad1635bc SHA512 b5886f89c4ea4739e6bfe34e9f8026946ffbbc619922cbd25bab0d7c5df3fefbaf1f198f1321feaf5bbffa79951c58b329cf1d47f4f7ee0f3014de4434c179ea WHIRLPOOL 14259b1a934fe91d24bf79ed6b01007602f00044f65108d17ff7a7d612f8a58b0029884ba5773c2e07eb0ed1979ea95859981c185fcb349a6df8a2ae5adf99ec +DIST libmba-0.9.1.tar.gz 290080 SHA256 1482c6c1a32794d1c40df471d25006ee1cae5b07ebd76b0301268dddb8629394 SHA512 28696e6066cb6c54434e1a35576c1e2430e3b83a478fddeabb20ddf1d8b889edac023de15090762fb95a759ebb9d2d8fcf1b0d19ec22f6a98ef2780400456da6 WHIRLPOOL 3dab2a36821049859d9f6e65af70fee8756c94e5135b6070d589fa46e8d95849221231d9b80cf6df4e81b254b80e8a27072da4ba5b227f252f80312ff7265cd3 +EBUILD libmba-0.9.1-r3.ebuild 903 SHA256 c5f4fdb3f904a4d1af0bb81505b5185e856aa5a61be9f18ac156d3f5da5115e8 SHA512 aed294ada81eebf9bda981a0b09bf82a1f419f8358d7a299e95d6d0b8f5b52a97ee313e0d85d978b535dec10e40a484a610055be475638a55ad51dbdcd29ba6c WHIRLPOOL b59beb593b56abdc50432efcc2a2e211821cc94733b6135659728cc5aee6123e9b4f5933f8ad7edf0c0145bf2a7ead62aa8896cd1428222347d83bbe48e6949e +MISC ChangeLog 2595 SHA256 ebed966313e26537d0f141fdc2f729f7e63b7ad44cf45fbaab69836d2cabf8be SHA512 ef6c63c7aebb033ab423c978981a4dd963724d070c86861eedf5ee4c65747eb0d10b9a388295f86632355eb6b34cb5b0a4ec77cb959025adf943df95cf628902 WHIRLPOOL 4feea8e991f89f130e8118f7c413097c9e00032286a301ce7575957f392c96668fd0d55fc74f38dd5dc2bda8fa5c55a1362b3bcdc1f1052acbb80f0dd1b20b04 +MISC ChangeLog-2015 2220 SHA256 6086ef8f0ce5315023e4685c8ba97906249e55487aba5178820af360bf738a8f SHA512 6684d65a0c12f315320ed25478bada0919f495349e2888bb021be5d9d131359689e3b45951a0b0fa5cee1e7d0f900400ab8d025d78c53710e331d8fd037d3772 WHIRLPOOL 28913992eff8126c200424405640449378d2524be7d2705d8fd04a5001671152a1ec2f0f5f14136b54a150eaa3007081d992fb43372309a705ddfd489117d695 +MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968 diff --git a/dev-libs/libmba/files/libmba-0.9.1-glibc-2.20.patch b/dev-libs/libmba/files/libmba-0.9.1-glibc-2.20.patch new file mode 100644 index 000000000000..4d5651cc5d12 --- /dev/null +++ b/dev-libs/libmba/files/libmba-0.9.1-glibc-2.20.patch @@ -0,0 +1,34 @@ +--- a/src/mba/text.h ++++ b/src/mba/text.h +@@ -315,31 +315,6 @@ + /* "dumb" snprintf returns -1 on overflow */ + LIBMBA_API int dsnprintf(char *str, size_t size, const char *format, ...); + +-#if !defined(_GNU_SOURCE) +- +-#if !defined(_BSD_SOURCE) && \ +- !defined(_XOPEN_SOURCE_EXTENDED) && \ +- !defined(_WIN32) && \ +- !(defined(__APPLE__) && defined(__MACH__)) +-LIBMBA_API char *strdup(const char *s); +-#endif +- +-LIBMBA_API wchar_t *wcsdup(const wchar_t *s); +-LIBMBA_API size_t strnlen(const char *s, size_t maxlen); +- +-#if (__STDC_VERSION__ < 199901L) && \ +- !defined(_BSD_SOURCE) && \ +- (_XOPEN_VERSION < 500) && \ +- !(defined(__APPLE__) && defined(__MACH__)) +-#include <stdarg.h> +-int vsnprintf(char *str, size_t size, const char *format, va_list ap); +-#endif +- +-LIBMBA_API size_t wcsnlen(const wchar_t *s, size_t maxlen); +-LIBMBA_API int wcscasecmp(const wchar_t *s1, const wchar_t *s2); +- +-#endif /* _GNU_SOURCE */ +- + /* + wchar_t *wcschrnul(const wchar_t *s, wchar_t wc); + int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n); diff --git a/dev-libs/libmba/files/libmba-0.9.1-qa.patch b/dev-libs/libmba/files/libmba-0.9.1-qa.patch new file mode 100644 index 000000000000..0f9859504f0a --- /dev/null +++ b/dev-libs/libmba/files/libmba-0.9.1-qa.patch @@ -0,0 +1,96 @@ +Addresing multiple QA issues: + - fixing CFLAGS, LDFLAGS, CC + - fixing parallel build + - fixing as-needed issues + - making static libs optional + - introducing make DESTDIR compatibility + - removing Makefile.PLATFORM bits, as they violate sandbox + +http://bugs.gentoo.org/show_bug.cgi?id=313673 + +Patch written by Kacper Kowalik <xarthisius.kk@gmail.com> + +--- a/Makefile ++++ b/Makefile +@@ -1,13 +1,13 @@ + # Makefile for libmba + # Supported flags: -DVARRAY_INIT_SIZE=N -DUSE_WCHAR + +-MFLAGS = -g -W1 -Isrc ++MFLAGS = -Isrc + MKTOOL = ./mktool + +-prefix = /usr/local ++prefix = $(DESTDIR)/usr + includedir = $(prefix)/include +-libdir = $(prefix)/lib +-mandir = $(prefix)/man ++libdir = $(prefix)/$(LIBDIR) ++mandir = $(prefix)/share/man + LIBNAME = mba + LIBVERS = 0.9.1 + ARNAME = lib$(LIBNAME).a +@@ -19,39 +19,49 @@ + MAN = diff.3m bitset.3m allocator.3m cfg.3m pool.3m varray.3m csv.3m text.3m path.3m suba.3m msgno.3m stack.3m linkedlist.3m hashmap.3m hexdump.3m shellout.3m eval.3m svsem.3m svcond.3m time.3m + MANGZ = $(MAN:.3m=.3m.gz) + ++.PHONY: all clean install uninstall install-ar uninstall-ar + .SUFFIXES: .pic.o .3m .3m.gz + +-all: mktool so ar ++ifeq ($(STATIC),1) ++all: $(MKTOOL) so ar ++install-ar: $(ARNAME) ++ -$(MKTOOL) -i $(ARNAME) $(libdir) ++uninstall-ar: ++ $(MKTOOL) -u $(ARNAME) $(libdir) ++else ++all: $(MKTOOL) so ++install-ar: ++uninstall-ar: ++endif + +-mktool: ++$(MKTOOL): mktool.c + $(CC) -g -o mktool mktool.c + +-ar: mktool $(OBJS) ++$(PICOBJS): $(MKTOOL) ++$(OBJS): $(MKTOOL) ++ ++ar: $(OBJS) + ar $(ARFLAGS) $(ARNAME) $(OBJS) + ranlib $(ARNAME) +-so: mktool $(PICOBJS) +- @$(MKTOOL) -l -v -libname $(LIBNAME) -libvers $(LIBVERS) -shared -soname -lutil $(PICOBJS) ++so: $(PICOBJS) ++ @$(MKTOOL) -l -v -libname $(LIBNAME) -libvers $(LIBVERS) -shared -soname $(LDFLAGS) $(PICOBJS) -lutil + + .c.pic.o: +- @$(MKTOOL) -c -v $(MFLAGS) -fpic -c -o $*.pic.o $< ++ @$(MKTOOL) -c -v $(CFLAGS) $(MFLAGS) -fpic -c -o $*.pic.o $< + .c.o: +- @$(MKTOOL) -c -v $(MFLAGS) -c -o $*.o $< ++ @$(MKTOOL) -c -v $(CFLAGS) $(MFLAGS) -c -o $*.o $< + +-install: mktool +- -$(MKTOOL) -i $(ARNAME) $(libdir) +- -$(MKTOOL) -i -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir) ++install: install-ar ++ $(MKTOOL) -i -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir) + $(MKTOOL) -i $(HDRS) $(includedir)/mba + $(MKTOOL) -i docs/man/*.3m.gz $(mandir)/man3 +- @-libdir=$(libdir) mandir="$(mandir)" MAN="$(MAN)" MANGZ="$(MANGZ)" $(MKTOOL) -m -v platform_specific_install + @echo + @echo installation successful +-uninstall: mktool +- $(MKTOOL) -u $(ARNAME) $(libdir) ++uninstall: uninstall-ar + $(MKTOOL) -u -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir) + $(MKTOOL) -u $(HDRS) $(includedir)/mba + rm -rf $(includedir)/mba + $(MKTOOL) -u $(MANGZ) $(mandir)/man3 +- -@libdir=$(libdir) mandir="$(mandir)" MAN="$(MAN)" MANGZ="$(MANGZ)" $(MKTOOL) -m -v platform_specific_uninstall + @echo + @echo de-installation successful + diff --git a/dev-libs/libmba/libmba-0.9.1-r3.ebuild b/dev-libs/libmba/libmba-0.9.1-r3.ebuild new file mode 100644 index 000000000000..9f66be909a62 --- /dev/null +++ b/dev-libs/libmba/libmba-0.9.1-r3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils flag-o-matic multilib toolchain-funcs + +DESCRIPTION="A library of generic C modules" +LICENSE="MIT" +HOMEPAGE="http://www.ioplex.com/~miallen/libmba/" +SRC_URI="${HOMEPAGE}dl/${P}.tar.gz" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="static-libs" + +src_prepare() { + use static-libs && export STATIC="1" + + epatch "${FILESDIR}"/${P}-qa.patch + epatch "${FILESDIR}"/${P}-glibc-2.20.patch + + tc-export CC + sed -i -e "s:gcc:${CC}:g" mktool.c || die + + # prevent reinventing strdup(), wcsdup() and strnlen() + append-cflags -D_XOPEN_SOURCE=500 +} + +src_compile() { + emake LIBDIR="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install + + dodoc README.txt docs/*.txt + dohtml -r docs/*.html docs/www/* docs/ref + + insinto /usr/share/doc/${PF}/examples + doins examples/* +} diff --git a/dev-libs/libmba/metadata.xml b/dev-libs/libmba/metadata.xml new file mode 100644 index 000000000000..6f49eba8f496 --- /dev/null +++ b/dev-libs/libmba/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> |