Ticket #44197: Portfile-launch4j-3.4.diff

File Portfile-launch4j-3.4.diff, 4.0 KB (added by steve+macports@…, 10 years ago)
  • Portfile-3.

    old new  
    44PortSystem 1.0
    55
    66name            launch4j
    7 version         3.0.2
     7version         3.4
    88categories      java
     9license         BSD
    910maintainers     panayotis.com:panayotis
    1011description     Cross-platform Java executable wrapper
    1112long_description \
     
    2223platforms       darwin
    2324
    2425master_sites    sourceforge
    25 distname        launch4j-${version}-macosx
     26distname        launch4j-${version}-macosx-x86
    2627extract.suffix  .tgz
    27 checksums \
    28                 md5 fbe35ef1200196c121682152f94d157e \
    29                 sha1 7e9faaa807547c687c141fe082098f94ca2d2bb1 \
    30                 rmd160 e76310b9a447ab58957205533f2027ac4e5e43b1
    31 
    32 patchfiles \
    33                 launcher.diff
     28checksums       rmd160 3267bb1d24d0d457b2cf06596529565e3c343327 \
     29                sha256 4d2c6c2928d2093b4be7d949aecbefe8b09c3660ea1ed400bd24f6f267f4eefe
     30worksrcdir      launch4j
    3431
    3532use_configure   no
    3633build           {}
    3734
    38 worksrcdir      launch4j
    3935destroot {
    40     set sharedir ${destroot}${prefix}/share
    41     set l4jdir ${sharedir}/launch4j
    42     set l4jdoc ${sharedir}/doc/launch4j
    43 
    44     xinstall -d -m 755 ${l4jdoc}
    45     file rename ${worksrcpath}/web ${l4jdoc}
    46     file rename ${worksrcpath}/demo ${l4jdoc}
    47     file rename ${worksrcpath}/LICENSE.txt ${l4jdoc}
    48     file rename ${worksrcpath}/w32api/MinGW.LICENSE.txt ${l4jdoc}
    49     foreach doc {JGoodies.Forms JGoodies.Looks Nuvola.Icon.Theme XStream commons foxtrot} {
    50         file rename ${worksrcpath}/lib/${doc}.LICENSE.txt ${l4jdoc}
    51     }
    52     file rename ${worksrcpath}/bin/COPYING ${l4jdoc}/bin.COPYING
    53     file rename ${worksrcpath}/bin/readme.txt ${l4jdoc}/bin.readme.txt
    54     file rename ${worksrcpath}/head/LICENSE.txt ${l4jdoc}/head.LICENSE.txt
     36    # set install paths
     37    set l4jdir ${prefix}/share/${name}
     38    set l4jdoc ${prefix}/share/doc/${name}
     39
     40    # delete source control files
     41    file delete ${worksrcpath}/.gitignore
     42    file delete ${worksrcpath}/demo/ConsoleApp/.gitignore
     43    file delete ${worksrcpath}/demo/SimpleApp/.gitignore
    5544
    56     file delete -force ${worksrcpath}/head_src
    57     file delete -force ${worksrcpath}/src
    58     file delete ${worksrcpath}/build.xml
    59     file delete ${worksrcpath}/launch4j.exe
    60     file delete ${worksrcpath}/launch4j.jfpr
     45    # delete build files
    6146    file delete ${worksrcpath}/.classpath
    6247    file delete ${worksrcpath}/.project
    6348    file delete -force ${worksrcpath}/.settings
     49    file delete ${worksrcpath}/build.xml
     50    file delete ${worksrcpath}/launch4j.jfpr
     51
     52    # delete source files
     53    file delete -force ${worksrcpath}/head_src
     54    file delete -force ${worksrcpath}/src
     55    file delete -force ${worksrcpath}/sign4j
     56
     57    # delete windows executable
     58    file delete ${worksrcpath}/launch4j.exe
     59
     60    # set absolute path to jar in wrapper script
     61    set jar_relpath {"$(dirname "$0")"/launch4j.jar}
     62    set jar_abspath '${l4jdir}/launch4j.jar'
     63    reinplace "s|${jar_relpath}|${jar_abspath}|g" ${worksrcpath}/launch4j
     64
     65    # install documentation
     66    xinstall -d -m 755 ${destroot}${l4jdoc}
     67    file rename ${worksrcpath}/LICENSE.txt ${destroot}${l4jdoc}
     68    file rename ${worksrcpath}/bin/COPYING ${destroot}${l4jdoc}/bin.COPYING
     69    file rename ${worksrcpath}/head/LICENSE.txt ${destroot}${l4jdoc}/head.LICENSE.txt
     70    file rename ${worksrcpath}/w32api/MinGW.LICENSE.txt ${destroot}${l4jdoc}
     71    foreach doc {JGoodies.Forms JGoodies.Looks Nuvola.Icon.Theme XStream ant commons foxtrot} {
     72        file rename ${worksrcpath}/lib/${doc}.LICENSE.txt ${destroot}${l4jdoc}
     73    }
     74    file rename ${worksrcpath}/web ${destroot}${l4jdoc}
     75    file rename ${worksrcpath}/demo ${destroot}${l4jdoc}
    6476
    65     xinstall -d -m 755 ${sharedir}
    66     file copy ${worksrcpath} ${sharedir}
    67     ln -s ../share/launch4j/launch4j ${destroot}${prefix}/bin/launch4j
     77    # install launch4j
     78    file copy ${worksrcpath} ${destroot}${l4jdir}
     79    ln -s ${l4jdir}/launch4j ${destroot}${prefix}/bin/${name}
    6880}