Ticket #16964: Portfile-swi-prolog-devel.diff

File Portfile-swi-prolog-devel.diff, 4.9 KB (added by pmoura (Paulo Moura), 16 years ago)
  • Portfile

    old new  
    1 # $Id: Portfile 38785 2008-07-31 09:10:05Z ryandesign@macports.org $
     1# $Id: Portfile 40260 2008-09-27 11:20:42Z ryandesign@macports.org $
     2
     3PortSystem      1.0
    24
    3 PortSystem  1.0
    45name            swi-prolog-devel
    5 version         5.5.36
    6 epoch           20050503
     6version         5.7.2
     7epoch           20051223
    78
    89categories      lang
    9 maintainers     pmoura@mac.com
     10maintainers     wielemak@science.uva.nl pmoura@logtalk.org
    1011platforms       darwin
    11 description     SWI-Prolog compiler plus extra packages (development version)
     12description     SWI-Prolog compiler plus extra packages (stable version)
    1213
    1314long_description        \
    14                 ISO/Edinburgh-style Prolog compiler including modules,          \
    15                 autoload, libraries, Garbage-collector, stack-expandor,         \
    16                 C/C++-interface, Multiple threads, GNU-readline interface,      \
    17                 very fast compiler. Including packages clib (Unix process       \
    18                 control, sockets, MIME), cpp (C++ interface), sgml (reading \
    19                 XML/SGML), sgml/RDF (reading RDF into triples), ODBC            \
    20                 interface and XPCE (Graphics UI toolkit, integrated editor      \
    21                 (Emacs-clone) and graphical debugger).
     15        ISO/Edinburgh-style Prolog compiler including modules,          \
     16        autoload, libraries, Garbage-collector, stack-expandor,         \
     17        C/C++-interface, Multiple threads, GNU-readline interface,      \
     18        coroutining, constraint programming, global variables,          \
     19        very fast compiler. Including packages clib (Unix process       \
     20        control, sockets, MIME), cpp (C++ interface), sgml (reading     \
     21        XML/SGML), sgml/RDF (reading RDF into triples), ODBC            \
     22        interface and XPCE (Graphics UI toolkit, integrated editor      \
     23        (Emacs-clone) and graphical debugger).
    2224
    2325homepage        http://www.swi-prolog.org/
    2426master_sites    http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/BETA/
    2527
    26 checksums       md5     8bba7daab3d402a0d21d23e6cd15f045
     28checksums       \
     29        md5     9197a4a6081f8e14a4d915933dd0aa71 \
     30        sha1    51f64d906b4253ad5bc1ee832a2e7ea0d6480be5 \
     31        rmd160  208b45b839048b85bc446850771b7f1776fe50bf
     32
     33depends_build   \
     34        port:gawk       \
     35        port:junit
    2736
    2837depends_lib             \
    29                 lib:libreadline:readline        \
    30                 lib:libncursesw:ncurses         \
    31                 lib:libjpeg:jpeg                \
    32                 lib:libmcrypt:libmcrypt         \
    33                 lib:libX11.6:XFree86            \
    34                 lib:libgmp:gmp
    35 
    36 platform darwin 6 { depends_lib-append lib:libdl:dlcompat }
     38        port:readline           \
     39        port:ncurses            \
     40        port:jpeg               \
     41        port:libmcrypt          \
     42        port:gmp                \
     43        port:zlib               \
     44        lib:libX11.6:XFree86
     45
     46platform darwin 6 {
     47        depends_lib-append port:dlcompat
     48}
     49
     50platform darwin 9 {
     51        depends_lib-append port:expat
     52}
    3753
    3854distname        pl-${version}
    3955
    40 configure.cflags-append "-I${prefix}/include"
    41 configure.env   CIFLAGS=-I${prefix}/include
    42 
    43 configure.args  --mandir=${prefix}/share/man    \
    44                 --with-world
    45 
    46 build.env       LDFLAGS=-L${prefix}/lib         \
    47                 CFLAGS=-I${prefix}/include      \
    48                 CPPFLAGS=-I${prefix}/include    \
    49                 CIFLAGS=-I${prefix}/include
    50 
    51 default_variants +mt
    52 
    53 variant st      { configure.args-append --disable-mt}
    54 
    55 variant mt      { configure.args-append --enable-mt}
    56 
     56configure.env   \
     57        LIBRARY_PATH=/usr/lib:${x11prefix}/lib:${prefix}/lib    \
     58        CPATH=/usr/include:${x11prefix}/include:${prefix}/include       \
     59        JUNIT=${prefix}/share/java/junit.jar
     60
     61configure.ldflags
     62
     63configure.args  \
     64        --mandir=${prefix}/share/man    \
     65        --with-world
     66
     67build.env       \
     68        LIBRARY_PATH=/usr/lib:${x11prefix}/lib:${prefix}/lib    \
     69        CPATH=/usr/include:${x11prefix}/include:${prefix}/include       \
     70        JUNIT=${prefix}/share/java/junit.jar
     71
     72post-build {
     73        file mkdir ${workpath}/macosx
     74        file copy -force -- ${workpath}/pl-${version}/man/macosx/License.html ${workpath}/macosx/
     75        file copy -force -- ${workpath}/pl-${version}/man/macosx/macosx.html ${workpath}/macosx/
     76        file copy -force -- ${workpath}/pl-${version}/man/macosx/Welcome.html ${workpath}/macosx/
     77}
     78
     79post-pkg {
     80        set resources ${workpath}/${name}-${version}.pkg/Contents/Resources/
     81        file copy -force -- ${workpath}/macosx/License.html ${resources}
     82        file copy -force -- ${workpath}/macosx/macosx.html ${resources}
     83        file copy -force -- ${workpath}/macosx/Welcome.html ${resources}
     84        file rename ${resources}/macosx.html ${resources}/ReadMe.html
     85        file delete -force -- ${resources}/Welcome.rtf
     86}
     87
     88post-mpkg {
     89        set resources ${workpath}/${name}-${version}.mpkg/Contents/Resources/
     90        file copy -force -- ${workpath}/macosx/License.html ${resources}
     91        file copy -force -- ${workpath}/macosx/macosx.html ${resources}
     92        file copy -force -- ${workpath}/macosx/Welcome.html ${resources}
     93        file rename ${resources}/macosx.html ${resources}/ReadMe.html
     94        file delete -force -- ${resources}/Welcome.rtf
     95}
     96
     97if {![variant_isset st]} {
     98        default_variants +mt
     99}
     100
     101variant st conflicts mt description {Single-threaded} {
     102        configure.args-append --disable-mt
     103}
     104
     105variant mt conflicts st description {Multi-threaded (default)} {
     106        configure.args-append --enable-mt
     107}
     108
     109livecheck.check     regexm
     110livecheck.url       ${homepage}dl-stable.html
     111livecheck.regex     "Gzipped tar file holding the sources for version <b>(\\d+\\.\\d+\\.\\d+)"