diff options
author | Sebastian Pipping <sping@gentoo.org> | 2018-05-18 20:50:15 +0200 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2018-05-18 20:50:44 +0200 |
commit | f723bb0a7ffd8152522f0ac2d05bfd251ac45fcc (patch) | |
tree | bda941dcd7a4d32c52fe67c3afae2eb925fdcc11 /app-arch | |
parent | dev-lisp/clozurecl: amd64 stable wrt bug #654668 (diff) | |
download | gentoo-f723bb0a7ffd8152522f0ac2d05bfd251ac45fcc.tar.gz gentoo-f723bb0a7ffd8152522f0ac2d05bfd251ac45fcc.tar.bz2 gentoo-f723bb0a7ffd8152522f0ac2d05bfd251ac45fcc.zip |
app-arch/zopfli: 1.0.2
Package-Manager: Portage-2.3.36, Repoman-2.3.9
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/zopfli/Manifest | 1 | ||||
-rw-r--r-- | app-arch/zopfli/files/zopfli-1.0.2-makefile.patch | 70 | ||||
-rw-r--r-- | app-arch/zopfli/zopfli-1.0.2.ebuild | 41 |
3 files changed, 112 insertions, 0 deletions
diff --git a/app-arch/zopfli/Manifest b/app-arch/zopfli/Manifest index de5300ad0235..ad9cc5bcbb86 100644 --- a/app-arch/zopfli/Manifest +++ b/app-arch/zopfli/Manifest @@ -1,2 +1,3 @@ DIST zopfli-1.0.0_p20140705.tar.gz 125759 BLAKE2B 5bc052de7f8189605ec4e155c35413e5000ab1fabe7edd2877b9bbc04a0041c5f02fa67fe6a818f68eb4af15251dabf7e599615656956e315b5ece497e2afa1a SHA512 ce5b3eb016b0d734a775dbb45842de4aa4a00bc1490edfdbbf81c4640da94994d08f336b313c45b785e17c61ecf58f370edb2cb6523c963798cad739af2282ca DIST zopfli-1.0.1.tar.gz 128178 BLAKE2B dfc410508c0566ba6ec948c2ed17b5ffa45338834c08991b5f2954b06b598f01a9c2cdba6526f324bd477e89e0ddb1ab86d4c2498ffe4cc573ba434b610fec14 SHA512 51d4b2d990e6785e86f0e0104325723c9a7c3b8bf6925ef694b6696f2238eaafff2ca625495a676874ecc1704df7d685e5234b0c601e5804c1c293242e113430 +DIST zopfli-1.0.2.tar.gz 136035 BLAKE2B 23b9af324f50f2fa7276cdb8ac042e251f4e295617638c6e3999b8ecaef5d61d1fe21dd7b8d84e19f7f682f3a592674fcd6c19f359efb86ac4ea57acaac3761e SHA512 290a9506a0c1f3d0510230ca21017e1d2bed830f3f96f9d38c9f27210d89123c3baebd05a1da988eccd5395a7b007f6690f08eb9087550a06eaa69d7531f074e diff --git a/app-arch/zopfli/files/zopfli-1.0.2-makefile.patch b/app-arch/zopfli/files/zopfli-1.0.2-makefile.patch new file mode 100644 index 000000000000..07a1c121032a --- /dev/null +++ b/app-arch/zopfli/files/zopfli-1.0.2-makefile.patch @@ -0,0 +1,70 @@ +From 90221a4d79dcbf44239b9b07cb7c3ec7c090a4a3 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Fri, 18 May 2018 20:43:23 +0200 +Subject: [PATCH] Respect env CC/CXX, split LDFLAGS, use libraries + +This is a port of files/zopfli-1.0.1-makefile.patch to 1.0.2. +--- + Makefile | 32 +++++++++++++++++++------------- + 1 file changed, 19 insertions(+), 13 deletions(-) + +diff --git a/Makefile b/Makefile +index 30b931e..bf063df 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,10 @@ +-CC = gcc +-CXX = g++ ++CC ?= gcc ++CXX ?= g++ + +-CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm -O2 -Wno-unused-function +-CXXFLAGS = -W -Wall -Wextra -ansi -pedantic -O2 ++CFLAGS += -W -Wall -Wextra -ansi -pedantic ++CXXFLAGS += -W -Wall -Wextra -ansi -pedantic ++LDFLAGS += -L. -Wno-unused-function ++LIBS = -lm + + ZOPFLILIB_SRC = src/zopfli/blocksplitter.c src/zopfli/cache.c\ + src/zopfli/deflate.c src/zopfli/gzip_container.c\ +@@ -18,24 +20,28 @@ ZOPFLIPNGBIN_SRC := src/zopflipng/zopflipng_bin.cc + + .PHONY: zopfli zopflipng + ++all: zopfli zopflipng ++ + # Zopfli binary +-zopfli: +- $(CC) $(ZOPFLILIB_SRC) $(ZOPFLIBIN_SRC) $(CFLAGS) -o zopfli ++zopfli: libzopfli ++ $(CC) $(ZOPFLIBIN_SRC) $(CFLAGS) $(LDFLAGS) $(LIBS) -lzopfli -o zopfli + + # Zopfli shared library + libzopfli: + $(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -fPIC -c +- $(CC) $(ZOPFLILIB_OBJ) $(CFLAGS) -shared -Wl,-soname,libzopfli.so.1 -o libzopfli.so.1.0.2 ++ $(CC) $(ZOPFLILIB_OBJ) $(CFLAGS) $(LDFLAGS) $(LIBS) -shared -Wl,-soname,libzopfli.so.1 -o libzopfli.so.1.0.2 ++ @ln -s libzopfli.so.1.0.2 libzopfli.so.1 ++ @ln -s libzopfli.so.1.0.2 libzopfli.so + + # ZopfliPNG binary +-zopflipng: +- $(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -c +- $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(ZOPFLIPNGBIN_SRC) $(CFLAGS) -o zopflipng ++zopflipng: libzopflipng ++ $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGBIN_SRC) $(CXXFLAGS) $(LDFLAGS) $(LIBS) -lzopflipng -o zopflipng + + # ZopfliPNG shared library +-libzopflipng: +- $(CC) $(ZOPFLILIB_SRC) $(CFLAGS) -fPIC -c +- $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(CFLAGS) -fPIC --shared -Wl,-soname,libzopflipng.so.1 -o libzopflipng.so.1.0.2 ++libzopflipng: libzopfli ++ $(CXX) $(ZOPFLILIB_OBJ) $(LODEPNG_SRC) $(ZOPFLIPNGLIB_SRC) $(CXXFLAGS) $(LDFLAGS) $(LIBS) -fPIC --shared -Wl,-soname,libzopflipng.so.1 -o libzopflipng.so.1.0.2 ++ @ln -s libzopflipng.so.1.0.2 libzopflipng.so.1 ++ @ln -s libzopflipng.so.1.0.2 libzopflipng.so + + # Remove all libraries and binaries + clean: +-- +2.17.0 + diff --git a/app-arch/zopfli/zopfli-1.0.2.ebuild b/app-arch/zopfli/zopfli-1.0.2.ebuild new file mode 100644 index 000000000000..9cedbfeb2e43 --- /dev/null +++ b/app-arch/zopfli/zopfli-1.0.2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Very good, but slow, deflate or zlib compression" +HOMEPAGE="https://github.com/google/zopfli/" +SRC_URI="https://github.com/google/zopfli/archive/${P}.tar.gz" + +S="${WORKDIR}/${PN}-${P}" + +LICENSE="Apache-2.0" +SLOT="0/1" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +DOCS=( CONTRIBUTORS README README.zopflipng ) + +PATCHES=( "${FILESDIR}"/${P}-makefile.patch ) + +# zopflipng statically links an exact version of LodePNG (https://github.com/lvandeve/lodepng) + +src_prepare() { + default + tc-export CC CXX +} + +# The Makefile has no install phase +src_install() { + dolib.so libzopfli.so* + doheader src/zopfli/zopfli.h + + dobin ${PN} + + # This version was erroneously not bumped to match ${PV} + dolib.so libzopflipng.so* + doheader src/zopflipng/zopflipng_lib.h + + dobin zopflipng +} |