[plt-scheme] scheme-pg on ppc-macosx

From: Geoffrey Knauth (geoff at knauth.org)
Date: Mon Apr 25 08:40:33 EDT 2005

Here are some minor changes I made to get scheme-pg running on Mac OS X.

Geoffrey
--
Geoffrey S. Knauth | http://knauth.org/gsk


diff -Naur old/compile.sh new/compile.sh
--- old/compile.sh	Mon Apr 25 08:28:44 2005
+++ new/compile.sh	Mon Apr 25 08:28:36 2005
@@ -6,4 +6,5 @@
  # License:           MIT License, see license.txt
  # CVS Id:            $Id: compile.sh,v 1.2 2005/02/05 20:38:00 djneu 
Exp $

-mzc --cc ++ccf -Iinclude ++ccf -I/usr/local/include s-pg.c
+. vars.sh
+mzc --cc ++ccf -Iinclude ++ccf -I$PGINCDIR s-pg.c
diff -Naur old/install.sh new/install.sh
--- old/install.sh	Mon Apr 25 08:28:44 2005
+++ new/install.sh	Mon Apr 25 08:31:08 2005
@@ -6,25 +6,27 @@
  # License:           MIT License, see license.txt
  # CVS Id:            $Id: install.sh,v 1.6 2005/03/21 20:24:18 djneu 
Exp $

-# NOTE: Adjust mkdir
-# $PLTCOLLECTS/scheme-pg/compiled/native/i386-freebsd to reflect your
-# system.
+# NOTE: Adjust, in vars.sh:
+#   MACHINE_OS PGINCDIR PGLIBDIR PLTCOLLECTS SHLIB
+# reflect your system.
+
+. vars.sh

  #rm -rf $PLTCOLLECTS/scheme-pg

  mkdir $PLTCOLLECTS/scheme-pg
  mkdir $PLTCOLLECTS/scheme-pg/compiled
  mkdir $PLTCOLLECTS/scheme-pg/compiled/native
-mkdir $PLTCOLLECTS/scheme-pg/compiled/native/i386-freebsd
+mkdir $PLTCOLLECTS/scheme-pg/compiled/native/$MACHINE_OS

  ./compile.sh
  ./link.sh
-mv -i s-pg.o $PLTCOLLECTS/scheme-pg/compiled/native/i386-freebsd
-mv -i s-pg.so $PLTCOLLECTS/scheme-pg/compiled/native/i386-freebsd
+mv -i s-pg.o $PLTCOLLECTS/scheme-pg/compiled/native/$MACHINE_OS
+mv -i s-pg.$SHLIB $PLTCOLLECTS/scheme-pg/compiled/native/$MACHINE_OS

  cp -ir * $PLTCOLLECTS/scheme-pg

-# NOTE: The timesatamp of s-pg.so must be later than the timestamp of
+# NOTE: The timesatamp of s-pg.$SHLIB must be later than the timestamp 
of
  # s-pg.ss.  Quoting from Section 3.3 of the mzc: MzScheme Compiler
  # Manual, "A byte-code or native-code file is used in place of the
  # requested file only if its modification date is later than the
@@ -32,7 +34,7 @@
  # byte-code and native-code files can be loaded, the native-code file
  # is loaded."
  touch $PLTCOLLECTS/scheme-pg/s-pg.ss
-touch $PLTCOLLECTS/scheme-pg/compiled/native/i386-freebsd/s-pg.so
+touch $PLTCOLLECTS/scheme-pg/compiled/native/$MACHINE_OS/s-pg.$SHLIB

  mzc --collection-zos scheme-pg
  #setup-plt --mode errortrace -l scheme-pg
diff -Naur old/link.sh new/link.sh
--- old/link.sh	Mon Apr 25 08:28:44 2005
+++ new/link.sh	Mon Apr 25 08:28:36 2005
@@ -6,4 +6,5 @@
  # License:           MIT License, see license.txt
  # CVS Id:            $Id: link.sh,v 1.2 2005/02/05 20:38:00 djneu Exp $

-mzc ++ldf -L/usr/local/lib ++ldf -lpq --ld s-pg.dylib s-pg.o
+. vars.sh
+mzc ++ldf -L$PGLIBDIR ++ldf -lpq --ld s-pg.$SHLIB s-pg.o
diff -Naur old/vars.sh new/vars.sh
--- old/vars.sh	Wed Dec 31 19:00:00 1969
+++ new/vars.sh	Mon Apr 25 08:28:36 2005
@@ -0,0 +1,13 @@
+PLTCOLLECTS=$PLTHOME/collects
+
+#MACHINE_OS=i386-freebsd
+MACHINE_OS=ppc-macosx
+
+#SHLIB=so
+SHLIB=dylib
+
+#PGINCDIR=/usr/local/include
+PGINCDIR=/usr/local/pgsql/include
+
+#PGLIBDIR=/usr/local/lib/
+PGLIBDIR=/usr/local/pgsql/lib/



Posted on the users mailing list.