# $Id$ PortSystem 1.0 name upx version 3.08 categories archivers maintainers gmail.com:cedric.luthi license GPL-2+ description compress or expand executable files long_description UPX is a free, portable, extendable, high-performance \ executable packer for several different executable formats homepage http://upx.sourceforge.net/ platforms darwin master_sites ${homepage}download/ distname ${name}-${version}-src use_bzip2 yes checksums [suffix ${distname}] \ rmd160 3fd7b3c4c66a90ddd622b5fb0ba0502c7145da62 \ sha256 c6d873925ef0d5422b9320c7075ef9be5981a6f99418469ce067becd68de65eb use_configure no variant universal {} build.env CPPFLAGS="${configure.cppflags}" \ CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \ LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" depends_lib port:ucl port:zlib # pod2man, pod2text, and pod2html are used to generate documentation depends_build bin:pod2man:perl5 \ bin:pod2text:perl5 \ bin:pod2html:perl5 post-configure { # Ensure that the correct compiler is used reinplace "s|CXX = .*|CXX = ${configure.cxx}|" ${worksrcpath}/src/Makefile } destroot { xinstall -m 755 ${worksrcpath}/src/upx.out ${destroot}${prefix}/bin/upx xinstall -m 644 ${worksrcpath}/doc/upx.1 ${destroot}${prefix}/share/man/man1 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} xinstall -m 644 -W ${worksrcpath}/doc upx.doc upx.html ${destroot}${prefix}/share/doc/${name} xinstall -m 644 -W ${worksrcpath} BUGS COPYING LICENSE NEWS PROJECTS README README.1ST README.SRC THANKS TODO ${destroot}${prefix}/share/doc/${name} } variant lzma description {Support LZMA compression} { set lzma-distfile [suffix lzma465] master_sites-append sourceforge:sevenzip:lzma distfiles-append ${lzma-distfile}:lzma checksums-append ${lzma-distfile} \ md5 29d5ffd03a5a3e51aef6a74e9eafb759 \ sha1 5ec1c4606fec88c770a9712073e83916f8aed173 \ rmd160 70953d4ee8542addf566953e0ed62e9c75a016b5 build.env-append UPX_LZMADIR=${workpath} } livecheck.type regex livecheck.url ${homepage} livecheck.regex UPX (\\d(\\.\\d+)*)