From lino@tp.unitedpeople.info  Thu Aug 31 15:32:01 2006
Return-Path: <lino@tp.unitedpeople.info>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 739C916A4DD
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 15:32:01 +0000 (UTC)
	(envelope-from lino@tp.unitedpeople.info)
Received: from tp.unitedpeople.info (BSN-61-4-150.dial-up.dsl.siol.net [86.61.4.150])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4BB0343D5F
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 15:31:54 +0000 (GMT)
	(envelope-from lino@tp.unitedpeople.info)
Received: from tp.unitedpeople.info (localhost [127.0.0.1])
	by tp.unitedpeople.info (8.13.6/8.13.6) with ESMTP id k7VFVn0A030951
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 17:31:50 +0200 (CEST)
	(envelope-from lino@tp.unitedpeople.info)
Received: (from lino@localhost)
	by tp.unitedpeople.info (8.13.6/8.13.6/Submit) id k7VFVmuo030950;
	Thu, 31 Aug 2006 17:31:48 +0200 (CEST)
	(envelope-from lino)
Message-Id: <200608311531.k7VFVmuo030950@tp.unitedpeople.info>
Date: Thu, 31 Aug 2006 17:31:48 +0200 (CEST)
From: Karel Miklav <karel@lovetemple.net>
Reply-To: Karel Miklav <karel@lovetemple.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch: lang/gnat-gcc34, problems installing FSF manuals 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102727
>Category:       ports
>Synopsis:       Patch: lang/gnat-gcc34, problems installing FSF manuals
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 31 17:00:36 GMT 2006
>Closed-Date:    Mon Sep 04 12:26:26 GMT 2006
>Last-Modified:  Mon Sep 04 12:26:26 GMT 2006
>Originator:     Karel Miklav
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD tp.unitedpeople.info 6.1-STABLE FreeBSD 6.1-STABLE #2: Mon Jul 31 00:49:01 CEST 2006 lino@tp.unitedpeople.info:/usr/obj/usr/src/sys/TPX40 i386
	
>Description:
Current lang/gnat-gcc34 port installs FSF manuals in a way that causes
potential conflicts with other ports and real conflicts with incoming
versions of this port.
	

>How-To-Repeat:
	
>Fix:
	

diff -urN /usr/ports/lang/gnat-gcc34/Makefile gnat-gcc34/Makefile
--- /usr/ports/lang/gnat-gcc34/Makefile	Mon Aug 28 21:59:52 2006
+++ gnat-gcc34/Makefile	Thu Aug 31 17:06:26 2006
@@ -8,6 +8,7 @@
 
 PORTNAME=		gnat-gcc
 PORTVERSION=	3.4.6
+PORTREVISION=	1
 CATEGORIES=		lang
 MASTER_SITES=	${MASTER_SITE_GCC}
 MASTER_SITE_SUBDIR=	releases/gcc-${PORTVERSION}
@@ -17,6 +18,8 @@
 MAINTAINER=		karel@lovetemple.net
 COMMENT=		The GNU Ada Compiler system
 
+ONLY_FOR_ARCHS=	i386
+
 USE_GMAKE=	yes
 USE_PERL5=	yes
 USE_BISON=	yes
@@ -27,7 +30,7 @@
 MAN1=		cpp${gcc_suffix}.1 \
 			gcc${gcc_suffix}.1 \
  			gcov${gcc_suffix}.1
-MAN7=		fsf-funding.7 gfdl.7 gpl.7
+MAN7=		${fsf_mans:S/$/${fsf_suffix}.7/}
 NOMANCOMPRESS=	yes	# too hard to deal with differences on 5-cur and releng4
 INFO=		gcc${gcc_suffix}/cpp \
 			gcc${gcc_suffix}/cppinternals \
@@ -38,6 +41,8 @@
 			gcc${gcc_suffix}/gnat_rm \
 			gcc${gcc_suffix}/gnat_ugn_unw
 
