Ticket #20020: Portfile

File Portfile, 2.9 KB (added by michal@…, 15 years ago)
Line 
1# $Id$
2
3PortSystem 1.0
4
5name                    gambit-c
6version                 4.4.4
7set branch              [join [lrange [split ${version} .] 0 1] .]
8categories              lang scheme
9platforms               darwin
10maintainers             gmail.com:arto.bendiken
11description             Gambit-C is a fast Scheme implementation.
12long_description        Gambit-C includes a Scheme interpreter and a Scheme \
13                        compiler which can be used to build standalone \
14                        executables. Because the compiler generates portable \
15                        C code it is fairly easy to port to any platform \
16                        with a decent C compiler. The thread system is very \
17                        efficient and can support millions of concurrent \
18                        processes. \
19                        \
20                        The Gambit-C system conforms to the R4RS, R5RS and \
21                        IEEE Scheme standards. The full numeric tower is \
22                        implemented, including: infinite precision integers \
23                        (bignums), rationals, inexact reals (floating point \
24                        numbers), and complex numbers.
25
26homepage                http://www.iro.umontreal.ca/~gambit/
27master_sites            ${homepage}download/gambit/v${branch}/source/
28distname                gambc-v[strsed ${version} {g/\./_/}]-devel
29extract.suffix          .tgz
30checksums               md5 43ce298aabfb5d8a4684795264db6469 \
31                        sha1 e1a50cc157270c1a5c0d5069e5840f05b4256203 \
32                        rmd160 6aea9432bccbf062c3ce560dd3e963a098fc9a42
33
34configure.args          --infodir=${prefix}/share/info \
35                        --libdir=${prefix}/lib/gambit-c \
36                        --enable-single-host
37
38post-extract {
39    # Get rid of the incompatible version-specific installation structure
40    reinplace "s|PACKAGE_SUBDIR=\"/${version}\"|PACKAGE_SUBDIR=\"\"|g" ${worksrcpath}/configure.ac
41    reinplace "s|&& \$(LN_S) \.\$(PACKAGE_SUBDIR) current||g" ${worksrcpath}/makefile.in
42    reinplace "s|rm -f \$(prefix)/current \$(prefix)/current.lnk||g" ${worksrcpath}/makefile.in
43
44    # Fix target paths since the configure options are not properly used in the makefiles
45    foreach makefile [exec find ${worksrcpath} -name makefile.in] {
46        reinplace "s|\$(prefix)\$(PACKAGE_SUBDIR)|\$(DESTDIR)\$(prefix)|g" $makefile
47        reinplace "s|\$(prefix)/info|\$(prefix)/share/info|g" $makefile
48        reinplace "s|\$(prefix)/doc|\$(prefix)/share/doc/gambit-c|g" $makefile
49        reinplace "s|\$(prefix)/lib|\$(prefix)/lib/gambit-c|g" $makefile
50        reinplace "s|\$(prefix)/syntax-case\.scm|\$(prefix)/lib/gambit-c/syntax-case\.scm|g" $makefile
51    }
52}
53
54variant optimized description "Use expensive GCC optimizations to improve speed and compactness" {
55    configure.args-append --enable-gcc-opts
56}
57
58variant profile description "Enable profiling" {
59    configure.args-append --enable-profile
60}