pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gauche + Add GDBM support and enable it by default.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/96aa4f977e68
branches:  trunk
changeset: 490310:96aa4f977e68
user:      uebayasi <uebayasi%pkgsrc.org@localhost>
date:      Mon Mar 07 03:16:46 2005 +0000

description:
+ Add GDBM support and enable it by default.
+ Use PKG_OPTIONS.

diffstat:

 lang/gauche/Makefile   |  18 +++++++++++-------
 lang/gauche/PLIST      |   4 +++-
 lang/gauche/options.mk |  32 ++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 8 deletions(-)

diffs (103 lines):

diff -r 82f924ba4f48 -r 96aa4f977e68 lang/gauche/Makefile
--- a/lang/gauche/Makefile      Mon Mar 07 02:08:37 2005 +0000
+++ b/lang/gauche/Makefile      Mon Mar 07 03:16:46 2005 +0000
@@ -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 @@
 
 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 @@
 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 -r 82f924ba4f48 -r 96aa4f977e68 lang/gauche/PLIST
--- a/lang/gauche/PLIST Mon Mar 07 02:08:37 2005 +0000
+++ b/lang/gauche/PLIST Mon Mar 07 03:16:46 2005 +0000
@@ -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-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/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 -r 82f924ba4f48 -r 96aa4f977e68 lang/gauche/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gauche/options.mk    Mon Mar 07 03:16:46 2005 +0000
@@ -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



Home | Main Index | Thread Index | Old Index