Created attachment 152743 [details] math_gumbit.diff
Comment on attachment 152743 [details] math_gumbit.diff >+post-patch: >+ @${REINPLACE_CMD} -e \ >+ '/^Icon/s|=.*|=${PREFIX}/share/pixmaps/gambit.xpm|' \ >+ ${WRKSRC}/gambit.desktop Do you *not* see the icon without the change? According to the specs relative paths to .xpm should be supported. Otherwise, many more ports would be affected e.g., x11/xterm, multimedia/miro. http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout >+post-install: >+ (cd ${WRKSRC} && ${INSTALL_DATA} gambit.desktop \ >+ ${STAGEDIR}${PREFIX}/share/applications) >+ (cd ${WRKSRC}/src/gui/bitmaps && ${INSTALL_DATA} gambit.xpm \ >+ ${STAGEDIR}${PREFIX}/share/pixmaps) Style nit: avoid `cd' for installing only one file in each directory.
A commit references this bug: Author: jbeich Date: Fri Feb 20 07:03:44 UTC 2015 New revision: 379413 URL: https://svnweb.freebsd.org/changeset/ports/379413 Log: - Update to version 14.1.0 - Install .desktop file PR: 197444 Submitted by: tkato432@yahoo.com (modified) Changes: head/math/gambit/Makefile head/math/gambit/distinfo head/math/gambit/pkg-plist
I'll do a followup commit if there's feedback otherwise close per timeout assuming landed was enough.
According to bsd.port.mk, DESKTOP_ENTRIES has to observe the rule as follows: > If set, Icon must be either absolute path (usually > ${PREFIX}/share/pixmaps/${PORTNAME}.png) or icon name > without extension if installed icons follow Icon Theme > Specification. I guess this convention would be applicable to ready-made desktop entry files too. http://svnweb.freebsd.org/ports?view=revision&revision=310870
Max, can you explain the rationale for preferring full path in DESKTOP_ENTRIES for Icon and Exec on FreeBSD? If for clarity only does it include modifying vendor-provided .desktop files as well?
Created attachment 153255 [details] icon-lookup.c Here's a simple program to explore how Icon in a .desktop file may be expanded. $ make icon-lookup CFLAGS="`pkg-config gtk+-2.0 --libs --cflags`" $ ./icon-lookup usage: ./icon-lookup icon_theme icon_name size flags $ ./icon-lookup test gambit 0 0 /usr/local/share/pixmaps/gambit.xpm $ ./icon-lookup test gimp 0 0 /usr/local/share/icons/hicolor/16x16/apps/gimp.png $ ./icon-lookup test tigervnc 0 0 /usr/local/share/icons/hicolor/scalable/apps/tigervnc.svg $ ./icon-lookup HighContrast firefox 48 0 /usr/local/share/icons/HighContrast/48x48/apps/firefox.png $ ./icon-lookup test non-existent 0 0 (process:73374): Gtk-CRITICAL **: IA__gtk_icon_info_get_filename: assertion 'icon_info != NULL' failed (null)
(In reply to Jan Beich from comment #5) > Max, can you explain the rationale for preferring full path in > DESKTOP_ENTRIES for Icon and Exec on FreeBSD? Personally I don't any preference until it follows specification. Both ways are legal, I believe relative paths prevail. > If for clarity only does it > include modifying vendor-provided .desktop files as well? If vendor's desktop file is correct I see no reason for "fixing" it.
It seems currently prevailing method for referring single picture file in ${PREFIX}/share/pixmaps/appname.png as menu icon is Icon=appname (without suffix). The original gambit.desktop is also using it. Although it's still unclear to me whether that synax really conforms to XDG specifications, there would probably be an explicit reason for it to be quite common.
(In reply to tkato432 from comment #8) > Although it's still unclear to me whether that synax really conforms > to XDG specifications, there would probably be an explicit reason > for it to be quite common. See http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html description for Icon: "...If the name is an absolute path, the given file will be used. If the name is not an absolute path, the algorithm described in the Icon Theme Specification will be used to locate the icon."
Feedback suggests no further action for math/gambit is required here. Maybe file a separate bug about DESKTOP_ENTRIES. Here're a few ideas: - clear up confusing points in the documentation - [hard] document how to debug common fields in .desktop files in order to help digesting the specs without installing full-blown DE - convert to relative paths, mainly share/pixmaps - drop unsupported icon formats (e.g. *.ico)