Ticket #65561: Portfile

File Portfile, 1.5 KB (added by RobK88, 21 months ago)

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}
16
17extract.suffix  .tgz
18
19depends_lib     port:libiconv
20
21checksums       md5 e4db2c4e3c8f6f5ee414b68bc55288e5 \
22                sha1 98a64f799892f7adfffd4635bd19826fe8f18b26 \
23                rmd160 bb55aee26e12c8bf0e4422b11feffa5c88844771
24
25worksrcdir              unalz
26
27patchfiles      1000-Makefile.patch
28
29use_configure    no
30
31post-patch {
32    reinplace -E "/^CFLAGS/s|\$|${configure.cflags} [get_canonical_archflags cc]\\\nCXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]|" ${worksrcpath}/Makefile
33    reinplace -E "/^LDFLAGS/s|\$|${configure.ldflags} [get_canonical_archflags ld]|" ${worksrcpath}/Makefile
34    reinplace "s|register ||" ${worksrcpath}/UnAlz.cpp
35    reinplace "s|CRC_TABLE = get_crc_table|CRC_TABLE = (unsigned long *)get_crc_table|" ${worksrcpath}/UnAlz.cpp
36}
37
38build.args       CPP="${configure.cxx}" \
39                     CXX="${configure.cxx}" \
40                     CC="${configure.cc}"
41
42build.target    posix-utf8
43
44destroot {
45        xinstall -m 755 ${worksrcpath}/unalz ${destroot}${prefix}/bin
46   
47    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
48    xinstall -m 644 ${worksrcpath}/readme.txt ${destroot}${prefix}/share/doc/${name}
49}
50