summaryrefslogtreecommitdiff
path: root/lang/gauche
diff options
context:
space:
mode:
authoruebayasi <uebayasi@pkgsrc.org>2005-03-07 03:16:46 +0000
committeruebayasi <uebayasi@pkgsrc.org>2005-03-07 03:16:46 +0000
commit733012f6d2deb8b709a9db4e49a51f8d196d6483 (patch)
tree424d49c6dd476432ac77b403a33c78812f0eaa51 /lang/gauche
parent7c6a9b9f04288def20d9f89b4028e4d40d5e7faa (diff)
downloadpkgsrc-733012f6d2deb8b709a9db4e49a51f8d196d6483.tar.gz
+ Add GDBM support and enable it by default.
+ Use PKG_OPTIONS.
Diffstat (limited to 'lang/gauche')
-rw-r--r--lang/gauche/Makefile18
-rw-r--r--lang/gauche/PLIST4
-rw-r--r--lang/gauche/options.mk32
3 files changed, 46 insertions, 8 deletions
diff --git a/lang/gauche/Makefile b/lang/gauche/Makefile
index fdc3e975df8..28b674421b8 100644
--- a/lang/gauche/Makefile
+++ b/lang/gauche/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.28 2005/01/16 08:57:55 kei Exp $
+# $NetBSD: Makefile,v 1.29 2005/03/07 03:16:46 uebayasi Exp $
#
DISTNAME= Gauche-0.8.3
-PKGREVISION= # empty
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gauche/}
EXTRACT_SUFX= .tgz
@@ -13,6 +13,15 @@ COMMENT= R5RS Scheme implementation aimed to be a handy tool for daily works
DEPENDS+= slib-[0-9]*:../../devel/slib
+.include "options.mk"
+
+# This is ad-hoc. TRT would be to fix configure scripts, but that
+# would be also very tedious...
+SUBST_CLASSES+= lgdbm
+SUBST_STAGE.lgdbm= pre-configure
+SUBST_FILES.lgdbm= configure
+SUBST_SED.lgdbm= -e 's|"-lgdbm"|"${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.gdbm}/lib -lgdbm"|g'
+
GNU_CONFIGURE= yes
USE_BUILDLINK3= yes
CONFIGURE_ARGS+= --with-slib=${PREFIX}/share/slib
@@ -26,11 +35,6 @@ LDFLAGS+= ${BUILDLINK_LIBICONV_LDADD}
USE_MAKEINFO= YES
INFO_FILES= gauche-refe.info gauche-refj.info
-.include "../../mk/bsd.prefs.mk"
-.if defined(GAUCHE_MULTIBYTE)
-CONFIGURE_ARGS+= --enable-multibyte=${GAUCHE_MULTIBYTE}
-.endif
-
.include "../../devel/boehm-gc/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
diff --git a/lang/gauche/PLIST b/lang/gauche/PLIST
index 241a4db685a..839119b9cc9 100644
--- a/lang/gauche/PLIST
+++ b/lang/gauche/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2005/01/26 09:27:38 minoura Exp $
+@comment $NetBSD: PLIST,v 1.11 2005/03/07 03:16:46 uebayasi Exp $
bin/gauche-cesconv
bin/gauche-config
bin/gauche-install
@@ -11,6 +11,7 @@ lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gauche-cesconv
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gauche-config
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gauche-install
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gauche-package
+${USE_GDBM}lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gdbm.so
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/gosh
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/libcharconv.so
lib/gauche/${PKGVERSION}/${MACHINE_GNU_PLATFORM}/libgauche-uvector.so
@@ -57,6 +58,7 @@ share/gauche/${PKGVERSION}/lib/compat/jfilter.scm
share/gauche/${PKGVERSION}/lib/compat/stk.scm
share/gauche/${PKGVERSION}/lib/dbm.scm
share/gauche/${PKGVERSION}/lib/dbm/fsdbm.scm
+${USE_GDBM}share/gauche/${PKGVERSION}/lib/dbm/gdbm.scm
share/gauche/${PKGVERSION}/lib/dbm/ndbm.scm
share/gauche/${PKGVERSION}/lib/file/filter.scm
share/gauche/${PKGVERSION}/lib/file/util.scm
diff --git a/lang/gauche/options.mk b/lang/gauche/options.mk
new file mode 100644
index 00000000000..ab57f078a14
--- /dev/null
+++ b/lang/gauche/options.mk
@@ -0,0 +1,32 @@
+# $NetBSD: options.mk,v 1.1 2005/03/07 03:16:46 uebayasi Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.gauche
+PKG_SUPPORTED_OPTIONS= gdbm multibyte
+PKG_DEFAULT_OPTIONS+= gdbm multibyte
+
+.include "../../mk/bsd.options.mk"
+.include "../../mk/bsd.prefs.mk"
+
+###
+### GDBM extension. Modules seem to be better tested with GDBM
+### than NDBM.
+###
+.if !empty(PKG_OPTIONS:Mgdbm)
+. include "../../databases/gdbm/buildlink3.mk"
+PLIST_SUBST+= USE_GDBM=''
+.else
+PLIST_SUBST+= USE_GDBM='@comment '
+.endif
+
+###
+### Multibyte extension.
+###
+.if !empty(PKG_OPTIONS:Mmultibyte) && defined(GAUCHE_MULTIBYTE)
+CONFIGURE_ARGS+= --enable-multibyte=${GAUCHE_MULTIBYTE}
+.endif
+
+.if defined(PKG_DEVELOPER)
+.PHONY: print-multibyte-options
+print-multibyte-options:
+ ${SED} -ne '/load "/ { s|^.*load "\([^"]*\)".*$|\1|; p; }' ${WRKSRC}/test/mb-chars.scm
+.endif