Ticket #26153: Portfile.2

File Portfile.2, 3.5 KB (added by J.Liem@…, 14 years ago)

This portfile installs 5.10.1 and works for me.

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 60682 2009-11-19 22:03:18Z snc@macports.org $
3
4PortSystem      1.0
5
6name            swi-prolog
7version         5.10.1
8epoch           20051223
9
10categories      lang
11maintainers     uva.nl:J.Wielemaker logtalk.org:pmoura
12platforms       darwin
13description     SWI-Prolog compiler plus extra packages (stable version)
14
15long_description        \
16        ISO/Edinburgh-style Prolog compiler including modules,          \
17        autoload, libraries, Garbage-collector, stack-expandor,         \
18        C/C++-interface, Multiple threads, GNU-readline interface,      \
19        coroutining, constraint programming, global variables,          \
20        very fast compiler. Including packages clib (Unix process       \
21        control, sockets, MIME), cpp (C++ interface), sgml (reading     \
22        XML/SGML), sgml/RDF (reading RDF into triples), ODBC            \
23        interface and XPCE (Graphics UI toolkit, integrated editor      \
24        (Emacs-clone) and graphical debugger).
25
26homepage        http://www.swi-prolog.org/
27master_sites    http://www.swi-prolog.org/download/stable/src
28
29checksums   \
30    md5     9168a2c872d2130467c3e74b80ed3ee0 \
31        sha1    aaf4a3b20b06dec9eb3a07b3cb9927094e4e8c2c \
32        rmd160  8bc2ed4e2d77e4c7c9a027c2cec654e79431bba4
33
34depends_build   \
35        port:gawk       \
36        port:junit
37
38depends_lib             \
39        port:readline           \
40        port:ncurses            \
41        port:ncursesw           \
42        port:jpeg               \
43        port:libmcrypt          \
44        port:gmp                \
45        port:zlib   \
46        port:libiconv   \
47        port:expat
48
49use_parallel_build      no
50
51platform darwin 9 {
52        depends_lib-append port:expat
53}
54
55distname        pl-${version}
56
57configure.env   \
58        LIBRARY_PATH=/usr/lib:/usr/X11R6/lib:${prefix}/lib      \
59        CPATH=/usr/include:/usr/X11R6/include:${prefix}/include \
60        JUNIT=${prefix}/share/java/junit.jar
61
62configure.ldflags
63
64configure.args  \
65        --mandir=${prefix}/share/man    \
66    --x-includes=/usr/X11R6/include  \
67    --x-libraries=/usr/X11R6/lib     \
68        --with-world
69
70build.env       \
71        LIBRARY_PATH=/usr/lib:/usr/X11R6/lib:${prefix}/lib      \
72        CPATH=/usr/include:/usr/X11R6/include:${prefix}/include \
73        JUNIT=${prefix}/share/java/junit.jar    \
74        CC=${configure.cc}
75
76post-build {
77        file mkdir ${workpath}/macosx
78        file copy -force -- ${workpath}/pl-${version}/man/macosx/License.html ${workpath}/macosx/
79        file copy -force -- ${workpath}/pl-${version}/man/macosx/macosx.html ${workpath}/macosx/
80        file copy -force -- ${workpath}/pl-${version}/man/macosx/Welcome.html ${workpath}/macosx/
81}
82
83post-pkg {
84        set resources ${workpath}/${name}-${version}.pkg/Contents/Resources/
85        file copy -force -- ${workpath}/macosx/License.html ${resources}
86        file copy -force -- ${workpath}/macosx/macosx.html ${resources}
87        file copy -force -- ${workpath}/macosx/Welcome.html ${resources}
88        file rename ${resources}/macosx.html ${resources}/ReadMe.html
89        file delete -force -- ${resources}/Welcome.rtf
90}
91
92post-mpkg {
93        set resources ${workpath}/${name}-${version}.mpkg/Contents/Resources/
94        file copy -force -- ${workpath}/macosx/License.html ${resources}
95        file copy -force -- ${workpath}/macosx/macosx.html ${resources}
96        file copy -force -- ${workpath}/macosx/Welcome.html ${resources}
97        file rename ${resources}/macosx.html ${resources}/ReadMe.html
98        file delete -force -- ${resources}/Welcome.rtf
99}
100
101if {![variant_isset st]} {
102        default_variants +mt
103}
104
105variant st conflicts mt description {Single-threaded} {
106        configure.args-append --disable-mt
107}
108
109variant mt conflicts st description {Multi-threaded} {
110        configure.args-append --enable-mt
111}
112
113livecheck.type      regexm
114livecheck.url       ${homepage}download/stable
115livecheck.regex     "/download/stable/src/pl-(\\d+\\.\\d+\\.\\d+).tar.gz"