From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 6 15:10:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D6A16A476 for ; Sun, 6 Jan 2008 15:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 057C113C4D5 for ; Sun, 6 Jan 2008 15:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m06FA1lh096349 for ; Sun, 6 Jan 2008 15:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m06FA187096348; Sun, 6 Jan 2008 15:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 6 Jan 2008 15:10:01 GMT Resent-Message-Id: <200801061510.m06FA187096348@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Boris Samorodov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C82816A473 for ; Sun, 6 Jan 2008 15:04:39 +0000 (UTC) (envelope-from bsam@bb.ipt.ru) Received: from bb.ipt.ru (bb.ipt.ru [194.62.233.89]) by mx1.freebsd.org (Postfix) with ESMTP id 150F213C469 for ; Sun, 6 Jan 2008 15:04:38 +0000 (UTC) (envelope-from bsam@bb.ipt.ru) Received: from bb.ipt.ru (localhost [127.0.0.1]) by bb.ipt.ru (8.14.2/8.14.2) with ESMTP id m06F34xk003092 for ; Sun, 6 Jan 2008 18:03:04 +0300 (MSK) (envelope-from bsam@bb.ipt.ru) Received: (from bsam@localhost) by bb.ipt.ru (8.14.2/8.14.2/Submit) id m06F33nN003091; Sun, 6 Jan 2008 18:03:03 +0300 (MSK) (envelope-from bsam) Message-Id: <200801061503.m06F33nN003091@bb.ipt.ru> Date: Sun, 6 Jan 2008 18:03:03 +0300 (MSK) From: Boris Samorodov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119385: [patch] lang/fpc: refine dealing with configuration file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Boris Samorodov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2008 15:10:02 -0000 >Number: 119385 >Category: ports >Synopsis: [patch] lang/fpc: refine dealing with configuration file >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Jan 06 15:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Boris Samorodov >Release: FreeBSD 7.0-PRERELEASE i386 >Organization: InPharmTech, Co. >Environment: System: FreeBSD bb.ipt.ru 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #1: Sat Dec 29 18:52:25 MSK 2007 root@bb.ipt.ru:/usr/obj/usr/src/sys/BB i386 >Description: Well, actually I was trying to build editors/lazarus which failed. Pointyhat shows the same as well. The main reason is that the port lang/fpc does not install a sample configuration file while installing from a package. Thus the compiler (fpc) does not find the needed (paths to) libraries. One minor bug was found at the lang/fpc port: it removes the configuration file unconditionally when the port/pachage is deletted. I propose to patch the script from the distribution so that a sample configuration file is installed (not the configuration file itself). Then the whole remaining logic becomes standard. >How-To-Repeat: Try to compile editors/lazarus. >Fix: . patch the samplecfg script (a new file files/patch-compiler_utils_samplecfg); . fix Makefile and pkg-plist to deal with a configuration file; . bump PORTREVISION. --- fpc.diff begins here --- ? files/patch-compiler_utils_samplecfg Index: Makefile =================================================================== RCS file: /home/pcvs/ports/lang/fpc/Makefile,v retrieving revision 1.26 diff -u -r1.26 Makefile --- Makefile 18 Sep 2007 06:53:23 -0000 1.26 +++ Makefile 6 Jan 2008 14:41:40 -0000 @@ -7,7 +7,7 @@ PORTNAME= fpc PORTVERSION= 2.2.0 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= lang MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/source-${PORTVERSION}/:source \ ftp://planetmirror.com/pub/fpc/dist/source-${PORTVERSION}/:source \ @@ -107,6 +107,9 @@ if [ -e "${PREFIX}/bin/ppc386" ]; then ${RM} -f "${PREFIX}/bin/ppc386"; fi ${LN} -s "${PREFIX}/lib/fpc/${PORTVERSION}/ppc386" "${PREFIX}/bin" ${SH} "${PREFIX}/lib/fpc/${PORTVERSION}/samplecfg" "${PREFIX}/lib/fpc/${PORTVERSION}" "${PREFIX}/etc" + @if [ ! -f ${PREFIX}/etc/fpc.cfg ]; then \ + ${CP} ${PREFIX}/etc/fpc.cfg.sample ${PREFIX}/etc/fpc.cfg; \ + fi @${CAT} ${PKGMESSAGE} .else Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/lang/fpc/pkg-plist,v retrieving revision 1.8 diff -u -r1.8 pkg-plist --- pkg-plist 18 Sep 2007 06:53:23 -0000 1.8 +++ pkg-plist 6 Jan 2008 14:41:40 -0000 @@ -1,6 +1,8 @@ @comment $FreeBSD: ports/lang/fpc/pkg-plist,v 1.8 2007/09/18 06:53:23 acm Exp $ -@unexec rm -f %D/etc/fpc.cfg > /dev/null 2>&1 || true +@unexec if cmp -s %D/etc/fpc.cfg.sample %D/etc/fpc.cfg; then rm -f %D/etc/fpc.cfg; fi +etc/fpc.cfg.sample +@exec if [ ! -f %D/etc/fpc.cfg ] ; then cp -p %D/%F %B/fpc.cfg; fi bin/fpc bin/fpcmkcfg bin/fpcsubst --- fpc.diff ends here --- --- patch-compiler_utils_samplecfg begins here --- --- compiler/utils/samplecfg.orig 2008-01-06 01:17:24.468239657 +0300 +++ compiler/utils/samplecfg 2008-01-06 01:36:20.388869514 +0300 @@ -72,7 +72,7 @@ # Detect if we have write permission in root. if [ -w $sysdir ] ; then echo Write permission in $sysdir. - thefile=$sysdir/fpc.cfg + thefile=$sysdir/fpc.cfg.sample else echo No write premission in $sysdir. thefile=$HOME/.fpc.cfg --- patch-compiler_utils_samplecfg ends here --- WBR -- bsam >Release-Note: >Audit-Trail: >Unformatted: