update Wed Jun 16 00:37:01 PDT 2010
[pkgsrc.git] / lang / sbcl / Makefile
1 # $NetBSD: Makefile,v 1.26 2010/06/16 06:19:23 asau Exp $
2
3 DISTNAME=               ${PKGNAME_NOREV}-source
4 PKGNAME=                sbcl-1.0.39
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 #  If SBCL is installed in an unusual place when trying to build this
35 #  package, you may need to set the full path in SBCL_BOOT_SYSTEM and
36 #  build the package with "SBCL_HOME=/path/to/SBCL/core/image/ make"
37
38 #SBCL_BOOT_SYSTEM=      clisp                   # CLisp
39 #SBCL_BOOT_SYSTEM=      "lisp -batch"           # CMUCL
40 #SBCL_BOOT_SYSTEM=      "openmcl --batch"       # OpenMCL
41 #SBCL_BOOT_SYSTEM=      sbcl                    # SBCL
42
43 .if !defined(SBCL_BOOT_SYSTEM)
44 # Use "clisp -ansi -on-error abort" to make the build more reproducible,
45 # per Christophe Rhodes:
46 SBCL_BOOT_SYSTEM=       clisp -norc -ansi -on-error abort
47 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
48 UNLIMIT_RESOURCES=      datasize
49 .elif ${SBCL_BOOT_SYSTEM} == clisp
50 BUILD_DEPENDS+=         clisp-[0-9]*:../../lang/clisp
51 UNLIMIT_RESOURCES=      datasize
52 .elif ${SBCL_BOOT_SYSTEM} == sbcl
53 # Get bootstrap version:
54 BUILD_DEPENDS+=         sbcl-[0-9]*:../../lang/sbcl
55 .endif
56
57
58 SUBST_CLASSES+=                 fix-paths
59 SUBST_STAGE.fix-paths=          pre-configure
60 SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
61 SUBST_FILES.fix-paths=          install.sh src/runtime/runtime.c doc/sbcl.1
62 SUBST_SED.fix-paths=            -e 's,@PREFIX@,${PREFIX},g'
63 SUBST_SED.fix-paths+=           -e 's,/var/log,${VARBASE}/log,g'
64
65 SUBST_CLASSES+=                 fix-gtar
66 SUBST_STAGE.fix-gtar=           pre-configure
67 SUBST_MESSAGE.fix-gtar=         Fixing GNU tar references.
68 SUBST_FILES.fix-gtar=           contrib/asdf-install/installer.lisp
69 SUBST_SED.fix-gtar=             -e 's,@GTAR@,${GTAR},'
70
71 do-build:
72         cd ${WRKSRC} && ${SH} make.sh ${SBCL_BOOT_SYSTEM:Q}
73 post-build:
74         cd ${WRKSRC} && ${RM} -f contrib/sb-cover/test-output/*
75
76 do-install:
77         cd ${WRKSRC} && BUILD_ROOT=${DESTDIR:Q} INSTALL_ROOT=${PREFIX:Q} MAN_DIR=${PREFIX:Q}/${PKGMANDIR} ${SH} install.sh
78         rm -f $(DESTDIR)$(PREFIX)/lib/sbcl/asdf-install/installer.lisp.orig
79
80 do-test:
81         cd ${WRKSRC}/tests && ${SH} ./run-tests.sh
82
83 .if $(LOWER_ARCH) == "amd64" || $(LOWER_ARCH) == "x86_64"
84 PLIST_SUBST+=   SUFX64=-64
85 .endif
86
87 .include "../../mk/bsd.pkg.mk"