Bug 197444 - math/gambit: Update to version 14.1.0
Summary: math/gambit: Update to version 14.1.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-08 19:10 UTC by tkato432
Modified: 2015-03-07 00:46 UTC (History)
1 user (show)

See Also:


Attachments
math_gumbit.diff (4.54 KB, patch)
2015-02-08 19:10 UTC, tkato432
no flags Details | Diff
icon-lookup.c (589 bytes, text/plain)
2015-02-21 00:22 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2015-02-08 19:10:05 UTC
Created attachment 152743 [details]
math_gumbit.diff
Comment 1 Jan Beich freebsd_committer freebsd_triage 2015-02-17 05:24:38 UTC
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.
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-02-20 07:04:16 UTC
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
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-02-20 07:08:49 UTC
I'll do a followup commit if there's feedback otherwise close per timeout assuming landed was enough.
Comment 4 tkato432 2015-02-20 20:40:05 UTC
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
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-02-21 00:19:54 UTC
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?
Comment 6 Jan Beich freebsd_committer freebsd_triage 2015-02-21 00:22:26 UTC
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)
Comment 7 Max Brazhnikov freebsd_committer freebsd_triage 2015-02-24 16:42:46 UTC
(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.
Comment 8 tkato432 2015-02-25 14:30:08 UTC
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.
Comment 9 Max Brazhnikov freebsd_committer freebsd_triage 2015-02-25 21:00:05 UTC
(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."
Comment 10 Jan Beich freebsd_committer freebsd_triage 2015-03-07 00:46:08 UTC
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)