+LATEST_LINK=	${PORTNAME}${gcc_suffix}
+
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} < 500000
@@ -45,6 +50,8 @@
 .endif
 
 gcc_suffix=		34
+fsf_mans=		fsf-funding gfdl gpl
+fsf_suffix=		-${PORTNAME}${gcc_suffix}
 targlib=		${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/${PORTVERSION}
 
 PATCH_WRKSRC=	${WRKSRC}
@@ -65,15 +72,12 @@
 BUILD_WRKSRC=	${WRKDIR}/build
 
 INSTALL_WRKSRC=	${WRKDIR}/build
-INSTALLS_SHLIB=	yes
-
-USE_LDCONFIG=	${targlib}
 
 PLIST_SUB=		GCC_VER=${PORTVERSION} \
 				GNU_HOST=${CONFIGURE_TARGET} \
 				SUFFIX=${gcc_suffix}
 
-ONLY_FOR_ARCHS=	i386
+USE_LDCONFIG=	${targlib}
 
 # You need a compiler who calls an existing GNAT compiler (3.15 or greater).
 # By default, we'll look for one in the path.  If we can't find one, we'll
@@ -108,7 +112,6 @@
 .endif
 
 .if empty(bootstrap_path)
-ONLY_FOR_ARCHS=	i386
 DISTFILES+=		gnat-3.15p-boot.tar.gz:boot
 MASTER_SITES+=	${MASTER_SITE_LOCAL}:boot
 MASTER_SITE_SUBDIR+=	deischen/gcc/:boot
@@ -154,10 +157,14 @@
 post-install:
 	${LN} -s ${PREFIX}/bin/gcc${gcc_suffix}/gcc${gcc_suffix} \
 		${PREFIX}/bin/gcc${gcc_suffix}/gcc
-	# Man pages can only be generated if Perl >= 5.6 is installed;
-	# fake them otherwise.
+	# Man pages can only be generated if Perl >= 5.6 is installed; fake them otherwise.
 	for mp in ${_MANPAGES}; do \
 		${TEST} -e $${mp} || ${TOUCH} ${TOUCH_FLAGS} $${mp}; \
+	done
+	# Version FSF funding and licensing manuals.
+	for mp in ${fsf_mans}; do \
+		${MV} -f ${PREFIX}/man/man7/$${mp}.7 \
+			${PREFIX}/man/man7/$${mp}${fsf_suffix}.7; \
 	done
 	# Add target libraries and include files to packaging list.
 	${RM} -f ${WRKDIR}/PLIST.lib


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bsam 
Responsible-Changed-By: bsam 
Responsible-Changed-When: Thu Aug 31 20:39:39 UTC 2006 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102727 

From: "Boris B. Samorodov" <bsam@ipt.ru>
To: bug-followup@FreeBSD.org,karel@lovetemple.net
Cc:  
Subject: Re: ports/102727: Patch: lang/gnat-gcc34, problems installing FSF manuals?Gcc=INBOX.Sent
Date: Fri, 01 Sep 2006 13:18:02 +0400

 Hm, the same problem upon deinstall/pkg_delete as for 4.x:
 -----
 ===>   Deinstalling gnat-gcc-3.4.6_1
 pkg_delete: unexec command for 'rmdir libdata/ldconfig >/dev/null 2>&1' failed
 pkg_delete: couldn't entirely delete package (perhaps the packing list is incorrectly specified?)
 -----
 
 Well, I'm going to suspend this PR until PR/101809 is committed.
 
 WBR
 -- 
 bsam
State-Changed-From-To: open->closed 
State-Changed-By: bsam 
State-Changed-When: Mon Sep 4 12:25:54 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

Since PR/101809 is only a cosmetic change to bsd.ports.mk and there souldn't 
be errors at pointyhat when building the port for 4.x, the BROKEN message was 
removed as well. 

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