update Sun Sep 13 06:37:00 PDT 2009
[pkgsrc.git] / wip / sbcl / Makefile
1 # $NetBSD: Makefile,v 1.14 2007/03/06 05:40:33 jonb Exp $
2
3 DISTNAME=               ${PKGNAME_NOREV}-source
4 PKGNAME=                sbcl-1.0.30
5 CATEGORIES=             lang
6 MASTER_SITES=           ${MASTER_SITE_SOURCEFORGE:=sbcl/}
7 EXTRACT_SUFX=           .tar.bz2
8
9 MAINTAINER=             asau@users.sourceforge.net
10 HOMEPAGE=               http://www.sbcl.org/
11 COMMENT=                SBCL, a Common Lisp implementation
12
13 # ONLY_FOR_PLATFORM=    NetBSD-[2-9]*-i386
14 # ONLY_FOR_PLATFORM+=   FreeBSD-[2-9]*-i386
15 # ONLY_FOR_PLATFORM+=   Linux-*-i386
16 # It should be possible to have SBCL working on amd64, powerpc,
17 # sparc, alpha, mips, and HPPA hardware also, but they probably
18 # need a bit of porting work done in SBCL itself.
19 # In addition, SBCL should also work on Darwin, Solaris, OpenBSD,
20 # and possibly Win32, OSF/1, HP-UX, and Irix.
21
22 USE_TOOLS+=             gmake gtar:run
23 PKG_INSTALLATION_TYPES= overwrite pkgviews
24 PKG_DESTDIR_SUPPORT=    user-destdir
25
26 #USE_CONFIGURE=yes
27 WRKSRC=                 ${WRKDIR}/${PKGNAME_NOREV}
28
29 .include "../../mk/bsd.prefs.mk"
30
31 #
32 # Bootstrap section.
33 #
34 # SBCL needs an existing Common Lisp system to build it...
35 # Currently allowed systems are CLISP, CMUCL, OpenMCL, and SBCL itself.
36 #
37 #  Note that CLISP 2.39nb1 worked two or three times when testing
38 #  this package and it failed to build SBCL twice.  It is also at
39 #  least twice as slow as using SBCL when building on an i386 platform.
40 #
41 #  I have reports that CLISP will build on PowerPC platforms, but is
42 #  unable to build SBCL.
43 #
44 #  If SBCL is installed in an unusual place when trying to build this
45 #  package, you may need to set the full path in SBCL_BOOT_SYSTEM and
46 #  build the package with "SBCL_HOME=/path/to/SBCL/core/image/ make"
47
48 #SBCL_BOOT_SYSTEM=      clisp                   # CLisp
49 #SBCL_BOOT_SYSTEM=      "lisp -batch"           # CMUCL
50 #SBCL_BOOT_SYSTEM=      "openmcl --batch"       # OpenMCL
51 #SBCL_BOOT_SYSTEM=      sbcl                    # SBCL
52
53 .if !defined(SBCL_BOOT_SYSTEM)
54 # Use "clisp -ansi -on-error abort" to make the build more reproducible,
55 # per Christophe Rhodes:
56 SBCL_BOOT_SYSTEM=       clisp -ansi -on-error abort
57 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
58 ULIMIT_RESOURCES=       datasize
59 .elif ${SBCL_BOOT_SYSTEM} == clisp
60 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
61 ULIMIT_RESOURCES=       datasize
62 .elif ${SBCL_BOOT_SYSTEM} == sbcl
63 # Get bootstrap version:
64 BUILD_DEPENDS+=         sbcl-[0-9]*:../../lang/sbcl
65 .endif
66
67
68 SUBST_CLASSES+=                 fix-paths
69 SUBST_STAGE.fix-paths=          pre-configure
70 SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
71 SUBST_FILES.fix-paths=          install.sh src/runtime/runtime.c doc/sbcl.1
72 SUBST_SED.fix-paths=            -e 's,@PREFIX@,${PREFIX},g'
73 #SUBST_SED.fix-paths+=           -e 's,/var/log,${VARBASE}/log,g'
74
75 SUBST_CLASSES+=                 fix-gtar
76 SUBST_STAGE.fix-gtar=           pre-configure
77 SUBST_MESSAGE.fix-gtar=         Fixing GNU tar references.
78 SUBST_FILES.fix-gtar=           contrib/asdf-install/installer.lisp
79 SUBST_SED.fix-gtar=             -e 's,@GTAR@,${GTAR},'
80
81 do-build:
82         cd ${WRKSRC} && ${SH} make.sh ${SBCL_BOOT_SYSTEM:Q}
83 post-build:
84         cd ${WRKSRC} && ${RM} -f contrib/sb-cover/test-output/*
85
86 do-install:
87         cd ${WRKSRC} && BUILD_ROOT=${DESTDIR:Q} INSTALL_ROOT=${PREFIX:Q} MAN_DIR=${PREFIX:Q}/${PKGMANDIR} ${SH} install.sh
88         rm -f $(DESTDIR)$(PREFIX)/lib/sbcl/asdf-install/installer.lisp.orig
89         rm -f $(DESTDIR)$(PREFIX)/lib/sbcl/sb-posix/posix-tests.lisp.orig
90         find $(DESTDIR)$(PREFIX)/lib/sbcl -type d -name CVS -exec rm -rf {} \+
91
92 do-test:
93         cd ${WRKSRC}/tests && ${SH} ./run-tests.sh
94
95 CVS_REPOSITORIES=       sbcl
96 CVS_ROOT.sbcl=          :pserver:anonymous:@sbcl.cvs.sourceforge.net:/cvsroot/sbcl
97 WRKSRC=                 ${WRKDIR}/sbcl
98 DISTNAME=
99 PKGNAME=                sbcl-1.0.99
100
101 .include "../mk/cvs-package.mk"
102
103 .include "../../mk/bsd.pkg.mk"