Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  6 Apr 2006 04:27:33 +0800 (CST)
From:      Yen-Ming Lee <leeym@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        kcwu@csie.org
Subject:   ports/95364: [PATCH] chinese/zh-libtabe: [SUMMARIZE CHANGES]
Message-ID:  <20060405202733.63512B29C6A@utopia.leeym.com>
Resent-Message-ID: <200604052030.k35KUFsB047835@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         95364
>Category:       ports
>Synopsis:       [PATCH] chinese/zh-libtabe: [SUMMARIZE CHANGES]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 05 20:30:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
FreeBSD Taiwan
>Environment:
System: FreeBSD utopia.leeym.com 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Tue Apr  4 08:47:26 CST
>Description:
- utilize USE_BDB and NOT_FOR_ARCHS
- support BDB 4+
- make it optional support for XLIB and bims

Added file(s):
- files/patch-configure

Port maintainer (kcwu@csie.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- zh-libtabe-0.2.5_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/chinese/libtabe/Makefile,v
retrieving revision 1.29
diff -u -u -r1.29 Makefile
--- Makefile	10 Feb 2006 00:56:59 -0000	1.29
+++ Makefile	5 Apr 2006 20:25:14 -0000
@@ -14,54 +14,45 @@
 MAINTAINER=	kcwu@csie.org
 COMMENT=	Unified library for Chinese text processing
 
-.if !defined(USE_DB2)
-LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
-.else
-LIB_DEPENDS=	db2.0:${PORTSDIR}/databases/db2
-.endif
-
 WRKSRC=		${WRKDIR}/libtabe
 INSTALLS_SHLIB=	yes
 HAS_CONFIGURE=	yes
 USE_GMAKE=	yes
-USE_XLIB=	yes
+USE_BDB=	yes
+OBSOLETE_BDB_VAR=	USE_DB2
+NOT_FOR_ARCHS=	amd64
+DATADIR=	${PREFIX}/share/tabe
+DOCSDIR=	${PREFIX}/share/doc/tabe
 CONFIGURE_ARGS=	--prefix=${PREFIX} \
 		--includedir=${PREFIX}/include/tabe \
-		--with-db-lib=${LOCALBASE}/lib \
+		--with-db-inc=${BDB_INCLUDE_DIR} \
+		--with-db-lib=${BDB_LIB_DIR} \
 		--with-db-bin=${LOCALBASE}/bin \
 		--enable-shared
 
-.if !defined(USE_DB2)
-CONFIGURE_ARGS+= --with-db-inc=${LOCALBASE}/include/db3
+.if !defined(WITHOUT_X11)
+PLIST_SUB+=	X11=""
+USE_XLIB=	yes
 .else
-CONFIGURE_ARGS+= --with-db-inc=${LOCALBASE}/include/db2
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64"
-BROKEN=		"Does not compile on amd64"
-.endif
-
-pre-fetch:
-.if !defined(USE_DB2)
-	@${ECHO} --
-	@${ECHO} "Type \"make -DUSE_DB2\" if you want use DB2."
-	@${ECHO} "Otherwise, xcin2.5 will use DB3."
-	@${ECHO} --
+CONFIGURE_ARGS+=--without-x
+PLIST_SUB+=	X11="@comment "
+post-patch:
+	${REINPLACE_CMD} -e '/all:/s/ bims//; /bims/d' ${WRKSRC}/src/Makefile.in
 .endif
 
 post-install:
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${PREFIX}/share/doc/tabe
-	${INSTALL_DATA} ${WRKSRC}/tsi-src/README ${PREFIX}/share/doc/tabe/README.tsi
-	${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README ${PREFIX}/share/doc/tabe/README.bims
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/tsi-src/README ${DOCSDIR}/README.tsi
+.if !defined(WITHOUT_X11)
+	${INSTALL_DATA} ${WRKSRC}/src/supports/bims/README ${DOCSDIR}/README.bims
+.endif
 .for DOC in BoPoMoFo.shtml Changes Changes.pre-0.1 TODO ZuYinCode.txt \
 		et26.txt libtabe.sgml
-	${INSTALL_DATA} ${WRKSRC}/doc/${DOC} ${PREFIX}/share/doc/tabe
+	${INSTALL_DATA} ${WRKSRC}/doc/${DOC} ${DOCSDIR}
 .endfor
 .endif
-	${MKDIR} ${PREFIX}/share/tabe
-	${TOUCH} ${PREFIX}/share/tabe/libtabe-0.2.5
+	${MKDIR} ${DATADIR}
+	${TOUCH} ${DATADIR}/${PORTNAME}-${PORTVERSION}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/chinese/libtabe/pkg-plist,v
retrieving revision 1.14
diff -u -u -r1.14 pkg-plist
--- pkg-plist	17 Apr 2002 11:51:52 -0000	1.14
+++ pkg-plist	5 Apr 2006 20:25:14 -0000
@@ -3,29 +3,29 @@
 bin/tsidump
 bin/tsiyincheck
 bin/tsiyindump
-include/tabe/bims.h
+%%X11%%include/tabe/bims.h
 include/tabe/tabe.h
-lib/libbims.a
-lib/libbims.la
-lib/libbims.so
-lib/libbims.so.2
+%%X11%%lib/libbims.a
+%%X11%%lib/libbims.la
+%%X11%%lib/libbims.so
+%%X11%%lib/libbims.so.2
 lib/libtabe.a
 lib/libtabe.la
 lib/libtabe.so
 lib/libtabe.so.2
 lib/tabe/tsi.db
 lib/tabe/yin.db
-%%PORTDOCS%%share/doc/tabe/BoPoMoFo.shtml
-%%PORTDOCS%%share/doc/tabe/Changes
-%%PORTDOCS%%share/doc/tabe/Changes.pre-0.1
-%%PORTDOCS%%share/doc/tabe/README.bims
-%%PORTDOCS%%share/doc/tabe/README.tsi
-%%PORTDOCS%%share/doc/tabe/TODO
-%%PORTDOCS%%share/doc/tabe/ZuYinCode.txt
-%%PORTDOCS%%share/doc/tabe/et26.txt
-%%PORTDOCS%%share/doc/tabe/libtabe.sgml
-share/tabe/libtabe-0.2.5
+%%PORTDOCS%%%%DOCSDIR%%/BoPoMoFo.shtml
+%%PORTDOCS%%%%DOCSDIR%%/Changes
+%%PORTDOCS%%%%DOCSDIR%%/Changes.pre-0.1
+%%X11%%%%PORTDOCS%%%%DOCSDIR%%/README.bims
+%%PORTDOCS%%%%DOCSDIR%%/README.tsi
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/ZuYinCode.txt
+%%PORTDOCS%%%%DOCSDIR%%/et26.txt
+%%PORTDOCS%%%%DOCSDIR%%/libtabe.sgml
+%%DATADIR%%/libtabe-0.2.5
 @dirrm include/tabe
 @dirrm lib/tabe
-%%PORTDOCS%%@dirrm share/doc/tabe
-@dirrm share/tabe
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%DATADIR%%
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-configure	5 Apr 2006 20:25:14 -0000
@@ -0,0 +1,36 @@
+--- configure.orig	Sat Oct 20 20:03:29 2001
++++ configure	Wed Apr  5 13:26:48 2006
+@@ -5315,18 +5315,15 @@
+   cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
+-test "$ac_cv_search_db_create" = "no" && for i in db db3; do
++test "$ac_cv_search_db_create" = "no" && for i in db db3 db4 db41 db-4.2 db-4.3 db-4.4; do
+ LIBS="-l$i  $ac_func_search_save_LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 5322 "configure"
+ #include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-/* We use char because int might match the return type of a gcc2
+-    builtin and then its argument prototype would still apply.  */
+-char db_create();
++#include "db.h"
+ 
+ int main() {
+-db_create()
++db_create(0,0,0)
+ ; return 0; }
+ EOF
+ if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+@@ -5726,11 +5723,6 @@
+   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+ fi
+ 
+-if test x$no_x = xyes; then
+-    echo "$ac_t""You need X11R6 header files to compile libtabe." 1>&6
+-    echo "$ac_t""Please use --x-includes to configure." 1>&6
+-    exit 1
+-fi
+ 
+ 
+ 
Index: files/patch-src::tabe_tsidbint.c
===================================================================
RCS file: /home/pcvs/ports/chinese/libtabe/files/patch-src::tabe_tsidbint.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-src::tabe_tsidbint.c
--- files/patch-src::tabe_tsidbint.c	22 Aug 2002 19:13:10 -0000	1.1
+++ files/patch-src::tabe_tsidbint.c	5 Apr 2006 20:25:15 -0000
@@ -1,10 +1,50 @@
---- src/tabe_tsidbint.c.orig	Sun Nov 11 12:33:07 2001
-+++ src/tabe_tsidbint.c	Thu Aug 22 02:14:53 2002
-@@ -267,3 +267,7 @@
+--- src/tabe_tsidbint.c.orig	Sun Nov 11 20:33:07 2001
++++ src/tabe_tsidbint.c	Wed Apr  5 13:40:32 2006
+@@ -84,8 +84,10 @@
+     else {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, DB_CREATE, 0644, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, DB_CREATE, 0644);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, DB_CREATE, 0644);
+ #endif
+     }
+   }
+@@ -93,15 +95,19 @@
+     if (flags & DB_FLAG_READONLY) {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, DB_RDONLY, 0444, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, DB_RDONLY, 0444);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, DB_RDONLY, 0444);
+ #endif
+     }
+     else {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, 0, 0644, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, 0, 0644);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, 0, 0644);
+ #endif
+     }
+   }
+@@ -265,7 +271,13 @@
+   switch(tsidb->type) {
+   case DB_TYPE_DB:
      dbp = (DB *)tsidb->dbp;
 +#ifndef HAVE_DB3
      errno = dbp->stat(dbp, &sp, NULL, 0);
-+#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 2))
 +    errno = dbp->stat(dbp, &sp, 0);
++#else
++    errno = dbp->stat(dbp, NULL, &sp, 0);
 +#endif
      if (!errno) {
+ #ifndef HAVE_DB3
+       return(sp->bt_nrecs);
Index: files/patch-src::tabe_tsiyindbint.c
===================================================================
RCS file: /home/pcvs/ports/chinese/libtabe/files/patch-src::tabe_tsiyindbint.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-src::tabe_tsiyindbint.c
--- files/patch-src::tabe_tsiyindbint.c	22 Aug 2002 19:13:10 -0000	1.1
+++ files/patch-src::tabe_tsiyindbint.c	5 Apr 2006 20:25:15 -0000
@@ -1,10 +1,50 @@
---- src/tabe_tsiyindbint.c.orig	Sun Nov 11 12:33:08 2001
-+++ src/tabe_tsiyindbint.c	Thu Aug 22 02:16:00 2002
-@@ -270,3 +270,7 @@
+--- src/tabe_tsiyindbint.c.orig	Sun Nov 11 20:33:08 2001
++++ src/tabe_tsiyindbint.c	Wed Apr  5 14:30:18 2006
+@@ -87,8 +87,10 @@
+     else {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, DB_CREATE, 0644, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, DB_CREATE, 0644);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, DB_CREATE, 0644);
+ #endif
+     }
+   }
+@@ -96,15 +98,19 @@
+     if (flags & DB_FLAG_READONLY) {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, DB_RDONLY, 0444, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, DB_RDONLY, 0444);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, DB_RDONLY, 0444);
+ #endif
+     }
+     else {
+ #ifndef HAVE_DB3
+       errno = db_open(db_name, DB_BTREE, 0, 0644, NULL, NULL, &dbp);
+-#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 0))
+       errno = dbp->open(dbp, db_name, NULL, DB_BTREE, 0, 0644);
++#else
++      errno = dbp->open(dbp, NULL, db_name, NULL, DB_BTREE, 0, 0644);
+ #endif
+     }
+   }
+@@ -268,7 +274,13 @@
+   switch(tsiyindb->type) {
+   case DB_TYPE_DB:
      dbp = (DB *)tsiyindb->dbp;
 +#ifndef HAVE_DB3
      errno = dbp->stat(dbp, &sp, NULL, 0);
-+#else
++#elif (DB_VERSION_MAJOR == 3 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 2))
 +    errno = dbp->stat(dbp, &sp, 0);
++#else
++    errno = dbp->stat(dbp, NULL, &sp, 0);
 +#endif
      if (!errno) {
+ #ifndef HAVE_DB3
+       return(sp->bt_nrecs);
--- zh-libtabe-0.2.5_2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060405202733.63512B29C6A>