Ticket #11688: Portfile

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