source: trunk/dports/lang/gambit-c/Portfile

Last change on this file was 147185, checked in by mf2k@…, 20 months ago

gambit-c: Minor whitespace fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 147185 2016-03-30 13:38:43Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               compiler_blacklist_versions 1.0
6
7name                    gambit-c
8version                 4.8.4
9set branch              [join [lrange [split ${version} .] 0 1] .]
10categories              lang
11license                 {LGPL-2.1+ Apache-2}
12maintainers             nomaintainer
13description             Gambit-C is a fast Scheme implementation.
14long_description        Gambit-C includes a Scheme interpreter and a Scheme \
15                        compiler which can be used to build standalone \
16                        executables. Because the compiler generates portable \
17                        C code it is fairly easy to port to any platform \
18                        with a decent C compiler. The thread system is very \
19                        efficient and can support millions of concurrent \
20                        processes. \
21                        \
22                        The Gambit-C system conforms to the R4RS, R5RS and \
23                        IEEE Scheme standards. The full numeric tower is \
24                        implemented, including: infinite precision integers \
25                        (bignums), rationals, inexact reals (floating point \
26                        numbers), and complex numbers.
27
28homepage                http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page
29
30platforms               darwin
31depends_build           port:autoconf
32
33master_sites            http://www.iro.umontreal.ca/~gambit/download/gambit/v${branch}/source/
34distname                gambit-v[strsed ${version} {g/\./_/}]-devel
35extract.suffix          .tgz
36
37checksums               rmd160  0445c576690274c5ddf08dc73156f1eecffc3331 \
38                        sha256  daeaaa55f0c5076686313017c7c3676c60db14cbf2b55dd6023e8ed1fcfff218
39
40# https://trac.macports.org/ticket/46013
41compiler.blacklist {clang < 600} *llvm-gcc-4.2
42
43configure.args          --infodir=${prefix}/share/info \
44                        --libdir=${prefix}/lib/gambit-c \
45                        --docdir=${prefix}/share/doc
46
47if {[string match *gcc* ${configure.compiler}]} {
48    configure.args-append --enable-single-host
49}
50
51use_parallel_build      no
52# gsc conficts with a binary installed by Ghostscript. Recommended
53# option (based on mailing list posts from Arch Linux and FreeBSD
54# projects) is to rename gsc to gambit-gsc
55set gsc "gambit-gsc"
56set gsi "gambit-gsi"
57
58post-extract {
59    # Get rid of the incompatible version-specific installation structure
60    reinplace "s|PACKAGE_SUBDIR=\"/${version}\"|PACKAGE_SUBDIR=\"\"|g" ${worksrcpath}/configure.ac
61    reinplace "s|&& \$(LN_S) \.\$(PACKAGE_SUBDIR) current||g" ${worksrcpath}/makefile.in
62    reinplace "s|rm -f \$(prefix)/current \$(prefix)/current.lnk||g" ${worksrcpath}/makefile.in
63    reinplace "s|.B gsc|.B ${gsc}|g" ${worksrcpath}/doc/gsi.1
64
65    # Fix target paths since the configure options are not properly used in the makefiles
66    foreach makefile [exec find ${worksrcpath} -name makefile.in] {
67        reinplace "s|\$(prefix)\$(PACKAGE_SUBDIR)|\$(DESTDIR)\$(prefix)|g" $makefile
68        reinplace "s|\$(prefix)/info|\$(prefix)/share/info|g" $makefile
69        reinplace "s|\$(prefix)/doc|\$(prefix)/share/doc/gambit-c|g" $makefile
70        reinplace "s|\$(prefix)/lib|\$(prefix)/lib/gambit-c|g" $makefile
71        reinplace "s|\$(prefix)/syntax-case\.scm|\$(prefix)/lib/gambit-c/syntax-case\.scm|g" $makefile
72    }
73}
74
75post-destroot {
76    file rename "${destroot}${prefix}/bin/gsc" "${destroot}${prefix}/bin/${gsc}"
77    file delete "${destroot}${prefix}/bin/gsc-script"
78    ln -s "${gsc}" "${destroot}${prefix}/bin/gsc-script"
79    # Create a matching link for gambit-gsi for symmetry, even though the
80    # original gsi binary doesn't conflict and isn't being removed.
81    ln -s "gsi" "${destroot}${prefix}/bin/${gsi}"
82}
83
84variant optimized description "Use expensive GCC optimizations to improve speed and compactness" {
85    configure.args-append --enable-gcc-opts
86}
87
88variant profile description "Enable profiling" {
89    configure.args-append --enable-profile
90}
91
92livecheck.type      regex
93livecheck.regex     (\\d+\\.\\d+\\.\\d+)
94livecheck.url       ${homepage}
Note: See TracBrowser for help on using the repository browser.