Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #11688 (closed enhancement: fixed)

Opened 20 months ago

Last modified 17 months ago

NEW: lang/gambit-c 4.0b20

Reported by: arto.bendiken@… Owned by: pmq@…
Priority: Normal Milestone: Port Submissions
Component: ports Version:
Keywords: gambit, gambit-c, scheme Cc: arto.bendiken@…, pmq@…
Port:

Description

I was surprised that Gambit-C wasn't included yet, so I whipped up a portfile for it.

Gambit is one of the more mature and fast Scheme compilers available. From the portfile description:

Gambit-C includes a Scheme interpreter and a Scheme compiler which can be used to build standalone executables. Because the compiler generates portable C code it is fairly easy to port to any platform with a decent C compiler. The thread system is very efficient and can support millions of concurrent processes.

The Gambit-C system conforms to the R4RS, R5RS and IEEE Scheme standards. The full numeric tower is implemented, including: infinite precision integers (bignums), rationals, inexact reals (floating point numbers), and complex numbers.

I'm also attaching a log file which shows a successful compile & install as well as the list of files this port installs.

Attachments

Portfile (2.7 KB) - added by arto.bendiken@… 19 months ago.
install.log (74.3 KB) - added by arto.bendiken@… 19 months ago.

Change History

Changed 20 months ago by jann@…

Are yo sure that some of the variants like optimize shouldn't be the default ?

Changed 20 months ago by arto.bendiken@…

It would indeed be good to have [{{--enable-gcc-opts}}} by default, in principle. However, it enables extremely expensive optimizations which quadruple the compilation time and need a machine with at least 2 GB of memory to compile without bringing the host to a grinding halt. Hence I made it a variant for purely practical reasons.

Changed 20 months ago by arto.bendiken@…

As for the other variants: the shared could perhaps be a default variant - is there a MacPorts general policy on whether apps be built with shared libraries or not? I've always compiled Gambit without --enable-shared, which is why I left it optional.

The {{{profile]}} and {{{debug}} are special cases that I don't think should be compiled in by default.

Changed 20 months ago by pipping@…

those reinplacements are static. hence, they should be made into a patch instead.

Changed 20 months ago by arto.bendiken@…

In addition to configure.ac, there are quite a few makefiles to patch:

$ find . -name makefile.in
./bin/makefile.in
./doc/makefile.in
./examples/distr-comp/makefile.in
./examples/makefile.in
./examples/pi/makefile.in
./examples/pthread/makefile.in
./examples/ring/makefile.in
./examples/tcltk/makefile.in
./examples/web-repl/makefile.in
./examples/web-server/makefile.in
./examples/Xlib-simple/makefile.in
./gsc/makefile.in
./gsi/makefile.in
./include/makefile.in
./lib/guide/images/makefile.in
./lib/guide/makefile.in
./lib/makefile.in
./makefile.in
./misc/makefile.in
./tests/makefile.in

It's going to take a comparatively large set of patches to do the equivalent of the < 10 simple reinplace lines in the portfile. Using a patch is also likely to require more maintenance for upcoming versions. Is a patch format really beneficial? The reinplace approach just seems much simpler and more future-proof.

Changed 20 months ago by pmq@…

  • cc pmq@… added

Hi guys, It looks good to me, apart from the tiny fact that I personally don't like having that much variants, so I'd probably kill the profile and debug ones, as these are special cases. As for the patch issue, I've to say I'd leave the reinplace, perhaps only changing it to an fs-traverse instead of an exec find.

Changed 20 months ago by arto.bendiken@…

I think you're right about the debug variant being unnecessary; however, I'd prefer to keep the profile variant as it's very useful for benchmarking purposes and I wouldn't want to force people to do a fully custom compile just to accomplish what switching between installed non-variant and variant versions could do very easily.

I wasn't familiar with fs-traverse -- is there documentation for it? If not, I'll just grep the existing Portfiles for examples...

I will submit an updated Portfile, removing the debug variant, soon (a new Gambit-C release already happened during our deliberations, too ;-))

Changed 20 months ago by pmq@…

  • owner changed from macports-dev@… to pmq@…

Sounds fine to me! You can leave out the fs-traverse stuff, as I don't know if the version in the current released MP works or not. We'll switch later.
Will commit when you attach the new version.

Changed 19 months ago by arto.bendiken@…

Changed 19 months ago by arto.bendiken@…

Changed 19 months ago by arto.bendiken@…

New portfile attached, with the following changes:

  • Updated for 4.0b22, the newest version as of right now.
  • Removed the shared and debug variants.
  • Converted tabs to spaces in the portfile per MacPorts mailing list discussions on the topic.
  • Verified that it still builds correctly (updated install.log attached).

Enjoy! :-)

Changed 19 months ago by pmq@…

  • status changed from new to closed
  • resolution set to fixed

Committed, thanks!

Changed 17 months ago by jmpp@…

  • milestone changed from New Ports to Port Submissions

Milestone New Ports deleted

Note: See TracTickets for help on using tickets.