Bug#659534: goplay: patch for NMU version 0.4-1.2

Petter Reinholdtsen pere at hungry.com
Sat Feb 11 22:51:49 UTC 2012


Package: goplay
Version: 0.4-1.2
Tags: patch
Severity: wishlist

I've just uploaded an NMU of goplay (version 0.4-1.2) to the 3 day
delayed upload queue.  The complete patch is attached.  It is based on
an NMU I found on mentors, and updated with the BTS reports with
patches that I could find.

This is the changelog:

goplay (0.4-1.2) unstable; urgency=low

  * Non-maintainer upload based on NMU found on mentors.debian.net.
  * Add support for starting installed packages by clicking on the
    screen shot (Closes: #490670).
  * src/pkgbrowser.cpp: Assign the return value from strtol() to an
    unused variable and mark it as unused to avoid compiler warnings
    (Closes: #659100).  Patch from Michael Vogt and Ubuntu.
  * Make enough room for the "Already installed" text (Closes:
    #544532).  Patch by Timo Juhani Lindfors.

 -- Petter Reinholdtsen <pere at debian.org>  Sat, 11 Feb 2012 22:40:08 +0000

goplay (0.4-1.1) unstable; urgency=low

  * Non-maintainer upload.
  * Packaging update:
    - removed dh-buildinfo, autotools-dev
    + added missing build-deps, dh-autotools; build-deps optimised
    + compat and debhelper to version 9
    + default hardening (with the exception of fortify)
    + standards to 3.9.2
    + ept-cache replaced with apt-xapian-index in Depends
      (Closes: #615495 important:"goplay must be run as root at least
       once to function")
      (Closes: #460921 wishlist:"requires manual ept-cache reindex on
       the first start")
    + games-thumbnails moved to Recommends
      (Closes: #470047 wishlist:"please Recommends: games-thumbnails
       instead of Depends")
    + no longer depends on g++-4.5
      (Closes: #654733 important:"non-standard gcc/g++ used for build...")
    + build-time .xpm icon regeneration, no longer ship pre-built icon
      (imagemagick added to build-deps)
  * patch to introduce 'goscience' browser,
    thanks to Frederic Daniel Luc Lehobey
    (Closes: #474603 wishlist:"Please add a goscience browser")
  * debian/copyright:
    + updated list of contributors
    + little correction for DEP-5 compliance

 -- Dmitry Smirnov <onlyjob at member.fsf.org>  Wed, 08 Feb 2012 01:08:17 +1100
-- 
Happy hacking
Petter Reinholdtsen
-------------- next part --------------
diff -Nru goplay-0.4/debian/changelog goplay-0.4/debian/changelog
--- goplay-0.4/debian/changelog	2010-06-25 10:37:46.000000000 +0200
+++ goplay-0.4/debian/changelog	2012-02-11 23:40:31.000000000 +0100
@@ -1,3 +1,46 @@
+goplay (0.4-1.2) unstable; urgency=low
+
+  * Non-maintainer upload based on NMU found on mentors.debian.net.
+  * Add support for starting installed packages by clicking on the
+    screen shot (Closes: #490670).
+  * src/pkgbrowser.cpp: Assign the return value from strtol() to an
+    unused variable and mark it as unused to avoid compiler warnings
+    (Closes: #659100).  Patch from Michael Vogt and Ubuntu.
+  * Make enough room for the "Already installed" text (Closes:
+    #544532).  Patch by Timo Juhani Lindfors.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Sat, 11 Feb 2012 22:40:08 +0000
+
+goplay (0.4-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Packaging update:
+    - removed dh-buildinfo, autotools-dev
+    + added missing build-deps, dh-autotools; build-deps optimised
+    + compat and debhelper to version 9
+    + default hardening (with the exception of fortify)
+    + standards to 3.9.2
+    + ept-cache replaced with apt-xapian-index in Depends
+      (Closes: #615495 important:"goplay must be run as root at least
+       once to function")
+      (Closes: #460921 wishlist:"requires manual ept-cache reindex on
+       the first start")
+    + games-thumbnails moved to Recommends
+      (Closes: #470047 wishlist:"please Recommends: games-thumbnails
+       instead of Depends")
+    + no longer depends on g++-4.5
+      (Closes: #654733 important:"non-standard gcc/g++ used for build...")
+    + build-time .xpm icon regeneration, no longer ship pre-built icon
+      (imagemagick added to build-deps)
+  * patch to introduce 'goscience' browser,
+    thanks to Frederic Daniel Luc Lehobey
+    (Closes: #474603 wishlist:"Please add a goscience browser")
+  * debian/copyright:
+    + updated list of contributors
+    + little correction for DEP-5 compliance
+
+ -- Dmitry Smirnov <onlyjob at member.fsf.org>  Wed, 08 Feb 2012 01:08:17 +1100
+
 goplay (0.4-1) UNRELEASED; urgency=low
 
   [ Peter De Wachter ]
diff -Nru goplay-0.4/debian/clean goplay-0.4/debian/clean
--- goplay-0.4/debian/clean	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/clean	2012-02-07 16:49:34.000000000 +0100
@@ -0,0 +1 @@
+goplay.xpm
diff -Nru goplay-0.4/debian/compat goplay-0.4/debian/compat
--- goplay-0.4/debian/compat	2010-06-25 09:58:22.000000000 +0200
+++ goplay-0.4/debian/compat	2012-02-07 15:08:35.000000000 +0100
@@ -1 +1 @@
-7
+9
diff -Nru goplay-0.4/debian/control goplay-0.4/debian/control
--- goplay-0.4/debian/control	2010-06-25 09:59:44.000000000 +0200
+++ goplay-0.4/debian/control	2012-02-07 16:47:24.000000000 +0100
@@ -6,16 +6,16 @@
  Miriam Ruiz <little_miry at yahoo.es>,
  Enrico Zini <enrico at debian.org>,
  Jonas Smedegaard <dr at jones.dk>
-Build-Depends: debhelper (>= 7.0.50~), autotools-dev,
- g++-4.5 | c++abi2-dev, dh-buildinfo, pkg-config,
- libept-dev (>= 1.0), libept-dev (<< 2),
- libwibble-dev (>= 0.1.9), libwibble-dev (<< 0.2),
- libfltk1.1-dev, fluid
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config,
+ libept-dev, libwibble-dev, libfltk1.1-dev, libtagcoll2-dev
+ ,imagemagick
+#, fluid
+Standards-Version: 3.9.2
 
 Package: goplay
 Architecture: any
-Depends: ept-cache (>= 0.5.11), debtags, games-thumbnails, ${shlibs:Depends}, ${misc:Depends}
+Depends: apt-xapian-index, debtags, ${shlibs:Depends}, ${misc:Depends}
+Recommends: games-thumbnails
 Conflicts: golearn
 Provides: golearn
 Replaces: golearn
@@ -25,7 +25,8 @@
  and libept as the backend for retrieving the data.
  .
  GoPlay! is also a generic yet simple to use DebTags-based package browser.
- Prepackaged browsers GoLearn!, GoAdmin!, GoNet!, GoOffice!, GoSafe!, and
- GoWeb! show applications (and for some of them also documentation) packages
- related to education, administration, network, office, safety and web.  You
- can also roll your own custom browsers using commandline options.
+ Prepackaged browsers GoLearn!, GoAdmin!, GoNet!, GoOffice!, GoSafe!, GoWeb!
+ and GoScience! show applications (and for some of them also documentation)
+ packages related to education, administration, network, office, safety, web
+ and science.  You can also roll your own custom browsers using commandline
+ options.
diff -Nru goplay-0.4/debian/copyright goplay-0.4/debian/copyright
--- goplay-0.4/debian/copyright	2010-06-25 10:25:32.000000000 +0200
+++ goplay-0.4/debian/copyright	2012-02-11 21:25:10.000000000 +0100
@@ -1,4 +1,4 @@
-Format-Specification: http://dep.debian.net/deps/dep5
+Format: http://dep.debian.net/deps/dep5
 
 Files: *
 Copyright:
@@ -18,9 +18,17 @@
 License: CuTest
 
 Files: debian/*
-Copyright: ? 2007, 2008, Miriam Ruiz <little_miry at yahoo.es>
+Copyright: ? 2012       Dmitry Smirnov <onlyjob at member.fsf.org>
+           ? 2008       Jonas Smedegaard <dr at jones.dk>
+           ? 2007-2010  Enrico Zini <enrico at debian.org>
+           ? 2007,2008, Miriam Ruiz <little_miry at yahoo.es>
 License: GPL-2+
 
+Files: libxdgutils/*
+Copyright: ? 2010, 2011, Paulo Zanoni <przanoni at gmail.com>
+License: MIT
+Source: http://gitorious.org/xdg-autostart/
+
 License: GPL-2+
  This package is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
@@ -31,25 +39,47 @@
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
-X-Comment: on Debian systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL-2'.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ version 2 can be found in `/usr/share/common-licenses/GPL-2'.
 
 License: CuTest
  THIS SOFTWARE IS PROVIDED 'AS IS', WITHOUT ANY EXPRESS OR IMPLIED
  WARRANTY. IN NO EVENT WILL THE AUTHORS BE HELD LIABLE FOR ANY DAMAGES
  ARISING FROM THE USE OF THIS SOFTWARE.
-
+ .
  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:
-
+ .
  1. The origin of this software must not be misrepresented; you must not
  claim that you wrote the original software. If you use this software in
  a product, an acknowledgment in the product documentation would be
  appreciated but is not required.
-
+ .
  2. Altered source versions must be plainly marked as such, and must not
  be misrepresented as being the original software.
-
+ .
  3. This notice may not be removed or altered from any source
- distribution.
\ Intet linjeskift ved filafslutning
+ distribution.
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
diff -Nru goplay-0.4/debian/goplay.links goplay-0.4/debian/goplay.links
--- goplay-0.4/debian/goplay.links	2010-06-25 09:50:28.000000000 +0200
+++ goplay-0.4/debian/goplay.links	2012-02-07 16:30:18.000000000 +0100
@@ -4,15 +4,18 @@
 usr/bin/goplay usr/bin/gooffice
 usr/bin/goplay usr/bin/gosafe
 usr/bin/goplay usr/bin/goweb
+usr/bin/goplay usr/bin/goscience
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/golearn.xpm
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/goadmin.xpm
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/gonet.xpm
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/gooffice.xpm
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/gosafe.xpm
 usr/share/pixmaps/goplay.xpm usr/share/pixmaps/goweb.xpm
+usr/share/pixmaps/goplay.xpm usr/share/pixmaps/goscience.xpm
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/golearn.1.gz
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/goadmin.1.gz
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/gonet.1.gz
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/gooffice.1.gz
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/gosafe.1.gz
 usr/share/man/man1/goplay.1.gz usr/share/man/man1/goweb.1.gz
+usr/share/man/man1/goplay.1.gz usr/share/man/man1/goscience.1.gz
diff -Nru goplay-0.4/debian/goplay.xpm goplay-0.4/debian/goplay.xpm
--- goplay-0.4/debian/goplay.xpm	2008-04-23 14:01:14.000000000 +0200
+++ goplay-0.4/debian/goplay.xpm	2012-02-11 23:38:03.000000000 +0100
@@ -1,224 +1,227 @@
 /* XPM */
-static char * goplay_xpm[] = {
-"32 32 189 2",
-"  	c None",
-". 	c #FF8100",
-"+ 	c #FF8200",
-"@ 	c #FFBA00",
-"# 	c #FFC000",
-"$ 	c #FFE600",
-"% 	c #FEFA01",
-"& 	c #FEAD02",
-"* 	c #F36418",
-"= 	c #E55735",
-"- 	c #DE3143",
-"; 	c #E34C38",
-"> 	c #E53733",
-", 	c #D70651",
-"' 	c #D70750",
-") 	c #D80D4F",
-"! 	c #E35338",
-"~ 	c #E8722E",
-"{ 	c #EC8527",
-"] 	c #EA772A",
-"^ 	c #E33038",
-"/ 	c #D80850",
-"( 	c #D90E4D",
-"_ 	c #E45338",
-": 	c #F7CF10",
-"< 	c #FFFE00",
-"[ 	c #FFFF00",
-"} 	c #FFC700",
-"| 	c #FB7408",
-"1 	c #D80A4E",
-"2 	c #F7860F",
-"3 	c #FFFD00",
-"4 	c #FFB100",
-"5 	c #FF8000",
-"6 	c #EA412A",
-"7 	c #D8094F",
-"8 	c #FF8300",
-"9 	c #FF8400",
-"0 	c #FFBF00",
-"a 	c #FFF900",
-"b 	c #FFD200",
-"c 	c #FFCE00",
-"d 	c #EC7A26",
-"e 	c #D70751",
-"f 	c #E23D3A",
-"g 	c #FFE200",
-"h 	c #FFE800",
-"i 	c #FFE900",
-"j 	c #FFA500",
-"k 	c #FFE100",
-"l 	c #FEF802",
-"m 	c #DD2E44",
-"n 	c #DA184B",
-"o 	c #EA8228",
-"p 	c #FEF902",
-"q 	c #FFF600",
-"r 	c #FF9600",
-"s 	c #FF9E00",
-"t 	c #FEFC01",
-"u 	c #F1A91C",
-"v 	c #E66731",
-"w 	c #E9772C",
-"x 	c #EF9C20",
-"y 	c #FBE608",
-"z 	c #EC8C25",
-"A 	c #EE9522",
-"B 	c #FDF104",
-"C 	c #FFB500",
-"D 	c #DB1448",
-"E 	c #ED6123",
-"F 	c #FFBC00",
-"G 	c #FFE300",
-"H 	c #FFFB00",
-"I 	c #EC8A26",
-"J 	c #ED9123",
-"K 	c #FCF004",
-"L 	c #FEFB01",
-"M 	c #FAE00A",
-"N 	c #F5C413",
-"O 	c #FEF503",
-"P 	c #FFD400",
-"Q 	c #FF8500",
-"R 	c #FF9F00",
-"S 	c #DE2341",
-"T 	c #DC2348",
-"U 	c #FDF204",
-"V 	c #F4BD15",
-"W 	c #ED8F24",
-"X 	c #E8742D",
-"Y 	c #FFF100",
-"Z 	c #FF9200",
-"` 	c #FFBD00",
-" .	c #FFF000",
-"..	c #DD2D44",
-"+.	c #E35438",
-"@.	c #E66631",
-"#.	c #FCED06",
-"$.	c #FDF004",
-"%.	c #FEF703",
-"&.	c #FAE209",
-"*.	c #E45836",
-"=.	c #FFFC00",
-"-.	c #FFA900",
-";.	c #FFB200",
-">.	c #DD2C44",
-",.	c #E86E2F",
-"'.	c #FEFA02",
-").	c #E25039",
-"!.	c #F8D70D",
-"~.	c #D70850",
-"{.	c #F1AD1A",
-"].	c #FFCA00",
-"^.	c #FF9100",
-"/.	c #FFD900",
-"(.	c #DD2A45",
-"_.	c #EB8528",
-":.	c #DE3342",
-"<.	c #FCEF05",
-"[.	c #FBE708",
-"}.	c #F2B219",
-"|.	c #DA194B",
-"1.	c #FACE0A",
-"2.	c #FF8B00",
-"3.	c #DC1747",
-"4.	c #EC8826",
-"5.	c #E45936",
-"6.	c #F3B518",
-"7.	c #FEF702",
-"8.	c #DC2646",
-"9.	c #EB8328",
-"0.	c #FDA604",
-"a.	c #E63E32",
-"b.	c #F2AF1A",
-"c.	c #E03F3E",
-"d.	c #F9DA0C",
-"e.	c #EA7E2A",
-"f.	c #E1483C",
-"g.	c #FEBC01",
-"h.	c #FFA200",
-"i.	c #F4C014",
-"j.	c #E24B3A",
-"k.	c #F8D40E",
-"l.	c #F6C612",
-"m.	c #E24E39",
-"n.	c #E35138",
-"o.	c #FCEC06",
-"p.	c #FFEE00",
-"q.	c #FF8900",
-"r.	c #FFD300",
-"s.	c #F8D30E",
-"t.	c #E8722D",
-"u.	c #DE3442",
-"v.	c #E34F38",
-"w.	c #E45B35",
-"x.	c #E03E3E",
-"y.	c #E0413E",
-"z.	c #EF9E1F",
-"A.	c #FFB400",
-"B.	c #F5BF14",
-"C.	c #F2B218",
-"D.	c #F3B418",
-"E.	c #FFDC00",
-"F.	c #FFC100",
-"G.	c #FFBB00",
-"H.	c #FFDB00",
-"I.	c #FFF700",
-"J.	c #FF9C00",
-"K.	c #DD1A44",
-"L.	c #FEBD02",
-"M.	c #FFED00",
-"N.	c #FF8700",
-"O.	c #FFE000",
-"P.	c #FFF800",
-"Q.	c #EC7C25",
-"R.	c #FF8D00",
-"S.	c #FFA700",
-"T.	c #FFC600",
-"U.	c #DA154A",
-"V.	c #EA7A2B",
-"W.	c #FEF603",
-"X.	c #FFC400",
-"Y.	c #FF8600",
-"Z.	c #F48614",
-"`.	c #E9752C",
-" +	c #FBA207",
-".+	c #FCD606",
-"++	c #E9452B",
-"@+	c #DA0F4B",
-"#+	c #FF8800",
-"                                                                ",
-"                          . +                                   ",
-"                          @ #                                   ",
-"                        + $ % &                                 ",
-"                        * = - ; > ,                             ",
-"                      ' ' , , , , , , , , ,                     ",
-"                  , , , , ) ! ~ { ] ^ / , , ,                   ",
-"                , , , ( _ : < [ [ [ } | ' , , ,                 ",
-"                , , 1 2 < [ [ [ [ [ 3 4 5 6 7 , ,     8 8 9 5   ",
-"              , , ,   0 [ [ [ [ [ [ [ a b c d e , f g $ h i j 5 ",
-"            , , ,   8 k [ [ [ [ [ [ [ [ [ [ l m n o p [ [ q r   ",
-"            , 1   + s a [ [ t u v w x y [ [ [ z e A B [ < C     ",
-"          D , E F G H [ [ < I J K [ L M % [ [ N , I O [ P 9     ",
-"      Q R S T U [ [ [ [ [ V W < [ [ [ [ [ [ [ M , X [ Y Z       ",
-"5 . `  .3 ..+.[ [ [ [ [ [ @.#.[ [ [ [ [ $.%.[ &., *.=.-.        ",
-"  5 ;.q [ >.,.[ [ [ [ [ '.).'.[ [ [ [ [ L t [ !.~.{.].          ",
-"      ^./.(._.[ [ [ [ [ t :.<.[ [ [ [ p [.[ [ }.|.1.2.          ",
-"        8 3.4.[ [ [ [ [ [ 5.6.[ [ '.U '.K [ 7.8.9.0.            ",
-"          , a.].H [ [ [ O b.c.<.[ B d.[ [ '.e.f.% g.            ",
-"          , 7   h.h [ [ '.i.I j.k.< [ '.l.m.n.o.[ p.q.          ",
-"            ,     q.r.[ [ < s.t.u.v.w.x.y.z.l [ [ < A.          ",
-"            , ,     # [ [ [ [ B B.C.D.M '.[ [ [ [ [ h Q         ",
-"            , ,     # [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < -.        ",
-"              , ,   # [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ E.        ",
-"              , ,   # [ [ [ [ [ [ a F.G.H.I.< [ [ [ [ H J.      ",
-"                , K.L.[ [ [ [ [ M.J.      N.h.# O.P.< [ c       ",
-"                  e Q.< [ [ [ E.R.                R.S.T.b Q     ",
-"                    U.V.W.=.X.Y.                        5 5     ",
-"                    Z.>.`. +.                                   ",
-"                    @ .+++ at +                                    ",
-"                    Q #+                                        ",
-"                    5                                           "};
+static char *goplay[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 189 2 ",
+"   c #E53733",
+".  c #E63E32",
+"X  c #E33038",
+"o  c #E23D3A",
+"O  c #E03E3E",
+"+  c #E03F3E",
+"@  c #FB7408",
+"#  c #F36418",
+"$  c #EA412A",
+"%  c #E9452B",
+"&  c #E0413E",
+"*  c #E24B3A",
+"=  c #E34C38",
+"-  c #E34F38",
+";  c #E24E39",
+":  c #E1483C",
+">  c #E55735",
+",  c #E45B35",
+"<  c #E45836",
+"1  c #E45936",
+"2  c #E35138",
+"3  c #E25039",
+"4  c #E35338",
+"5  c #E45338",
+"6  c #E35438",
+"7  c #ED6123",
+"8  c #E86E2F",
+"9  c #EC7A26",
+"0  c #EC7C25",
+"q  c #EA772A",
+"w  c #E8722D",
+"e  c #E8722E",
+"r  c #E9752C",
+"t  c #E8742D",
+"y  c #E9772C",
+"u  c #EA7A2B",
+"i  c #EA7E2A",
+"p  c #E66631",
+"a  c #E66731",
+"s  c #DA0F4B",
+"d  c #D8094F",
+"f  c #D80A4E",
+"g  c #D90E4D",
+"h  c #D80D4F",
+"j  c #DC1747",
+"k  c #DD1A44",
+"l  c #DB1448",
+"z  c #DA154A",
+"x  c #DA184B",
+"c  c #DA194B",
+"v  c #D70750",
+"b  c #D70651",
+"n  c #D70751",
+"m  c #D70850",
+"M  c #D80850",
+"N  c #DE2341",
+"B  c #DC2646",
+"V  c #DD2A45",
+"C  c #DD2C44",
+"Z  c #DD2D44",
+"A  c #DD2E44",
+"S  c #DC2348",
+"D  c #DE3143",
+"F  c #DE3342",
+"G  c #DE3442",
+"H  c #FF8000",
+"J  c #FF8100",
+"K  c #FF8200",
+"L  c #FF8300",
+"P  c #FF8400",
+"I  c #FF8500",
+"U  c #FF8600",
+"Y  c #FF8700",
+"T  c #FF8800",
+"R  c #FF8900",
+"E  c #FF8B00",
+"W  c #FF8D00",
+"Q  c #F7860F",
+"!  c #FF9100",
+"~  c #FF9200",
+"^  c #FF9600",
+"/  c #FF9C00",
+"(  c #FF9E00",
+")  c #FF9F00",
+"_  c #F48614",
+"`  c #EF9E1F",
+"'  c #FFA200",
+"]  c orange",
+"[  c #FFA700",
+"{  c #FBA207",
+"}  c #FDA604",
+"|  c #FFA900",
+" . c #FEAD02",
+".. c #FFB100",
+"X. c #FFB200",
+"o. c #FFB400",
+"O. c #FFB500",
+"+. c #FFBA00",
+"@. c #FFBB00",
+"#. c #FFBC00",
+"$. c #FFBD00",
+"%. c #FEBC01",
+"&. c #FFBF00",
+"*. c #FEBD02",
+"=. c #F1AD1A",
+"-. c #F2AF1A",
+";. c #F1A91C",
+":. c #F4BD15",
+">. c #F5BF14",
+",. c #F2B218",
+"<. c #F2B219",
+"1. c #F3B418",
+"2. c #F3B518",
+"3. c #EC8527",
+"4. c #EC8826",
+"5. c #EC8A26",
+"6. c #EC8C25",
+"7. c #ED8F24",
+"8. c #EA8228",
+"9. c #EB8328",
+"0. c #EB8528",
+"q. c #ED9123",
+"w. c #EE9522",
+"e. c #EF9C20",
+"r. c #FFC000",
+"t. c #FFC100",
+"y. c #FFC400",
+"u. c #FFC600",
+"i. c #FFC700",
+"p. c #FFCA00",
+"a. c #FFCE00",
+"s. c #FACE0A",
+"d. c #FFD200",
+"f. c #FFD300",
+"g. c #FFD400",
+"h. c #FCD606",
+"j. c #FFD900",
+"k. c #FFDB00",
+"l. c #FFDC00",
+"z. c #F8D30E",
+"x. c #F8D70D",
+"c. c #F8D40E",
+"v. c #F9DA0C",
+"b. c #F5C413",
+"n. c #F6C612",
+"m. c #F4C014",
+"M. c #F7CF10",
+"N. c #FFE000",
+"B. c #FFE100",
+"V. c #FFE200",
+"C. c #FFE300",
+"Z. c #FFE600",
+"A. c #FFE800",
+"S. c #FFE900",
+"D. c #FFED00",
+"F. c #FFEE00",
+"G. c #FCEF05",
+"H. c #FCEC06",
+"J. c #FCED06",
+"K. c #FAE209",
+"L. c #FAE00A",
+"P. c #FBE608",
+"I. c #FBE708",
+"U. c #FFF000",
+"Y. c #FFF100",
+"T. c #FFF600",
+"R. c #FFF700",
+"E. c #FEF503",
+"W. c #FEF702",
+"Q. c #FEF603",
+"!. c #FEF703",
+"~. c #FCF004",
+"^. c #FDF004",
+"/. c #FDF104",
+"(. c #FDF204",
+"). c #FFF800",
+"_. c #FFF900",
+"`. c #FFFB00",
+"'. c #FEFA01",
+"]. c #FEFB01",
+"[. c #FEF802",
+"{. c #FEF902",
+"}. c #FEFA02",
+"|. c #FFFC00",
+" X c #FFFD00",
+".X c #FEFC01",
+"XX c #FFFE00",
+"oX c yellow",
+"OX c None",
+/* pixels */
+"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOXOXH H OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOXOX at .r.OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOXH A._. .OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOX# > D ;   m OXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXn n n n n n n n n n n OXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXn n n n m 6 e 0.q X M n n n OXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXn n n g 6 M. X X X Xi.@ n n b b OXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXn n f Q  X X X X X X XX.H $ m b n OXOXI H I H OX",
+"OXOXOXOXOXOXOXn n n OX$. X X X X X X X_.d.d.q m n o V.A.A.A.[ H ",
+"OXOXOXOXOXOXn n n OXH V. X X X X X X X X X X}.A l 8.}. X XR.^ OX",
+"OXOXOXOXOXOXn f OXH ) _. X X X;.p u e.I. X X X6.m w./. X XO.OXOX",
+"OXOXOXOXOXl m 7 $.V. X X X X5.7.G. X XL._. X Xb.n 5.(. Xg.OXOXOX",
+"OXOXOXI ) N S (. X X X X X>.7. X X X X X X X XL.n y  XU.~ OXOXOX",
+"H H $.U. XZ 6  X X X X X Xp J. X X X X XG.}. XK.n >  X .OXOXOXOX",
+"OXH X.R. XZ 8  X X X X X X3 }. X X X X X X X Xx.m ;.i.OXOXOXOXOX",
+"OXOXOX~ k.V 0..X X X X X.XG G. X X X X}.I. X X<.c s.R OXOXOXOXOX",
+"OXOXOXOXH c 5..X X X X X X1 2. X X XG.}.G. X}.B 9.} OXOXOXOXOXOX",
+"OXOXOXOXOXb % i. X X X X(.<.& /. XG.v. X X_.i : _.$.OXOXOXOXOXOX",
+"OXOXOXOXOXb M OX[ A. X X}.m.5.* x. X X Xn.3 3 J. XU.R OXOXOXOXOX",
+"OXOXOXOXOXOXb OXOXR d. X X Xc.e G 3 , + & e.}. X X XO.OXOXOXOXOX",
+"OXOXOXOXOXOXb b OXOXr. X X X X/.>.<.2.L. X X X X X XA.I OXOXOXOX",
+"OXOXOXOXOXOXb b OXOXr. X X X X X X X X X X X X X X X X .OXOXOXOX",
+"OXOXOXOXOXOXOXb n OXr. X X X X X X X X X X X X X X X Xl.OXOXOXOX",
+"OXOXOXOXOXOXOXb n OXr. X X X X X X_.r. at .k.R. X X X X X X) OXOXOX",
+"OXOXOXOXOXOXOXOXm k *. X X X X XD.) OXOXOXI [ r.V._. X Xa.OXOXOX",
+"OXOXOXOXOXOXOXOXOXm 0  X X X Xl.W OXOXOXOXOXOXOXOXW [ u.d.I OXOX",
+"OXOXOXOXOXOXOXOXOXOXl u }. Xu.I OXOXOXOXOXOXOXOXOXOXOXOXH H OXOX",
+"OXOXOXOXOXOXOXOXOXOX_ Z y { H OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXr.h.% s OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXI R OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOX@ OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX"
+};
diff -Nru goplay-0.4/debian/goscience.desktop goplay-0.4/debian/goscience.desktop
--- goplay-0.4/debian/goscience.desktop	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/goscience.desktop	2012-02-07 16:31:13.000000000 +0100
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=GoScience!
+GenericName=goscience
+Comment=Science packages browser
+Icon=goscience
+Exec=goscience
+Terminal=false
+Categories=Utility;
+MimeType=
diff -Nru goplay-0.4/debian/patches/clicktorun.patch goplay-0.4/debian/patches/clicktorun.patch
--- goplay-0.4/debian/patches/clicktorun.patch	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/clicktorun.patch	2012-02-11 22:45:16.000000000 +0100
@@ -0,0 +1,2085 @@
+Description: 
+   * Add support for starting installed packages by clicking on the
+     screen shot (Closes: #490670).
+Author: Petter Reinholdtsen <pere at debian.org>
+Bug-Debian: http://bugs.debian.org/490670
+Forwarded: no
+Last-Update: 2012-02-11
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: goplay-0.4/Makefile.am
+===================================================================
+--- goplay-0.4.orig/Makefile.am	2012-02-11 21:12:57.000000000 +0000
++++ goplay-0.4/Makefile.am	2012-02-11 21:26:15.000000000 +0000
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-SUBDIRS = src .
++SUBDIRS = libxdgutils src .
+ 
+ man_MANS = goplay.1
+ 
+Index: goplay-0.4/configure.ac
+===================================================================
+--- goplay-0.4.orig/configure.ac	2012-02-11 21:12:57.000000000 +0000
++++ goplay-0.4/configure.ac	2012-02-11 21:26:15.000000000 +0000
+@@ -15,6 +15,7 @@
+ AC_PROG_CXXCPP
+ AM_PROG_CC_STDC
+ AC_HEADER_STDC
++AC_PROG_RANLIB
+ 
+ dnl Use libtool
+ AM_PROG_LIBTOOL
+@@ -31,6 +32,7 @@
+ 
+ AC_CONFIG_FILES([
+ Makefile
++libxdgutils/Makefile
+ src/Makefile
+ ])
+ AC_OUTPUT
+Index: goplay-0.4/src/pkgbrowser.cpp
+===================================================================
+--- goplay-0.4.orig/src/pkgbrowser.cpp	2012-02-11 21:26:15.000000000 +0000
++++ goplay-0.4/src/pkgbrowser.cpp	2012-02-11 21:26:28.000000000 +0000
+@@ -155,6 +155,7 @@
+ 	{
+ 		int n = VersatileBrowser::lineno(p);
+ 		void *data = VersatileBrowser::data(n);
++		pkgname = (const char*) data;
+ 		//printf("  #%d : \"%s\"\n", n, (const char *)data);
+ 		//fflush(stdout);
+ 
+@@ -510,3 +511,8 @@
+ 	}
+ 	return ret;
+ }
++
++const std::string PackageBrowser::pkg_selected(void) const
++{
++  return pkgname;
++}
+Index: goplay-0.4/src/Makefile.am
+===================================================================
+--- goplay-0.4.orig/src/Makefile.am	2012-02-11 21:12:57.000000000 +0000
++++ goplay-0.4/src/Makefile.am	2012-02-11 21:26:15.000000000 +0000
+@@ -24,7 +24,11 @@
+ 	windows.cpp \
+ 	aux.cpp \
+ 	goplay.cpp
+-goplay_LDFLAGS = $(LIBEPT_LIBS) `fltk-config --ldflags --use-images`
++goplay_LDFLAGS = \
++	`fltk-config --ldflags --use-images`
++goplay_LDADD = \
++	../libxdgutils/libxdgutils.a \
++	$(LIBEPT_LIBS)
+ 
+ manpage_SOURCES = manpage.cpp
+ manpage_LDADD = $(LIBEPT_LIBS)
+Index: goplay-0.4/src/pkgbrowser.h
+===================================================================
+--- goplay-0.4.orig/src/pkgbrowser.h	2012-02-11 21:12:57.000000000 +0000
++++ goplay-0.4/src/pkgbrowser.h	2012-02-11 21:26:15.000000000 +0000
+@@ -32,6 +32,8 @@
+ #include <FL/Fl_Help_View.H>
+ #include <FL/fl_draw.H>
+ 
++#include <string>
++
+ //
+ // Demonstrate how to derive a class extending Fl_Browser with interactively resizable columns
+ // erco 1.10 12/09/2005
+@@ -202,6 +204,7 @@
+ public:
+ 	PackageBrowser(int x, int y, int w, int h, const char *l = NULL);
+ 	virtual ~PackageBrowser();
++	const std::string pkg_selected(void) const;
+ 
+ protected:
+ 	virtual void item_select(void *p, int s=1);
+@@ -212,6 +215,7 @@
+ private:
+ 	const unsigned int num_bar_images;
+ 	Fl_Image *bar_images[2*2];
++	std::string pkgname;
+ };
+ 
+ class PackageView : public Fl_Help_View
+Index: goplay-0.4/src/goplay.cpp
+===================================================================
+--- goplay-0.4.orig/src/goplay.cpp	2012-02-11 21:14:46.000000000 +0000
++++ goplay-0.4/src/goplay.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -42,6 +42,7 @@
+ #include <xapian.h>
+ 
+ #include <iostream>
++#include <fstream>
+ #include <cmath>
+ 
+ #ifdef USE_GETTEXT
+@@ -58,6 +59,8 @@
+ 
+ #include <string.h>
+ 
++#include "libxdgutils/XDGDesktopEntry.h"
++
+ namespace std {
+ 
+ template<typename TAG, typename _Traits>
+@@ -322,6 +325,55 @@
+ 	UpdateUILists(ui);
+ }
+ 
++static void StartPackage(const std::string pkgname)
++{
++	// find desktop file, fork, exec
++  
++	std::vector<std::string> desktoplist;
++
++	std::string pkglistfile =
++	  std::string("/var/lib/dpkg/info/") + pkgname + ".list";
++	std::ifstream pkglist(pkglistfile.c_str());
++	if (pkglist.is_open())
++	  {
++	    while ( pkglist.good() )
++	      {
++		std::string line;
++		std::getline (pkglist,line);
++		if (0 == line.find("/usr/share/applications/")
++		    && 0 < line.find(".desktop")) {
++		  std::cout << line << endl;
++		  desktoplist.push_back(line);
++		}
++	      }
++	    pkglist.close();
++	  }
++	else
++	  std::cout << "Unable to open file" << std::endl; 
++	if (1 == desktoplist.size()) {
++	  std::string desktopfile(desktoplist.back());
++	  std::cout << "Running " << desktopfile << endl;
++	  XDGDesktopEntry entry(desktopfile.c_str());
++	  entry.run("");
++	} else {
++	  std::cout << "Not only one desktop file" << std::endl; 
++	}
++}
++
++static void CallBackScreenshotClick(Fl_Round_Button*, void *data)
++{
++	printf("CallBackScreenshotClick\n"); fflush(stdout);
++	GamesUI& ui = *static_cast<GamesUI*>(data);
++	PackageBrowser *ResultsBrowser = ui.ResultsBrowser;
++	std::string pkgname = ResultsBrowser->pkg_selected();
++	PackageRecord rec(ui.engine->apt().rawRecord(pkgname));
++
++	bool isinstalled = true; // FIXME find way to figure this out
++	if (isinstalled) {
++		StartPackage(pkgname);
++	}
++}
++
+ #if 0
+ static void OnResultsBrowserClick(Fl_Browser*, void *data)
+ {
+@@ -466,9 +518,12 @@
+ 		mainui.InstalledOrNot->value(1); mainui.InstalledOrNot->redraw();
+ 		mainui.engine->setInstalledFilter(Engine::ANY);
+ 
++		mainui.ScreenshotWidget->callback((Fl_Callback*)CallBackScreenshotClick, &mainui);
+ 		mainui.Screenshot(new Fl_PNG_Image(FILE_NO_SCREENSHOT));
+ 		mainui.AboutView->load(HTMLDIR "/about.en.html");
+ 
++		
++
+ 		UpdateUILists(mainui);
+ 
+ 		window->show(argc, (char**)argv);
+Index: goplay-0.4/src/ui.fld
+===================================================================
+--- goplay-0.4.orig/src/ui.fld	2012-02-11 21:26:15.000000000 +0000
++++ goplay-0.4/src/ui.fld	2012-02-11 21:26:28.000000000 +0000
+@@ -63,10 +63,12 @@
+   Function {Screenshot(Fl_Image *img)} {open return_type void
+   } {
+     code {Fl_Image *i=ScreenshotWidget->image();
++  Fl_Callback*callback = ScreenshotWidget->callback();
+   ScreenshotWidget->image(img);
+   if (i != NULL) {
+     delete i;
+   }
++  ScreenshotWidget->callback(callback);
+   ScreenshotWidget->redraw();} {}
+   }
+   Function {CreateMainWindow()} {open
+@@ -121,7 +123,7 @@
+           image {../data/icons/Icon32.png} xywh {340 20 35 35} box NO_BOX
+         }
+       }
+-      Fl_Box ScreenshotWidget {
++      Fl_Button ScreenshotWidget {
+         xywh {385 15 320 240} box FLAT_BOX color 32 selection_color 32
+       }
+       Fl_Browser ResultsBrowser {
+Index: goplay-0.4/libxdgutils/XDGBasedir.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGBasedir.h	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,56 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef XDG_BASEDIR_H
++#define XDG_BASEDIR_H
++
++#include <list>
++#include <string>
++
++class XDGBasedir
++{
++    public:
++	enum XDGVariables {
++	    XDG_DATA_HOME,
++	    XDG_CONFIG_HOME,
++	    XDG_DATA_DIRS,
++	    XDG_CONFIG_DIRS,
++	    XDG_CACHE_HOME,
++	    XDG_RUNTIME_DIR
++	};
++
++	static std::string getVariable(XDGVariables var);
++
++	// checks if XDG_RUNTIME_DIR is compliant with the specification
++	static bool validRuntimeDir();
++
++	static std::list<std::string> findDataFile(const char *fileName);
++	static std::list<std::string> findConfigFile(const char *fileName);
++
++    private:
++	static std::list<std::string> findFile(const char *fileName,
++					       const std::string& userDir,
++					       const std::string& systemDirs);
++};
++
++#endif
+Index: goplay-0.4/libxdgutils/XDGUtils.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGUtils.h	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,67 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef XDG_UTILS_H
++#define XDG_UTILS_H
++
++#include <string>
++
++#define ITERATE_STRTOK_R(s, delim, ptrptr, tokStr) \
++	for(tokStr = strtok_r(s, delim, ptrptr); \
++	    tokStr != NULL; \
++	    tokStr = strtok_r(NULL, delim, ptrptr))
++
++#define ITERATE_ESCAPED_STRTOK_R(s, delim, ptrptr, tokStr) \
++	for(tokStr = XDGUtils::escapedStrTok_r(s, delim, ptrptr); \
++	    tokStr != NULL; \
++	    tokStr = XDGUtils::escapedStrTok_r(NULL, delim, ptrptr))
++
++class XDGUtils
++{
++    public:
++
++	static bool validSemicolonList(const char *list);
++
++	static char *escapedStrTok_r(char *s, const char *delim,
++				     char **ptrptr);
++
++	static bool findFileInPath(const char *fileName,
++				   std::string& fullPath);
++
++	static bool fileExists(const char *filePath);
++
++	enum XDGLogLevel {
++	    Quiet   = 0,
++	    Verbose = 1,
++	    Debug   = 2
++	};
++
++	static void setLogLevel(XDGLogLevel logLevel);
++	static void log(XDGLogLevel logLevel, const char *fmt, ...);
++
++    private:
++	static XDGLogLevel logLevel_;
++
++};
++
++#endif
+Index: goplay-0.4/libxdgutils/XDGAutostart.cpp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGAutostart.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,101 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#include <cstring>
++#include <iostream>
++#include <set>
++
++extern "C" {
++#include <sys/types.h>
++#include <dirent.h>
++}
++
++#include "XDGAutostart.h"
++#include "XDGUtils.h"
++
++static bool strEndsWith(const char *s, const char *substr)
++{
++    size_t i;
++    size_t s_len = strlen(s);
++    size_t substr_len = strlen(substr);
++
++    if (substr_len > s_len)
++	return false;
++
++    for(i = s_len - substr_len; i < s_len; i++)
++	if (s[i] != substr[i - (s_len - substr_len)])
++	    return false;
++
++    return true;
++}
++
++
++void XDGAutostart::run(const char *environment)
++{
++    std::list<std::string> autostartDirs;
++    std::list<std::string>::iterator it;
++
++    std::set<std::string> autostartFiles;
++    DIR *autostartDir;
++    struct dirent *dirEntry;
++
++    autostartDirs = XDGBasedir::findConfigFile("autostart");
++
++    for(it = autostartDirs.begin(); it != autostartDirs.end(); ++it) {
++
++	autostartDir = opendir(it->c_str());
++	if (!autostartDir) {
++	    std::cerr << "Error opening " << *it << " directory\n";
++	    return;
++	}
++
++	while ((dirEntry = readdir(autostartDir))) {
++	    if (strEndsWith(dirEntry->d_name, ".desktop")) {
++		XDGUtils::log(XDGUtils::Verbose, "File found: %s\n",
++			      dirEntry->d_name);
++
++		if (autostartFiles.count(dirEntry->d_name) == 0) {
++		    std::string fullFileName = *it + std::string("/") +
++			std::string(dirEntry->d_name);
++		    runDesktopFile(fullFileName.c_str(), environment);
++		    autostartFiles.insert(dirEntry->d_name);
++		} else {
++		    std::cout << "not running: repeated\n";
++		}
++	    }
++	}
++
++	if (closedir(autostartDir) != 0)
++	    std::cerr << "Error: failed to close dir " << it->c_str() << "\n";
++    }
++}
++
++int XDGAutostart::runDesktopFile(const char *fileName,
++				 const char *environment)
++{
++    XDGDesktopEntry entry(fileName);
++    if (entry.showInEnvironment(environment))
++	return entry.run("");
++
++    return 0;
++}
+Index: goplay-0.4/libxdgutils/Makefile.am
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/Makefile.am	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,35 @@
++# Copyright (c) 2011 Paulo Zanoni
++#
++# Permission is hereby granted, free of charge, to any person obtaining a
++# copy of this software and associated documentation files (the "Software"),
++# to deal in the Software without restriction, including without limitation
++# the rights to use, copy, modify, merge, publish, distribute, sublicense,
++# and/or sell copies of the Software, and to permit persons to whom the
++# Software is furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice (including the next
++# paragraph) shall be included in all copies or substantial portions of the
++# Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++# DEALINGS IN THE SOFTWARE.
++
++noinst_LIBRARIES = libxdgutils.a
++libxdgutils_a_SOURCES = \
++	XDGAutostart.h \
++	XDGAutostart.cpp \
++	XDGBasedir.h \
++	XDGBasedir.cpp \
++	XDGDesktopEntry.h \
++	XDGDesktopEntry.cpp \
++	XDGMenu.h \
++	XDGMenu.cpp \
++	XDGUtils.h \
++	XDGUtils.cpp
++
++INCLUDES = -I.. $(LIBEPT_CFLAGS) -Wall -Werror -ggdb
+Index: goplay-0.4/libxdgutils/XDGDesktopEntry.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGDesktopEntry.h	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,103 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef XDG_DESKTOP_ENTRY_H
++#define XDG_DESKTOP_ENTRY_H
++
++class XDGDesktopEntry
++{
++    // XXX: todo:
++    //      - improve checks
++    //      - check KDE stuff
++    //      - check X- extensions
++    //      - warn on unexistant keys
++    //      - don't allow localization for non localestring stuff
++    //      - implement a func to write a file
++    public:
++	XDGDesktopEntry(const char *fileName);
++	~XDGDesktopEntry();
++	bool valid();
++	bool showInEnvironment(const char *environment);
++	int run(const char *args);
++
++    private:
++	struct XDGEntry {
++	    char *key;
++	    char *locale;
++	    char *value;
++	    struct XDGEntry *next;
++	};
++
++	enum XDGEntryValueType {
++	    XDGString,
++	    XDGStrings,
++	    XDGLocalestring,
++	    XDGBoolean,
++	    XDGNumeric
++	};
++
++	bool valid_;
++	char *fileName_;
++	char *fileContent_;
++	struct XDGEntry *entries_;
++
++	bool processEntry(char *line);
++	bool storeEntry(struct XDGEntry *entry);
++	bool getEntry(const char *key, const char *locale, const char **value);
++	void validateEntries();
++
++	bool checkValueType(const char *value, XDGEntryValueType type);
++
++
++	// XXX: move all below this line to .cpp file?
++
++	enum XDGTypeMask {
++	    Application = 1,
++	    Link        = 2,
++	    Directory   = 4,
++	    // Old KDE stuff:
++	    ServiceType = 8,
++	    Service     = 16,
++	    FSDevice    = 32,
++	    // Deprecated:
++	    MimeType    = 64,
++	    All         = 127
++	};
++
++	typedef struct {
++	    const char *name;
++	    XDGEntryValueType valueType;
++	    bool required;
++	    XDGTypeMask type;
++	    bool deprecated;
++	    bool (*validValueFunc)(const char *);
++	} XDGEntryDescription;
++
++	static XDGEntryDescription registeredEntries[];
++
++	static bool validExec(const char *execString);
++
++	static int runCommand(const char *commandString);
++};
++
++#endif
+Index: goplay-0.4/libxdgutils/XDGBasedir.cpp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGBasedir.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,147 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#include <cstdlib>
++#include <cstring>
++#include <iostream>
++
++#include "XDGBasedir.h"
++#include "XDGUtils.h"
++
++// XXX: spec mentions these directories, but hardcodes /etc and /usr in the
++//      specification of default directories to be used! Fix spec?
++#ifndef SYSCONFDIR
++#define SYSCONFDIR "/etc"
++#endif
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
++std::string XDGBasedir::getVariable(XDGVariables var)
++{
++    const char *varName;
++    switch(var) {
++	case XDG_DATA_HOME:
++	    varName = "XDG_DATA_HOME";
++	    break;
++	case XDG_CONFIG_HOME:
++	    varName = "XDG_CONFIG_HOME";
++	    break;
++	case XDG_DATA_DIRS:
++	    varName = "XDG_DATA_DIRS";
++	    break;
++	case XDG_CONFIG_DIRS:
++	    varName = "XDG_CONFIG_DIRS";
++	    break;
++	case XDG_CACHE_HOME:
++	    varName = "XDG_CACHE_HOME";
++	    break;
++	case XDG_RUNTIME_DIR:
++	    varName = "XDG_RUNTIME_DIR";
++	    break;
++	default:
++	    std::cerr << "Error: undefined variable!\n";
++	    return "";
++    }
++
++    char *varValue = getenv(varName);
++
++    if (varValue)
++	return varValue;
++
++    char *home = NULL;
++    if (var == XDG_DATA_HOME || var == XDG_CONFIG_HOME ||
++	var == XDG_CACHE_HOME) {
++	home = getenv("HOME");
++	if (!home) {
++	    std::cerr << "Error: $HOME is not set!\n";
++	    return "";
++	}
++    }
++
++    std::string ret;
++    switch(var) {
++	case XDG_DATA_HOME:
++	    ret = std::string(home) + "/.local/share";
++	    break;
++	case XDG_CONFIG_HOME:
++	    ret = std::string(home) + "/.config";
++	    break;
++	case XDG_DATA_DIRS:
++	    ret = "/usr/local/share/:/usr/share/";
++	    break;
++	case XDG_CONFIG_DIRS:
++	    // XXX: spec doesn't mention $sysconfdir here!
++	    ret = "/etc/xdg";
++	    break;
++	case XDG_CACHE_HOME:
++	    ret = std::string(home) + "/.cache";
++	    break;
++	case XDG_RUNTIME_DIR:
++	    // "If $XDG_RUNTIME_DIR is not set applications should fall back to
++	    // a replacement directory with similar capabilities and print a
++	    // warning message"
++	    std::cout << "Warning: XDG_RUNTIME_DIR not set\n";
++	    return "";
++    }
++    return ret;
++}
++
++bool XDGBasedir::validRuntimeDir()
++{
++    // XXX: check the spec! there are a lot of things to validate here
++    return true;
++}
++
++std::list<std::string> XDGBasedir::findFile(const char *fileName,
++					    const std::string& userDir,
++					    const std::string& systemDirs)
++{
++    std::list<std::string> ret;
++
++    ret.push_back(std::string(userDir + '/' + fileName));
++
++    char *path = strdup(systemDirs.c_str());
++    char *tokStr, *tokPtr;
++    ITERATE_STRTOK_R(path, ":", &tokPtr, tokStr) {
++	std::string fullPath(std::string(tokStr) + '/' + fileName);
++	if (XDGUtils::fileExists(fullPath.c_str()))
++	    ret.push_back(fullPath);
++    }
++    free(path);
++
++    return ret;
++}
++
++std::list<std::string> XDGBasedir::findDataFile(const char *fileName)
++{
++    return findFile(fileName, getVariable(XDG_DATA_HOME),
++		    getVariable(XDG_DATA_DIRS));
++}
++
++std::list<std::string> XDGBasedir::findConfigFile(const char *fileName)
++{
++    return findFile(fileName, getVariable(XDG_CONFIG_HOME),
++		    getVariable(XDG_CONFIG_DIRS));
++}
++
+Index: goplay-0.4/libxdgutils/XDGMenu.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGMenu.h	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,37 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef XDG_MENU_H
++#define XDG_MENU_H
++
++class XDGMenu
++{
++    public:
++	static bool validCategories(const char *categoriesString);
++	static bool validCategory(const char *category);
++
++	static bool validEnvironments(const char *environmentsString);
++	static bool validEnvironment(const char *environment);
++};
++
++#endif
+Index: goplay-0.4/libxdgutils/XDGUtils.cpp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGUtils.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,112 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#include <cstdlib>
++#include <cstdarg>
++#include <cstdio>
++#include <cstring>
++#include <iostream>
++
++extern "C" {
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++}
++
++#include "XDGUtils.h"
++
++XDGUtils::XDGLogLevel XDGUtils::logLevel_ = Quiet;
++
++bool XDGUtils::validSemicolonList(const char *list)
++{
++    size_t len;
++
++    // Last char must be unescaped ';'
++    len = strlen(list);
++    if (list[len-1] != ';' || list[len-2] == '\\')
++        return false;
++
++    return true;
++}
++
++char *XDGUtils::escapedStrTok_r(char *s, const char *delim,
++				char **ptrptr)
++{
++    char *checkedString;
++    int i;
++
++    if (s)
++	checkedString = s;
++    else
++	checkedString = *ptrptr;
++
++    for(i = 0; checkedString[i] != '\0'; i++) {
++	if (checkedString[i] == '\\')
++	    i++;
++	if (strchr(delim, checkedString[i])) {
++	    checkedString[i] = '\0';
++	    *ptrptr = &checkedString[i+1];
++	    return checkedString;
++	}
++    }
++    return NULL;
++}
++
++bool XDGUtils::findFileInPath(const char *fileName,
++			      std::string& fullPath)
++{
++    char *path = strdup(getenv("PATH"));
++    char *tokStr, *tokPtr;
++
++    ITERATE_STRTOK_R(path, ":", &tokPtr, tokStr) {
++	std::string tmp(std::string(tokStr) + '/' + fileName);
++	if (fileExists(tmp.c_str())) {
++	    fullPath = tmp;
++	    free(path);
++	    return true;
++	}
++    }
++    free(path);
++    return false;
++}
++
++bool XDGUtils::fileExists(const char *filePath)
++{
++    struct stat statBuffer;
++    return (stat(filePath, &statBuffer) == 0);
++}
++
++void XDGUtils::setLogLevel(XDGLogLevel logLevel)
++{
++    logLevel_ = logLevel;
++}
++
++void XDGUtils::log(XDGLogLevel logLevel, const char *fmt, ...)
++{
++    va_list argp;
++    va_start(argp, fmt);
++
++    if (logLevel_ >= logLevel)
++        vprintf(fmt, argp);
++    va_end(argp);
++}
+Index: goplay-0.4/libxdgutils/XDGAutostart.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGAutostart.h	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,40 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef XDG_AUTOSTART_H
++#define XDG_AUTOSTART_H
++
++#include "XDGBasedir.h"
++#include "XDGDesktopEntry.h"
++
++class XDGAutostart
++{
++    public:
++	static void run(const char *environment);
++
++    private:
++	static int runDesktopFile(const char *fileName,
++				  const char *environment);
++};
++
++#endif
+Index: goplay-0.4/libxdgutils/XDGMenu.cpp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGMenu.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,315 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#include <cstdlib>
++#include <cstring>
++#include <iostream>
++
++#include "XDGMenu.h"
++
++#include "XDGUtils.h"
++
++static const char *mainCategories[] = {
++    "AudioVideo",
++    "Audio",
++    "Video",
++    "Development",
++    "Education",
++    "Game",
++    "Graphics",
++    "Network",
++    "Office",
++    "Settings",
++    "System",
++    "Utility",
++    NULL
++};
++
++static const char *additionalCategories[] = {
++    "Building",
++    "Debugger",
++    "IDE",
++    "GUIDesigner",
++    "Profiling",
++    "RevisionControl",
++    "Translation",
++    "Calendar",
++    "ContactManagement",
++    "Database",
++    "Dictionary",
++    "Chart",
++    "Email",
++    "Finance",
++    "FlowChart",
++    "PDA",
++    "ProjectManagement",
++    "Presentation",
++    "Spreadsheet",
++    "WordProcessor",
++    "2DGraphics",
++    "VectorGraphics",
++    "RasterGraphics",
++    "3DGraphics",
++    "Scanning",
++    "OCR",
++    "Photography",
++    "Publishing",
++    "Viewer",
++    "TextTools",
++    "DesktopSettings",
++    "HardwareSettings",
++    "Printing",
++    "PackageManager",
++    "Dialup",
++    "InstantMessaging",
++    "Chat",
++    "IRCClient",
++    "FileTransfer",
++    "HamRadio",
++    "News",
++    "P2P",
++    "RemoteAccess",
++    "Telephony",
++    "TelephonyTools",
++    "VideoConference",
++    "WebBrowser",
++    "WebDevelopment",
++    "Midi",
++    "Mixer",
++    "Sequencer",
++    "Tuner",
++    "TV",
++    "AudioVideoEditing",
++    "Player",
++    "Recorder",
++    "DiscBurning",
++    "ActionGame",
++    "AdventureGame",
++    "ArcadeGame",
++    "BoardGame",
++    "BlocksGame",
++    "CardGame",
++    "KidsGame",
++    "LogicGame",
++    "RolePlaying",
++    "Simulation",
++    "SportsGame",
++    "StrategyGame",
++    "Art",
++    "Construction",
++    "Music",
++    "Languages",
++    "Science",
++    "ArtificialIntelligence",
++    "Astronomy",
++    "Biology",
++    "Chemistry",
++    "ComputerScience",
++    "DataVisualization",
++    "Economy",
++    "Electricity",
++    "Geography",
++    "Geology",
++    "Geoscience",
++    "History",
++    "ImageProcessing",
++    "Literature",
++    "Math",
++    "NumericalAnalysis",
++    "MedicalSoftware",
++    "Physics",
++    "Robotics",
++    "Sports",
++    "ParallelComputing",
++    "Amusement",
++    "Archiving",
++    "Compression",
++    "Electronics",
++    "Emulator",
++    "Engineering",
++    "FileTools",
++    "FileManager",
++    "TerminalEmulator",
++    "Filesystem",
++    "Monitor",
++    "Security",
++    "Accessibility",
++    "Calculator",
++    "Clock",
++    "TextEditor",
++    "Documentation",
++    "Core",
++    "KDE",
++    "GNOME",
++    "GTK",
++    "Qt",
++    "Motif",
++    "Java",
++    "ConsoleOnly",
++    NULL
++};
++
++static const char *reservedCategories[] = {
++    "Screensaver",
++    "TrayIcon",
++    "Applet",
++    "Shell",
++    NULL
++};
++
++static const char *deprecatedCategories[] = {
++    "Application",
++    "Applications",
++    NULL
++};
++
++static const char *environments[] = {
++    "GNOME",
++    "KDE",
++    "LXDE",
++    "ROX",
++    "XFCE",
++    "Old",
++    NULL
++};
++
++bool XDGMenu::validCategories(const char *categoriesString)
++{
++    char *s, *tokPtr, *tokStr;
++    bool mainFound = false;
++    int i;
++
++    // Allow empty categories for now
++    if (!categoriesString)
++	return true;
++
++    if (!XDGUtils::validSemicolonList(categoriesString))
++	return false;
++
++    s = strdup(categoriesString);
++
++    ITERATE_ESCAPED_STRTOK_R(s, ";", &tokPtr, tokStr) {
++	if (!validCategory(tokStr)) {
++	    free(s);
++	    return false;
++	}
++
++	if (!mainFound) {
++	    for(i = 0; mainCategories[i] != NULL; i++) {
++		if (strcmp(tokStr, mainCategories[i]) == 0)
++		    mainFound = true;
++	    }
++	}
++    }
++
++    // "Audio" or "Video" entries require "AudioVideo"
++    char *s2, *tokPtr2, *tokStr2;
++    s2 = strdup(categoriesString);
++    ITERATE_ESCAPED_STRTOK_R(s, ":", &tokPtr, tokStr) {
++	if ((strcmp(tokStr, "Audio") == 0) || (strcmp(tokStr, "Video") == 0)) {
++	    ITERATE_ESCAPED_STRTOK_R(s2, ":", &tokPtr2, tokStr2) {
++		if (strcmp(tokStr2, "AudioVideo") == 0)
++		    goto done;
++	    }
++	    free(s2);
++	    free(s);
++	    std::cerr << "Audio or Video found, but no AudioVideo\n";
++	    return false;
++	}
++    }
++
++done:
++    if (!mainFound)
++	std::cerr << "Main category missing!\n";
++
++    free(s);
++    free(s2);
++    return mainFound;
++    // XXX: the spec suggests that some of the additional categories should only
++    // be used with specific main categories: we should check for this!
++    //
++    // XXX: reserved categories can only be present if we have a OnlyShowIn=
++    // entry in the desktop file!
++}
++
++
++bool XDGMenu::validCategory(const char *category)
++{
++    int i;
++
++    for(i = 0; mainCategories[i] != NULL; i++)
++	if (strcmp(category, mainCategories[i]) == 0)
++	    return true;
++
++    for(i = 0; additionalCategories[i] !=  NULL; i++)
++	if (strcmp(category, additionalCategories[i]) == 0)
++	    return true;
++
++    for(i = 0; reservedCategories[i] !=  NULL; i++)
++	if (strcmp(category, reservedCategories[i]) == 0) {
++	    std::cout << "Warning: reserved category \""
++		      << reservedCategories[i] << "\"\n";
++	    return true;
++	}
++    for(i = 0; deprecatedCategories[i] != NULL; i++)
++	if (strcmp(category, deprecatedCategories[i]) == 0) {
++	    std::cout << "Warning: deprecated category \""
++		      << deprecatedCategories[i] << "\"\n";
++	    return true;
++	}
++    if (category[0] == 'X' && category[1] == '-')
++	return true;
++
++    std::cerr << "Invalid category: " << category << "\n";
++    return false;
++}
++
++bool XDGMenu::validEnvironments(const char *environmentsString)
++{
++    char *s, *tokPtr, *tokStr;
++
++    if (!XDGUtils::validSemicolonList(environmentsString))
++	return false;
++
++    s = strdup(environmentsString);
++
++    ITERATE_ESCAPED_STRTOK_R(s, ";", &tokPtr, tokStr) {
++	if (!validEnvironment(tokStr)) {
++	    free(s);
++	    return false;
++	}
++    }
++
++    free(s);
++    return true;
++}
++
++bool XDGMenu::validEnvironment(const char *environment)
++{
++    int i;
++    for(i = 0; environments[i] != NULL; i++)
++	if (strcmp(environment, environments[i]) == 0)
++	    return true;
++
++    return false;
++}
+Index: goplay-0.4/libxdgutils/XDGDesktopEntry.cpp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ goplay-0.4/libxdgutils/XDGDesktopEntry.cpp	2012-02-11 21:26:15.000000000 +0000
+@@ -0,0 +1,781 @@
++/*
++ * Copyright (c) 2011 Paulo Zanoni
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++
++#include <cassert>
++#include <cstdio>
++#include <cstring>
++#include <cstdlib>
++
++#include <iostream>
++
++extern "C" {
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <fcntl.h>
++}
++
++#include "XDGDesktopEntry.h"
++#include "XDGUtils.h"
++#include "XDGMenu.h"
++
++XDGDesktopEntry::XDGEntryDescription XDGDesktopEntry::registeredEntries[] = {
++    // Note: "Type" is special and treated in a different way
++
++    // name,           valueType,       reqrd, type,        dpctd, valdValFnc
++    //{ "Type",         XDGString,       true,  All,         false, NULL },
++    { "Version",        XDGString,       false, All,         false, NULL },
++    { "Name",           XDGLocalestring, true,  All,         false, NULL },
++    { "GenericName",    XDGLocalestring, false, All,         false, NULL },
++    { "NoDisplay",      XDGBoolean,      false, All,         false, NULL },
++    { "Comment",        XDGLocalestring, false, All,         false, NULL },
++    { "Icon",           XDGLocalestring, false, All,         false, NULL },
++    { "Hidden",         XDGBoolean,      false, All,         false, NULL },
++    { "OnlyShowIn",     XDGStrings,      false, All,         false,
++	XDGMenu::validEnvironments },
++    { "NotShowIn",      XDGStrings,      false, All,         false,
++	XDGMenu::validEnvironments },
++    { "TryExec",        XDGString,       false, Application, false, NULL },
++    { "Exec",           XDGString,       true,  Application, false,
++	validExec },
++    { "Path",           XDGString,       false, Application, false, NULL },
++    { "Terminal",       XDGBoolean,      false, Application, false, NULL },
++    { "MimeType",       XDGStrings,      false, Application, false, NULL },
++    { "Categories",     XDGStrings,      false, Application, false,
++	XDGMenu::validCategories },
++    { "StartupNotify",  XDGBoolean,      false, Application, false, NULL },
++    { "StartupWMClass", XDGString,       false, Application, false, NULL },
++    { "URL",            XDGString,       true,  Link,        false, NULL },
++
++    // Old KDE stuff:
++    // XXX: their valueType is not specified in the spec!
++    //      I'm not sure they're actually considered deprecated...
++    { "ServiceTypes",      XDGLocalestring, false, All,         false, NULL },
++    { "DocPath",           XDGLocalestring, false, All,         false, NULL },
++    { "Keywords",          XDGLocalestring, false, All,         false, NULL },
++    { "InitialPreference", XDGLocalestring, false, All,         false, NULL },
++    { "Dev",               XDGString,       false, FSDevice,    false, NULL },
++    { "FSType",            XDGString,       false, FSDevice,    false, NULL },
++    { "MountPoint",        XDGString,       false, FSDevice,    false, NULL },
++    { "ReadOnly",          XDGBoolean,      false, FSDevice,    false, NULL },
++    { "UnmountIcon",       XDGLocalestring, false, FSDevice,    false, NULL },
++
++    // Really deprecated items
++    // valueType not specified...
++    { "Patterns",        XDGLocalestring, false, MimeType,    true,  NULL },
++    { "DefaultApp",      XDGLocalestring, false, MimeType,    true,  NULL },
++    { "Encoding",        XDGLocalestring, false, All,         true,  NULL },
++    { "MiniIcon",        XDGLocalestring, false, All,         true,  NULL },
++    { "TerminalOptions", XDGLocalestring, false, All,         true,  NULL },
++    { "Protocols",       XDGLocalestring, false, All,         true,  NULL },
++    { "Extensions",      XDGLocalestring, false, All,         true,  NULL },
++    { "BinaryPattern",   XDGLocalestring, false, All,         true,  NULL },
++    { "MapNotify",       XDGLocalestring, false, All,         true,  NULL },
++    { "SwallowTitle",    XDGLocalestring, false, All,         true,  NULL },
++    { "SwallowExec",     XDGString,       false, All,         true,  NULL },
++    { "SortOrder",       XDGStrings,      false, All,         true,  NULL },
++    { "FilePattern",     XDGLocalestring, false, All,         true,  NULL },
++
++
++    // End of list
++    { NULL,             XDGStrings,      false, All,         false, NULL },
++    //{ "",    XDGLocalestring, false, All, false, NULL },
++
++    // XXX: Keys that have a specific set of values (so we need to implement
++    //      validValueFunc):
++    //      - Encoding (deprecated)
++    // XXX: FilePattern actually had its own "regex" type
++    // XXX: We're only 1.0-compliant, so why bother registering deprecated stuff
++    //      here? Maybe we should just fail?
++};
++
++
++XDGDesktopEntry::XDGDesktopEntry(const char *fileName)
++    : valid_(false),
++      fileName_(NULL),
++      fileContent_(NULL),
++      entries_(NULL)
++{
++    struct stat statBuffer;
++    int fd;
++
++    fileName_ = strdup(fileName);
++    assert(fileName_);
++
++    if (stat(fileName_, &statBuffer) != 0) {
++	std::cerr << "Error: can't stat " << fileName_ << "\n";
++	return;
++    }
++
++    // We're going to slurp the whole file, add a few '\0's and point structs to
++    // it.
++    fileContent_ = (char *)malloc(statBuffer.st_size+1);
++    assert(fileContent_);
++    fileContent_[statBuffer.st_size] = '\0';
++
++    fd = open(fileName_, O_RDONLY);
++    if (fd == -1) {
++	std::cerr << "Error: can't open " << fileName_ << "\n";
++	return;
++    }
++
++    ssize_t ret, readed = 0;
++    while (readed < statBuffer.st_size) {
++	ret = read(fd, fileContent_, statBuffer.st_size - readed);
++	if (ret == -1) {
++	    std::cerr << "Error: can't read " << fileName_ << "\n";
++	    return;
++	}
++	readed += ret;
++    }
++
++    if (close(fd) == -1) {
++	std::cerr << "Error: can't close " << fileName_ << "\n";
++	return;
++    }
++
++    XDGUtils::log(XDGUtils::Debug, "File:\n%s\n", fileContent_);
++
++    char *line;
++    int lineNumber = 1;
++    bool desktopEntryGroupFound = false;
++    for(int i = 0; fileContent_[i] != '\0'; i++, lineNumber++) {
++	line = &fileContent_[i];
++
++	if (line[0] == '\n') {
++	    continue;
++	}
++
++	if (line[0] == '#') {
++	    for(; fileContent_[i] != '\n'; i++)
++		;
++	    continue;
++	}
++
++	if (line[0] == '[') {
++	    if (desktopEntryGroupFound) {
++		// We don't care about reading other groups for now.
++		// Later we might parse them and check for correct syntax
++		break;
++	    } else {
++		if (strncmp(line, "[Desktop Entry]\n", 16) == 0) {
++		    desktopEntryGroupFound = true;
++		    for(; fileContent_[i] != '\n'; i++)
++			;
++		    continue;
++		} else {
++		    std::cerr << fileName_ << " error: first group must be "
++			      << "[Desktop Entry]\n";
++		    return;
++		}
++	    }
++	}
++
++	// processEntry will mess with the line, so we better advance now
++	for(; fileContent_[i] != '\n'; i++)
++	    ;
++	if (!processEntry(line)) {
++	    std::cerr << fileName_ << " error: invalid entry at line "
++		      << lineNumber << "\n";
++	    return;
++	}
++    }
++
++    validateEntries();
++}
++
++XDGDesktopEntry::~XDGDesktopEntry()
++{
++    free(fileName_);
++    free(fileContent_);
++    struct XDGEntry *pEntry = entries_;
++    struct XDGEntry *prev;
++
++    while (pEntry != NULL) {
++	prev = pEntry;
++	pEntry = pEntry->next;
++	free(prev);
++    }
++}
++
++bool XDGDesktopEntry::processEntry(char *line)
++{
++    unsigned int i, keyEnd = 0, valueBegin = 0;
++    unsigned int localeBegin = 0, localeEnd = 0;
++    char lastChar;
++
++    struct XDGEntry *entry = (struct XDGEntry*)malloc(sizeof(struct XDGEntry));
++    assert(entry);
++
++    // Look for the key
++    for(i = 0; line[i] != '\n' && line[i] != '\0'; i++) {
++	if (!isalnum(line[i]) && line[i] != '-') {
++	    keyEnd = i;
++	    break;
++	}
++    }
++
++    if (keyEnd == 0) {
++	free(entry);
++	return false;
++    }
++
++    lastChar = line[keyEnd];
++    line[keyEnd] = '\0';
++    entry->key = &line[0];
++    XDGUtils::log(XDGUtils::Debug, "key[%s]\n", entry->key);
++    i++;
++
++    // Check for localized entries
++    if (lastChar == '[') {
++	localeBegin = i;
++	for(; line[i] != '\n' && line[i] != '\0'; i++) {
++	    if (line[i] == ']') {
++		localeEnd = i;
++		i++;
++		break;
++	    }
++	}
++	if (localeEnd != 0) {
++	    lastChar = line[localeEnd];
++	    line[localeEnd] = '\0';
++	    entry->locale = &line[localeBegin];
++	} else {
++	    free(entry);
++	    return false;
++	}
++    } else {
++	entry->locale = NULL;
++    }
++
++    if (entry->locale)
++	XDGUtils::log(XDGUtils::Debug, "locale[%s]\n", entry->locale);
++    else
++	XDGUtils::log(XDGUtils::Debug, "locale[NULL]\n");
++
++    // Now eat spaces until the '=' char
++    if (lastChar != '=') {
++	for(; line[i] != '\n' && line[i] != '\0'; i++) {
++	    if (!isspace(line[i]))
++		break;
++	}
++	if (line[i] != '=') {
++	    std::cerr << fileName_ << " error: '=' expected, but found '"
++		      << line[i] << "'\n";
++	    free(entry);
++	    return false;
++	} else {
++	    i++;
++	}
++    }
++
++    // Now eat spaces until the value starts
++    for(; line[i] != '\n' && line[i] != '\0'; i++) {
++	if (!isspace(line[i])) {
++	    valueBegin = i;
++	    break;
++	}
++    }
++
++    if (line[i] == '\n' || line[i] == '\0' ||
++	line[valueBegin] == '\n' || line[valueBegin] == '\0') {
++	// Although the spec doesn't mention, there are desktop files with
++	// empty values
++	entry->value = NULL;
++    } else {
++	entry->value = &line[valueBegin];
++	for(; line[i] != '\n' && line[i] != '\0'; i++)
++	    ;
++	line[i] = '\0';
++    }
++
++    if (entry->value)
++	XDGUtils::log(XDGUtils::Debug, "value[%s]\n", entry->value);
++    else
++	XDGUtils::log(XDGUtils::Debug, "value[NULL]\n");
++
++    return storeEntry(entry);
++}
++
++bool XDGDesktopEntry::storeEntry(struct XDGEntry *entry)
++{
++    struct XDGEntry *pEntry;
++
++    entry->next = NULL;
++
++    if (entries_ == NULL) {
++	entries_ = entry;
++	return true;
++    }
++    pEntry = entries_;
++    while (pEntry->next != NULL) {
++	if (strcmp(entry->key, pEntry->key) == 0) {
++	    if (entry->locale == NULL && pEntry->locale == NULL) {
++		std::cerr << fileName_ << " error: key " << entry->key
++			  << "already stored!\n";
++		return false;
++	    }
++
++	    if (!(entry->locale == NULL || pEntry->locale == NULL)) {
++		if (strcmp(entry->locale, pEntry->locale) == 0) {
++		    std::cerr << fileName_ << " error: key " << entry->key
++			      << "[" << entry->locale  << "] already stored!\n";
++		    return false;
++		}
++	    }
++
++	}
++	pEntry = pEntry->next;
++    }
++
++    pEntry->next = entry;
++    return true;
++}
++
++bool XDGDesktopEntry::getEntry(const char *key, const char *locale,
++			       const char **value)
++{
++    struct XDGEntry *pEntry;
++
++    pEntry = entries_;
++    while (pEntry != NULL) {
++	if (strcmp(pEntry->key, key) == 0) {
++	    if ((pEntry->locale == NULL && locale == NULL) ||
++		(strcmp(pEntry->locale, locale) == 0)) {
++		*value = pEntry->value;
++		return true;
++	    }
++	}
++	pEntry = pEntry->next;
++    }
++    return false;
++}
++
++void XDGDesktopEntry::validateEntries()
++{
++    int i;
++    char *key = NULL;
++    char *locale;
++    const char *value;
++    XDGTypeMask type;
++
++    valid_ = false;
++
++    if (!getEntry("Type", NULL, &value)) {
++	std::cerr << fileName_ << " error: \"Type\" key not found!\n";
++	return;
++    } else {
++	if (strcmp(value, "Application") == 0)
++	    type = Application;
++	else if (strcmp(value, "Link") == 0)
++	    type = Link;
++	else if (strcmp(value, "Directory") == 0)
++	    type = Directory;
++	else if (strcmp(value, "ServiceType") == 0)
++	    type = ServiceType;
++	else if (strcmp(value, "Service") == 0)
++	    type = Service;
++	else if (strcmp(value, "FSDevice") == 0)
++	    type = FSDevice;
++	else if (strcmp(value, "MimeType") == 0) {
++	    type = MimeType;
++	    std::cerr << fileName_
++		      << " error: type \"MimeType\" is deprecated!\n";
++	} else {
++	    std::cerr << fileName_ << " error: invalid type!\n";
++	    return;
++	}
++    }
++
++    // For each key we have, compare against the registered ones
++    struct XDGEntry *pEntry;
++    for(pEntry = entries_; pEntry != NULL; pEntry = pEntry->next) {
++	key = pEntry->key;
++	locale = pEntry->locale;
++	value = pEntry->value;
++
++	if ((key[0] == 'X' && key[1] == '-') || (strcmp(key, "Type") == 0))
++	    continue;
++
++	bool found = false;
++	for(i = 0; registeredEntries[i].name != NULL; i++) {
++	    if (strcmp(registeredEntries[i].name, key) != 0)
++		continue;
++
++	    found = true;
++
++	    if (!(registeredEntries[i].type & type)) {
++		std::cerr << fileName_ << " error: key " << key
++			  << " invalid for this type\n";
++		return;
++	    }
++
++	    if (locale != NULL &&
++		registeredEntries[i].valueType != XDGLocalestring) {
++		std::cerr << fileName_ << " error: only localestring can "
++			  << "have localized values\n";
++		return;
++	    }
++
++	    if (!checkValueType(value, registeredEntries[i].valueType)) {
++		std::cerr << fileName_ << " error: invalid value "
++			  << value << " for type\n";
++		return;
++	    }
++
++	    if (registeredEntries[i].deprecated)
++		std::cerr << fileName_ << " warning: key " << key
++			  << " is deprecated\n";
++
++	    if (registeredEntries[i].validValueFunc != NULL) {
++		if (!(registeredEntries[i].validValueFunc)(value)) {
++		    std::cerr << fileName_ << " error: invalid value " << value
++			      << "\n";
++		    return;
++		}
++	    }
++
++	    break;
++	}
++	if (!found) {
++	    std::cerr << fileName_ << " error: key " << key
++		      << " is not registered\n";
++	    return;
++	}
++
++    }
++
++    // Now find missing required keys
++    for(i = 0; registeredEntries[i].name != NULL; i++) {
++	if (!registeredEntries[i].type & type)
++	    continue;
++
++	if (registeredEntries[i].required) {
++	    if (!getEntry(key, NULL, &value)) {
++		std::cerr << fileName_ << " error: key " << key
++			  << " entry required but not found\n";
++		return;
++	    }
++	}
++    }
++
++
++    if (getEntry("OnlyShowIn", NULL, &value) &&
++	getEntry("NotShowIn", NULL, &value)) {
++	std::cerr << fileName_ << " error: only one of OnlyShowIn or "
++		  << "NotShowIn is allowed\n";
++	return;
++    }
++
++    // XXX: this way, we only check for the "defined" entries. Anything else is
++    //      just ignored! Shouldn't we fail for unknown entries?
++
++
++    valid_ = true;
++}
++
++bool XDGDesktopEntry::checkValueType(const char *value, XDGEntryValueType type)
++{
++    unsigned int i;
++
++    // Allow empty values for now
++    if (!value)
++	return true;
++
++    if (type == XDGString) {
++	// "Values of type string may contain all ASCII characters except for
++	// control characters."
++	for(i = 0; value[i] != '\0'; i++)
++	    if (!isascii(value[i]) || iscntrl(value[i]))
++		return false;
++	return true;
++
++    } else if (type == XDGStrings) {
++	char *s, *tokPtr, *tokStr;
++	if (!XDGUtils::validSemicolonList(value))
++	    return false;
++
++	s = strdup(value);
++	ITERATE_ESCAPED_STRTOK_R(s, ";", &tokPtr, tokStr) {
++	    if (!checkValueType(tokStr, XDGString)) {
++		free(s);
++		return false;
++	    }
++	}
++	free(s);
++	return true;
++
++    } else if (type == XDGLocalestring) {
++	// "Values of type localestring are user displayable, and are encoded in
++	// UTF-8."
++	// XXX: implement! check for displayability and utf-8!
++	return true;
++
++    } else if (type == XDGBoolean) {
++	// "Values of type boolean must either be the string true or false."
++	if (strcmp(value, "0") == 0 || strcmp(value, "1") == 0) {
++	    std::cerr << fileName_ << " warning: boolean values \"0\" and "
++		      << "\"1\" are deprecated!\n";
++	    return true;
++	}
++	if ((strcmp(value, "true") != 0) && (strcmp(value, "false") != 0))
++	    return false;
++	else
++	    return true;
++
++    } else if (type == XDGNumeric) {
++	// "Values of type numeric must be a valid floating point number as
++	// recognized by the %f specifier for scanf in the C locale."
++	float tmp;
++	if (sscanf(value, "%f", &tmp) != 1)
++	    return false;
++	else
++	    return true;
++
++    } else {
++	std::cerr << fileName_ << " error: invalid XDGEntryType\n";
++	return false;
++    }
++}
++
++bool XDGDesktopEntry::valid()
++{
++    return valid_;
++}
++
++bool XDGDesktopEntry::showInEnvironment(const char *environment)
++{
++    if (!valid_) {
++	XDGUtils::log(XDGUtils::Verbose,
++		      "%s error: invalid desktop file\n", fileName_);
++	return false;
++    }
++
++    const char *value;
++    char *s, *tokPtr, *tokStr;
++    if (getEntry("OnlyShowIn", NULL, &value)) {
++	s = strdup(value);
++	ITERATE_ESCAPED_STRTOK_R(s, ";", &tokPtr, tokStr) {
++	    if (strcmp(tokStr, environment) == 0) {
++		free(s);
++		return true;
++	    }
++	}
++	XDGUtils::log(XDGUtils::Verbose, "%s not in OnlyShowIn list\n",
++		      fileName_);
++	free(s);
++	return false;
++    } else if (getEntry("NotShowIn", NULL, &value)) {
++	s = strdup(value);
++	ITERATE_ESCAPED_STRTOK_R(s, ";", &tokPtr, tokStr) {
++	    if (strcmp(tokStr, environment) == 0) {
++		XDGUtils::log(XDGUtils::Verbose,
++			      "%s present in NotShowIn list\n", fileName_);
++		free(s);
++		return false;
++
++	    }
++	}
++	free(s);
++	return true;
++    }
++
++    return true;
++}
++
++int XDGDesktopEntry::run(const char *args)
++{
++    const char *value;
++
++    if (!valid_)
++	return 0;
++
++    XDGUtils::log(XDGUtils::Verbose, "%s: --> Running entry!\n", fileName_);
++    std::string executablePath;
++
++    // Test TryExec:
++    if (getEntry("TryExec", NULL, &value)) {
++	XDGUtils::log(XDGUtils::Verbose, "%s: TryExec: %s\n", fileName_, value);
++
++	if (value[0] == '/' || value[0] == '.') {
++	    if (!XDGUtils::fileExists(value)) {
++		XDGUtils::log(XDGUtils::Verbose,
++			      "%s error: TryExec failed: file %s not found\n",
++			      fileName_, value);
++		return 0;
++	    }
++	    executablePath = value;
++	} else {
++	    if (!XDGUtils::findFileInPath(value, executablePath)) {
++		XDGUtils::log(XDGUtils::Verbose,
++			      "%s error: TryExec failed: file %s not found\n",
++			      fileName_, value);
++		return 0;
++	    }
++	}
++	if (access(executablePath.c_str(), X_OK) == -1) {
++	    XDGUtils::log(XDGUtils::Verbose,
++			  "%s TryExec failed: file %s not executable\n",
++			  fileName_, value);
++	    return 0;
++	}
++	XDGUtils::log(XDGUtils::Verbose, "%s: -- TryExec success\n",
++		      fileName_);
++    }
++
++    // Now run the desktop file
++    getEntry("Exec", NULL, &value);
++
++    // XXX: For now, just remove the field codes...
++    std::string commandString;
++    for(unsigned int i = 0; value[i] != '\0'; i++) {
++	if (value[i] == '%') {
++	    i++;
++	    if (value[i] == 'i') {
++		// "The Icon key of the desktop entry expanded as two arguments,
++		// first --icon and then the value of the Icon key. Should not
++		// expand to any arguments if the Icon key is empty or missing."
++		const char *iconValue;
++		if (getEntry("Icon", NULL, &iconValue)) {
++		    commandString += std::string("-- icon ") + iconValue;
++		}
++	    } else if (value[i] == 'c') {
++		// "The translated name of the application as listed in the
++		// appropriate Name key in the desktop entry."
++		// XXX: implement
++	    } else if (value[i] == 'k') {
++		// "The location of the desktop file as either a URI (if for
++		// example gotten from the vfolder system) or a local filename
++		// or empty if no location is known."
++		// XXX: implement
++	    } else {
++		continue;
++	    }
++	}
++	commandString += value[i];
++    }
++
++    commandString += std::string(" ") + args;
++
++    return runCommand(commandString.c_str());
++}
++
++int XDGDesktopEntry::runCommand(const char *commandString)
++{
++    // XXX: use alloca instead of new?
++    unsigned int i, buf_i, j;
++    bool lookingForQuote = false;
++    pid_t pid;
++
++    // "buffer" contains consecutive strings separated by '\0's
++    char *buffer = (char *) alloca(strlen(commandString) * sizeof(char));
++    char *arg = &buffer[0];
++    unsigned int arguments = 0;
++
++    for(i = 0, buf_i = 0; commandString[i] != '\0'; i++) {
++	if (commandString[i] == '\\') {
++	    i++;
++	} else if (commandString[i] == ' ' && (!lookingForQuote)) {
++	    if (!(arg == &buffer[buf_i])) {
++		// Not two consecutive spaces
++		buffer[buf_i] = '\0';
++		arguments++;
++		buf_i++;
++		arg = &buffer[buf_i];
++	    }
++	} else if (commandString[i] == '"') {
++	    lookingForQuote = !lookingForQuote;
++	} else {
++	    buffer[buf_i] = commandString[i];
++	    buf_i++;
++	}
++    }
++    if (arg != &buffer[buf_i]) {
++	buffer[buf_i] = '\0';
++	arguments++;
++    }
++
++    if (lookingForQuote) {
++        std::cerr << "Error: missing quotes\n";
++        return 0;
++    }
++
++    if (arguments == 0) {
++        std::cerr << "Error: empty command\n";
++        return 0;
++    }
++
++    char **c_args = (char **) alloca(sizeof(char *) * arguments+1);
++    char *c_command;
++
++    c_command = buffer;
++    for(i = 0, j = 0; i < arguments; i++) {
++	c_args[i] = &buffer[j];
++	// Skip to the next argument:
++	for(; buffer[j] != '\0'; j++)
++	    ;
++	j++;
++    }
++    c_args[i] = NULL;
++
++    pid = fork();
++    if (pid == 0) {
++        execvp(c_command, c_args);
++        exit(0);
++    }
++
++    return pid;
++}
++
++
++bool XDGDesktopEntry::validExec(const char *execString)
++{
++    bool exclusiveFieldFound = false;
++    for(unsigned int i = 0; execString[i] != '\0'; i++) {
++	if (execString[i] == '%') {
++	    i++;
++	    if (execString[i] == 'f' || execString[i] == 'F' ||
++		execString[i] == 'u' || execString[i] == 'U') {
++		if (exclusiveFieldFound) {
++		    std::cerr << "Error: Exec fields %f, %F, %u "
++			         "or %U are mutually exclusive\n";
++		    return false;
++		} else {
++		    exclusiveFieldFound = true;
++		}
++	    } else if (execString[i] == 'd' || execString[i] == 'D' ||
++		       execString[i] == 'n' || execString[i] == 'N' ||
++		       execString[i] == 'v' || execString[i] == 'm' ) {
++		std::cerr << "Warning: deprecated Exec field code %"
++			  << execString[i] << "\n";
++	    } else if (execString[i] != 'i' && execString[i] != 'c' &&
++		       execString[i] != 'k') {
++		std::cerr << "Error: invalid Exec field %"
++			  << execString[i] << "\n";
++		return false;
++	    }
++	}
++    }
++    return true;
++}
diff -Nru goplay-0.4/debian/patches/generated.patch goplay-0.4/debian/patches/generated.patch
--- goplay-0.4/debian/patches/generated.patch	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/generated.patch	2012-02-11 23:36:35.000000000 +0100
@@ -0,0 +1,2447 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ goplay (0.4-1.2) unstable; urgency=low
+ .
+   * Non-maintainer upload based on NMU found on mentors.debian.net.
+   * Add support for starting installed packages by clicking on the
+     screen shot (Closes: #490670).
+   * src/pkgbrowser.cpp: Assign the return value from strtol() to an
+     unused variable and mark it as unused to avoid compiler warnings
+     (Closes: #659100).  Patch from Michael Vogt and Ubuntu.
+   * Make enough room for the "Already installed" text (Closes:
+     #544532).  Patch by Timo Juhani Lindfors.
+Author: Petter Reinholdtsen <pere at debian.org>
+Bug-Debian: http://bugs.debian.org/490670
+Bug-Debian: http://bugs.debian.org/544532
+Bug-Debian: http://bugs.debian.org/659100
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- goplay-0.4.orig/configure
++++ goplay-0.4/configure
+@@ -1,13 +1,13 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.65 for goplay 0.4.
++# Generated by GNU Autoconf 2.67 for goplay 0.4.
+ #
+ # Report bugs to <Miriam Ruiz <little_miry at yahoo.es>, Enrico Zini <enrico at debian.org>>.
+ #
+ #
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+-# Inc.
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
++# Foundation, Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+@@ -320,7 +320,7 @@ $as_echo X"$as_dir" |
+       test -d "$as_dir" && break
+     done
+     test -z "$as_dirs" || eval "mkdir $as_dirs"
+-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ 
+ 
+ } # as_fn_mkdir_p
+@@ -360,19 +360,19 @@ else
+ fi # as_fn_arith
+ 
+ 
+-# as_fn_error ERROR [LINENO LOG_FD]
+-# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+-# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+-  as_status=$?; test $as_status -eq 0 && as_status=1
+-  if test "$3"; then
+-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+   fi
+-  $as_echo "$as_me: error: $1" >&2
++  $as_echo "$as_me: error: $2" >&2
+   as_fn_exit $as_status
+ } # as_fn_error
+ 
+@@ -683,7 +683,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
+ exec 6>&1
+ 
+ # Name of the host.
+-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+ 
+@@ -764,7 +764,6 @@ LIPO
+ NMEDIT
+ DSYMUTIL
+ lt_ECHO
+-RANLIB
+ AR
+ OBJDUMP
+ LN_S
+@@ -783,6 +782,7 @@ build_vendor
+ build_cpu
+ build
+ LIBTOOL
++RANLIB
+ am__fastdepCC_FALSE
+ am__fastdepCC_TRUE
+ CCDEPMODE
+@@ -963,8 +963,9 @@ do
+   fi
+ 
+   case $ac_option in
+-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+-  *)	ac_optarg=yes ;;
++  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++  *=)   ac_optarg= ;;
++  *)    ac_optarg=yes ;;
+   esac
+ 
+   # Accept the important Cygnus configure options, so we can diagnose typos.
+@@ -1009,7 +1010,7 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: $ac_useropt"
+     ac_useropt_orig=$ac_useropt
+     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+@@ -1035,7 +1036,7 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: $ac_useropt"
+     ac_useropt_orig=$ac_useropt
+     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+@@ -1239,7 +1240,7 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: $ac_useropt"
+     ac_useropt_orig=$ac_useropt
+     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+@@ -1255,7 +1256,7 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: $ac_useropt"
+     ac_useropt_orig=$ac_useropt
+     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+@@ -1285,8 +1286,8 @@ do
+   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+     x_libraries=$ac_optarg ;;
+ 
+-  -*) as_fn_error "unrecognized option: \`$ac_option'
+-Try \`$0 --help' for more information."
++  -*) as_fn_error $? "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information"
+     ;;
+ 
+   *=*)
+@@ -1294,7 +1295,7 @@ Try \`$0 --help' for more information."
+     # Reject names that are not valid shell variable names.
+     case $ac_envvar in #(
+       '' | [0-9]* | *[!_$as_cr_alnum]* )
+-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
++      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+     esac
+     eval $ac_envvar=\$ac_optarg
+     export $ac_envvar ;;
+@@ -1312,13 +1313,13 @@ done
+ 
+ if test -n "$ac_prev"; then
+   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+-  as_fn_error "missing argument to $ac_option"
++  as_fn_error $? "missing argument to $ac_option"
+ fi
+ 
+ if test -n "$ac_unrecognized_opts"; then
+   case $enable_option_checking in
+     no) ;;
+-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
++    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+   esac
+ fi
+@@ -1341,7 +1342,7 @@ do
+     [\\/$]* | ?:[\\/]* )  continue;;
+     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+   esac
+-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
++  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+ 
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -1355,8 +1356,8 @@ target=$target_alias
+ if test "x$host_alias" != x; then
+   if test "x$build_alias" = x; then
+     cross_compiling=maybe
+-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+-    If a cross compiler is detected then cross compile mode will be used." >&2
++    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
++    If a cross compiler is detected then cross compile mode will be used" >&2
+   elif test "x$build_alias" != "x$host_alias"; then
+     cross_compiling=yes
+   fi
+@@ -1371,9 +1372,9 @@ test "$silent" = yes && exec 6>/dev/null
+ ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ ac_ls_di=`ls -di .` &&
+ ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+-  as_fn_error "working directory cannot be determined"
++  as_fn_error $? "working directory cannot be determined"
+ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+-  as_fn_error "pwd does not report name of working directory"
++  as_fn_error $? "pwd does not report name of working directory"
+ 
+ 
+ # Find the source files, if location was not specified.
+@@ -1412,11 +1413,11 @@ else
+ fi
+ if test ! -r "$srcdir/$ac_unique_file"; then
+   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
++  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+ fi
+ ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ ac_abs_confdir=`(
+-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
++	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ 	pwd)`
+ # When building in place, set srcdir=.
+ if test "$ac_abs_confdir" = "$ac_pwd"; then
+@@ -1456,7 +1457,7 @@ Configuration:
+       --help=short        display options specific to this package
+       --help=recursive    display the short help of all the included packages
+   -V, --version           display version information and exit
+-  -q, --quiet, --silent   do not print \`checking...' messages
++  -q, --quiet, --silent   do not print \`checking ...' messages
+       --cache-file=FILE   cache test results in FILE [disabled]
+   -C, --config-cache      alias for \`--cache-file=config.cache'
+   -n, --no-create         do not create output files
+@@ -1630,9 +1631,9 @@ test -n "$ac_init_help" && exit $ac_stat
+ if $ac_init_version; then
+   cat <<\_ACEOF
+ goplay configure 0.4
+-generated by GNU Autoconf 2.65
++generated by GNU Autoconf 2.67
+ 
+-Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -1702,7 +1703,7 @@ $as_echo "$ac_try_echo"; } >&5
+     mv -f conftest.er1 conftest.err
+   fi
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; } >/dev/null && {
++  test $ac_status = 0; } > conftest.i && {
+ 	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ 	 test ! -s conftest.err
+        }; then :
+@@ -1726,10 +1727,10 @@ fi
+ ac_fn_cxx_check_header_mongrel ()
+ {
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++  if eval "test \"\${$3+set}\"" = set; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ fi
+ eval ac_res=\$$3
+@@ -1765,7 +1766,7 @@ if ac_fn_cxx_try_cpp "$LINENO"; then :
+ else
+   ac_header_preproc=no
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+ $as_echo "$ac_header_preproc" >&6; }
+ 
+@@ -1788,17 +1789,15 @@ $as_echo "$as_me: WARNING: $2: see the A
+ $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+-( cat <<\_ASBOX
+-## EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ##
++( $as_echo "## EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ##
+ ## Report this to Miriam Ruiz <little_miry at yahoo.es> ##
+-## EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ##
+-_ASBOX
++## EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE ##"
+      ) | sed "s/^/$as_me: WARNING:     /" >&2
+     ;;
+ esac
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   eval "$3=\$ac_header_compiler"
+@@ -1862,7 +1861,7 @@ ac_fn_cxx_check_header_compile ()
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -1977,7 +1976,7 @@ ac_fn_c_check_header_compile ()
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -2007,7 +2006,7 @@ ac_fn_c_check_func ()
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+ $as_echo_n "checking for $2... " >&6; }
+-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${$3+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -2116,7 +2115,7 @@ This file contains any messages produced
+ running configure, to aid debugging if configure makes a mistake.
+ 
+ It was created by goplay $as_me 0.4, which was
+-generated by GNU Autoconf 2.65.  Invocation command line was
++generated by GNU Autoconf 2.67.  Invocation command line was
+ 
+   $ $0 $@
+ 
+@@ -2226,11 +2225,9 @@ trap 'exit_status=$?
+   {
+     echo
+ 
+-    cat <<\_ASBOX
+-## ---------------- ##
++    $as_echo "## ---------------- ##
+ ## Cache variables. ##
+-## ---------------- ##
+-_ASBOX
++## ---------------- ##"
+     echo
+     # The following way of writing the cache mishandles newlines in values,
+ (
+@@ -2264,11 +2261,9 @@ $as_echo "$as_me: WARNING: cache variabl
+ )
+     echo
+ 
+-    cat <<\_ASBOX
+-## ----------------- ##
++    $as_echo "## ----------------- ##
+ ## Output variables. ##
+-## ----------------- ##
+-_ASBOX
++## ----------------- ##"
+     echo
+     for ac_var in $ac_subst_vars
+     do
+@@ -2281,11 +2276,9 @@ _ASBOX
+     echo
+ 
+     if test -n "$ac_subst_files"; then
+-      cat <<\_ASBOX
+-## ------------------- ##
++      $as_echo "## ------------------- ##
+ ## File substitutions. ##
+-## ------------------- ##
+-_ASBOX
++## ------------------- ##"
+       echo
+       for ac_var in $ac_subst_files
+       do
+@@ -2299,11 +2292,9 @@ _ASBOX
+     fi
+ 
+     if test -s confdefs.h; then
+-      cat <<\_ASBOX
+-## ----------- ##
++      $as_echo "## ----------- ##
+ ## confdefs.h. ##
+-## ----------- ##
+-_ASBOX
++## ----------- ##"
+       echo
+       cat confdefs.h
+       echo
+@@ -2358,7 +2349,12 @@ _ACEOF
+ ac_site_file1=NONE
+ ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+-  ac_site_file1=$CONFIG_SITE
++  # We do not want a PATH search for config.site.
++  case $CONFIG_SITE in #((
++    -*)  ac_site_file1=./$CONFIG_SITE;;
++    */*) ac_site_file1=$CONFIG_SITE;;
++    *)   ac_site_file1=./$CONFIG_SITE;;
++  esac
+ elif test "x$prefix" != xNONE; then
+   ac_site_file1=$prefix/share/config.site
+   ac_site_file2=$prefix/etc/config.site
+@@ -2373,7 +2369,11 @@ do
+     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
+     sed 's/^/| /' "$ac_site_file" >&5
+-    . "$ac_site_file"
++    . "$ac_site_file" \
++      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "failed to load site script $ac_site_file
++See \`config.log' for more details" "$LINENO" 5 ; }
+   fi
+ done
+ 
+@@ -2449,7 +2449,7 @@ if $ac_cache_corrupted; then
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+ $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ fi
+ ## -------------------- ##
+ ## Main body of script. ##
+@@ -2469,16 +2469,22 @@ am__api_version='1.11'
+ 
+ ac_aux_dir=
+ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+-  for ac_t in install-sh install.sh shtool; do
+-    if test -f "$ac_dir/$ac_t"; then
+-      ac_aux_dir=$ac_dir
+-      ac_install_sh="$ac_aux_dir/$ac_t -c"
+-      break 2
+-    fi
+-  done
++  if test -f "$ac_dir/install-sh"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install-sh -c"
++    break
++  elif test -f "$ac_dir/install.sh"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install.sh -c"
++    break
++  elif test -f "$ac_dir/shtool"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/shtool install -c"
++    break
++  fi
+ done
+ if test -z "$ac_aux_dir"; then
+-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
++  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ fi
+ 
+ # These three variables are undocumented and unsupported,
+@@ -2594,11 +2600,11 @@ am_lf='
+ '
+ case `pwd` in
+   *[\\\"\#\$\&\'\`$am_lf]*)
+-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
++    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+ esac
+ case $srcdir in
+   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
++    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+ esac
+ 
+ # Do `set' in a subshell so we don't clobber the current shell's
+@@ -2620,7 +2626,7 @@ if (
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+       # broken ls alias from the environment.  This has actually
+       # happened.  Such a system could not be considered "sane".
+-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
++      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+    fi
+ 
+@@ -2630,7 +2636,7 @@ then
+    # Ok.
+    :
+ else
+-   as_fn_error "newly created file is older than distributed files!
++   as_fn_error $? "newly created file is older than distributed files!
+ Check your system clock" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -2868,7 +2874,7 @@ done
+ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+ set x ${MAKE-make}
+ ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat >conftest.make <<\_ACEOF
+@@ -2876,7 +2882,7 @@ SHELL = /bin/sh
+ all:
+ 	@echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ case `${MAKE-make} -f conftest.make 2>/dev/null` in
+   *@@@%%%=?*=@@@%%%*)
+     eval ac_cv_prog_make_${ac_make}_set=yes;;
+@@ -2910,7 +2916,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"
+   am__isrc=' -I$(srcdir)'
+   # test to see if srcdir already configured
+   if test -f $srcdir/config.status; then
+-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
++    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+   fi
+ fi
+ 
+@@ -2971,7 +2977,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am
+ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+ set x ${MAKE-make}
+ ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+   cat >conftest.make <<\_ACEOF
+@@ -2979,7 +2985,7 @@ SHELL = /bin/sh
+ all:
+ 	@echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ case `${MAKE-make} -f conftest.make 2>/dev/null` in
+   *@@@%%%=?*=@@@%%%*)
+     eval ac_cv_prog_make_${ac_make}_set=yes;;
+@@ -3291,9 +3297,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ as_fn_set_status 77
+-as_fn_error "C++ compiler cannot create executables
+-See \`config.log' for more details." "$LINENO" 5; }; }
++as_fn_error 77 "C++ compiler cannot create executables
++See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+@@ -3335,8 +3340,8 @@ done
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "cannot compute suffix of executables: cannot compile and link
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ rm -f conftest conftest$ac_cv_exeext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+@@ -3393,9 +3398,9 @@ $as_echo "$ac_try_echo"; } >&5
+     else
+ 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "cannot run C++ compiled programs.
++as_fn_error $? "cannot run C++ compiled programs.
+ If you meant to cross compile, use \`--host'.
+-See \`config.log' for more details." "$LINENO" 5; }
++See \`config.log' for more details" "$LINENO" 5 ; }
+     fi
+   fi
+ fi
+@@ -3446,8 +3451,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "cannot compute suffix of object files: cannot compile
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+@@ -3742,7 +3747,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -3758,11 +3763,11 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+   break
+ fi
+@@ -3801,7 +3806,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -3817,18 +3822,18 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ 
+ ac_ext=cpp
+@@ -3889,7 +3894,7 @@ esac
+   done
+ IFS=$as_save_IFS
+   if test -z "$ac_cv_path_GREP"; then
+-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+   fi
+ else
+   ac_cv_path_GREP=$GREP
+@@ -3955,7 +3960,7 @@ esac
+   done
+ IFS=$as_save_IFS
+   if test -z "$ac_cv_path_EGREP"; then
+-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+   fi
+ else
+   ac_cv_path_EGREP=$EGREP
+@@ -4087,8 +4092,7 @@ do :
+   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ "
+-eval as_val=\$$as_ac_Header
+-   if test "x$as_val" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+@@ -4582,7 +4586,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -4598,11 +4602,11 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+   break
+ fi
+@@ -4641,7 +4645,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -4657,18 +4661,18 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+ 
+ else
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ 
+ ac_ext=cpp
+@@ -4977,8 +4981,8 @@ fi
+ 
+ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "no acceptable C compiler found in \$PATH
+-See \`config.log' for more details." "$LINENO" 5; }
++as_fn_error $? "no acceptable C compiler found in \$PATH
++See \`config.log' for more details" "$LINENO" 5 ; }
+ 
+ # Provide some information about the compiler.
+ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+@@ -5459,6 +5463,98 @@ $as_echo "#define STDC_HEADERS 1" >>conf
+ 
+ fi
+ 
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$RANLIB"; then
++  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_RANLIB"; then
++  ac_ct_RANLIB=$RANLIB
++  # Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_RANLIB"; then
++  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_RANLIB="ranlib"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_RANLIB" = x; then
++    RANLIB=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    RANLIB=$ac_ct_RANLIB
++  fi
++else
++  RANLIB="$ac_cv_prog_RANLIB"
++fi
++
+ 
+ case `pwd` in
+   *\ * | *\	*)
+@@ -5487,7 +5583,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
+ 
+ # Make sure we can run config.sub.
+ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+ $as_echo_n "checking build system type... " >&6; }
+@@ -5498,16 +5594,16 @@ else
+ test "x$ac_build_alias" = x &&
+   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ test "x$ac_build_alias" = x &&
+-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
++  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
++  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ 
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+ $as_echo "$ac_cv_build" >&6; }
+ case $ac_cv_build in
+ *-*-*) ;;
+-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+ esac
+ build=$ac_cv_build
+ ac_save_IFS=$IFS; IFS='-'
+@@ -5532,7 +5628,7 @@ else
+   ac_cv_host=$ac_cv_build
+ else
+   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ fi
+ 
+ fi
+@@ -5540,7 +5636,7 @@ fi
+ $as_echo "$ac_cv_host" >&6; }
+ case $ac_cv_host in
+ *-*-*) ;;
+-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+ esac
+ host=$ac_cv_host
+ ac_save_IFS=$IFS; IFS='-'
+@@ -5613,7 +5709,7 @@ esac
+   done
+ IFS=$as_save_IFS
+   if test -z "$ac_cv_path_SED"; then
+-    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
++    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+   fi
+ else
+   ac_cv_path_SED=$SED
+@@ -5692,7 +5788,7 @@ esac
+   done
+ IFS=$as_save_IFS
+   if test -z "$ac_cv_path_FGREP"; then
+-    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+   fi
+ else
+   ac_cv_path_FGREP=$FGREP
+@@ -5808,7 +5904,7 @@ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
++test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+ $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+ if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+@@ -6010,13 +6106,13 @@ if test "${lt_cv_nm_interface+set}" = se
+ else
+   lt_cv_nm_interface="BSD nm"
+   echo "int some_variable = 0;" > conftest.$ac_ext
+-  (eval echo "\"\$as_me:6013: $ac_compile\"" >&5)
++  (eval echo "\"\$as_me:6109: $ac_compile\"" >&5)
+   (eval "$ac_compile" 2>conftest.err)
+   cat conftest.err >&5
+-  (eval echo "\"\$as_me:6016: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++  (eval echo "\"\$as_me:6112: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+   cat conftest.err >&5
+-  (eval echo "\"\$as_me:6019: output\"" >&5)
++  (eval echo "\"\$as_me:6115: output\"" >&5)
+   cat conftest.out >&5
+   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+     lt_cv_nm_interface="MS dumpbin"
+@@ -7222,7 +7318,7 @@ ia64-*-hpux*)
+   ;;
+ *-*-irix6*)
+   # Find out which ABI we are using.
+-  echo '#line 7225 "configure"' > conftest.$ac_ext
++  echo '#line 7321 "configure"' > conftest.$ac_ext
+   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+@@ -8409,7 +8505,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -8425,11 +8521,11 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+   break
+ fi
+@@ -8468,7 +8564,7 @@ else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+   # OK, works on sane cases.  Now check whether nonexistent headers
+   # can be detected and how.
+@@ -8484,11 +8580,11 @@ else
+ ac_preproc_ok=:
+ break
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+ done
+ # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.i conftest.err conftest.$ac_ext
+ if $ac_preproc_ok; then :
+ 
+ else
+@@ -9006,11 +9102,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9009: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:9105: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:9013: \$? = $ac_status" >&5
++   echo "$as_me:9109: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -9345,11 +9441,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9348: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:9444: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:9352: \$? = $ac_status" >&5
++   echo "$as_me:9448: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -9450,11 +9546,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9453: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:9549: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:9457: \$? = $ac_status" >&5
++   echo "$as_me:9553: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -9505,11 +9601,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:9508: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:9604: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:9512: \$? = $ac_status" >&5
++   echo "$as_me:9608: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -11889,7 +11985,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11892 "configure"
++#line 11988 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11985,7 +12081,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11988 "configure"
++#line 12084 "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -12400,7 +12496,7 @@ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
++test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+ $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+ if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+@@ -13941,11 +14037,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:13944: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:14040: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>conftest.err)
+    ac_status=$?
+    cat conftest.err >&5
+-   echo "$as_me:13948: \$? = $ac_status" >&5
++   echo "$as_me:14044: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
+      # So say no if there are warnings other than the usual output.
+@@ -14040,11 +14136,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:14043: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:14139: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:14047: \$? = $ac_status" >&5
++   echo "$as_me:14143: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -14092,11 +14188,11 @@ else
+    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+    -e 's:$: $lt_compiler_flag:'`
+-   (eval echo "\"\$as_me:14095: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:14191: $lt_compile\"" >&5)
+    (eval "$lt_compile" 2>out/conftest.err)
+    ac_status=$?
+    cat out/conftest.err >&5
+-   echo "$as_me:14099: \$? = $ac_status" >&5
++   echo "$as_me:14195: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s out/conftest2.$ac_objext
+    then
+      # The compiler can only warn and ignore the option if not recognized
+@@ -15237,7 +15333,7 @@ fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LIBWIBBLE_PKG_ERRORS" >&5
+ 
+-	as_fn_error "Package requirements (libwibble) were not met:
++	as_fn_error $? "Package requirements (libwibble) were not met:
+ 
+ $LIBWIBBLE_PKG_ERRORS
+ 
+@@ -15252,7 +15348,7 @@ elif test $pkg_failed = untried; then
+ $as_echo "no" >&6; }
+ 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
++as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+ 
+@@ -15261,7 +15357,7 @@ and LIBWIBBLE_LIBS to avoid the need to
+ See the pkg-config man page for more details.
+ 
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+-See \`config.log' for more details." "$LINENO" 5; }
++See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ 	LIBWIBBLE_CFLAGS=$pkg_cv_LIBWIBBLE_CFLAGS
+ 	LIBWIBBLE_LIBS=$pkg_cv_LIBWIBBLE_LIBS
+@@ -15330,7 +15426,7 @@ fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LIBTAGCOLL2_PKG_ERRORS" >&5
+ 
+-	as_fn_error "Package requirements (libtagcoll2) were not met:
++	as_fn_error $? "Package requirements (libtagcoll2) were not met:
+ 
+ $LIBTAGCOLL2_PKG_ERRORS
+ 
+@@ -15345,7 +15441,7 @@ elif test $pkg_failed = untried; then
+ $as_echo "no" >&6; }
+ 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
++as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+ 
+@@ -15354,7 +15450,7 @@ and LIBTAGCOLL2_LIBS to avoid the need t
+ See the pkg-config man page for more details.
+ 
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+-See \`config.log' for more details." "$LINENO" 5; }
++See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ 	LIBTAGCOLL2_CFLAGS=$pkg_cv_LIBTAGCOLL2_CFLAGS
+ 	LIBTAGCOLL2_LIBS=$pkg_cv_LIBTAGCOLL2_LIBS
+@@ -15423,7 +15519,7 @@ fi
+ 	# Put the nasty error message in config.log where it belongs
+ 	echo "$LIBEPT_PKG_ERRORS" >&5
+ 
+-	as_fn_error "Package requirements (libept) were not met:
++	as_fn_error $? "Package requirements (libept) were not met:
+ 
+ $LIBEPT_PKG_ERRORS
+ 
+@@ -15438,7 +15534,7 @@ elif test $pkg_failed = untried; then
+ $as_echo "no" >&6; }
+ 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
++as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+ 
+@@ -15447,7 +15543,7 @@ and LIBEPT_LIBS to avoid the need to cal
+ See the pkg-config man page for more details.
+ 
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+-See \`config.log' for more details." "$LINENO" 5; }
++See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ 	LIBEPT_CFLAGS=$pkg_cv_LIBEPT_CFLAGS
+ 	LIBEPT_LIBS=$pkg_cv_LIBEPT_LIBS
+@@ -15507,7 +15603,7 @@ cat >>confdefs.h <<_ACEOF
+ _ACEOF
+ 
+ 
+-ac_config_files="$ac_config_files Makefile src/Makefile"
++ac_config_files="$ac_config_files Makefile libxdgutils/Makefile src/Makefile"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -15592,6 +15688,7 @@ DEFS=-DHAVE_CONFIG_H
+ 
+ ac_libobjs=
+ ac_ltlibobjs=
++U=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+   # 1. Remove the extension, and $U if already installed.
+   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+@@ -15615,23 +15712,23 @@ else
+ fi
+ 
+ if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+-  as_fn_error "conditional \"AMDEP\" was never defined.
++  as_fn_error $? "conditional \"AMDEP\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
++  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
++  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
++  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
++  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ 
+@@ -15781,19 +15878,19 @@ export LANGUAGE
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
+ 
+-# as_fn_error ERROR [LINENO LOG_FD]
+-# ---------------------------------
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+-# script with status $?, using 1 if that was 0.
++# script with STATUS, using 1 if that was 0.
+ as_fn_error ()
+ {
+-  as_status=$?; test $as_status -eq 0 && as_status=1
+-  if test "$3"; then
+-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+   fi
+-  $as_echo "$as_me: error: $1" >&2
++  $as_echo "$as_me: error: $2" >&2
+   as_fn_exit $as_status
+ } # as_fn_error
+ 
+@@ -15989,7 +16086,7 @@ $as_echo X"$as_dir" |
+       test -d "$as_dir" && break
+     done
+     test -z "$as_dirs" || eval "mkdir $as_dirs"
+-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
++  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+ 
+ 
+ } # as_fn_mkdir_p
+@@ -16043,7 +16140,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
+ # values after options handling.
+ ac_log="
+ This file was extended by goplay $as_me 0.4, which was
+-generated by GNU Autoconf 2.65.  Invocation command line was
++generated by GNU Autoconf 2.67.  Invocation command line was
+ 
+   CONFIG_FILES    = $CONFIG_FILES
+   CONFIG_HEADERS  = $CONFIG_HEADERS
+@@ -16109,10 +16206,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ goplay config.status 0.4
+-configured by $0, generated by GNU Autoconf 2.65,
++configured by $0, generated by GNU Autoconf 2.67,
+   with options \\"\$ac_cs_config\\"
+ 
+-Copyright (C) 2009 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+ 
+@@ -16130,11 +16227,16 @@ ac_need_defaults=:
+ while test $# != 0
+ do
+   case $1 in
+-  --*=*)
++  --*=?*)
+     ac_option=`expr "X$1" : 'X\([^=]*\)='`
+     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+     ac_shift=:
+     ;;
++  --*=)
++    ac_option=`expr "X$1" : 'X\([^=]*\)='`
++    ac_optarg=
++    ac_shift=:
++    ;;
+   *)
+     ac_option=$1
+     ac_optarg=$2
+@@ -16156,6 +16258,7 @@ do
+     $ac_shift
+     case $ac_optarg in
+     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    '') as_fn_error $? "missing file argument" ;;
+     esac
+     as_fn_append CONFIG_FILES " '$ac_optarg'"
+     ac_need_defaults=false;;
+@@ -16168,7 +16271,7 @@ do
+     ac_need_defaults=false;;
+   --he | --h)
+     # Conflict between --help and --header
+-    as_fn_error "ambiguous option: \`$1'
++    as_fn_error $? "ambiguous option: \`$1'
+ Try \`$0 --help' for more information.";;
+   --help | --hel | -h )
+     $as_echo "$ac_cs_usage"; exit ;;
+@@ -16177,7 +16280,7 @@ Try \`$0 --help' for more information.";
+     ac_cs_silent=: ;;
+ 
+   # This is an error.
+-  -*) as_fn_error "unrecognized option: \`$1'
++  -*) as_fn_error $? "unrecognized option: \`$1'
+ Try \`$0 --help' for more information." ;;
+ 
+   *) as_fn_append ac_config_targets " $1"
+@@ -16586,9 +16689,10 @@ do
+     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++    "libxdgutils/Makefile") CONFIG_FILES="$CONFIG_FILES libxdgutils/Makefile" ;;
+     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ 
+-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
++  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+   esac
+ done
+ 
+@@ -16626,7 +16730,7 @@ $debug ||
+ {
+   tmp=./conf$$-$RANDOM
+   (umask 077 && mkdir "$tmp")
+-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ 
+ # Set up the scripts for CONFIG_FILES section.
+ # No need to generate them if there are no CONFIG_FILES.
+@@ -16643,7 +16747,7 @@ if test "x$ac_cr" = x; then
+ fi
+ ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+ if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+-  ac_cs_awk_cr='\r'
++  ac_cs_awk_cr='\\r'
+ else
+   ac_cs_awk_cr=$ac_cr
+ fi
+@@ -16657,18 +16761,18 @@ _ACEOF
+   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+   echo "_ACEOF"
+ } >conf$$subs.sh ||
+-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
++  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   . ./conf$$subs.sh ||
+-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ 
+   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+   if test $ac_delim_n = $ac_delim_num; then
+     break
+   elif $ac_last_try; then
+-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+   else
+     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+   fi
+@@ -16757,20 +16861,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n
+ else
+   cat
+ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
++  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+ _ACEOF
+ 
+-# VPATH may cause trouble with some makes, so we remove $(srcdir),
+-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+-s/:*\$(srcdir):*/:/
+-s/:*\${srcdir}:*/:/
+-s/:*@srcdir@:*/:/
+-s/^\([^=]*=[	 ]*\):*/\1/
++  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
++h
++s///
++s/^/:/
++s/[	 ]*$/:/
++s/:\$(srcdir):/:/g
++s/:\${srcdir}:/:/g
++s/:@srcdir@:/:/g
++s/^:*//
+ s/:*$//
++x
++s/\(=[	 ]*\).*/\1/
++G
++s/\n//
+ s/^[^=]*=[	 ]*$//
+ }'
+ fi
+@@ -16798,7 +16910,7 @@ for ac_last_try in false false :; do
+   if test -z "$ac_t"; then
+     break
+   elif $ac_last_try; then
+-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
++    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+   else
+     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+   fi
+@@ -16883,7 +16995,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
++  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+ fi # test -n "$CONFIG_HEADERS"
+ 
+ 
+@@ -16896,7 +17008,7 @@ do
+   esac
+   case $ac_mode$ac_tag in
+   :[FHL]*:*);;
+-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
++  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+   :[FH]-) ac_tag=-:-;;
+   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+   esac
+@@ -16924,7 +17036,7 @@ do
+ 	   [\\/$]*) false;;
+ 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ 	   esac ||
+-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+       esac
+       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+       as_fn_append ac_file_inputs " '$ac_f'"
+@@ -16951,7 +17063,7 @@ $as_echo "$as_me: creating $ac_file" >&6
+ 
+     case $ac_tag in
+     *:-:* | *:-) cat >"$tmp/stdin" \
+-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
++      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+     esac
+     ;;
+   esac
+@@ -17088,22 +17200,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
+ $ac_datarootdir_hack
+ "
+ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+-  || as_fn_error "could not create $ac_file" "$LINENO" 5
++  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ 
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+-which seems to be undefined.  Please make sure it is defined." >&5
++which seems to be undefined.  Please make sure it is defined" >&5
+ $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+-which seems to be undefined.  Please make sure it is defined." >&2;}
++which seems to be undefined.  Please make sure it is defined" >&2;}
+ 
+   rm -f "$tmp/stdin"
+   case $ac_file in
+   -) cat "$tmp/out" && rm -f "$tmp/out";;
+   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+   esac \
+-  || as_fn_error "could not create $ac_file" "$LINENO" 5
++  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+  ;;
+   :H)
+   #
+@@ -17114,19 +17226,19 @@ which seems to be undefined.  Please mak
+       $as_echo "/* $configure_input  */" \
+       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+     } >"$tmp/config.h" \
+-      || as_fn_error "could not create $ac_file" "$LINENO" 5
++      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
+     else
+       rm -f "$ac_file"
+       mv "$tmp/config.h" "$ac_file" \
+-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
++	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+     fi
+   else
+     $as_echo "/* $configure_input  */" \
+       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+-      || as_fn_error "could not create -" "$LINENO" 5
++      || as_fn_error $? "could not create -" "$LINENO" 5
+   fi
+ # Compute "$ac_file"'s index in $config_headers.
+ _am_arg="$ac_file"
+@@ -18078,7 +18190,7 @@ _ACEOF
+ ac_clean_files=$ac_clean_files_save
+ 
+ test $ac_write_fail = 0 ||
+-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
++  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ 
+ 
+ # configure is writing to config.log, and then calls config.status.
+@@ -18099,7 +18211,7 @@ if test "$no_create" != yes; then
+   exec 5>>config.log
+   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+   # would make configure fail if this is the last instruction.
+-  $ac_cs_success || as_fn_exit $?
++  $ac_cs_success || as_fn_exit 1
+ fi
+ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+--- goplay-0.4.orig/aclocal.m4
++++ goplay-0.4/aclocal.m4
+@@ -13,8 +13,8 @@
+ 
+ m4_ifndef([AC_AUTOCONF_VERSION],
+   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+-[m4_warning([this file was generated for autoconf 2.65.
++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
++[m4_warning([this file was generated for autoconf 2.67.
+ You have another version of autoconf.  It may work, but is not guaranteed to.
+ If you have problems, you may need to regenerate the build system entirely.
+ To do so, use the procedure documented by the package, typically `autoreconf'.])])
+@@ -8152,7 +8152,7 @@ $$1_PKG_ERRORS
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+ 
+-_PKG_TEXT])dnl
++_PKG_TEXT])[]dnl
+         ])
+ elif test $pkg_failed = untried; then
+      	AC_MSG_RESULT([no])
+@@ -8163,7 +8163,7 @@ path to pkg-config.
+ 
+ _PKG_TEXT
+ 
+-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+         ])
+ else
+ 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+--- goplay-0.4.orig/goplay.1
++++ goplay-0.4/goplay.1
+@@ -1,4 +1,4 @@
+-.TH GOPLAY 1 "June 25, 2010" "0.4"
++.TH GOPLAY 1 "February 11, 2012" "0.4"
+ .SH NAME
+ goplay \- Debian game browser
+ .SH SYNOPSIS
+--- goplay-0.4.orig/Makefile.in
++++ goplay-0.4/Makefile.in
+@@ -251,7 +251,7 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-SUBDIRS = src .
++SUBDIRS = libxdgutils src .
+ man_MANS = goplay.1
+ EXTRA_DIST = $(man_MANS) FAQ LICENSE README data
+ all: config.h
+--- goplay-0.4.orig/src/ui.cpp
++++ goplay-0.4/src/ui.cpp
+@@ -1,15 +1,17 @@
+-// generated by Fast Light User Interface Designer (fluid) version 1.0110
++// generated by Fast Light User Interface Designer (fluid) version 1.0300
+ 
+ #include "common.h"
+ #include "ui.h"
+ 
++unsigned char GamesUI::menu_TypeSelection_i18n_done = 0;
+ Fl_Menu_Item GamesUI::menu_TypeSelection[] = {
+- {_("Any type"), 0,  0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
++ {"Any type", 0,  0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+  {0,0,0,0,0,0,0,0,0}
+ };
+ 
++unsigned char GamesUI::menu_InterfaceSelection_i18n_done = 0;
+ Fl_Menu_Item GamesUI::menu_InterfaceSelection[] = {
+- {_("Any interface"), 0,  0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
++ {"Any interface", 0,  0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+  {0,0,0,0,0,0,0,0,0}
+ };
+ 
+@@ -1574,58 +1576,60 @@ GamesUI::GamesUI() {
+ 
+ GamesUI::~GamesUI() {
+   if (ScreenshotWidget->image() == NULL) {
+-    Fl_Image *i=ScreenshotWidget->image();
+-    ScreenshotWidget->image(NULL);
+-    delete i;
+-  }
++      Fl_Image *i=ScreenshotWidget->image();
++      ScreenshotWidget->image(NULL);
++      delete i;
++    }
+ }
+ 
+ void GamesUI::Resize(int w, int h) {
+   static const int border = 6;
+-static const int vgap = 4;
+-static const int hgap = 6;
+-
+-if (w < 710) w = 710;
+-if (h < 500) h = 500;
+-
+-int x_ref = w - 320 - border;
+-int h_info_tags = (h - 240 - border * 2 - vgap * 2);
+-int h_info = h_info_tags * 2 / 3;
+-int h_tags = h_info_tags - h_info;
+-
+-if (InputGroup)
+-	InputGroup->resize(border, border, x_ref - border - hgap, 120);
+-if (ResultsBrowser)
+-	ResultsBrowser->resize(border, 120 + border + vgap, x_ref - border - hgap, h - 120 - border * 2 - vgap);
+-
+-if (ScreenshotWidget)
+-	ScreenshotWidget->resize(x_ref, border, 320, 240);
+-if (InfoView)
+-	InfoView->resize(x_ref, border + 240 + vgap, 320, h_info);
+-if (DebTagsBrowser)
+-	DebTagsBrowser->resize(x_ref, border + 240 + h_info + vgap * 2, 320, h_tags);
++  static const int vgap = 4;
++  static const int hgap = 6;
++  
++  if (w < 710) w = 710;
++  if (h < 500) h = 500;
++  
++  int x_ref = w - 320 - border;
++  int h_info_tags = (h - 240 - border * 2 - vgap * 2);
++  int h_info = h_info_tags * 2 / 3;
++  int h_tags = h_info_tags - h_info;
++  
++  if (InputGroup)
++  	InputGroup->resize(border, border, x_ref - border - hgap, 120);
++  if (ResultsBrowser)
++  	ResultsBrowser->resize(border, 120 + border + vgap, x_ref - border - hgap, h - 120 - border * 2 - vgap);
++  
++  if (ScreenshotWidget)
++  	ScreenshotWidget->resize(x_ref, border, 320, 240);
++  if (InfoView)
++  	InfoView->resize(x_ref, border + 240 + vgap, 320, h_info);
++  if (DebTagsBrowser)
++  	DebTagsBrowser->resize(x_ref, border + 240 + h_info + vgap * 2, 320, h_tags);
+ }
+ 
+ void GamesUI::Screenshot(Fl_Image *img) {
+   Fl_Image *i=ScreenshotWidget->image();
+-  ScreenshotWidget->image(img);
+-  if (i != NULL) {
+-    delete i;
+-  }
+-  ScreenshotWidget->redraw();
++    Fl_Callback*callback = ScreenshotWidget->callback();
++    ScreenshotWidget->image(img);
++    if (i != NULL) {
++      delete i;
++    }
++    ScreenshotWidget->callback(callback);
++    ScreenshotWidget->redraw();
+ }
+ 
+ MainWindow* GamesUI::CreateMainWindow() {
+   { Window = new MainWindow(710, 525);
+     Window->box(FL_FLAT_BOX);
+-    Window->color((Fl_Color)FL_BACKGROUND_COLOR);
+-    Window->selection_color((Fl_Color)FL_BACKGROUND_COLOR);
++    Window->color(FL_BACKGROUND_COLOR);
++    Window->selection_color(FL_BACKGROUND_COLOR);
+     Window->labeltype(FL_NO_LABEL);
+     Window->labelfont(0);
+     Window->labelsize(14);
+-    Window->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
++    Window->labelcolor(FL_FOREGROUND_COLOR);
+     Window->user_data((void*)(this));
+-    Window->align(FL_ALIGN_TOP);
++    Window->align(Fl_Align(FL_ALIGN_TOP));
+     Window->when(FL_WHEN_RELEASE);
+     { InputGroup = new Fl_Group(5, 16, 375, 118);
+       InputGroup->box(FL_UP_FRAME);
+@@ -1636,15 +1640,29 @@ MainWindow* GamesUI::CreateMainWindow()
+         TypeSelection->down_box(FL_BORDER_BOX);
+         TypeSelection->labelsize(12);
+         TypeSelection->when(FL_WHEN_CHANGED);
++        if (!menu_TypeSelection_i18n_done) {
++          int i=0;
++          for ( ; i<1; i++)
++            if (menu_TypeSelection[i].label())
++              menu_TypeSelection[i].label(_(menu_TypeSelection[i].label()));
++          menu_TypeSelection_i18n_done = 1;
++        }
+         TypeSelection->menu(menu_TypeSelection);
+       } // Fl_Choice* TypeSelection
+       { InterfaceSelection = new Fl_Choice(260, 60, 115, 25, _("Interface"));
+         InterfaceSelection->down_box(FL_BORDER_BOX);
+         InterfaceSelection->labelsize(12);
++        if (!menu_InterfaceSelection_i18n_done) {
++          int i=0;
++          for ( ; i<1; i++)
++            if (menu_InterfaceSelection[i].label())
++              menu_InterfaceSelection[i].label(_(menu_InterfaceSelection[i].label()));
++          menu_InterfaceSelection_i18n_done = 1;
++        }
+         InterfaceSelection->menu(menu_InterfaceSelection);
+       } // Fl_Choice* InterfaceSelection
+       { Fl_Group* o = new Fl_Group(13, 25, 312, 30);
+-        { AlreadyInstalled = new Fl_Round_Button(13, 28, 110, 20, _("Already installed"));
++        { AlreadyInstalled = new Fl_Round_Button(13, 28, 122, 20, _("Already installed"));
+           AlreadyInstalled->down_box(FL_ROUND_DOWN_BOX);
+           AlreadyInstalled->labelsize(12);
+         } // Fl_Round_Button* AlreadyInstalled
+@@ -1666,45 +1684,45 @@ MainWindow* GamesUI::CreateMainWindow()
+       } // Fl_Button* o
+       InputGroup->end();
+     } // Fl_Group* InputGroup
+-    { ScreenshotWidget = new Fl_Box(385, 15, 320, 240);
++    { ScreenshotWidget = new Fl_Button(385, 15, 320, 240);
+       ScreenshotWidget->box(FL_FLAT_BOX);
+-      ScreenshotWidget->color((Fl_Color)FL_GRAY0);
+-      ScreenshotWidget->selection_color((Fl_Color)FL_GRAY0);
+-    } // Fl_Box* ScreenshotWidget
++      ScreenshotWidget->color(FL_GRAY0);
++      ScreenshotWidget->selection_color(FL_GRAY0);
++    } // Fl_Button* ScreenshotWidget
+     { ResultsBrowser = new PackageBrowser(5, 140, 375, 375);
+       ResultsBrowser->type(2);
+       ResultsBrowser->box(FL_NO_BOX);
+-      ResultsBrowser->color((Fl_Color)FL_BACKGROUND2_COLOR);
+-      ResultsBrowser->selection_color((Fl_Color)FL_SELECTION_COLOR);
++      ResultsBrowser->color(FL_BACKGROUND2_COLOR);
++      ResultsBrowser->selection_color(FL_SELECTION_COLOR);
+       ResultsBrowser->labeltype(FL_NORMAL_LABEL);
+       ResultsBrowser->labelfont(0);
+       ResultsBrowser->labelsize(14);
+-      ResultsBrowser->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
++      ResultsBrowser->labelcolor(FL_FOREGROUND_COLOR);
+       ResultsBrowser->textsize(12);
+-      ResultsBrowser->align(FL_ALIGN_CENTER);
++      ResultsBrowser->align(Fl_Align(FL_ALIGN_CENTER));
+       ResultsBrowser->when(FL_WHEN_RELEASE_ALWAYS);
+     } // PackageBrowser* ResultsBrowser
+     { DebTagsBrowser = new VersatileBrowser(385, 435, 320, 80);
+       DebTagsBrowser->box(FL_NO_BOX);
+-      DebTagsBrowser->color((Fl_Color)FL_BACKGROUND2_COLOR);
+-      DebTagsBrowser->selection_color((Fl_Color)FL_SELECTION_COLOR);
++      DebTagsBrowser->color(FL_BACKGROUND2_COLOR);
++      DebTagsBrowser->selection_color(FL_SELECTION_COLOR);
+       DebTagsBrowser->labeltype(FL_NORMAL_LABEL);
+       DebTagsBrowser->labelfont(0);
+       DebTagsBrowser->labelsize(14);
+-      DebTagsBrowser->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
++      DebTagsBrowser->labelcolor(FL_FOREGROUND_COLOR);
+       DebTagsBrowser->textsize(11);
+-      DebTagsBrowser->align(FL_ALIGN_CENTER);
++      DebTagsBrowser->align(Fl_Align(FL_ALIGN_CENTER));
+       DebTagsBrowser->when(FL_WHEN_RELEASE_ALWAYS);
+     } // VersatileBrowser* DebTagsBrowser
+     { InfoView = new HTMLView(385, 260, 320, 170);
+       InfoView->box(FL_NO_BOX);
+-      InfoView->color((Fl_Color)FL_BACKGROUND2_COLOR);
+-      InfoView->selection_color((Fl_Color)FL_SELECTION_COLOR);
++      InfoView->color(FL_BACKGROUND2_COLOR);
++      InfoView->selection_color(FL_SELECTION_COLOR);
+       InfoView->labeltype(FL_NORMAL_LABEL);
+       InfoView->labelfont(0);
+       InfoView->labelsize(14);
+-      InfoView->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
+-      InfoView->align(FL_ALIGN_TOP);
++      InfoView->labelcolor(FL_FOREGROUND_COLOR);
++      InfoView->align(Fl_Align(FL_ALIGN_TOP));
+       InfoView->when(FL_WHEN_RELEASE);
+     } // HTMLView* InfoView
+     Window->end();
+@@ -1719,13 +1737,13 @@ Fl_Double_Window* GamesUI::CreateAboutWi
+     AboutWindow->user_data((void*)(this));
+     { AboutView = new HTMLView(5, 75, 510, 350);
+       AboutView->box(FL_NO_BOX);
+-      AboutView->color((Fl_Color)FL_BACKGROUND2_COLOR);
+-      AboutView->selection_color((Fl_Color)FL_SELECTION_COLOR);
++      AboutView->color(FL_BACKGROUND2_COLOR);
++      AboutView->selection_color(FL_SELECTION_COLOR);
+       AboutView->labeltype(FL_NORMAL_LABEL);
+       AboutView->labelfont(0);
+       AboutView->labelsize(14);
+-      AboutView->labelcolor((Fl_Color)FL_FOREGROUND_COLOR);
+-      AboutView->align(FL_ALIGN_TOP);
++      AboutView->labelcolor(FL_FOREGROUND_COLOR);
++      AboutView->align(Fl_Align(FL_ALIGN_TOP));
+       AboutView->when(FL_WHEN_RELEASE);
+     } // HTMLView* AboutView
+     { AboutStar = new Fl_Button(400, 5, 90, 90);
+@@ -1742,13 +1760,13 @@ Fl_Double_Window* GamesUI::CreateAboutWi
+ 
+ MainWindow * GamesUI::CreateWindows() {
+   CreateMainWindow();
+-CreateAboutWindow();
+-return Window;
++  CreateAboutWindow();
++  return Window;
+ }
+ 
+ void GamesUI::AboutViewUpdated(HTMLView *item) {
+   Fl_Group *highest_parent=item->parent();
+-while (highest_parent->parent()) highest_parent = highest_parent->parent();
+-GamesUI *ui = highest_parent ? (GamesUI*)(highest_parent->user_data()) : NULL;
+-ui->AboutStar->redraw();
++  while (highest_parent->parent()) highest_parent = highest_parent->parent();
++  GamesUI *ui = highest_parent ? (GamesUI*)(highest_parent->user_data()) : NULL;
++  ui->AboutStar->redraw();
+ }
+--- goplay-0.4.orig/src/Makefile.in
++++ goplay-0.4/src/Makefile.in
+@@ -55,13 +55,14 @@ am_goplay_OBJECTS = Environment.$(OBJEXT
+ 	taghandler.$(OBJEXT) windows.$(OBJEXT) aux.$(OBJEXT) \
+ 	goplay.$(OBJEXT)
+ goplay_OBJECTS = $(am_goplay_OBJECTS)
+-goplay_LDADD = $(LDADD)
++am__DEPENDENCIES_1 =
++goplay_DEPENDENCIES = ../libxdgutils/libxdgutils.a \
++	$(am__DEPENDENCIES_1)
+ goplay_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ 	$(goplay_LDFLAGS) $(LDFLAGS) -o $@
+ am_manpage_OBJECTS = manpage.$(OBJEXT)
+ manpage_OBJECTS = $(am_manpage_OBJECTS)
+-am__DEPENDENCIES_1 =
+ manpage_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+@@ -229,7 +230,13 @@ goplay_SOURCES = \
+ 	aux.cpp \
+ 	goplay.cpp
+ 
+-goplay_LDFLAGS = $(LIBEPT_LIBS) `fltk-config --ldflags --use-images`
++goplay_LDFLAGS = \
++	`fltk-config --ldflags --use-images`
++
++goplay_LDADD = \
++	../libxdgutils/libxdgutils.a \
++	$(LIBEPT_LIBS)
++
+ manpage_SOURCES = manpage.cpp
+ manpage_LDADD = $(LIBEPT_LIBS)
+ INCLUDES = -I.. $(LIBEPT_CFLAGS) `fltk-config --cxxflags --use-images` -Wall -Werror -ggdb
+--- goplay-0.4.orig/src/ui.h
++++ goplay-0.4/src/ui.h
+@@ -1,4 +1,4 @@
+-// generated by Fast Light User Interface Designer (fluid) version 1.0110
++// generated by Fast Light User Interface Designer (fluid) version 1.0300
+ 
+ #ifndef ui_h
+ #define ui_h
+@@ -13,7 +13,6 @@ class Engine;
+ #include <FL/Fl_Choice.H>
+ #include <FL/Fl_Round_Button.H>
+ #include <FL/Fl_Button.H>
+-#include <FL/Fl_Box.H>
+ #include <FL/Fl_Double_Window.H>
+ 
+ class GamesUI {
+@@ -27,8 +26,10 @@ public:
+   Fl_Group *InputGroup;
+   Fl_Input *SearchInput;
+   Fl_Choice *TypeSelection;
++  static unsigned char menu_TypeSelection_i18n_done;
+   static Fl_Menu_Item menu_TypeSelection[];
+   Fl_Choice *InterfaceSelection;
++  static unsigned char menu_InterfaceSelection_i18n_done;
+   static Fl_Menu_Item menu_InterfaceSelection[];
+   Fl_Round_Button *AlreadyInstalled;
+   Fl_Round_Button *ToBeInstalled;
+@@ -37,7 +38,7 @@ private:
+   void cb__i(Fl_Button*, void*);
+   static void cb_(Fl_Button*, void*);
+ public:
+-  Fl_Box *ScreenshotWidget;
++  Fl_Button *ScreenshotWidget;
+   PackageBrowser *ResultsBrowser;
+   VersatileBrowser *DebTagsBrowser;
+   HTMLView *InfoView;
+--- /dev/null
++++ goplay-0.4/libxdgutils/Makefile.in
+@@ -0,0 +1,522 @@
++# Makefile.in generated by automake 1.11.1 from Makefile.am.
++# @configure_input@
++
++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
++# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
++# Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++ at SET_MAKE@
++
++# Copyright (c) 2011 Paulo Zanoni
++#
++# Permission is hereby granted, free of charge, to any person obtaining a
++# copy of this software and associated documentation files (the "Software"),
++# to deal in the Software without restriction, including without limitation
++# the rights to use, copy, modify, merge, publish, distribute, sublicense,
++# and/or sell copies of the Software, and to permit persons to whom the
++# Software is furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice (including the next
++# paragraph) shall be included in all copies or substantial portions of the
++# Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
++# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++# DEALINGS IN THE SOFTWARE.
++
++VPATH = @srcdir@
++pkgdatadir = $(datadir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkglibexecdir = $(libexecdir)/@PACKAGE@
++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
++install_sh_DATA = $(install_sh) -c -m 644
++install_sh_PROGRAM = $(install_sh) -c
++install_sh_SCRIPT = $(install_sh) -c
++INSTALL_HEADER = $(INSTALL_DATA)
++transform = $(program_transform_name)
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++build_triplet = @build@
++host_triplet = @host@
++subdir = libxdgutils
++DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++am__aclocal_m4_deps = $(top_srcdir)/configure.ac
++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
++	$(ACLOCAL_M4)
++mkinstalldirs = $(install_sh) -d
++CONFIG_HEADER = $(top_builddir)/config.h
++CONFIG_CLEAN_FILES =
++CONFIG_CLEAN_VPATH_FILES =
++LIBRARIES = $(noinst_LIBRARIES)
++ARFLAGS = cru
++libxdgutils_a_AR = $(AR) $(ARFLAGS)
++libxdgutils_a_LIBADD =
++am_libxdgutils_a_OBJECTS = XDGAutostart.$(OBJEXT) XDGBasedir.$(OBJEXT) \
++	XDGDesktopEntry.$(OBJEXT) XDGMenu.$(OBJEXT) XDGUtils.$(OBJEXT)
++libxdgutils_a_OBJECTS = $(am_libxdgutils_a_OBJECTS)
++DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
++depcomp = $(SHELL) $(top_srcdir)/depcomp
++am__depfiles_maybe = depfiles
++am__mv = mv -f
++CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
++LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
++CXXLD = $(CXX)
++CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
++	$(LDFLAGS) -o $@
++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++CCLD = $(CC)
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++	$(LDFLAGS) -o $@
++SOURCES = $(libxdgutils_a_SOURCES)
++DIST_SOURCES = $(libxdgutils_a_SOURCES)
++ETAGS = etags
++CTAGS = ctags
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++ACLOCAL = @ACLOCAL@
++AMTAR = @AMTAR@
++APTGET = @APTGET@
++AR = @AR@
++AUTOCONF = @AUTOCONF@
++AUTOHEADER = @AUTOHEADER@
++AUTOMAKE = @AUTOMAKE@
++AWK = @AWK@
++CC = @CC@
++CCDEPMODE = @CCDEPMODE@
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++CXX = @CXX@
++CXXCPP = @CXXCPP@
++CXXDEPMODE = @CXXDEPMODE@
++CXXFLAGS = @CXXFLAGS@
++CYGPATH_W = @CYGPATH_W@
++DEFS = @DEFS@
++DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
++DUMPBIN = @DUMPBIN@
++ECHO_C = @ECHO_C@
++ECHO_N = @ECHO_N@
++ECHO_T = @ECHO_T@
++EGREP = @EGREP@
++EXEEXT = @EXEEXT@
++FGREP = @FGREP@
++GREP = @GREP@
++INSTALL = @INSTALL@
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++LD = @LD@
++LDFLAGS = @LDFLAGS@
++LIBEPT_CFLAGS = @LIBEPT_CFLAGS@
++LIBEPT_LIBS = @LIBEPT_LIBS@
++LIBOBJS = @LIBOBJS@
++LIBS = @LIBS@
++LIBTAGCOLL2_CFLAGS = @LIBTAGCOLL2_CFLAGS@
++LIBTAGCOLL2_LIBS = @LIBTAGCOLL2_LIBS@
++LIBTOOL = @LIBTOOL@
++LIBWIBBLE_CFLAGS = @LIBWIBBLE_CFLAGS@
++LIBWIBBLE_LIBS = @LIBWIBBLE_LIBS@
++LIPO = @LIPO@
++LN_S = @LN_S@
++LTLIBOBJS = @LTLIBOBJS@
++MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NM = @NM@
++NMEDIT = @NMEDIT@
++OBJDUMP = @OBJDUMP@
++OBJEXT = @OBJEXT@
++OTOOL = @OTOOL@
++OTOOL64 = @OTOOL64@
++PACKAGE = @PACKAGE@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_URL = @PACKAGE_URL@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++PATH_SEPARATOR = @PATH_SEPARATOR@
++PKG_CONFIG = @PKG_CONFIG@
++PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
++PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
++RANLIB = @RANLIB@
++SED = @SED@
++SET_MAKE = @SET_MAKE@
++SHELL = @SHELL@
++STRIP = @STRIP@
++VERSION = @VERSION@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
++ac_ct_CC = @ac_ct_CC@
++ac_ct_CXX = @ac_ct_CXX@
++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
++am__include = @am__include@
++am__leading_dot = @am__leading_dot@
++am__quote = @am__quote@
++am__tar = @am__tar@
++am__untar = @am__untar@
++bindir = @bindir@
++build = @build@
++build_alias = @build_alias@
++build_cpu = @build_cpu@
++build_os = @build_os@
++build_vendor = @build_vendor@
++builddir = @builddir@
++datadir = @datadir@
++datarootdir = @datarootdir@
++docdir = @docdir@
++dvidir = @dvidir@
++exec_prefix = @exec_prefix@
++host = @host@
++host_alias = @host_alias@
++host_cpu = @host_cpu@
++host_os = @host_os@
++host_vendor = @host_vendor@
++htmldir = @htmldir@
++includedir = @includedir@
++infodir = @infodir@
++install_sh = @install_sh@
++libdir = @libdir@
++libexecdir = @libexecdir@
++localedir = @localedir@
++localstatedir = @localstatedir@
++lt_ECHO = @lt_ECHO@
++mandir = @mandir@
++mkdir_p = @mkdir_p@
++oldincludedir = @oldincludedir@
++pdfdir = @pdfdir@
++prefix = @prefix@
++program_transform_name = @program_transform_name@
++psdir = @psdir@
++sbindir = @sbindir@
++sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
++sysconfdir = @sysconfdir@
++target_alias = @target_alias@
++top_build_prefix = @top_build_prefix@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
++noinst_LIBRARIES = libxdgutils.a
++libxdgutils_a_SOURCES = \
++	XDGAutostart.h \
++	XDGAutostart.cpp \
++	XDGBasedir.h \
++	XDGBasedir.cpp \
++	XDGDesktopEntry.h \
++	XDGDesktopEntry.cpp \
++	XDGMenu.h \
++	XDGMenu.cpp \
++	XDGUtils.h \
++	XDGUtils.cpp
++
++INCLUDES = -I.. $(LIBEPT_CFLAGS) -Wall -Werror -ggdb
++all: all-am
++
++.SUFFIXES:
++.SUFFIXES: .cpp .lo .o .obj
++$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
++	@for dep in $?; do \
++	  case '$(am__configure_deps)' in \
++	    *$$dep*) \
++	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
++	        && { if test -f $@; then exit 0; else break; fi; }; \
++	      exit 1;; \
++	  esac; \
++	done; \
++	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libxdgutils/Makefile'; \
++	$(am__cd) $(top_srcdir) && \
++	  $(AUTOMAKE) --foreign libxdgutils/Makefile
++.PRECIOUS: Makefile
++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
++	@case '$?' in \
++	  *config.status*) \
++	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
++	  *) \
++	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
++	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
++	esac;
++
++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++
++$(top_srcdir)/configure:  $(am__configure_deps)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++$(am__aclocal_m4_deps):
++
++clean-noinstLIBRARIES:
++	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
++libxdgutils.a: $(libxdgutils_a_OBJECTS) $(libxdgutils_a_DEPENDENCIES) 
++	-rm -f libxdgutils.a
++	$(libxdgutils_a_AR) libxdgutils.a $(libxdgutils_a_OBJECTS) $(libxdgutils_a_LIBADD)
++	$(RANLIB) libxdgutils.a
++
++mostlyclean-compile:
++	-rm -f *.$(OBJEXT)
++
++distclean-compile:
++	-rm -f *.tab.c
++
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/XDGAutostart.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/XDGBasedir.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/XDGDesktopEntry.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/XDGMenu.Po at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/XDGUtils.Po at am__quote@
++
++.cpp.o:
++ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
++
++.cpp.obj:
++ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
++
++.cpp.lo:
++ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
++
++mostlyclean-libtool:
++	-rm -f *.lo
++
++clean-libtool:
++	-rm -rf .libs _libs
++
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	mkid -fID $$unique
++tags: TAGS
++
++TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	set x; \
++	here=`pwd`; \
++	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	shift; \
++	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
++	  test -n "$$unique" || unique=$$empty_fix; \
++	  if test $$# -gt 0; then \
++	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++	      "$$@" $$unique; \
++	  else \
++	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++	      $$unique; \
++	  fi; \
++	fi
++ctags: CTAGS
++CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	test -z "$(CTAGS_ARGS)$$unique" \
++	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
++	     $$unique
++
++GTAGS:
++	here=`$(am__cd) $(top_builddir) && pwd` \
++	  && $(am__cd) $(top_srcdir) \
++	  && gtags -i $(GTAGS_ARGS) "$$here"
++
++distclean-tags:
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
++
++distdir: $(DISTFILES)
++	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++	list='$(DISTFILES)'; \
++	  dist_files=`for file in $$list; do echo $$file; done | \
++	  sed -e "s|^$$srcdirstrip/||;t" \
++	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
++	case $$dist_files in \
++	  */*) $(MKDIR_P) `echo "$$dist_files" | \
++			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
++			   sort -u` ;; \
++	esac; \
++	for file in $$dist_files; do \
++	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
++	  if test -d $$d/$$file; then \
++	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
++	    if test -d "$(distdir)/$$file"; then \
++	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
++	    fi; \
++	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
++	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
++	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
++	    fi; \
++	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
++	  else \
++	    test -f "$(distdir)/$$file" \
++	    || cp -p $$d/$$file "$(distdir)/$$file" \
++	    || exit 1; \
++	  fi; \
++	done
++check-am: all-am
++check: check-am
++all-am: Makefile $(LIBRARIES)
++installdirs:
++install: install-am
++install-exec: install-exec-am
++install-data: install-data-am
++uninstall: uninstall-am
++
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++
++installcheck: installcheck-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++	  `test -z '$(STRIP)' || \
++	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
++mostlyclean-generic:
++
++clean-generic:
++
++distclean-generic:
++	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
++	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
++
++maintainer-clean-generic:
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
++clean: clean-am
++
++clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
++	mostlyclean-am
++
++distclean: distclean-am
++	-rm -rf ./$(DEPDIR)
++	-rm -f Makefile
++distclean-am: clean-am distclean-compile distclean-generic \
++	distclean-tags
++
++dvi: dvi-am
++
++dvi-am:
++
++html: html-am
++
++html-am:
++
++info: info-am
++
++info-am:
++
++install-data-am:
++
++install-dvi: install-dvi-am
++
++install-dvi-am:
++
++install-exec-am:
++
++install-html: install-html-am
++
++install-html-am:
++
++install-info: install-info-am
++
++install-info-am:
++
++install-man:
++
++install-pdf: install-pdf-am
++
++install-pdf-am:
++
++install-ps: install-ps-am
++
++install-ps-am:
++
++installcheck-am:
++
++maintainer-clean: maintainer-clean-am
++	-rm -rf ./$(DEPDIR)
++	-rm -f Makefile
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am
++
++mostlyclean-am: mostlyclean-compile mostlyclean-generic \
++	mostlyclean-libtool
++
++pdf: pdf-am
++
++pdf-am:
++
++ps: ps-am
++
++ps-am:
++
++uninstall-am:
++
++.MAKE: install-am install-strip
++
++.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
++	clean-libtool clean-noinstLIBRARIES ctags distclean \
++	distclean-compile distclean-generic distclean-libtool \
++	distclean-tags distdir dvi dvi-am html html-am info info-am \
++	install install-am install-data install-data-am install-dvi \
++	install-dvi-am install-exec install-exec-am install-html \
++	install-html-am install-info install-info-am install-man \
++	install-pdf install-pdf-am install-ps install-ps-am \
++	install-strip installcheck installcheck-am installdirs \
++	maintainer-clean maintainer-clean-generic mostlyclean \
++	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
++	pdf pdf-am ps ps-am tags uninstall uninstall-am
++
++
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:
diff -Nru goplay-0.4/debian/patches/goscience.patch goplay-0.4/debian/patches/goscience.patch
--- goplay-0.4/debian/patches/goscience.patch	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/goscience.patch	2012-02-07 16:36:52.000000000 +0100
@@ -0,0 +1,45 @@
+Author: Dmitry Smirnov <onlyjob at member.fsf.org>
+From: Frederic Daniel Luc Lehobey <Frederic at Lehobey.net>
+Bug-Debian: http://bugs.debian.org/474603
+Last-Update: 2012-02-08
+Forwarded: no
+Description: add goscience browser
+
+
+--- a/goplay.1
++++ b/goplay.1
+@@ -32,7 +32,7 @@
+ enable debugging output (including verbose output).
+ .TP
+ .B \-\-go=\fIwhere\fP
+-change the interface flavour. Available flavours are: play, learn, admin, net, office, safe, web.
++change the interface flavour. Available flavours are: play, learn, admin, net, office, safe, web, science.
+ .TP
+ .B \-\-primary=\fIfacet\fP
+ use the given facet instead of 'games'.
+--- a/src/GamesOptions.h
++++ b/src/GamesOptions.h
+@@ -51,7 +51,7 @@
+ 						"enable debugging output (including verbose output)");
+ 		gowhere = add<StringOption>("go", 0, "go", "where",
+ 						"change the interface flavour. "
+-						"Available flavours are: play, learn, admin, net, office, safe, web");
++						"Available flavours are: play, learn, admin, net, office, safe, web, science");
+ 		mainFacet = add<StringOption>("primary", 0, "primary", "facet",
+ 						"use the given facet instead of 'games'");
+ 		secondaryFacet = add<StringOption>("secondary", 0, "secondary", "facet",
+--- a/src/goplay.cpp
++++ b/src/goplay.cpp
+@@ -397,6 +397,12 @@
+ 			engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
+ 										Xapian::Query("XTrole::documentation"),
+ 										Xapian::Query("XTrole::program"));
++		} else if (wibble::str::endsWith(argv[0], "science") || opts.gowhere->stringValue() == "science") {
++			engine.mainFacet = "field";
++			engine.secondaryFacet = "interface";
++			engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
++										Xapian::Query("XTrole::documentation"),
++										Xapian::Query("XTrole::program"));
+ 		} else {
+ 			engine.mainFacet = "game";
+ 			engine.secondaryFacet = "interface";
diff -Nru goplay-0.4/debian/patches/gui-resize.patch goplay-0.4/debian/patches/gui-resize.patch
--- goplay-0.4/debian/patches/gui-resize.patch	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/gui-resize.patch	2012-02-11 22:36:18.000000000 +0100
@@ -0,0 +1,42 @@
+Description: 
+   * Make enough room for the "Already installed" text (Closes:
+     #544532).  Patch by Timo Juhani Lindfors.
+Author: Timo Juhani Lindfors
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
+Last-Update: 2012-02-11
+Bug-Debian: http://bugs.debian.org/544532
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- goplay-0.4.orig/src/ui.fld
++++ goplay-0.4/src/ui.fld
+@@ -1,5 +1,5 @@
+ # data file for the Fltk User Interface Designer (fluid)
+-version 1.0107 
++version 1.0109 
+ i18n_type 1 
+ i18n_include "common.h" 
+ i18n_function _ 
+@@ -104,8 +106,8 @@ if (DebTagsBrowser)
+           xywh {13 25 312 30}
+         } {
+           Fl_Round_Button AlreadyInstalled {
+-            label {Already installed}
+-            xywh {13 28 110 20} down_box ROUND_DOWN_BOX labelsize 12
++            label {Already installed} selected
++            xywh {13 28 122 20} down_box ROUND_DOWN_BOX labelsize 12
+           }
+           Fl_Round_Button ToBeInstalled {
+             label {To be installed}
diff -Nru goplay-0.4/debian/patches/series goplay-0.4/debian/patches/series
--- goplay-0.4/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/series	2012-02-11 23:37:28.000000000 +0100
@@ -0,0 +1,5 @@
+goscience.patch
+gui-resize.patch
+strtol-warnings.patch
+clicktorun.patch
+generated.patch
diff -Nru goplay-0.4/debian/patches/strtol-warnings.patch goplay-0.4/debian/patches/strtol-warnings.patch
--- goplay-0.4/debian/patches/strtol-warnings.patch	1970-01-01 01:00:00.000000000 +0100
+++ goplay-0.4/debian/patches/strtol-warnings.patch	2012-02-11 22:24:04.000000000 +0100
@@ -0,0 +1,52 @@
+Description: 
+   * src/pkgbrowser.cpp: Assign the return value from strtol() to an
+     unused variable and mark it as unused to avoid compiler warnings
+     (Closes: #659100).  Patch from Michael Vogt and Ubuntu.
+Author: Michael Vogt
+Bug-Debian: http://bugs.debian.org/659100
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
+Last-Update: 2012-02-11
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- goplay-0.4.orig/src/pkgbrowser.cpp
++++ goplay-0.4/src/pkgbrowser.cpp
+@@ -303,7 +304,7 @@ int PackageBrowser::item_width(void *p)
+ 			case 'i': font = (Fl_Font)(font|FL_ITALIC); break;
+ 			case 'f': case 't': font = FL_COURIER; break;
+ 			case 'B':
+-			case 'C': strtol(str, &str, 10); break;// skip a color number
++			case 'C': {long int __attribute__((unused)) unused = strtol(str, &str, 10);} break;// skip a color number
+ 			case 'F': font = (Fl_Font)strtol(str, &str, 10); break;
+ 			case 'S': tsize = strtol(str, &str, 10); break;
+ 			case '.': done = 1; break;
+@@ -316,7 +317,7 @@ int PackageBrowser::item_width(void *p)
+ 	if (*str=='%' && '0'<=str[1] && str[1]<='9')
+ 	{
+ 		char *after;
+-		/* int percent = */ strtol(str+1, &after, 10);
++		/* int percent = */ long int __attribute__((unused)) unused = strtol(str+1, &after, 10);
+ 		int steps = 0;
+ 		unsigned int bar = 0;
+ 		if (after && *after=='/')
+@@ -384,7 +385,7 @@ void PackageBrowser::item_draw(void *p,
+ 						fl_rectf(x, y, w1, h);
+ 					}
+ 					else
+-						strtol(str, &str, 10);
++						long int __attribute__((unused)) unused = strtol(str, &str, 10);
+ 					break;
+ 				case 'C': lcol = (Fl_Color)strtol(str, &str, 10); break;
+ 				case 'F': font = (Fl_Font)strtol(str, &str, 10); break;
diff -Nru goplay-0.4/debian/rules goplay-0.4/debian/rules
--- goplay-0.4/debian/rules	2010-06-25 09:58:22.000000000 +0200
+++ goplay-0.4/debian/rules	2012-02-07 17:02:10.000000000 +0100
@@ -3,9 +3,13 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# the following is necessary to prevent FTBFS
+export DEB_BUILD_MAINT_OPTIONS=hardening=-fortify
+$(info DEB_BUILD_MAINT_OPTIONS:$(origin DEB_BUILD_MAINT_OPTIONS)=$(DEB_BUILD_MAINT_OPTIONS))
+
 %:
-	dh $@
+	dh $@ --with-autoreconf
 
-override_dh_fixperms:
-	dh_fixperms
-	test -e /usr/bin/dh_buildinfo && dh_buildinfo
+override_dh_auto_build:
+	convert data/icons/Icon32.png debian/goplay.xpm
+	dh_auto_build


More information about the Pkg-games-devel mailing list