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

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

p7zip: prevent permission errors when not installing as root (fixes #48653)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1# $Id: Portfile 140698 2015-09-30 12:43:50Z mcalhoun@macports.org $
2
3PortSystem      1.0
4
5name            p7zip
6version         9.38.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  df76939ed67f3835fe4f8e92f2fec1ab4e4328c6 \
27                sha256  fd5019109c9a1bf34ad3257d37a6853eae8151ff50345f0a3ffba7d8c5fdb995
28
29variant universal {}
30
31post-patch {
32    # if not root, installing with restricted permissions causes errors
33    #     when attempting to remove work directory
34    # see http://www.linuxfromscratch.org/blfs/view/svn/general/p7zip.html
35    reinplace "s|chmod 444|chmod 644|g" ${worksrcpath}/install.sh
36    reinplace "s|chmod 555|chmod 755|g" ${worksrcpath}/install.sh
37}
38
39configure {
40    copy -force ${worksrcpath}/makefile.macosx_32bits ${worksrcpath}/makefile.machine
41    reinplace "s|^CXX=c++|CXX=${configure.cxx}|g" \
42            ${worksrcpath}/makefile.machine
43    reinplace "s|^CC=cc|CC=${configure.cc}|g" \
44            ${worksrcpath}/makefile.machine
45    reinplace "s|-m32||g" \
46            ${worksrcpath}/makefile.machine
47    reinplace "s|\$(LOCAL_FLAGS)|[get_canonical_archflags] \$(LOCAL_FLAGS)|g" \
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/${name}-${version} \
56                    DEST_MAN=${prefix}/share/man \
57                    DEST_DIR=${destroot}
Note: See TracBrowser for help on using the repository browser.