Ticket #21779: patch-mit-scheme.diff

File patch-mit-scheme.diff, 9.9 KB (added by drkp (Dan Ports), 15 years ago)

update to 20090107 and fix build on 10.6

  • Portfile

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/mit-scheme/Portfile ./Portfile
    old new  
    44PortSystem 1.0
    55
    66name                    mit-scheme
    7 version                 20080130
    8 revision                2
     7version                 20090107
    98categories              lang
    109platforms               darwin
    11 maintainers             nomaintainer
     10maintainers             ambulatoryclam.net:dports openmaintainer
    1211
    1312description             MIT/GNU Scheme
    1413
     
    2120                        development cycle.
    2221
    2322homepage                http://www.gnu.org/software/mit-scheme/
    24 master_sites            http://ftp.gnu.org/gnu/mit-scheme/snapshot.pkg/${version}/
     23master_sites            gnu:${name}/snapshot.pkg/${version}/
    2524distname                ${name}-c-${version}
    26 checksums               md5 75e11fcba96c9efd49cd283b43d6839a
     25checksums               md5     55cc891cf6321ae71506c8699204d165 \
     26                        sha1    7c73cff5a48e6bb83c8c36fb895bd70ab1482251 \
     27                        rmd160  43ad4c5bb1a67972f1a5059981de3de9fed4b908
    2728
    28 depends_lib \
    29     port:xorg-libX11
     29depends_lib             port:xorg-libX11
     30depends_build           port:autoconf
    3031
     32patchfiles              patch-src_microcode_configure.ac.diff
    3133post-patch  {
     34    # Regenerate src/microcode/configure from patched configure.in
     35    system "cd ${worksrcpath}/src/microcode && autoconf"
     36   
    3237    reinplace "s|/usr/local|${prefix}|g" \
    3338        ${worksrcpath}/doc/configure \
    3439        ${worksrcpath}/doc/ref-manual/os-interface.texi \
  • files/patch-src_microcode_configure.ac.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/mit-scheme/files/patch-src_microcode_configure.ac.diff ./files/patch-src_microcode_configure.ac.diff
    old new  
     1--- src/microcode/configure.ac  2008-09-26 23:59:05.000000000 -0400
     2+++ src/microcode/configure.ac  2009-12-27 21:49:07.000000000 -0500
     3@@ -164,6 +164,13 @@
     4        [Use PostgreSQL libpq library if available [[yes]]]))
     5 : ${with_libpq='yes'}
     6 
     7+dnl For reasons I don't understand, it is necessary to use
     8+dnl quadigraphs here instead of [[ ... ]].
     9+AC_ARG_WITH([macosx-version],
     10+    AS_HELP_STRING([--with-macosx-version],
     11+       [MacOSX version to compile for @<:@host's version@:>@]))
     12+
     13+
     14 if test ${enable_static_libs} != no && test ${enable_native_code} = c; then
     15     AC_MSG_ERROR(
     16        [--enable-native-code=c incompatible with --enable-static-libs])
     17@@ -171,7 +178,7 @@
     18 
     19 dnl Substitution variables to be filled in below.
     20 AS_FLAGS=
     21-GC_HEAD_FILES=
     22+GC_HEAD_FILES="gccode.h cmpgc.h cmpintmd-config.h cmpintmd.h"
     23 M4_FLAGS=
     24 OPTIONAL_BASES=
     25 OPTIONAL_SOURCES=
     26@@ -213,6 +220,9 @@
     27 AC_C_INLINE
     28 AC_C_STRINGIZE
     29 AC_C_PROTOTYPES
     30+AC_PROG_EGREP
     31+AC_PROG_FGREP
     32+AC_PROG_GREP
     33 AC_PROG_INSTALL
     34 AC_PROG_LN_S
     35 AC_PROG_MAKE_SET
     36@@ -246,20 +256,87 @@
     37        )],
     38        [
     39        AC_MSG_RESULT([yes])
     40-        CFLAGS="${CFLAGS} -Wextra -Wno-sign-compare -Wno-unused-parameter"
     41-        CFLAGS="${CFLAGS} -Wold-style-definition"
     42+       CFLAGS="${CFLAGS} -Wextra -Wno-sign-compare -Wno-unused-parameter"
     43+       CFLAGS="${CFLAGS} -Wold-style-definition"
     44        ],
     45        [AC_MSG_RESULT([no])])
     46 
     47     # other possibilities:
     48     # -Wmissing-prototypes -Wunreachable-code -Wwrite-strings
     49 fi
     50-FOO=`${INSTALL} --help 2> /dev/null | fgrep -e --preserve-timestamps`
     51+FOO=`${INSTALL} --help 2> /dev/null | ${FGREP} -e --preserve-timestamps`
     52 if test "x${FOO}" != x; then
     53     INSTALL="${INSTALL} --preserve-timestamps"
     54 fi
     55 CCLD=${CC}
     56 
     57+AC_MSG_CHECKING([for native-code support])
     58+SCM_ARCH=none
     59+case ${enable_native_code} in
     60+yes)
     61+    case ${host_cpu} in
     62+    alpha*)
     63+       SCM_ARCH=alpha
     64+       ;;
     65+    hppa*)
     66+       SCM_ARCH=hppa
     67+       GC_HEAD_FILES="${GC_HEAD_FILES} hppacach.h"
     68+       ;;
     69+    i?86)
     70+       SCM_ARCH=i386
     71+       ;;
     72+    # x86_64)
     73+    #     SCM_ARCH=i386
     74+    #     CFLAGS="${CFLAGS} -m32"
     75+    #     LDFLAGS="${LDFLAGS} -m32"
     76+    #     ;;
     77+    m68k|m680?0)
     78+       SCM_ARCH=mc68k
     79+       ;;
     80+    mips*)
     81+       SCM_ARCH=mips
     82+       ;;
     83+    vax)
     84+       SCM_ARCH=vax
     85+       ;;
     86+    esac
     87+    ;;
     88+c)
     89+    SCM_ARCH=c
     90+    ;;
     91+svm)
     92+    SCM_ARCH=svm1
     93+    ;;
     94+no|none)
     95+    ;;
     96+*)
     97+    dnl This is not quite right, because the compiler and microcode
     98+    dnl disagree about what some architectures should be called, such as
     99+    dnl bobcat vs mc68k or spectrum versus hppa.  I don't know what the
     100+    dnl state of Scheme on these architectures is, however, so at least
     101+    dnl this will flag an error if you try to use them.
     102+    if test -f "cmpauxmd/${enable_native_code}.m4"; then
     103+       AC_MSG_ERROR([unknown native-code type: ${enable_native_code}])
     104+    fi
     105+    SCM_ARCH=${enable_native_code}
     106+    ;;
     107+esac
     108+
     109+case ${SCM_ARCH} in
     110+none)
     111+    AC_MSG_RESULT([no])
     112+    ;;
     113+c)
     114+    AC_MSG_RESULT([yes, using portable C code])
     115+    ;;
     116+svm1)
     117+    AC_MSG_RESULT([yes, using portable SVM code])
     118+    ;;
     119+*)
     120+    AC_MSG_RESULT([yes, for ${SCM_ARCH}])
     121+    ;;
     122+esac
     123+
     124 dnl Add OS-dependent customizations.  This must happen before checking
     125 dnl any headers or library routines, because it may add CFLAGS or
     126 dnl LDFLAGS that the subsequent checks require.
     127@@ -282,14 +359,34 @@
     128     GNU_LD=yes
     129     ;;
     130 darwin*)
     131-    MACOSX=yes
     132-    MACOSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
     133-    if test -d ${MACOSX_SYSROOT}; then
     134-       MACOSX_CFLAGS="-mmacosx-version-min=10.4 -isysroot ${MACOSX_SYSROOT}"
     135-       MACOSX_LDFLAGS="${MACOSX_CFLAGS} -Wl,-syslibroot,${MACOSX_SYSROOT}"
     136-       CFLAGS="${CFLAGS} ${MACOSX_CFLAGS}"
     137-       LDFLAGS="${LDFLAGS} ${MACOSX_LDFLAGS}"
     138+    if test -n "${with_macosx_version}"; then
     139+       MACOSX=${with_macosx_version}
     140+       MACOSX_CFLAGS="-mmacosx-version-min=${MACOSX}"
     141+    else
     142+       MACOSX=`sw_vers | ${GREP} ^ProductVersion: \
     143+           | ${EGREP} -o '[[0-9]+\.[0-9]+]'`
     144+       if test -z "${MACOSX}"; then
     145+           AC_MSG_ERROR([Unable to determine MacOSX version])
     146+       fi
     147+       MACOSX_CFLAGS=
     148     fi
     149+    if test "${MACOSX}" = 10.4; then
     150+       SDK=MacOSX${MACOSX}u
     151+    else
     152+       SDK=MacOSX${MACOSX}
     153+    fi
     154+    MACOSX_SYSROOT=/Developer/SDKs/${SDK}.sdk
     155+    if ! test -d "${MACOSX_SYSROOT}"; then
     156+       AC_MSG_ERROR([No MacOSX SDK for version: ${MACOSX}])
     157+    fi
     158+    MACOSX_CFLAGS="${MACOSX_CFLAGS} -isysroot ${MACOSX_SYSROOT}"
     159+    AC_MSG_NOTICE([Compiling for MacOSX version ${MACOSX}])
     160+    if test "${SCM_ARCH}" = i386; then
     161+       MACOSX_CFLAGS="-arch i386 ${MACOSX_CFLAGS}"
     162+       SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000"
     163+    fi
     164+    CFLAGS="${CFLAGS} ${MACOSX_CFLAGS}"
     165+    LDFLAGS="${LDFLAGS} ${MACOSX_CFLAGS} -Wl,-syslibroot,${MACOSX_SYSROOT}"
     166     MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -bundle_loader "'${SCHEME_EXE}'
     167     ;;
     168 netbsd*)
     169@@ -490,7 +587,7 @@
     170        [Define to `unsigned long' if <time.h> doesn't define.])],
     171     [SCM_INC_TIME])
     172 
     173-AC_CHECK_TYPE([time_t],
     174+AC_CHECK_TYPE([time_t],
     175     [],
     176     [AC_DEFINE([time_t], [long],
     177        [Define to `long' if <time.h> doesn't define.])],
     178@@ -809,7 +906,7 @@
     179                [[db_create (0, 0, 0)]])],
     180            [
     181            AC_MSG_RESULT([yes])
     182-           AC_DEFINE([HAVE_LIBDB_4], [1],
     183+           AC_DEFINE([HAVE_LIBDB_4], [1],
     184                [Define to 1 if you have the `db-4' library (-ldb-4).])
     185            MODULE_LIBS="-ldb-4 ${MODULE_LIBS}"
     186            MODULE_BASES="${MODULE_BASES} prdb4"
     187@@ -874,7 +971,7 @@
     188            LIBS="${STATIC_LIBS} -ldl ${LIBS}"
     189            ],
     190            [
     191-           if test ${enable_native_code} = c; then
     192+           if test ${SCM_ARCH} = c; then
     193                AC_MSG_ERROR(
     194                    [--enable-native-code=c requires dynamic loader support])
     195            fi
     196@@ -910,60 +1007,12 @@
     197     OPTIONAL_BASES="${OPTIONAL_BASES} x11base x11term x11graph x11color"
     198 fi
     199 
     200-AC_MSG_CHECKING([for native-code support])
     201 OPTIONAL_BASES="${OPTIONAL_BASES} cmpint cmpintmd comutl"
     202-GC_HEAD_FILES="gccode.h cmpgc.h cmpintmd-config.h cmpintmd.h"
     203-SCM_ARCH=none
     204-ECN_WARNP=no
     205-
     206-case ${enable_native_code} in
     207-yes)
     208-    case ${host_cpu} in
     209-    alpha*)
     210-       SCM_ARCH=alpha
     211-       ;;
     212-    hppa*)
     213-       SCM_ARCH=hppa
     214-       GC_HEAD_FILES="${GC_HEAD_FILES} hppacach.h"
     215-       ;;
     216-    i?86)
     217-       SCM_ARCH=i386
     218-       ;;
     219-    # x86_64)
     220-    #     SCM_ARCH=i386
     221-    #     CFLAGS="${CFLAGS} -m32"
     222-    #     LDFLAGS="${LDFLAGS} -m32"
     223-    #     ;;
     224-    m68k|m680?0)
     225-       SCM_ARCH=mc68k
     226-       ;;
     227-    mips*)
     228-       SCM_ARCH=mips
     229-       ;;
     230-    vax)
     231-       SCM_ARCH=vax
     232-       ;;
     233-    esac
     234-    ;;
     235-c)
     236-    SCM_ARCH=c
     237-    ;;
     238-svm)
     239-    SCM_ARCH=svm1
     240-    ;;
     241-no|none)
     242-    ;;
     243-*)
     244-    ECN_WARNP=yes
     245-    ;;
     246-esac
     247 
     248 case ${SCM_ARCH} in
     249 none)
     250-    AC_MSG_RESULT([no])
     251     ;;
     252 c)
     253-    AC_MSG_RESULT([yes, using portable C code])
     254     AC_CONFIG_LINKS([cmpauxmd.c:cmpauxmd/c.c])
     255     AC_CONFIG_FILES([liarc-cc], [chmod +x liarc-cc])
     256     AC_CONFIG_FILES([liarc-ld], [chmod +x liarc-ld])
     257@@ -977,23 +1026,17 @@
     258     INSTALL_INCLUDE=install-include
     259     ;;
     260 svm1)
     261-    AC_MSG_RESULT([yes, using portable SVM code])
     262     OPTIONAL_BASES="${OPTIONAL_BASES} svm1-interp"
     263     AUXDIR_NAME=mit-scheme-svm
     264     EXE_NAME=mit-scheme-svm
     265     ;;
     266 *)
     267-    AC_MSG_RESULT([yes, for ${SCM_ARCH}])
     268     AC_CONFIG_LINKS([cmpauxmd.m4:cmpauxmd/${SCM_ARCH}.m4])
     269     OPTIONAL_SOURCES="${OPTIONAL_SOURCES} cmpauxmd.m4"
     270     OPTIONAL_OBJECTS="${OPTIONAL_OBJECTS} cmpauxmd.o"
     271     ;;
     272 esac
     273 
     274-if test ${ECN_WARNP} = yes; then
     275-    AC_MSG_WARN([illegal --enable-native-code value: ${enable_native_code}])
     276-fi
     277-
     278 AC_CONFIG_LINKS([
     279     cmpintmd.h:cmpintmd/${SCM_ARCH}.h
     280     cmpintmd.c:cmpintmd/${SCM_ARCH}.c
     281@@ -1016,10 +1059,6 @@
     282     done
     283 fi
     284 
     285-if test x${MACOSX} = xyes && test ${SCM_ARCH} = i386; then
     286-    SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000"
     287-fi
     288-
     289 AC_SUBST([AS_FLAGS])
     290 AC_SUBST([GC_HEAD_FILES])
     291 AC_SUBST([M4_FLAGS])