Bug 143296 - editors/py-room: desktop file should be patched
Summary: editors/py-room: desktop file should be patched
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 16:50 UTC by Anatoly Borodin
Modified: 2010-02-17 17:10 UTC (History)
0 users

See Also:


Attachments
file.txt (1.50 KB, text/plain)
2010-01-27 16:50 UTC, Anatoly Borodin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anatoly Borodin 2010-01-27 16:50:02 UTC
The desktop file contains Linux-style path for the icon and the executable. See possible patch.

Or should DESKTOP_ENTRIES be used instead?

Fix: Patch attached with submission follows:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-01-27 18:35:06 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

ports PR.
Comment 2 Alexander Best 2010-02-07 14:19:06 UTC
maintainer approves patch.

thanks. :)
alex
Comment 3 Dmitry Marakasov freebsd_committer 2010-02-14 02:43:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 4 Dmitry Marakasov 2010-02-14 03:03:20 UTC
* Alexander Best (alexbestms@wwu.de) wrote:

>  maintainer approves patch.

I'd like to also change LOCALBASE substitutions to PREFIX here -
it's more correct as the PREFIX is where the port is installed,
while LOCALBASE is where is searches for dependencies. Please
approve.

--- pyroom.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/editors/py-room/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	5 Feb 2010 11:36:40 -0000	1.3
+++ Makefile	14 Feb 2010 02:41:59 -0000
@@ -27,8 +27,8 @@
 
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		's|%%PREFIX%%|${PREFIX}|g' \
 			${WRKSRC}/setup.py ${WRKSRC}/PyRoom/preferences.py \
-				${WRKSRC}/PyRoom/gui.py
+			${WRKSRC}/PyRoom/gui.py ${WRKSRC}/pyroom.desktop
 
 .include <bsd.port.mk>
Index: files/patch-PyRoom-gui.py
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/editors/py-room/files/patch-PyRoom-gui.py,v
retrieving revision 1.1
diff -u -r1.1 patch-PyRoom-gui.py
--- files/patch-PyRoom-gui.py	17 Nov 2009 09:12:42 -0000	1.1
+++ files/patch-PyRoom-gui.py	14 Feb 2010 02:42:12 -0000
@@ -5,7 +5,7 @@
          order of preference is homedir, global dir, source dir (if available)"""
          local_directory = os.path.join(data_home, 'pyroom', 'themes')
 -        global_directory = '/usr/share/pyroom/themes' # FIXME: platform
-+        global_directory = '%%LOCALBASE%%/share/pyroom/themes' # FIXME: platform
++        global_directory = '%%PREFIX%%/share/pyroom/themes' # FIXME: platform
          # in case PyRoom is run without installation
          fallback_directory = os.path.join(
              os.path.dirname(os.path.abspath(__file__)),
Index: files/patch-PyRoom-preferences.py
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/editors/py-room/files/patch-PyRoom-preferences.py,v
retrieving revision 1.1
diff -u -r1.1 patch-PyRoom-preferences.py
--- files/patch-PyRoom-preferences.py	17 Nov 2009 09:12:42 -0000	1.1
+++ files/patch-PyRoom-preferences.py	14 Feb 2010 02:42:21 -0000
@@ -5,7 +5,7 @@
          self.data_dir = os.path.join(data_home, 'pyroom')
          self.themes_dir  = os.path.join(self.data_dir, 'themes')
 -        self.global_themes_dir = '/usr/share/pyroom/themes'
-+        self.global_themes_dir = '%%LOCALBASE%%/share/pyroom/themes'
++        self.global_themes_dir = '%%PREFIX%%/share/pyroom/themes'
          # if we are not using a global installation,
          # take the themes directly from sources
          if not os.path.isdir(self.global_themes_dir) :
Index: files/patch-pyroom.desktop
===================================================================
RCS file: files/patch-pyroom.desktop
diff -N files/patch-pyroom.desktop
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-pyroom.desktop	14 Feb 2010 02:40:57 -0000
@@ -0,0 +1,14 @@
+--- pyroom.desktop	2009-04-06 10:32:56.000000000 +0200
++++ pyroom.desktop	2009-04-06 10:32:56.000000000 +0200
+@@ -1,9 +1,9 @@
+ [Desktop Entry]
+ Version=1.0
+ Name=PyRoom
+-Icon=/usr/share/pyroom/pyroom.png
++Icon=%%PREFIX%%/share/pyroom/pyroom.png
+ Comment=Distraction free full-screen text editor
+-Exec=/usr/bin/pyroom %F
++Exec=%%PREFIX%%/bin/pyroom %F
+ Terminal=false
+ Type=Application
+ Categories=GNOME;GTK;Office;
Index: files/patch-setup.py
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/editors/py-room/files/patch-setup.py,v
retrieving revision 1.1
diff -u -r1.1 patch-setup.py
--- files/patch-setup.py	17 Nov 2009 09:12:42 -0000	1.1
+++ files/patch-setup.py	14 Feb 2010 02:42:32 -0000
@@ -7,9 +7,9 @@
 -    ('/usr/share/pyroom/themes', glob.glob('themes/*.theme')),
 -    ('/usr/share/pyroom', ['pyroom.png']),
 -    ('/usr/share/applications', ['pyroom.desktop'])
-+    ('%%LOCALBASE%%/share/pyroom/themes', glob.glob('themes/*.theme')),
-+    ('%%LOCALBASE%%/share/pyroom', ['pyroom.png']),
-+    ('%%LOCALBASE%%/share/applications', ['pyroom.desktop'])
++    ('%%PREFIX%%/share/pyroom/themes', glob.glob('themes/*.theme')),
++    ('%%PREFIX%%/share/pyroom', ['pyroom.png']),
++    ('%%PREFIX%%/share/applications', ['pyroom.desktop'])
      ],
    scripts=['pyroom',],
    cmdclass={'install_data': InstallData},
--- pyroom.patch ends here ---

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru
Comment 5 Alexander Best 2010-02-16 21:19:59 UTC
looking good.

approved. :)

cheers.
alex
Comment 6 Dmitry Marakasov freebsd_committer 2010-02-17 17:06:57 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer 2010-02-17 17:07:02 UTC
amdmi3      2010-02-17 17:06:53 UTC

  FreeBSD ports repository

  Modified files:
    editors/py-room      Makefile 
    editors/py-room/files patch-PyRoom-gui.py 
                          patch-PyRoom-preferences.py 
                          patch-setup.py 
  Added files:
    editors/py-room/files patch-pyroom.desktop 
  Log:
  - Fix paths to icon and executable in .desktop file
  - Fix LOCALBASE/PREFIX misuse
  
  PR:             143296
  Submitted by:   Anatoly Borodin <anatoly.borodin@gmail.com>
  Approved by:    Alexander Best <alexbestms@wwu.de> (maintainer)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.4       +2 -2      ports/editors/py-room/Makefile
  1.2       +1 -1      ports/editors/py-room/files/patch-PyRoom-gui.py
  1.2       +1 -1      ports/editors/py-room/files/patch-PyRoom-preferences.py
  1.1       +14 -0     ports/editors/py-room/files/patch-pyroom.desktop (new)
  1.2       +3 -3      ports/editors/py-room/files/patch-setup.py
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"