source: trunk/dports/archivers/p7zip/Portfile

Last change on this file was 149393, checked in by mps@…, 15 months ago

p7zip: apply Debian patches for CVE-2016-2334 and CVE-2016-2335

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 149393 2016-06-16 13:41:37Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            p7zip
6version         15.14.1
7revision        1
8categories      archivers
9# contains unrar code which has a restrictive license
10license         LGPL-2.1+ Restrictive/Distributable
11maintainers     gmail.com:stuartwesterman openmaintainer
12platforms       darwin
13description     7-Zip implementation
14
15long_description \
16    p7zip is a port of 7-Zip, a file archiver with \
17    highest compression ratio.
18
19homepage        http://p7zip.sourceforge.net/
20
21master_sites    sourceforge:project/${name}/${name}/${version}
22distname        [strsed ${distname} {g/-/_/}]
23use_bzip2       yes
24distfiles       ${distname}_src_all${extract.suffix}
25
26checksums       rmd160  1b240131d6fc8322830fa893357a62a9cdb81bdb \
27                sha256  699db4da3621904113e040703220abb1148dfef477b55305e2f14a4f1f8f25d4
28
29# security patches from Debian (will no longer be needed when version >= 16.0.2)
30patchfiles      CVE-2016-2334.patch \
31                CVE-2016-2335.patch
32
33variant universal {}
34
35post-patch {
36    # if not root, installing with restricted permissions causes errors
37    #     when attempting to remove work directory
38    # see http://www.linuxfromscratch.org/blfs/view/svn/general/p7zip.html
39    reinplace "s|chmod 444|chmod 644|g" ${worksrcpath}/install.sh
40    reinplace "s|chmod 555|chmod 755|g" ${worksrcpath}/install.sh
41}
42
43configure {
44    copy -force ${worksrcpath}/makefile.macosx_llvm_64bits ${worksrcpath}/makefile.machine
45    # this also corrects a typo in the makefile ('XX' rather than 'CXX')
46    reinplace "s|^XX=/usr/bin/llvm-g++|CXX=${configure.cxx}|" \
47            ${worksrcpath}/makefile.machine
48    reinplace "s|^CC=/usr/bin/llvm-gcc|CC=${configure.cc}|" \
49            ${worksrcpath}/makefile.machine
50    reinplace "s|-m64||g" \
51            ${worksrcpath}/makefile.machine
52    reinplace "s|\$(LOCAL_FLAGS)|[get_canonical_archflags] \$(LOCAL_FLAGS)|" \
53            ${worksrcpath}/makefile.machine
54}
55
56# build 7za, 7z and 7zr
57build.target all3
58
59destroot.destdir    DEST_HOME=${prefix} \
60                    DEST_SHARE_DOC=${prefix}/share/doc/${subport} \
61                    DEST_MAN=${prefix}/share/man \
62                    DEST_DIR=${destroot}
63
64test.run            yes
65test.target         all_test
Note: See TracBrowser for help on using the repository browser.