Bug 56324

Summary: sysutils/pkg_install: FBSDID undefined on older systems
Product: Ports & Packages Reporter: stolz <stolz>
Component: Individual Port(s)Assignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me CC: portmgr
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description stolz 2003-09-02 18:20:15 UTC
On 4.3-S(!):
===>  Building for pkg_install-20030714_1
===> lib
cc -O -pipe -march=pentium -march=pentium  -c file.c -o file.o
file.c:22: syntax error before string constant
file.c:22: warning: data definition has no type or storage class
*** Error code 1

line 22:
__FBSDID("$FreeBSD: src/usr.sbin/pkg_install/lib/file.c,v 1.64 2003/01/06 07:39:02 jkh Exp $");

Fix: 

While I probably shouldn't be using 4.3, it would be great if this
minor thing wouldn't break regression.

Would it be possible to move the appropriate parts from cdefs.h into
the port?
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2003-09-02 19:45:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Over to maintainer.
Comment 2 Oliver Eikemeier 2003-09-02 21:07:04 UTC
Hi Volker,

could you please try the following patch to confirm that this is the only
problem building the port on 4.3? I do not have a 4.3 system, and can't test
things here. If the port builds we can look for a solution not requiring perl
(or we leave it that way, or make a new package)

Thanks
    Oliver

--- pkg_install-4.3.patch begins here ---
--- Makefile.orig	Tue Sep  2 21:57:26 2003
+++ Makefile	Tue Sep  2 21:59:32 2003
@@ -41,6 +41,10 @@
 .endif
 .endif
 
+post-extract:
+	@${FIND} "${WRKSRC}" -name '*.c' \
+		| ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/'
+
 pre-configure:
 	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
 		-e 's,%%MANPREFIX%%,${MANPREFIX},g' \
--- pkg_install-4.3.patch ends here ---
Comment 3 stolz 2003-09-03 08:33:08 UTC
On Tue, Sep 02, 2003 at 10:07:04PM +0200, Oliver Eikemeier wrote:
> could you please try the following patch to confirm that this is the only
> problem building the port on 4.3? I do not have a 4.3 system, and can't test
> things here. If the port builds we can look for a solution not requiring 
> perl

It works, thanks. My suggestions:
Leave in the ${PERL}, but conditionalise on a FreeBSD-version prior to
the cdefs.h commit. Those should always have had perl in base at least.

Volker
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
rage against the finite state machine
Comment 4 Oliver Eikemeier 2003-09-04 02:03:02 UTC
Followup in PR ports/56389:

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/56389
Comment 5 Joe Marcus Clarke freebsd_committer freebsd_triage 2003-09-04 04:41:46 UTC
State Changed
From-To: open->closed

Fixed, thanks for reporting.