From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Sep 25 14:20:03 2010 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 B03211065693 for ; Sat, 25 Sep 2010 14:20:03 +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 71C498FC1D for ; Sat, 25 Sep 2010 14:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8PEK3VU098671 for ; Sat, 25 Sep 2010 14:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8PEK3eu098670; Sat, 25 Sep 2010 14:20:03 GMT (envelope-from gnats) Resent-Date: Sat, 25 Sep 2010 14:20:03 GMT Resent-Message-Id: <201009251420.o8PEK3eu098670@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, Anonymous Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FF21106566B for ; Sat, 25 Sep 2010 14:15:10 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 143748FC13 for ; Sat, 25 Sep 2010 14:15:09 +0000 (UTC) Received: by fxm9 with SMTP id 9so2770900fxm.13 for ; Sat, 25 Sep 2010 07:15:09 -0700 (PDT) Received: by 10.223.107.74 with SMTP id a10mr4949098fap.12.1285424108370; Sat, 25 Sep 2010 07:15:08 -0700 (PDT) Received: from localhost (tor.funk.org [193.37.152.204]) by mx.google.com with ESMTPS id j14sm1513946faa.23.2010.09.25.07.15.06 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Sep 2010 07:15:07 -0700 (PDT) Message-Id: <86y6apewxq.fsf@gmail.com> Date: Sat, 25 Sep 2010 18:10:09 +0400 From: Anonymous To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/150935: [patch] devel/desktop-file-utils: simplify PORT_MIMEDIRS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 14:20:03 -0000 >Number: 150935 >Category: ports >Synopsis: [patch] devel/desktop-file-utils: simplify PORT_MIMEDIRS >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: Sat Sep 25 14:20:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: >Description: - use PREFIX rather than LOCALBASE, for mimeinfo.cache, too (bug) - nuke pkg-install/pkg-deinstall scripts, they're too simple to keep them out of the port's Makefile - drop WANT_GNOME, USE_GNOME already picks up bsd.gnome.mk (cosmetic) - tabify (cosmetic) >How-To-Repeat: >Fix: The patch doesn't need an exp-run, it affects only the port's own plist. --- a.diff begins here --- Index: devel/desktop-file-utils/Makefile =================================================================== RCS file: /a/.cvsup/ports/devel/desktop-file-utils/Makefile,v retrieving revision 1.23 diff -u -p -r1.23 Makefile --- devel/desktop-file-utils/Makefile 31 May 2010 22:52:37 -0000 1.23 +++ devel/desktop-file-utils/Makefile 25 Sep 2010 14:02:25 -0000 @@ -17,34 +17,24 @@ COMMENT= A couple of command line utilit USE_GNOME= glib20 USE_GETTEXT= yes -WANT_GNOME= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --without-lispdir CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" EMACS="no" -PKGINSTALL= ${WRKDIR}/pkg-install -PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +PORT_MIMEDIRS= share/applications -PORT_MIMEDIRS= ${LOCALBASE}/share/applications - -MIMEDIRS= ${PORT_MIMEDIRS} - -RMDIRS= ${PORT_MIMEDIRS} - -post-patch: - @${SED} -e 's|%%MIMEDIRS%%|${MIMEDIRS}| ;\ - s|%%RMDIRS%%|${RMDIRS}| ; \ - s|%%PORT_MIMEDIRS%%|${PORT_MIMEDIRS}|' \ - < ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL} - @${SED} -e 's|%%PORT_MIMEDIRS%%|${PORT_MIMEDIRS}|' \ - < ${FILESDIR}/pkg-install.in > ${PKGINSTALL} +.for d in ${PORT_MIMEDIRS} +PLIST_FILES+= '@rmtry ${d}/mimeinfo.cache' \ + '@dirrmtry ${d}' +.endfor post-install: +.for d in ${PORT_MIMEDIRS} + ${MKDIR} ${PREFIX}/${d} + ${PREFIX}/bin/update-desktop-database ${PREFIX}/${d} +.endfor ${INSTALL_DATA} ${WRKSRC}/misc/desktop-entry-mode.el \ - ${PREFIX}/share/emacs/site-lisp/desktop-entry-mode.el -.if !defined(PACKAGE_BUILDING) - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif + ${PREFIX}/share/emacs/site-lisp/desktop-entry-mode.el .include Index: devel/desktop-file-utils/files/pkg-deinstall.in =================================================================== RCS file: devel/desktop-file-utils/files/pkg-deinstall.in diff -N devel/desktop-file-utils/files/pkg-deinstall.in --- devel/desktop-file-utils/files/pkg-deinstall.in 24 Oct 2007 23:35:04 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/devel/desktop-file-utils/files/pkg-deinstall.in,v 1.4 2007/10/24 23:35:04 marcus Exp $ -# -# Remove leftover mimeinfo.cache files. - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -for mdir in %%MIMEDIRS%%; do - if [ -f ${mdir}/mimeinfo.cache ]; then - rm -f ${mdir}/mimeinfo.cache - fi -done - -for pmdir in $(echo %%RMDIRS%% | sort -r); do - rmdir ${pmdir} 2>/dev/null -done - -exit 0 Index: devel/desktop-file-utils/files/pkg-install.in =================================================================== RCS file: devel/desktop-file-utils/files/pkg-install.in diff -N devel/desktop-file-utils/files/pkg-install.in --- devel/desktop-file-utils/files/pkg-install.in 24 Oct 2007 23:35:04 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,17 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/devel/desktop-file-utils/files/pkg-install.in,v 1.2 2007/10/24 23:35:04 marcus Exp $ -# -# Initialize the desktop directories and MIME cache. - -if [ "$2" != "POST-INSTALL" ]; then - exit 0 -fi - -for pmdir in %%PORT_MIMEDIRS%%; do - mkdir -p ${pmdir} -done - -${PKG_PREFIX}/bin/update-desktop-database -q - -exit 0 --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: