source: trunk/dports/archivers/p7zip/Portfile @ 144942

Last change on this file since 144942 was 144942, checked in by jmr@…, 4 years ago

p7zip: fix reinplaces that were rendered incorrect by the makefile switch in r143900

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