summaryrefslogtreecommitdiff
path: root/lang/scm/Makefile
blob: ad4eae496ad3ceb8ee1a991cc806fd9e7d92b4e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $NetBSD: Makefile,v 1.19 2007/08/02 14:47:24 obache Exp $
#
# Convert the version number as follows 2d2 -> 2.4.2, where the d is
# changed to a 4, representing the 4th letter.
# Thus, 5e3 -> 5.5.3
#
# Do not forget to update InitXXX.scm in files/buildscm.scm

DISTNAME=	scm5e3
PKGNAME=	scm-5.5.3
CATEGORIES=	lang
MASTER_SITES=	http://swissnet.ai.mit.edu/ftpdir/scm/
EXTRACT_SUFX=	.zip

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.swiss.ai.mit.edu/~jaffer/SCM
COMMENT=	Portable scheme interpreter

DEPENDS+=	slib>=3.1.1:../../devel/slib

WRKSRC=		${WRKDIR}/scm
EVAL_PREFIX+=	SLIB_PREFIX=slib
INFO_FILES=	yes

SCM_MODULES+=	sc2 ramap dynl edline gsubr ioext posix record rgx socket
SCM_MODULES+=	unix  continue scm scmmain findexec script time repl scl eval
SCM_MODULES+=	sys subr debug unif rope unexelf
COMPILED_INITS+=init_edline

.include "options.mk"

SRCS=		${SCM_MODULES:=.c}
OBJS=		${SCM_MODULES:=.o}

BUILD_TARGET=	scmlit libscm.a
INSTALL_TARGET=	install installlib

INSTALL_MAKE_FLAGS=	${MAKE_FLAGS} mandir=${PREFIX:Q}/${PKGMANDIR:Q}/

INSTALLATION_DIRS=	${PKGINFODIR} share/scm

.include "../../devel/readline/buildlink3.mk"

post-extract:
	${SED} -e "s|@SLIB_PREFIX@|"${SLIB_PREFIX:Q}"|g"		\
		${FILESDIR}/require.scm > ${WRKSRC}/require.scm
	${SED} -e "s|@PREFIX@|"${PREFIX:Q}"|g"				\
		-e "s|@COMPILED_INITS@|${COMPILED_INITS:=();}|g"	\
		${FILESDIR}/buildscm.sh  > ${WRKSRC}/buildscm.sh

post-build:
	cd ${WRKSRC} && env ${MAKE_ENV} LIBS=${LIBS:Q} \
		SRCS=${SRCS:Q} OBJS=${OBJS:Q} \
		${SH} ./buildscm.sh

post-install:
	${INSTALL_DATA} ${WRKSRC}/slibcat ${PREFIX}/share/scm
	cd ${WRKSRC}; for f in *.info *.info-[0-9]*; do			\
		${TEST} ! -f "$$f" ||					\
		${INSTALL_DATA} "$$f" ${PREFIX}/${PKGINFODIR};		\
	done

.include "../../mk/bsd.pkg.mk"