update Wed Feb 24 06:37:03 PST 2010
[pkgsrc.git] / lang / sbcl / Makefile
1 # $NetBSD: Makefile,v 1.21 2010/02/24 12:16:09 asau Exp $
2
3 DISTNAME=               ${PKGNAME_NOREV}-source
4 PKGNAME=                sbcl-1.0.35
5 CATEGORIES=             lang
6 MASTER_SITES=           ${MASTER_SITE_SOURCEFORGE:=sbcl/}
7 EXTRACT_SUFX=           .tar.bz2
8
9 MAINTAINER=             jonb@NetBSD.org
10 HOMEPAGE=               http://www.sbcl.org/
11 COMMENT=                SBCL, a Common Lisp implementation
12
13 # SBCL creates a new release with minor updates and fixes every
14 # month.  The maintainer of this package does not have the time
15 # to build, test, update, etc. this package that often.  If you
16 # would like a newer (or older) version, this works very often:
17 # 1) change the PKGNAME variable above as desired
18 # 2) make fetch && make makesum && make package
19
20 USE_TOOLS+=             gmake gtar:run
21 PKG_INSTALLATION_TYPES= overwrite pkgviews
22 PKG_DESTDIR_SUPPORT=    user-destdir
23
24 WRKSRC=                 ${WRKDIR}/${PKGNAME_NOREV}
25
26 .include "../../mk/bsd.prefs.mk"
27
28 #
29 # Bootstrap section.
30 #
31 # SBCL needs an existing Common Lisp system to build it...
32 # Currently allowed systems are CLISP, CMUCL, OpenMCL, and SBCL itself.
33 #
34 #  Note that CLISP 2.39nb1 worked two or three times when testing
35 #  this package and it failed to build SBCL twice.  It is also at
36 #  least twice as slow as using SBCL when building on an i386 platform.
37 #
38 #  I have reports that CLISP will build on PowerPC platforms, but is
39 #  unable to build SBCL.
40 #
41 #  If SBCL is installed in an unusual place when trying to build this
42 #  package, you may need to set the full path in SBCL_BOOT_SYSTEM and
43 #  build the package with "SBCL_HOME=/path/to/SBCL/core/image/ make"
44
45 #SBCL_BOOT_SYSTEM=      clisp                   # CLisp
46 #SBCL_BOOT_SYSTEM=      "lisp -batch"           # CMUCL
47 #SBCL_BOOT_SYSTEM=      "openmcl --batch"       # OpenMCL
48 #SBCL_BOOT_SYSTEM=      sbcl                    # SBCL
49
50 .if !defined(SBCL_BOOT_SYSTEM)
51 # Use "clisp -ansi -on-error abort" to make the build more reproducible,
52 # per Christophe Rhodes:
53 SBCL_BOOT_SYSTEM=       clisp -ansi -on-error abort
54 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
55 ULIMIT_RESOURCES=       datasize
56 .elif ${SBCL_BOOT_SYSTEM} == clisp
57 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
58 ULIMIT_RESOURCES=       datasize
59 .elif ${SBCL_BOOT_SYSTEM} == sbcl
60 # Get bootstrap version:
61 BUILD_DEPENDS+=         sbcl-[0-9]*:../../lang/sbcl
62 .endif
63
64
65 SUBST_CLASSES+=                 fix-paths
66 SUBST_STAGE.fix-paths=          pre-configure
67 SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
68 SUBST_FILES.fix-paths=          install.sh src/runtime/runtime.c doc/sbcl.1
69 SUBST_SED.fix-paths=            -e 's,@PREFIX@,${PREFIX},g'
70 SUBST_SED.fix-paths+=           -e 's,/var/log,${VARBASE}/log,g'
71
72 SUBST_CLASSES+=                 fix-gtar
73 SUBST_STAGE.fix-gtar=           pre-configure
74 SUBST_MESSAGE.fix-gtar=         Fixing GNU tar references.
75 SUBST_FILES.fix-gtar=           contrib/asdf-install/installer.lisp
76 SUBST_SED.fix-gtar=             -e 's,@GTAR@,${GTAR},'
77
78 do-build:
79         cd ${WRKSRC} && ${SH} make.sh ${SBCL_BOOT_SYSTEM:Q}
80 post-build:
81         cd ${WRKSRC} && ${RM} -f contrib/sb-cover/test-output/*
82
83 do-install:
84         cd ${WRKSRC} && BUILD_ROOT=${DESTDIR:Q} INSTALL_ROOT=${PREFIX:Q} MAN_DIR=${PREFIX:Q}/${PKGMANDIR} ${SH} install.sh
85         rm -f $(DESTDIR)$(PREFIX)/lib/sbcl/asdf-install/installer.lisp.orig
86
87 do-test:
88         cd ${WRKSRC}/tests && ${SH} ./run-tests.sh
89
90 .include "../../mk/bsd.pkg.mk"