diff options
author | Matthias Maier <tamiko@gentoo.org> | 2016-10-03 18:21:13 -0500 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2016-10-03 18:44:49 -0500 |
commit | 08a6e00d545bb140b543c51ab1bf182f2e7fdf15 (patch) | |
tree | a04c929dcc03675ec1b5c9773a225def3158d8ed /app-arch/zstd | |
parent | app-crypt/bcrypt: remove from tree (diff) | |
download | gentoo-08a6e00d545bb140b543c51ab1bf182f2e7fdf15.tar.gz gentoo-08a6e00d545bb140b543c51ab1bf182f2e7fdf15.tar.bz2 gentoo-08a6e00d545bb140b543c51ab1bf182f2e7fdf15.zip |
app-arch/zstd: version bump to 1.1.0, fix a a number of bugs:
- respect "$(get_libdir)"
- introduce USE=static-libs, bug #593634
- do not compile library a second time, bug #594514
- respect CC, bug #593630
- prefix support
- keyword for x86
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-arch/zstd')
-rw-r--r-- | app-arch/zstd/Manifest | 1 | ||||
-rw-r--r-- | app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch | 79 | ||||
-rw-r--r-- | app-arch/zstd/zstd-1.1.0.ebuild | 30 |
3 files changed, 110 insertions, 0 deletions
diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest index 161aec2be1cc..afac251bd752 100644 --- a/app-arch/zstd/Manifest +++ b/app-arch/zstd/Manifest @@ -1 +1,2 @@ DIST zstd-1.0.0.tar.gz 593430 SHA256 197e6ef74da878cbf72844f38461bb18129d144fd5221b3598e973ecda6f5963 SHA512 ba7b1c993656fa220dd8d4c8cd6b7999b0d7b59b4290d7767063f6c4bfbb81e04b9d9890dea4d223d48082ab253159209d6187dc7b42cafc28ebc738bfa17ace WHIRLPOOL 129bd4fb25eddcb63054ce171cc1051feffcae914661ef7c96f0147edfcaf489f4affbd7940e72aa3d742bd89068cb5074e61634d3480f8c178838d4fb4bf46d +DIST zstd-1.1.0.tar.gz 716327 SHA256 61cbbd28ff78f658f0564c2ccc206ac1ac6abe7f2c65c9afdca74584a104ea51 SHA512 9fe72081d333b58d5c8f27f13bd01ab0d729984215b75690282770aa769aab6879b88177aa2b45d8ce2869bf1b360f3a828ca00aa3646a7cc57285a4e167d71f WHIRLPOOL f7e4eab8e7dada2dd0d3ab8eeba4f2b3f165476c4cacf1a609269cb8ed9bccd12c498f50e2aaf365d6c0167c0f2db2b6b6902a786ba98f169e4f0ea0b7ceacfe diff --git a/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch b/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch new file mode 100644 index 000000000000..75531c409974 --- /dev/null +++ b/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch @@ -0,0 +1,79 @@ +diff --git a/lib/Makefile b/lib/Makefile +index 4fb8ed9..ec5436d 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -63,17 +63,17 @@ all: clean libzstd + + libzstd: $(ZSTD_FILES) + @echo compiling static library +- @$(CC) $(FLAGS) -c $^ +- @$(AR) rcs $@.a *.o ++ $(CC) $(FLAGS) -c $^ ++ $(AR) rcs $@.a *.o + @echo compiling dynamic library $(LIBVER) +- @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) ++ $(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) + @echo creating versioned links +- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) +- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) ++ ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) ++ ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) + + clean: +- @rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc +- @rm -f decompress/*.o ++ rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc ++ rm -f decompress/*.o + @echo Cleaning library completed + + #------------------------------------------------------------------------ +@@ -83,22 +83,22 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly + libzstd.pc: + libzstd.pc: libzstd.pc.in + @echo creating pkgconfig +- @sed -e 's|@PREFIX@|$(PREFIX)|' \ ++ sed -e 's|@PREFIX@|$(PREFIX)|' \ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + $< >$@ + +-install: libzstd libzstd.pc +- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ +- @install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) +- @cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR) +- @cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR) +- @cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ +- @install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a +- @install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h +- @install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h +- @install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h ++install: libzstd.pc ++ install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ ++ install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) ++ cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR) ++ cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR) ++ cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/ ++ install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a ++ install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h ++ install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h ++ install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h + @echo zstd static and shared library installed + + uninstall: +diff --git a/programs/Makefile b/programs/Makefile +index 6e78d0e..993d138 100644 +--- a/programs/Makefile ++++ b/programs/Makefile +@@ -21,11 +21,7 @@ MANDIR = $(PREFIX)/share/man/man1 + + ZSTDDIR = ../lib + +-ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version "), 1) +-ALIGN_LOOP = -falign-loops=32 +-else + ALIGN_LOOP = +-endif + + CPPFLAGS= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder + CFLAGS ?= -O3 diff --git a/app-arch/zstd/zstd-1.1.0.ebuild b/app-arch/zstd/zstd-1.1.0.ebuild new file mode 100644 index 000000000000..bcfe360e065a --- /dev/null +++ b/app-arch/zstd/zstd-1.1.0.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="http://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +PATCHES=( "${FILESDIR}/${P}-fix_build_system.patch" ) + +src_compile() { + emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" zstd + cd lib && + emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" libzstd +} + +src_install() { + emake DESTDIR="${D}" \ + PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" install + + ! use static-libs && + rm -f $ "${ED}usr/$(get_libdir)/libzstd.a" +} |