From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 9 15:50:26 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EFAE16A4D1 for ; Thu, 9 Sep 2004 15:50:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABFB343D53 for ; Thu, 9 Sep 2004 15:50:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i89FoFSk097069 for ; Thu, 9 Sep 2004 15:50:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i89FoFPU097068; Thu, 9 Sep 2004 15:50:15 GMT (envelope-from gnats) Resent-Date: Thu, 9 Sep 2004 15:50:15 GMT Resent-Message-Id: <200409091550.i89FoFPU097068@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, Yen-Ming Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F7AD16A4CE for ; Thu, 9 Sep 2004 15:43:29 +0000 (GMT) Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8993243D41 for ; Thu, 9 Sep 2004 15:43:28 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from localhost (localhost [127.0.0.1]) by utopia.leeym.com (Postfix) with ESMTP id AB7593EAD0B for ; Thu, 9 Sep 2004 23:43:27 +0800 (CST) Received: from utopia.leeym.com ([127.0.0.1]) by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18242-08 for ; Thu, 9 Sep 2004 23:43:20 +0800 (CST) Received: by utopia.leeym.com (Postfix, from userid 1000) id 3C50D3EAD0A; Thu, 9 Sep 2004 23:43:20 +0800 (CST) Message-Id: <20040909154320.3C50D3EAD0A@utopia.leeym.com> Date: Thu, 9 Sep 2004 23:43:20 +0800 (CST) From: Yen-Ming Lee To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/71531: change-request: remove GNU gettext reference files X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Yen-Ming Lee List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 15:50:27 -0000 >Number: 71531 >Category: ports >Synopsis: change-request: remove GNU gettext reference files >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 09 15:50:14 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 5.3-BETA3 i386 >Organization: FreeBSD Taiwan >Environment: System: FreeBSD utopia.leeym.com 5.3-BETA3 FreeBSD 5.3-BETA3 #1: Sun Sep 5 01:06:46 CST 2004 root@utopia.leeym.com:/usr/obj/usr/src/sys/UTOPIA i386 >Description: GNU gettext reference files (*.alias): lib/charset.alias share/locale/locale.alias If a port depends on gettext library, it may requires some reference files. During installatin, the port will register itself in these reference files, however it won't be unregistered when deinstalling. add add-plist-intl target in bsd.port.mk to deal with these files: 1. unregister the port from the reference files. 2. if the port is the last one using it, then remove the reference files. >How-To-Repeat: http://pointyhat.freebsd.org/errorlogs/i386-5-full-logs/extras.html (anubis, beaver, coreutils, doc++, elinks, gnuls, minicom.....) >Fix: --- add-plist-intl.diff begins here --- Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.497 diff -u -r1.497 bsd.port.mk --- bsd.port.mk 3 Aug 2004 19:03:58 -0000 1.497 +++ bsd.port.mk 9 Sep 2004 15:16:27 -0000 @@ -1383,6 +1383,7 @@ . else LIB_DEPENDS+= intl.${USE_GETTEXT}:${PORTSDIR}/devel/gettext . endif +USE_REINPLACE= yes .endif .if defined(USE_LINUX) @@ -3555,6 +3556,7 @@ _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ pre-su-install-script do-install post-install \ post-install-script add-plist-info add-plist-docs \ + add-plist-intl \ compress-man run-ldconfig fake-pkg security-check _PACKAGE_DEP= install _PACKAGE_SEQ= package-message pre-package pre-package-script \ @@ -4658,6 +4660,15 @@ .endfor .if !defined(NO_MTREE) @${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST} +.endif + +add-plist-intl: +# Process GNU gettext (libintl) reference files at package deinstall time +.if defined(USE_GETTEXT) +.for f in lib/charset.alias share/locale/locale.alias + @${ECHO_CMD} "@unexec ${REINPLACE_CMD} 's, ${PORTNAME} , ,g' %D/${f} && rm %D/${f}.bak" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec if grep -q '^# Packages using this file: $$' %D/${f}; then rm %D/${f}; else true; fi" >> ${TMPPLIST} +.endfor .endif # Compress (or uncompress) and symlink manpages. --- add-plist-intl.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: