Ticket #60014: Portfile

File Portfile, 1.6 KB (added by Cor0n4V1rus, 5 years ago)

patched Portfile

Line 
1PortSystem      1.0
2
3name                    unalz
4version         0.65
5categories              archivers
6platforms               darwin
7maintainers             bawi.org:minskim
8description             unarchiver for the AlZip format
9
10long_description        Unalz is a BSD-licensed unarchiver for AlZip format which \
11                                requires proprietary and win32-only software but widely used \
12                                in Korea.
13
14homepage                http://www.kipple.pe.kr/win/unalz/
15master_sites    ${homepage}
16extract.suffix  .tgz
17
18depends_lib     port:libiconv
19
20checksums       md5 e4db2c4e3c8f6f5ee414b68bc55288e5 \
21                sha1 98a64f799892f7adfffd4635bd19826fe8f18b26 \
22                rmd160 bb55aee26e12c8bf0e4422b11feffa5c88844771
23
24worksrcdir              unalz
25
26post-patch {
27    reinplace "s|/usr/local|\$(DESTDIR)${prefix}|" ${worksrcpath}/Makefile
28    reinplace "s|register ||" ${worksrcpath}/UnAlz.cpp
29    reinplace "s|CRC_TABLE = get_crc_table|CRC_TABLE = (unsigned long *)get_crc_table|" ${worksrcpath}/UnAlz.cpp
30}
31
32
33# Note: CPP in the Makefile is the C++ compiler, not preprocessor
34configure {
35    reinplace -E "/^CFLAGS/s|\$|${configure.cflags} [get_canonical_archflags cc]\\\nCPPFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]|" ${worksrcpath}/Makefile
36    reinplace -E "/^LDFLAGS/s|\$|${configure.ldflags} [get_canonical_archflags ld]|" ${worksrcpath}/Makefile
37}
38
39build.args       CPP="${configure.cxx}" \
40                     CXX="${configure.cxx}" \
41                     CC="${configure.cc}"
42build.target    posix-utf8
43
44post-destroot {
45    set docdir ${prefix}/share/doc/${name}
46    xinstall -d ${destroot}${docdir}
47    xinstall -m 0644 ${worksrcpath}/readme.txt ${destroot}${docdir}
48}
49
50livecheck.type  regex
51livecheck.url   ${homepage}
52livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)