Bug 60473 - New port databases/db3-tcl
Summary: New port databases/db3-tcl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-21 16:30 UTC by Roberto Grassi
Modified: 2004-07-06 01:12 UTC (History)
0 users

See Also:


Attachments
db3-tcl.shar (1.19 KB, text/plain)
2003-12-21 16:30 UTC, Roberto Grassi
no flags Details
db3-Makefile-withTcl (1.86 KB, application/octet-stream)
2004-02-01 23:42 UTC, Roberto Grassi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Grassi 2003-12-21 16:30:16 UTC
	New ports - add TCL support to Berkeley DB3 port
Comment 1 Mark Linimon 2003-12-21 18:14:33 UTC
To be helpful to any interested new-ports committers, I've
taken the liberty of adding the category/portname string to
this PR's Synopsis.  Whenever a posting just says "new port"
it is very likely to find itself lost among all the other PRs.
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2003-12-29 07:18:52 UTC
State Changed
From-To: open->feedback

please ignore for the moment.
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2003-12-29 07:19:22 UTC
State Changed
From-To: feedback->open

reopen PR to proper status
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2003-12-29 07:43:01 UTC
State Changed
From-To: open->feedback

Does't really compile properly: 

rm -f .libs/tcl_compat.lo 
cc -c -I. -I./../dist/../include -I./../dist/../include_auto -D_THREAD_SAFE -O -pipe -march=pentiumpro ./../dist/../tcl/tcl_compat.c  -fPIC -DPIC -o tcl_compat.o 
./../dist/../tcl/tcl_compat.c:20: tcl.h: No such file or directory 
In file included from ./../dist/../tcl/tcl_compat.c:26: 
../dist/../include/tcl_db.h:79: syntax error before `Tcl_Interp' 
[..] 
../dist/../include_auto/tcl_ext.h:63: syntax error before `*' 
./../dist/../tcl/tcl_compat.c:31: syntax error before `*' 
./../dist/../tcl/tcl_compat.c:41: syntax error before `Tcl_Interp' 
./../dist/../tcl/tcl_compat.c:43: syntax error before `*' 
*** Error code 1 

Stop in /usr/home/edwin/cvs/ports/NEW/db3-tcl/work/db-3.3.11/build_unix. 
*** Error code 1 

This is both on -STABLE as -CURRENT.
Comment 5 Matthias Andree 2004-01-07 03:38:49 UTC
Should the master db3 port get a WITH_TCL option instead?

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95
Comment 6 Roberto Grassi 2004-02-01 23:42:08 UTC
Yes, you are right
I modified your Makefile adding the evaluation of the WITH_TCL_VER make
variable. This method is used in other packages, so it's the best, no
need to create a new package.
Feel free to include the diffs on the db3 package Makefile and close
this PR.

Roberto

At 04.38 07/01/2004, matthias.andree wrote:
>Should the master db3 port get a WITH_TCL option instead?
>
>--
>Matthias Andree
>
>Encrypt your mail: my GnuPG key ID is 0x052E7D95

   
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2004-03-28 15:36:08 UTC
Here is an unified diff of latest followup on this PR.
Maintainer of databases/db3, do you approve this change?

--- /usr/ports/databases/db3/Makefile	Sun Mar 14 17:55:13 2004
+++ Makefile	Sun Mar 28 16:34:42 2004
@@ -43,11 +43,24 @@
 	${RMDIR} ${DOCSDIR}/ref/splash
 .endif
 
+.if defined(WITH_TCL_VER)
+.if ${WITH_TCL_VER} == 8.4 || ${WITH_TCL_VER} == 8.3
+CONFIGURE_ARGS+=	--enable-tcl --with-tcl=/usr/local/lib/tcl${WITH_TCL_VER}
+.else
+BROKEN=  "WITH_TCL_VER must be 8.4 or 8.3"
+.endif
+.endif
+
 pre-patch:
 	@${REINPLACE_CMD} -Ee 's|-l?pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/${CONFIGURE_SCRIPT}
 
 post-patch:
 	@${CHMOD} 755 ${WRKSRC}/${CONFIGURE_SCRIPT}
 	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/../dist/configure
+
+post-configure:
+.if defined(WITH_TCL_VER)
+	@${REINPLACE_CMD} -e "s|TCFLAGS=.*|TCFLAGS=-I/usr/local/include/tcl${WITH_TCL_VER} -L/usr/local/lib/tcl${WITH_TCL_VER}|g" ${WRKSRC}/Makefile
+.endif
 
 .include <bsd.port.mk>


-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

You have acquired a scroll entitled 'irk gleknow mizk' (n).
This is an IBM Manual scroll.
You are permanently confused.
Comment 8 Pav Lucistnik freebsd_committer freebsd_triage 2004-03-28 15:36:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Handle
Comment 9 Matthias Andree 2004-03-29 00:24:59 UTC
WRT to approval/disapproval, I'll follow up within a week.

One question up front:
is there a reason this is added to db3 rather than db42?
I haven't mentioned this earlier but db3 has been discontinued by the
upstream, so all we should be doing is keeping the old version going
in order to keep the ports that support only db3 (and not db41 or db42)
happy.

-- 
Matthias Andree
Comment 10 Pav Lucistnik freebsd_committer freebsd_triage 2004-03-29 13:46:39 UTC
V po, 29. 03. 2004 v 01:24, Matthias Andree p=ED=B9e:

> One question up front:
> is there a reason this is added to db3 rather than db42?
> I haven't mentioned this earlier but db3 has been discontinued by the
> upstream, so all we should be doing is keeping the old version going
> in order to keep the ports that support only db3 (and not db41 or db42)
> happy.

I think it's given the age of this PR, back in the days when it was
files, db3 was the latest and greatest. If you could prepare similar
update for db42 that would be nice, too.

--=20
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

What do we know about love? Love is like a pear.  Pear is sweet and havea
specific shape. Try to exactly define the shape of a pear.
  -- Marigold: 50 Years Of Poetry
Comment 11 Roberto Grassi 2004-04-26 21:15:42 UTC
I tested that the following rows added to che Makefile
work fine for db4 and db42 (the same of db3 diff).
Roberto

--------------------- cut here -------------------
.if defined(WITH_TCL_VER)
.if ${WITH_TCL_VER} =3D=3D 8.4 || ${WITH_TCL_VER} =3D=3D 8.3
CONFIGURE_ARGS+=3D--enable-tcl --with-tcl=3D/usr/local/lib/tcl${WITH_TCL_VER=
}
.else
BROKEN=3D  "WITH_TCL_VER must be 8.4 or 8.3"
.endif
.endif

post-configure:
.if defined(WITH_TCL_VER)
         @${REINPLACE_CMD} -e=20
"s|TCFLAGS=3D.*|TCFLAGS=3D-I/usr/local/include/tcl${WITH_TCL_VER}=20
-L/usr/local/lib/tcl${WITH_TCL_VER}|g" ${WRKSRC}/Makefile
.endif
--------------------- cut here -------------------

At 14.46 29/03/2004, Pav Lucistnik wrote:
>V po, 29. 03. 2004 v 01:24, Matthias Andree p=ED=B9e:
>
> > One question up front:
> > is there a reason this is added to db3 rather than db42?
> > I haven't mentioned this earlier but db3 has been discontinued by the
> > upstream, so all we should be doing is keeping the old version going
> > in order to keep the ports that support only db3 (and not db41 or db42)
> > happy.
>
>I think it's given the age of this PR, back in the days when it was
>files, db3 was the latest and greatest. If you could prepare similar
>update for db42 that would be nice, too.
>
>--
>Pav Lucistnik <pav@oook.cz>
>               <pav@FreeBSD.org>
>
>What do we know about love? Love is like a pear.  Pear is sweet and havea
>specific shape. Try to exactly define the shape of a pear.
>   -- Marigold: 50 Years Of Poetry

--
Roberto Grassi
Obicon Srl
tel. 0362 569428
cell. 335 7627279 =20
Comment 12 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-05 20:08:51 UTC
So what's the status of this old PR? Is maintainer fine with last
submitter's patch, or should this be reworked further, or should this PR
be just closed as obsolete?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Eat when you are hungry, sleep when you are tired.
Chase butterflies when you want some fun.
Comment 13 Matthias Andree 2004-07-05 22:50:14 UTC
We'll need to fix the pkg-plist. I'm working on it.
Comment 14 Matthias Andree 2004-07-05 23:16:36 UTC
>Submitter-Id:	current-users
>Originator:	Matthias Andree
>Organization:	
>Confidential:	no 
>Synopsis:	ports/60473: [MAINTAINER] databases/db3: support WITH_TCL_VER
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		maintainer-update
>Release:	FreeBSD 4.10-RELEASE-p2 i386
>Environment:
System: FreeBSD libertas.emma.line.org 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #2: Thu Jul  1 00:06:57 CEST
>Description:
Add Tcl support based on Roberto Grassi's work.
Differences from previous patch:
- bump PORTREVISION
- track changes in pkg-plist
- do not install .la file
- use ${LOCALBASE} rather than /usr/local

Note I have only tested Tcl 8.4 so try testing with Tcl 8.3 if you must ;)

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

--- db3-3.3.11_2,1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/databases/db3/Makefile /usr/home/emma/ports/databases/db3/Makefile
--- /usr/ports/databases/db3/Makefile	Mon May 10 11:46:16 2004
+++ /usr/home/emma/ports/databases/db3/Makefile	Tue Jul  6 00:13:17 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	db3
 PORTVERSION=	3.3.11
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH?=	1
 CATEGORIES=	databases
 #MASTER_SITES=	http://www.sleepycat.com/update/snapshot/
@@ -44,11 +44,30 @@
 	${RMDIR} ${DOCSDIR}/ref/splash
 .endif
 
+.if defined(WITH_TCL_VER)
+.if ${WITH_TCL_VER} == 8.4 || ${WITH_TCL_VER} == 8.3
+CONFIGURE_ARGS+=	--enable-tcl --with-tcl=${LOCALBASE}/lib/tcl${WITH_TCL_VER}
+PLIST_SUB=	WITHTCL=""
+.else
+BROKEN=	"WITH_TCL_VER must be 8.4 or 8.3"
+.endif
+.else
+PLIST_SUB=	WITHTCL="@comment "
+.endif
+
 pre-patch:
 	@${REINPLACE_CMD} -Ee 's|-l?pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/${CONFIGURE_SCRIPT}
 
 post-patch:
 	@${CHMOD} 755 ${WRKSRC}/${CONFIGURE_SCRIPT}
 	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/../dist/configure
+
+post-install:
+	${RM} -f ${PREFIX}/lib/libdb_tcl-3.3.la
+
+post-configure:
+.if defined(WITH_TCL_VER)
+	@${REINPLACE_CMD} -e "s|TCFLAGS=.*|TCFLAGS=-I${LOCALBASE}/include/tcl${WITH_TCL_VER} -L${LOCALBASE}/lib/tcl${WITH_TCL_VER}|g" ${WRKSRC}/Makefile
+.endif
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/databases/db3/pkg-plist /usr/home/emma/ports/databases/db3/pkg-plist
--- /usr/ports/databases/db3/pkg-plist	Fri Jan 16 12:36:27 2004
+++ /usr/home/emma/ports/databases/db3/pkg-plist	Mon Jul  5 23:45:18 2004
@@ -20,4 +20,9 @@
 lib/libdb3_cxx.a
 lib/libdb3_cxx.so
 lib/libdb3_cxx.so.3
+%%WITHTCL%%lib/libdb_tcl-3.3.a
+%%WITHTCL%%lib/libdb_tcl-3.3.so
+%%WITHTCL%%lib/libdb_tcl-3.3.so.3
+%%WITHTCL%%lib/libdb_tcl.so
+%%WITHTCL%%lib/libdb_tcl-3.so
 @dirrm include/db3
--- db3-3.3.11_2,1.patch ends here ---
Comment 15 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-06 01:12:49 UTC
State Changed
From-To: feedback->closed

Committed, thanks!