Ticket #65561: Portfile-unalz.diff

File Portfile-unalz.diff, 3.5 KB (added by RobK88, 2 years ago)

Portfile-unalz diff

  • Portfile

    old new  
    1 PortSystem      1.0
     1PortSystem              1.0
     2PortGroup               makefile 1.0
    23
    34name                    unalz
    4 version         0.65
     5version                 0.65
    56categories              archivers
    67platforms               darwin
    7 maintainers             bawi.org:minskim
     8license                 zlib
     9maintainers             bawi.org:minskim \
     10                                {hotmail.com:amtor @RobK88} \
     11                openmaintainer
     12
    813description             unarchiver for the AlZip format
    914
    10 long_description        Unalz is a BSD-licensed unarchiver for AlZip format which \
    11                                 requires proprietary and win32-only software but widely used \
    12                                 in Korea.
     15long_description        Unalz is an unarchiver for the AlZip format which \
     16                                is widely used in Korea.  The ALZ file format is a proprietary \
     17                                file compression and archiving format designed to overcome \
     18                                the file size limitations of the ZIP file format. \
     19                                If you want to create .alz archives, \
     20                                you will need to use the proprietary ALZip software which only \
     21                                runs in Windows.
    1322
    14 homepage                http://www.kipple.pe.kr/win/unalz/
     23homepage                http://kippler.com/win/unalz/
    1524master_sites    ${homepage}
    16 extract.suffix  .tgz
    17 
    18 depends_lib     port:libiconv
    19 
    20 checksums       md5 e4db2c4e3c8f6f5ee414b68bc55288e5 \
    21                 sha1 98a64f799892f7adfffd4635bd19826fe8f18b26 \
    22                 rmd160 bb55aee26e12c8bf0e4422b11feffa5c88844771
    2325
    24 worksrcdir              unalz
     26extract.suffix  .tgz
    2527
     28depends_lib             port:libiconv \
     29                                port:zlib \
     30                                port:bzip2
     31
     32checksums               md5 e4db2c4e3c8f6f5ee414b68bc55288e5 \
     33                                rmd160 bb55aee26e12c8bf0e4422b11feffa5c88844771 \
     34                                sha256 4c26699eb7545072de2ef7de79b4fff1f01c4db09cebff2d8d50ec03d5d74db0 \
     35                                size 137985
     36
     37worksrcdir              ${name}
     38
     39patchfiles      1000-Makefile.diff \
     40                                1001-libz-linkage.diff \
     41                                1002-libbz2-linkage.diff \
     42                                1003-zlib-1.2.7-build.diff \
     43                                1004-pipe-mode-fixes.diff \
     44                                1005-filename-length-check.diff \
     45                                1006-fix-offset-overflow.diff
     46
     47#
     48# Remove this post-patch if you want to take advantage of the potential speed increase
     49# offered by using the "register" keyword in the C++ program.
     50# Unfortunately, the "register" keyword is only available in older compilers.
     51# The "register" keyword was deprecated in the C++17 language standard.
     52#
    2653post-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
    34 configure {
    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
     54        reinplace -locale C "s|register ||" ${worksrcpath}/UnAlz.cpp
    3755}
    3856
    39 build.args       CPP="${configure.cxx}" \
    40                      CXX="${configure.cxx}" \
    41                      CC="${configure.cc}"
     57use_configure   no
    4258
    4359build.target    posix-utf8
    4460
    45 post-destroot {
    46     set docdir ${prefix}/share/doc/${name}
    47     xinstall -d ${destroot}${docdir}
    48     xinstall -m 0644 ${worksrcpath}/readme.txt ${destroot}${docdir}
     61destroot {
     62        xinstall -m 755 ${worksrcpath}/unalz ${destroot}${prefix}/bin
     63        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
     64    xinstall -m 644 ${worksrcpath}/readme.txt ${destroot}${prefix}/share/doc/${name}
    4965}
    5066
    5167livecheck.type  regex