From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ntuyc-0007yu-Uk for garchives@archives.gentoo.org; Tue, 23 Mar 2010 03:40:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60CD6E088A; Tue, 23 Mar 2010 03:40:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3DDCDE088A for ; Tue, 23 Mar 2010 03:40:20 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id DFABB67950 for ; Tue, 23 Mar 2010 03:40:19 +0000 (UTC) Received: from vapier by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NtuyZ-0004Fy-Ch for gentoo-commits@lists.gentoo.org; Tue, 23 Mar 2010 03:40:19 +0000 From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: eutils.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: eutils.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Message-Id: Sender: Mike Frysinger Date: Tue, 23 Mar 2010 03:40:19 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2a08c1cc-bc2c-4034-b890-7c5860409206 X-Archives-Hash: e2fd6eab3065a7e69c565dee2e91ebd5 vapier 10/03/23 03:40:19 Modified: eutils.eclass Log: make_desktop_entry: let 5th arg take arbitrary fields to append to the = desktop file #310763 by Jim Ramsay Revision Changes Path 1.341 eclass/eutils.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.ecla= ss?rev=3D1.341&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.ecla= ss?rev=3D1.341&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/eutils.ecla= ss?r1=3D1.340&r2=3D1.341 Index: eutils.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v retrieving revision 1.340 retrieving revision 1.341 diff -u -r1.340 -r1.341 --- eutils.eclass 7 Mar 2010 03:00:08 -0000 1.340 +++ eutils.eclass 23 Mar 2010 03:40:18 -0000 1.341 @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.340 2010/03/= 07 03:00:08 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.341 2010/03/= 23 03:40:18 vapier Exp $ =20 # @ECLASS: eutils.eclass # @MAINTAINER: @@ -858,7 +858,7 @@ # Great for making those icons in kde/gnome startmenu ! # Amaze your friends ! Get the women ! Join today ! # -# make_desktop_entry(, [name], [icon], [type], [path]) +# make_desktop_entry(, [name], [icon], [type], [fields]) # # binary: what command does the app run with ? # name: the name that will show up in the menu @@ -867,15 +867,15 @@ # a full path to an icon # type: what kind of application is this ? for categories: # http://standards.freedesktop.org/menu-spec/latest/apa.html -# path: if your app needs to startup in a specific dir +# fields: extra fields to append to the desktop file; a printf string make_desktop_entry() { - [[ -z $1 ]] && eerror "make_desktop_entry: You must specify the executa= ble" && return 1 + [[ -z $1 ]] && die "make_desktop_entry: You must specify the executable= " =20 local exec=3D${1} local name=3D${2:-${PN}} local icon=3D${3:-${PN}} local type=3D${4} - local path=3D${5} + local fields=3D${5} =20 if [[ -z ${type} ]] ; then local catmaj=3D${CATEGORY%%-*} @@ -1028,7 +1028,12 @@ Categories=3D${type} EOF =20 - [[ ${path} ]] && echo "Path=3D${path}" >> "${desktop}" + if [[ ${fields:-=3D} !=3D *=3D* ]] ; then + # 5th arg used to be value to Path=3D + ewarn "make_desktop_entry: update your 5th arg to read Path=3D${fields= }" + fields=3D"Path=3D${fields}" + fi + [[ -n ${fields} ]] && printf "${fields}\n" >> "${desktop}" =20 ( # wrap the env here so that the 'insinto' call