From 2cb218100a529db52a72e24620c91eadd1a5f211 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 8 Feb 2010 20:44:37 +0000 Subject: app-arch/zpaq: Version bump. Support for ZPAQ's self-optimization. svn path=/sunrise/; revision=10003 --- app-arch/zpaq/ChangeLog | 6 ++- app-arch/zpaq/Manifest | 9 ++-- app-arch/zpaq/files/zpaqmake.in | 6 +++ app-arch/zpaq/metadata.xml | 4 ++ app-arch/zpaq/zpaq-1.09.ebuild | 55 ----------------------- app-arch/zpaq/zpaq-1.10.ebuild | 98 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 118 insertions(+), 60 deletions(-) create mode 100644 app-arch/zpaq/files/zpaqmake.in delete mode 100644 app-arch/zpaq/zpaq-1.09.ebuild create mode 100644 app-arch/zpaq/zpaq-1.10.ebuild (limited to 'app-arch') diff --git a/app-arch/zpaq/ChangeLog b/app-arch/zpaq/ChangeLog index cec00f4ee..e1d4a226d 100644 --- a/app-arch/zpaq/ChangeLog +++ b/app-arch/zpaq/ChangeLog @@ -1,7 +1,11 @@ # ChangeLog for app-arch/zpaq -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 08 Feb 2010; Michał Górny (sedzimir) + -zpaq-1.09.ebuild, +zpaq-1.10.ebuild, +files/zpaqmake.in, metadata.xml: + Version bump. Support for ZPAQ's self-optimization. + 01 Nov 2009; Michał Górny (sedzimir) zpaq-1.09.ebuild: Install LZP preprocessor in libexec, small fixes. diff --git a/app-arch/zpaq/Manifest b/app-arch/zpaq/Manifest index f90c73f66..7fe4d6ed2 100644 --- a/app-arch/zpaq/Manifest +++ b/app-arch/zpaq/Manifest @@ -1,4 +1,5 @@ -DIST zpaq109.zip 94431 RMD160 5176503996b530f58d4a468f9b954567109f3788 SHA1 7c175595a0187a10c08ddc06f1857622db06978c SHA256 97a25847ecb01f12c21c4b9edae305b0622bb48625cc1a3d5b2cfb9e66591576 -EBUILD zpaq-1.09.ebuild 1629 RMD160 7db80fd17f40c70135d1b65739e84b33eba4f755 SHA1 42d20f35196de3e2852e02cfb7355ce2463b055d SHA256 66c5222ae32a82855beb77406d8bf279fa5444421a54e43afab1e74d6fa445a8 -MISC ChangeLog 818 RMD160 41294c86e29f5c1be1d9eb8335f42275457e9232 SHA1 055b4d8758482015e6761f10fc725d3dc52f1f87 SHA256 00663a6b64504a2689cc82eb1cfa7f000b444f4ecf2b8b2a1787953a23b35261 -MISC metadata.xml 171 RMD160 ed284df01c230fc7990a6b5888b39166d23f29ba SHA1 f3d64a69044b710e23fb874b3ee4cd338858c8b4 SHA256 a7b30fbacd0e4c312c07a3efac112a3794c81d134442d8104325734d03425adf +AUX zpaqmake.in 198 RMD160 cbc092ba9badb34ab5f37d9492126bfafecc9174 SHA1 59b1208001bea49b2ce578b4767855e02aee78ad SHA256 d548855b7d357a0659f6272e759d291d0afca7816495ac31e2be53836b9826a3 +DIST zpaq110.zip 94403 RMD160 bc9d5c549cfecdea62f30aaa31ea66a642913e7a SHA1 266a5146fc42ccd2c0631701be4529a2740cd23f SHA256 af2564b2ebc7ecb370cd0ed24e30a92bc8ca4ad256c63174b1a83fade88245e8 +EBUILD zpaq-1.10.ebuild 2596 RMD160 a715f91e6bcd6d9330154195bb3bdc7777740a9d SHA1 f72e753b53a0e3ef37dec120768d5672e8634566 SHA256 2e6681b2f9af9ea30cd1100df7338be389c3d350232ea08d0afb848acbd92b02 +MISC ChangeLog 1011 RMD160 049f08047d75d6ae86a7841646d3f0aae9c68bf7 SHA1 6bf54f9ca6d37ae4fde84bcefc1ecb3cb88def2b SHA256 2bb699d3b942321d11de5e81b743f730269a6d51586eb3d72eead5549d7460e5 +MISC metadata.xml 304 RMD160 739c9d04e648fdd762da968fce83dba7da1b8a71 SHA1 6f1bc945c848487545a5c0b3ce46a3b69ca877ef SHA256 7aef31d94c7145199f824eefcaf2e5c2d5a437d7fffe63f49c38a1dda5b7b2ec diff --git a/app-arch/zpaq/files/zpaqmake.in b/app-arch/zpaq/files/zpaqmake.in new file mode 100644 index 000000000..9740bcc30 --- /dev/null +++ b/app-arch/zpaq/files/zpaqmake.in @@ -0,0 +1,6 @@ +#!/bin/sh +# based on zpaqmake.bat from zpaq + +exec "${CXX:-%CXX%}" ${CXXFLAGS-%CXXFLAGS%} -DNDEBUG -DOPT \ + "$1".cpp -I/usr/include/zpaq /usr/%LIBDIR%/zpaq/zpaq.o \ + -o "$1".exe ${LDFLAGS-%LDFLAGS%} diff --git a/app-arch/zpaq/metadata.xml b/app-arch/zpaq/metadata.xml index 6f1d493c5..d97740beb 100644 --- a/app-arch/zpaq/metadata.xml +++ b/app-arch/zpaq/metadata.xml @@ -2,4 +2,8 @@ maintainer-wanted + + Install additional files required to support + ZPAQ's optimized compression mode. + diff --git a/app-arch/zpaq/zpaq-1.09.ebuild b/app-arch/zpaq/zpaq-1.09.ebuild deleted file mode 100644 index 4b8b484ed..000000000 --- a/app-arch/zpaq/zpaq-1.09.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit toolchain-funcs - -MY_P="${PN}${PV/./}" -DESCRIPTION="Unified compressor for PAQ algorithms" -HOMEPAGE="http://mattmahoney.net/dc/#zpaq" -SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="app-arch/unzip" -RDEPEND="" - -src_compile() { - # Upstream doesn't provide any Makefile - - # -DOPT is broken (at least) on Linux - "$(tc-getCXX)" ${CXXFLAGS} -DNDEBUG zpaq.cpp -o zpaq || die 'compiling zpaq failed' - "$(tc-getCXX)" ${CXXFLAGS} lzppre.cpp -o lzppre || die 'compiling lzppre failed' - - sed -e 's:^pcomp :&/usr/libexec/zpaq/:' -i *.cfg || die 'sed failed' -} - -src_install() { - dobin zpaq || die 'dobin failed' - - dodoc readme.txt || die 'dodoc failed' - - # Preprocessors - exeinto /usr/libexec/zpaq - doexe lzppre || die 'doexe failed' - - # These are more like compression profiles, so install them in /usr/share - insinto /usr/share/zpaq - doins *.cfg || die 'doins failed' -} - -pkg_postinst() { - elog "Unlike conventional archivers, zpaq doesn't have any algorithm chain" - elog "compiled in by default. Instead, it provides many PAQ components to allow" - elog "user to create his own chain and supply it as configuration file." - elog - elog "We install few default configs in /usr/share/zpaq to start with. They can" - elog "be used like that:" - elog " zpaq c/usr/share/zpaq/max.cfg out.zpaq files" - elog - elog "You may also want to install app-arch/zpaq-extras package which provides" - elog "few additional configs and preprocessors for use with zpaq." -} diff --git a/app-arch/zpaq/zpaq-1.10.ebuild b/app-arch/zpaq/zpaq-1.10.ebuild new file mode 100644 index 000000000..db9d760d6 --- /dev/null +++ b/app-arch/zpaq/zpaq-1.10.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit multilib toolchain-funcs + +MY_P="${PN}${PV/./}" +DESCRIPTION="Unified compressor for PAQ algorithms" +HOMEPAGE="http://mattmahoney.net/dc/#zpaq" +SRC_URI="http://mattmahoney.net/dc/${MY_P}.zip" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="optimization" + +DEPEND="app-arch/unzip" +RDEPEND="" + +src_prepare() { + # make it FHS-friendly + sed -e 's:^pcomp :&/usr/libexec/zpaq/:' -i *.cfg || die + + if use optimization; then + sed \ + -e "s:%CXX%:$(tc-getCXX):" \ + -e "s:%CXXFLAGS%:${CXXFLAGS}:" \ + -e "s:%LIBDIR%:$(get_libdir):" \ + "${FILESDIR}"/zpaqmake.in > zpaqmake || die + fi +} + +src_configure() { + tc-export CXX + + if use optimization; then + # NOTE: zpaqmake is used in runtime by zpaq to compile profiles + # please do not complain about stripping, it's not for build time + + local stripflag=' -Wl,--strip-all' + # check whether the default compiler supports -Wl,--strip-all + echo 'int main(void) {return 0;}' > striptest.c + "${CXX}" ${CXXFLAGS} striptest.c -o striptest \ + ${LDFLAGS} ${stripflag} || stripflag= + + sed -i -e "s:%LDFLAGS%:${LDFLAGS}${stripflag}:" zpaqmake || die + fi +} + +src_compile() { + "${CXX}" ${CXXFLAGS} -DNDEBUG zpaq.cpp -o zpaq ${LDFLAGS} || die + "${CXX}" ${CXXFLAGS} lzppre.cpp -o lzppre ${LDFLAGS} || die + + if use optimization; then + # provide precompiled stub + "${CXX}" -c ${CXXFLAGS} -DNDEBUG -DOPT zpaq.cpp -o zpaq.o || die + fi +} + +src_install() { + dobin zpaq || die + dodoc readme.txt || die + + if use optimization; then + dobin zpaqmake || die + insinto /usr/include/zpaq + doins zpaq.h || die + insinto /usr/$(get_libdir)/zpaq + doins zpaq.o || die + fi + + # Preprocessors + exeinto /usr/libexec/zpaq + doexe lzppre || die + + # These are more like compression profiles, so install them in /usr/share + insinto /usr/share/zpaq + doins *.cfg || die +} + +pkg_postinst() { + elog "Unlike conventional archivers, zpaq doesn't have any algorithm chain" + elog "compiled in by default. Instead, it provides many PAQ components to allow" + elog "user to create his own chain and supply it as configuration file." + elog + elog "We install few default configs in /usr/share/zpaq to start with. They can" + elog "be used like that:" + if use optimization; then + elog " zpaq oc/usr/share/zpaq/max.cfg out.zpaq files" + else + elog " zpaq c/usr/share/zpaq/max.cfg out.zpaq files" + fi + elog + elog "You may also want to install app-arch/zpaq-extras package which provides" + elog "few additional configs and preprocessors for use with zpaq." +} -- cgit v1.2.3-65-gdbad