diff options
author | miwi <miwi@FreeBSD.org> | 2014-06-14 13:49:29 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2014-06-14 13:49:29 +0800 |
commit | eeaf6daef2858f71291178fa27a029f5f3cc44dd (patch) | |
tree | 9438261f73237ddbf9d17f79673a4121867e4dc8 /lang | |
parent | dfcd779a32d3689dd3bee665c83f34a6ba7608e6 (diff) | |
download | freebsd-ports-gnome-eeaf6daef2858f71291178fa27a029f5f3cc44dd.tar.gz freebsd-ports-gnome-eeaf6daef2858f71291178fa27a029f5f3cc44dd.tar.zst freebsd-ports-gnome-eeaf6daef2858f71291178fa27a029f5f3cc44dd.zip |
- Fix build with i386
PR: 190900
Submitted by: ports fury
Diffstat (limited to 'lang')
-rw-r--r-- | lang/scm/Makefile | 85 | ||||
-rw-r--r-- | lang/scm/files/patch-build.scm | 20 | ||||
-rw-r--r-- | lang/scm/files/patch-r4rstest.scm | 12 | ||||
-rw-r--r-- | lang/scm/files/patch-scmfig.h | 32 | ||||
-rw-r--r-- | lang/scm/pkg-descr | 27 | ||||
-rw-r--r-- | lang/scm/pkg-install | 9 | ||||
-rw-r--r-- | lang/scm/pkg-plist | 5 |
7 files changed, 126 insertions, 64 deletions
diff --git a/lang/scm/Makefile b/lang/scm/Makefile index 497c773ccc28..19249920ef47 100644 --- a/lang/scm/Makefile +++ b/lang/scm/Makefile @@ -3,6 +3,7 @@ PORTNAME= scm PORTVERSION= 5f1 +PORTREVISION= 1 CATEGORIES= lang scheme MASTER_SITES= http://groups.csail.mit.edu/mac/ftpdir/scm/%SUBDIR%/ MASTER_SITE_SUBDIR= . OLD @@ -14,83 +15,91 @@ COMMENT= Scheme interpreter LICENSE= LGPL21 -OPTIONS_DEFINE= X11 - WRKSRC= ${WRKDIR}/${PORTNAME} USES= gmake readline zip USE_GCC= any +HAS_CONFIGURE= yes +CONFIGURE_ENV= --prefix=${PREFIX} MAKE_JOBS_UNSAFE= yes SUB_FILES= require.scm PLIST_SUB= VERSION="${PORTVERSION}" -MAN1= scm.1 +PKGDEINSTALL= ${PKGINSTALL} + INFO= scm +OPTIONS_DEFINE= X11 +OPTIONS_SUB= yes + +X11_USE= xorg=ice,sm,x11,xext + SCM_DATA= COPYING COPYING.LESSER Iedline.scm Idiffer.scm \ Init${PORTVERSION}.scm Link.scm Macexp.scm Macro.scm \ Transcen.scm Tscript.scm build build.scm compile.scm \ hobbit.scm mkimpcat.scm patchlvl.h \ r4rstest.scm rwb-isam.scm scmhob.h scmhob.scm wbtab.scm +SCM_DATA_X11= keysymdef.scm x11.scm xatoms.scm xevent.scm SCM_MODULES= byte.so bytenumb.so crs.so differ.so edline.so gsubr.so \ ioext.so posix.so ramap.so record.so rgx.so sc2.so \ socket.so unix.so +SCM_MODULES_X11=x.so -NO_STAGE= yes .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MX11} -USE_XORG= ice sm x11 xext -PLIST_SUB+= X11="" -SCM_DATA+= keysymdef.scm x11.scm xatoms.scm xevent.scm -SCM_MODULES+= x.so -.else -PLIST_SUB+= X11="@comment " -.endif - -.include <bsd.port.pre.mk> - .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" BROKEN= Does not compile on ia64, powerpc, or sparc64 .endif -.if ${OSVERSION} > 1000000 -READLINE_DIR= ${LOCALBASE} -.else -READLINE_DIR= /usr -.endif - post-extract: @${TAR} -C ${WRKDIR} -zxf ${DISTDIR}/slib-psd1-3.tar.gz post-patch: - @${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|' \ - ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include| ; \ + /strip/s|^|#|' ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g ; \ s|%%CFLAGS%%|${CFLAGS}|g ; \ - s|%%READLINE_DIR%%|${READLINE_DIR}|g ; \ s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/build.scm + @${REINPLACE_CMD} -e 's|__osf__|__FreeBSD__|' ${WRKSRC}/gmalloc.c @${REINPLACE_CMD} -e 's|gnuregex\.h|gnu/regex.h|g' ${WRKSRC}/rgx.c @${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|g' \ ${WRKSRC}/xgen.scm do-install: - (cd ${WRKSRC} && ${INSTALL_PROGRAM} scm ${PREFIX}/bin) - (cd ${WRKSRC} && ${INSTALL_SCRIPT} scmlit ${PREFIX}/bin) - (cd ${WRKSRC} && ${INSTALL_MAN} scm.1 ${MANPREFIX}/man/man1) - @${MKDIR} ${PREFIX}/lib/scm - (cd ${WRKDIR} && ${INSTALL_DATA} require.scm ${PREFIX}/lib/scm) -.for i in ${SCM_DATA} ${SCM_MODULES} - (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${PREFIX}/lib/scm) + (cd ${WRKSRC} && ${INSTALL_PROGRAM} scm scmlit \ + ${STAGEDIR}${PREFIX}/bin) + (cd ${WRKSRC} && ${INSTALL_MAN} scm.1 \ + ${STAGEDIR}${MANPREFIX}/man/man1) + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm + (cd ${WRKDIR} && ${INSTALL_DATA} require.scm \ + ${STAGEDIR}${PREFIX}/lib/scm) +.for i in ${SCM_DATA} + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} \ + ${STAGEDIR}${PREFIX}/lib/scm) .endfor - @${MKDIR} ${PREFIX}/lib/scm/slib - (cd ${WRKDIR}/slib && ${INSTALL_DATA} *.scm ${PREFIX}/lib/scm/slib) - @${MKDIR} ${PREFIX}/lib/scm/slib/psd +.for i in ${SCM_MODULES} + (cd ${WRKSRC} && ${INSTALL_LIB} ${i} \ + ${STAGEDIR}${PREFIX}/lib/scm) +.endfor +.if ${PORT_OPTIONS:MX11} +.for i in ${SCM_DATA_X11} + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} \ + ${STAGEDIR}${PREFIX}/lib/scm) +.endfor +.for i in ${SCM_MODULES_X11} + (cd ${WRKSRC} && ${INSTALL_LIB} ${i} \ + ${STAGEDIR}${PREFIX}/lib/scm) +.endfor +.endif + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm/slib + (cd ${WRKDIR}/slib && ${INSTALL_DATA} *.scm \ + ${STAGEDIR}${PREFIX}/lib/scm/slib) + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm/slib/psd (cd ${WRKDIR}/slib/psd && ${INSTALL_DATA} *.scm \ - ${PREFIX}/lib/scm/slib/psd) - (cd ${WRKDIR}/scm && ${INSTALL_DATA} scm.info ${PREFIX}/${INFO_PATH}) - (cd ${PREFIX}/lib/scm && ${PREFIX}/bin/scm -lmkimpcat.scm) + ${STAGEDIR}${PREFIX}/lib/scm/slib/psd) + (cd ${WRKDIR}/scm && ${INSTALL_DATA} scm.info \ + ${STAGEDIR}${PREFIX}/${INFO_PATH}) -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/lang/scm/files/patch-build.scm b/lang/scm/files/patch-build.scm index a5bdb83b6213..692742b7a86e 100644 --- a/lang/scm/files/patch-build.scm +++ b/lang/scm/files/patch-build.scm @@ -1,20 +1,23 @@ --- build.scm.orig 2009-08-04 03:35:57.000000000 +0900 +++ build.scm 2009-08-07 01:59:30.000000000 +0900 -@@ -667,12 +667,13 @@ +@@ -665,14 +665,15 @@ + (dump darwin "" "" #f ("unexmacosx.c" "lastfile.c") ()) + (dlll darwin "-DSUN_DL" "-ldl" "" () ()) - (c freebsd "" "-export-dynamic" #f () ()) +- (c freebsd "" "-export-dynamic" #f () ()) ++ (c freebsd "" "-Wl,-export-dynamic" #f () ()) (m freebsd "" "-lm" #f () ()) - (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) + (curses freebsd "" "-lcurses" "/usr/lib/libcurses.a" () ()) (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ()) -- (editline freebsd "" "-lreadline" "" () ()) -+ (editline freebsd "-I%%READLINE_DIR%%/include" "-lreadline" "-L%%READLINE_DIR%%/lib" () ()) -+ (graphics freebsd "-I%%LOCALBASE%%/include -DX11" "-lX11" "-L%%LOCALBASE%%/lib" () ()) - (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) + (editline freebsd "" "-lreadline" "" () ()) +- (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) - (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ()) - (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ()) ++ (graphics freebsd "-I%%LOCALBASE%%/include -DX11" "-lX11" "-L%%LOCALBASE%%/lib" () ()) ++ (dlll freebsd "-DSUN_DL" "" "" () ()) + (nostart freebsd "" "" #f () ()) -+ (dump freebsd "" "" #f ("unexeclf.c" "gmalloc.c") ()) ++ (dump freebsd "" "" #f ("unexelf.c" "gmalloc.c") ()) (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) (editline netbsd "-I/usr/pkg/include" "-lreadline" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) (graphics netbsd "-I/usr/X11R6/include -DX11" "-lX11" "-Wl,-rpath -Wl,/usr/X11R6/lib -L/usr/X11R6/lib" () ()) @@ -51,9 +54,8 @@ - parms "cc" "-shared" + parms "%%CC%%" "-shared" (cond -- ((equal? (car fnames) "edline") "-lreadline") + ((equal? (car fnames) "edline") "-lreadline") - ((equal? (car fnames) "x") "-L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lxpg4") -+ ((equal? (car fnames) "edline") "-L%%READLINE_DIR%%/lib -lreadline") + ((equal? (car fnames) "rgx") "-lgnuregex") + ((equal? (car fnames) "x") "-L%%LOCALBASE%%/lib -lSM -lICE -lXext -lX11") (else "")) diff --git a/lang/scm/files/patch-r4rstest.scm b/lang/scm/files/patch-r4rstest.scm new file mode 100644 index 000000000000..b85ef51c0bdd --- /dev/null +++ b/lang/scm/files/patch-r4rstest.scm @@ -0,0 +1,12 @@ +--- r4rstest.scm.orig ++++ r4rstest.scm +@@ -794,8 +794,7 @@ + (test #t 'mult-float-print-test (mult-float-print-test + (string->number "3.1415926535897931"))) + (test #t 'mult-float-print-test (mult-float-print-test +- (string->number "2.7182818284590451"))) +- (test #t float-rw-range-test))) ++ (string->number "2.7182818284590451"))))) + + (define (test-bignum) + (define tb diff --git a/lang/scm/files/patch-scmfig.h b/lang/scm/files/patch-scmfig.h new file mode 100644 index 000000000000..0b193ee5fd15 --- /dev/null +++ b/lang/scm/files/patch-scmfig.h @@ -0,0 +1,32 @@ +--- scmfig.h.orig ++++ scmfig.h +@@ -256,11 +256,7 @@ + #ifdef __alpha + # define SHORT_INT + #endif +-#ifdef __ia64__ +-# define SHORT_INT +-# define CDR_DOUBLES +-#endif +-#ifdef __x86_64 ++#if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__) + # define SHORT_INT + # define CDR_DOUBLES + #endif +@@ -393,14 +389,10 @@ + # define WHITE_SPACES ' ':case '\t':case '\r':case '\f' + #endif + +-#ifdef __ia64__ ++# if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__) + # define PTR2INT(x) ((long)(x)) + #else +-# ifdef __x86_64 +-# define PTR2INT(x) ((long)(x)) +-# else +-# define PTR2INT(x) ((int)(x)) +-# endif ++# define PTR2INT(x) ((int)(x)) + #endif + + #ifndef __builtin_expect diff --git a/lang/scm/pkg-descr b/lang/scm/pkg-descr index 255ba1f0e17c..303de1aa9ae5 100644 --- a/lang/scm/pkg-descr +++ b/lang/scm/pkg-descr @@ -1,24 +1,21 @@ -Scm conforms to Revised^5 Report on the Algorithmic Language Scheme and the IEEE -P1178 specification. Scm is written in C and runs under Amiga, Atari-ST, MacOS, -MS-DOS, OS/2, NOS/VE, Unicos, VMS, Unix and similar systems. ASCII and EBCDIC -are supported. - -Documentation is included explaining the many Scheme Language extensions in scm, -the internal representation and how to extend or include scm in other programs. +Scm conforms to Revised^5 Report on the Algorithmic Language Scheme and +the IEEE P1178 specification. SLIB is a portable Scheme library which SCM uses. SLIB-PSD is a portable debugger for Scheme (requires emacs editor). -The init file is hard-coded as /usr/local/lib/scm/Init.scm. Alternatively, -one can set the environment variable SCM_INIT_PATH to the pathname of Init.scm. +The init file is hard-coded as /usr/local/lib/scm/Init.scm. +Alternatively, one can set the environment variable SCM_INIT_PATH to the +pathname of Init.scm. -The library files are in /usr/local/lib/scm/slib. Alternatively, one can set -the environment variable SCHEME_LIBRARY_PATH to the slib directory. Remember to -use a trailing / on the pathname. +The library files are in /usr/local/lib/scm/slib. Alternatively, one can +set the environment variable SCHEME_LIBRARY_PATH to the slib directory. +Remember to use a trailing / on the pathname. -By default -DSICP is turned on, with the expectation that this is the major -reason for this port. This means test.scm will fail on three tests in section -6.1. Where strict R4S compliance is important, recompile without the SICP flag. +By default -DSICP is turned on, with the expectation that this is the +major reason for this port. This means test.scm will fail on three tests +in section 6.1. Where strict R4S compliance is important, recompile +without the SICP flag. WWW: http://people.csail.mit.edu/jaffer/SCM diff --git a/lang/scm/pkg-install b/lang/scm/pkg-install new file mode 100644 index 000000000000..22908d4a1f46 --- /dev/null +++ b/lang/scm/pkg-install @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$2" = "POST-INSTALL" ]; then + cd $PKG_PREFIX/lib/scm && $PKG_PREFIX/bin/scm -l mkimpcat.scm + cd $PKG_PREFIX/lib/scm && $PKG_PREFIX/bin/scm -l slib/mklibcat.scm +elif [ "$2" = "DEINSTALL" ] ; then + rm -f $PKG_PREFIX/lib/scm/slibcat + rm -f $PKG_PREFIX/lib/scm/implcat +fi diff --git a/lang/scm/pkg-plist b/lang/scm/pkg-plist index be159b16b4bf..5da3ca3ed978 100644 --- a/lang/scm/pkg-plist +++ b/lang/scm/pkg-plist @@ -20,7 +20,7 @@ lib/scm/differ.so lib/scm/edline.so lib/scm/gsubr.so lib/scm/hobbit.scm -lib/scm/implcat +@comment lib/scm/implcat lib/scm/ioext.so %%X11%%lib/scm/keysymdef.scm lib/scm/mkimpcat.scm @@ -200,7 +200,7 @@ lib/scm/slib/wttree-test.scm lib/scm/slib/wttree.scm lib/scm/slib/xml-parse.scm lib/scm/slib/yasyn.scm -lib/scm/slibcat +@comment lib/scm/slibcat lib/scm/socket.so lib/scm/unix.so lib/scm/wbtab.scm @@ -208,6 +208,7 @@ lib/scm/wbtab.scm %%X11%%lib/scm/x11.scm %%X11%%lib/scm/xatoms.scm %%X11%%lib/scm/xevent.scm +man/man1/scm.1.gz @dirrm lib/scm/slib/psd @dirrm lib/scm/slib @dirrm lib/scm |