From yar@bsd.chem.msu.ru  Wed Jan 22 06:22:19 2003
Return-Path: <yar@bsd.chem.msu.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 37F8137B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Jan 2003 06:22:19 -0800 (PST)
Received: from bsd.chem.msu.ru (bsd.chem.msu.ru [195.208.208.23])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9867E43F18
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Jan 2003 06:22:17 -0800 (PST)
	(envelope-from yar@bsd.chem.msu.ru)
Received: from bsd.chem.msu.ru (localhost [127.0.0.1])
	by bsd.chem.msu.ru (8.12.6/8.12.6) with ESMTP id h0MEMEfn047372;
	Wed, 22 Jan 2003 17:22:14 +0300 (MSK)
	(envelope-from yar@bsd.chem.msu.ru)
Received: (from yar@localhost)
	by bsd.chem.msu.ru (8.12.6/8.12.6/Submit) id h0MEMC8n047371;
	Wed, 22 Jan 2003 17:22:12 +0300 (MSK)
Message-Id: <200301221422.h0MEMC8n047371@bsd.chem.msu.ru>
Date: Wed, 22 Jan 2003 17:22:12 +0300 (MSK)
From: Yar Tikhiy <yar@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: cyrille.lefevre@laposte.net
Subject: databases/gdbm won't install compatibility files
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47363
>Category:       ports
>Synopsis:       databases/gdbm won't install compatibility files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 06:30:01 PST 2003
>Closed-Date:    Wed Jan 22 09:06:46 PST 2003
>Last-Modified:  Wed Jan 22 09:06:46 PST 2003
>Originator:     Yar Tikhiy
>Release:        FreeBSD 4.7-RELEASE-p3 i386
>Organization:
Moscow State University
>Environment:
	FreeBSD

>Description:
	At some point of gdbm development, Unix dbm/ndbm compatibility
	functions were moved from the main library to libgdbm_compat,
	and an additional make(1) target, install-compat, was introduced
	to install the compatibility files.

	The FreeBSD databases/gdbm port can't install those files, though.

>How-To-Repeat:
	Install databases/gdbm.

>Fix:

The below patch adds a make(1) variable, WITH_COMPAT,
which allows one to control whether the compatibility
files will be installed.

If the port's maintainer has no objections, I can commit
this patch.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/gdbm/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	3 Jan 2003 08:16:54 -0000	1.18
+++ Makefile	22 Jan 2003 14:18:34 -0000
@@ -17,10 +17,24 @@
 USE_LIBTOOL=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 INSTALLS_SHLIB=	yes
+.if defined(WITH_COMPAT) && ${WITH_COMPAT:L} != no
+INSTALL_TARGET=	install install-compat
+PLIST_SUB=	GDBM_COMPAT=""
+.else
+PLIST_SUB=	GDBM_COMPAT="@comment "
+.endif
 
 MAN3=		gdbm.3
 
 INSTALL_INFO?=	install-info
+
+pre-everything::
+.if !defined(WITH_COMPAT)
+	@${ECHO_MSG}
+	@${ECHO_MSG} "If you need UNIX dbm/ndbm compatibility functions,"
+	@${ECHO_MSG} "use \"make WITH_COMPAT=yes\""
+	@${ECHO_MSG}
+.endif
 
 post-install:
 	@${INSTALL_INFO} ${PREFIX}/info/${PORTNAME}.info ${PREFIX}/info/dir
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/databases/gdbm/pkg-plist,v
retrieving revision 1.7
diff -u -r1.7 pkg-plist
--- pkg-plist	3 Jan 2003 08:16:54 -0000	1.7
+++ pkg-plist	22 Jan 2003 14:18:34 -0000
@@ -1,7 +1,12 @@
 include/gdbm.h
+%%GDBM_COMPAT%%include/dbm.h
+%%GDBM_COMPAT%%include/ndbm.h
 @unexec install-info --delete %D/info/gdbm.info %D/info/dir
 info/gdbm.info
 @exec install-info %D/info/gdbm.info %D/info/dir
 lib/libgdbm.a
 lib/libgdbm.so
 lib/libgdbm.so.3
+%%GDBM_COMPAT%%lib/libgdbm_compat.a
+%%GDBM_COMPAT%%lib/libgdbm_compat.so
+%%GDBM_COMPAT%%lib/libgdbm_compat.so.3
>Release-Note:
>Audit-Trail:

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: Yar Tikhiy <yar@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/47363: databases/gdbm won't install compatibility files
Date: Wed, 22 Jan 2003 16:14:47 +0100

 On Wed, Jan 22, 2003 at 05:22:12PM +0300, Yar Tikhiy wrote:
 > 
 > If the port's maintainer has no objections, I can commit
 > this patch.
 
 no, I have no objection. thanks :)
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
State-Changed-From-To: open->closed 
State-Changed-By: yar 
State-Changed-When: Wed Jan 22 09:02:13 PST 2003 
State-Changed-Why:  
Patch committed. 
Thank you Cyrille for reviewing it. 


Responsible-Changed-From-To: freebsd-ports-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Wed Jan 22 09:02:13 PST 2003 
Responsible-Changed-Why:  
I'm the person to blame for this change. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47363 
>Unformatted:
