all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add Tiled
@ 2014-11-13 14:53 宋文武
  2014-11-13 15:02 ` Eric Bavier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: 宋文武 @ 2014-11-13 14:53 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/tiled.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am          |  1 +
 gnu/packages/tiled.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 gnu/packages/tiled.scm

diff --git a/gnu-system.am b/gnu-system.am
index 1af1aa5..900bd2e 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -244,6 +244,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/telephony.scm			\
   gnu/packages/texinfo.scm			\
   gnu/packages/texlive.scm			\
+  gnu/packages/tiled.scm			\
   gnu/packages/time.scm				\
   gnu/packages/tmux.scm				\
   gnu/packages/tor.scm				\
diff --git a/gnu/packages/tiled.scm b/gnu/packages/tiled.scm
new file mode 100644
index 0000000..0d4241e
--- /dev/null
+++ b/gnu/packages/tiled.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, 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.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages tiled)
+  #:use-module ((guix licenses)
+                #:hide (zlib))
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages compression))
+
+(define-public tiled
+  (package
+    (name "tiled")
+    (version "0.10.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/bjorn/tiled/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0p4p3lv4nw11fkfvvyjirb93r2x4w2rrc2w650gl2k57k92jpiij"))))
+    (build-system gnu-build-system)
+    (inputs `(("qt" ,qt)
+              ("zlib" ,zlib)))
+    (arguments
+     '(#:phases
+       (alist-replace
+        'configure
+        (lambda* (#:key outputs #:allow-other-keys)
+          (let ((out (assoc-ref outputs "out")))
+            (system* "qmake"
+                     (string-append "PREFIX=" out))))
+        %standard-phases)))
+    (home-page "http://www.mapeditor.org/")
+    (synopsis "Tile map editor")
+    (description
+     "Tiled is a general purpose tile map editor.  It is meant to be used for
+editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
+clone.")
+    (license (list gpl2+ bsd-2))))
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 14:53 [PATCH] gnu: Add Tiled 宋文武
@ 2014-11-13 15:02 ` Eric Bavier
  2014-11-13 15:10   ` 宋文武
  2014-11-13 15:17 ` 宋文武
  2014-11-13 17:01 ` Ludovic Courtès
  2 siblings, 1 reply; 13+ messages in thread
From: Eric Bavier @ 2014-11-13 15:02 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel


宋文武 writes:

> * gnu/packages/tiled.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
> ---
>  gnu-system.am          |  1 +
>  gnu/packages/tiled.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
>  create mode 100644 gnu/packages/tiled.scm

Would it make sense to put this new package in gnu/packages/games.scm instead?

-- 
Eric Bavier

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 15:02 ` Eric Bavier
@ 2014-11-13 15:10   ` 宋文武
  0 siblings, 0 replies; 13+ messages in thread
From: 宋文武 @ 2014-11-13 15:10 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> writes:

> 宋文武 writes:
>
>> * gnu/packages/tiled.scm: New file.
>> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
>> ---
>>  gnu-system.am          |  1 +
>>  gnu/packages/tiled.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 58 insertions(+)
>>  create mode 100644 gnu/packages/tiled.scm
>
> Would it make sense to put this new package in gnu/packages/games.scm
> instead?
Well, I'll prefer editors.scm or graphics.scm.
>
> -- 
> Eric Bavier
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 14:53 [PATCH] gnu: Add Tiled 宋文武
  2014-11-13 15:02 ` Eric Bavier
@ 2014-11-13 15:17 ` 宋文武
  2014-11-14 22:10   ` Ludovic Courtès
  2014-11-13 17:01 ` Ludovic Courtès
  2 siblings, 1 reply; 13+ messages in thread
From: 宋文武 @ 2014-11-13 15:17 UTC (permalink / raw)
  To: guix-devel

Oh, the patch title should be `gnu: Add Tiled.'

And, I can not type anything in tiled (eg. file save dialog),
I got:

  Qt: Failed to create XKB context!
  Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional
  search path, add ':' as separator to provide several search paths and/or
  make sure that XKB configuration data directory contains recent enough
  contents, to update please see
  http://cgit.freedesktop.org/xkeyboard-config/.

Does every qt5 application have this issue?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 14:53 [PATCH] gnu: Add Tiled 宋文武
  2014-11-13 15:02 ` Eric Bavier
  2014-11-13 15:17 ` 宋文武
@ 2014-11-13 17:01 ` Ludovic Courtès
  2014-11-14 11:27   ` 宋文武
  2 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2014-11-13 17:01 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> +    (license (list gpl2+ bsd-2))))

Could you add a comment above explaining what is meant here: is it
dual-licensing?  Or does it mean that some files are GPL’d while others
are BSD?

In the latter case, the combined work is GPL, so ‘license’ should be
just gpl2+.  It’s a good idea, though, to add a comment stating that
some files are under another license.

> Eric Bavier <ericbavier@gmail.com> writes:
>
>> 宋文武 writes:
>>
>>> * gnu/packages/tiled.scm: New file.
>>> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
>>> ---
>>>  gnu-system.am          |  1 +
>>>  gnu/packages/tiled.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  2 files changed, 58 insertions(+)
>>>  create mode 100644 gnu/packages/tiled.scm
>>
>> Would it make sense to put this new package in gnu/packages/games.scm
>> instead?
> Well, I'll prefer editors.scm or graphics.scm.

I’m of the opinion of Eric here.  “editors” and “graphics” seem like
very vague categories to me.  Or did you have other packages in mind
that would fit in there?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 17:01 ` Ludovic Courtès
@ 2014-11-14 11:27   ` 宋文武
  0 siblings, 0 replies; 13+ messages in thread
From: 宋文武 @ 2014-11-14 11:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> +    (license (list gpl2+ bsd-2))))
>
> Could you add a comment above explaining what is meant here: is it
> dual-licensing?  Or does it mean that some files are GPL’d while others
> are BSD?
>
> In the latter case, the combined work is GPL, so ‘license’ should be
> just gpl2+.  It’s a good idea, though, to add a comment stating that
> some files are under another license.
Yes, it's GPL, while libtiled and tmxviewer are under BSD.
>
>> Eric Bavier <ericbavier@gmail.com> writes:
>>
>>> 宋文武 writes:
>>>
>>>> * gnu/packages/tiled.scm: New file.
>>>> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
>>>> ---
>>>>  gnu-system.am          |  1 +
>>>>  gnu/packages/tiled.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>  2 files changed, 58 insertions(+)
>>>>  create mode 100644 gnu/packages/tiled.scm
>>>
>>> Would it make sense to put this new package in gnu/packages/games.scm
>>> instead?
>> Well, I'll prefer editors.scm or graphics.scm.
>
> I’m of the opinion of Eric here.  “editors” and “graphics” seem like
> very vague categories to me.  Or did you have other packages in mind
> that would fit in there?
Maybe gimp and inkscape? Yeah, games does make sense.
>
> Thanks,
> Ludo’.

Here is my new patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-Tiled.patch --]
[-- Type: text/x-patch, Size: 2492 bytes --]

From b5481951dcba1a34305d9f1ac55ca880415ab731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Thu, 13 Nov 2014 22:50:57 +0800
Subject: [PATCH] gnu: Add Tiled.

* gnu/pacakges/games.scm (tiled): New variable.
---
 gnu/packages/games.scm | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index dee39dd..4e1335e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -23,7 +23,8 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages games)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses)
+                #:hide (zlib))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (gnu packages)
@@ -49,6 +50,8 @@
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages compression)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial))
 
@@ -498,3 +501,34 @@ tutorials for the standard QWERTY layout, there are also tutorials for the
 alternative layouts Dvorak and Colemak, as well as for the numpad.  Tutorials
 are primarily in English, however some in other languages are provided.")
     (license gpl3+)))
+
+(define-public tiled
+  (package
+    (name "tiled")
+    (version "0.10.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/bjorn/tiled/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0p4p3lv4nw11fkfvvyjirb93r2x4w2rrc2w650gl2k57k92jpiij"))))
+    (build-system gnu-build-system)
+    (inputs `(("qt" ,qt)
+              ("zlib" ,zlib)))
+    (arguments
+     '(#:phases
+       (alist-replace
+        'configure
+        (lambda* (#:key outputs #:allow-other-keys)
+          (let ((out (assoc-ref outputs "out")))
+            (system* "qmake"
+                     (string-append "PREFIX=" out))))
+        %standard-phases)))
+    (home-page "http://www.mapeditor.org/")
+    (synopsis "Tile map editor")
+    (description
+     "Tiled is a general purpose tile map editor.  It is meant to be used for
+editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
+clone.")
+    (license gpl2+)))
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-13 15:17 ` 宋文武
@ 2014-11-14 22:10   ` Ludovic Courtès
  2014-11-21 17:07     ` Andreas Enge
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2014-11-14 22:10 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> And, I can not type anything in tiled (eg. file save dialog),
> I got:
>
>   Qt: Failed to create XKB context!
>   Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional
>   search path, add ':' as separator to provide several search paths and/or
>   make sure that XKB configuration data directory contains recent enough
>   contents, to update please see
>   http://cgit.freedesktop.org/xkeyboard-config/.
>
> Does every qt5 application have this issue?

I tried it, and indeed, I had to run it like this to work around the
problem:

  QT_XKB_CONFIG_ROOT=$(guix build xkeyboard-config)/share/X11/xkb tiled 

I suspect we should configure Qt with a flag that tells it the default
location of the XKB data.  Andreas?  :-)

> Here is my new patch:

Thanks, applied with a comment about the license.

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-14 22:10   ` Ludovic Courtès
@ 2014-11-21 17:07     ` Andreas Enge
  2014-11-21 22:17       ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Enge @ 2014-11-21 17:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, 宋文武

On Fri, Nov 14, 2014 at 11:10:08PM +0100, Ludovic Courtès wrote:
> I tried it, and indeed, I had to run it like this to work around the
> problem:
>   QT_XKB_CONFIG_ROOT=$(guix build xkeyboard-config)/share/X11/xkb tiled 
> I suspect we should configure Qt with a flag that tells it the default
> location of the XKB data.  Andreas?  :-)

The problem was that our oldish version of libxkbcommon was not enough any
more for our new version of qt. So qt used a bundled copy instead, which
requires to set QT_XKB_CONFIG_ROOT or to give a correspondong configure flag.

I updated libxkbcommon (together with a number of inputs related to xcb)
in commit ff53457. Could you check that the problem is solved now?

There are a number of optional inputs that we could add to qt; I will try
them out.

Andreas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-21 17:07     ` Andreas Enge
@ 2014-11-21 22:17       ` Ludovic Courtès
  2014-11-22 12:08         ` Andreas Enge
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2014-11-21 22:17 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, 宋文武

Andreas Enge <andreas@enge.fr> skribis:

> On Fri, Nov 14, 2014 at 11:10:08PM +0100, Ludovic Courtès wrote:
>> I tried it, and indeed, I had to run it like this to work around the
>> problem:
>>   QT_XKB_CONFIG_ROOT=$(guix build xkeyboard-config)/share/X11/xkb tiled 
>> I suspect we should configure Qt with a flag that tells it the default
>> location of the XKB data.  Andreas?  :-)
>
> The problem was that our oldish version of libxkbcommon was not enough any
> more for our new version of qt. So qt used a bundled copy instead, which
> requires to set QT_XKB_CONFIG_ROOT or to give a correspondong configure flag.
>
> I updated libxkbcommon (together with a number of inputs related to xcb)
> in commit ff53457. Could you check that the problem is solved now?

I’ve tried Tiled from v0.8-45-gf4391be and the problem is still there
(unable to enter text.)  The message might be slightly different:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/q8i8mixx5xx1g06bb7jzzywm189768pc-tiled-0.10.2/bin/tiled 
xkbcommon: ERROR: failed to add default include path /gnu/store/9hyb8pn2vcy92m5rww2g308sjxv1hrr1-libxkbcommon-0.5.0/share/X11/xkb
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
--8<---------------cut here---------------end--------------->8---

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-21 22:17       ` Ludovic Courtès
@ 2014-11-22 12:08         ` Andreas Enge
  2014-11-23  4:43           ` iyzsong
  2014-11-24 20:32           ` Ludovic Courtès
  0 siblings, 2 replies; 13+ messages in thread
From: Andreas Enge @ 2014-11-22 12:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, 宋文武

The problem should now be fixed in 5dee80d. I tried to enter something
in the file open dialog of tiled, and it worked.

Andreas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-22 12:08         ` Andreas Enge
@ 2014-11-23  4:43           ` iyzsong
  2014-11-24 20:32           ` Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: iyzsong @ 2014-11-23  4:43 UTC (permalink / raw)
  To: Andreas Enge, Ludovic Courtès; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

> The problem should now be fixed in 5dee80d. I tried to enter something
> in the file open dialog of tiled, and it worked.
Great!
>
> Andreas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-22 12:08         ` Andreas Enge
  2014-11-23  4:43           ` iyzsong
@ 2014-11-24 20:32           ` Ludovic Courtès
  2014-11-27 17:39             ` Ludovic Courtès
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2014-11-24 20:32 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, 宋文武

Andreas Enge <andreas@enge.fr> skribis:

> The problem should now be fixed in 5dee80d. I tried to enter something
> in the file open dialog of tiled, and it worked.

Nope, it doesn’t work on the standalone system.  I still get:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/12xncnj5gakzwn7wqbsbaqinr4b1m4ir-tiled-0.10.2/bin/tiled
xkbcommon: ERROR: failed to add default include path auto
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
--8<---------------cut here---------------end--------------->8---

and then I’m unable to enter text.

Looks like Qt did not record the file name of the xkb data or something
like that?  Perhaps we need an explicit ‘-system-xkbcommon’ configure
flag?  (I see that Nixpkgs has it, along with a bunch of other similar
flags.)

(If you don’t have the standalone system, you can test with, say, ‘guix
system vm build-aux/hydra/demo-os.scm’, but you need to add ‘tiled’ to
the list of packages in there.)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] gnu: Add Tiled
  2014-11-24 20:32           ` Ludovic Courtès
@ 2014-11-27 17:39             ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2014-11-27 17:39 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, 宋文武

ludo@gnu.org (Ludovic Courtès) skribis:

> Andreas Enge <andreas@enge.fr> skribis:
>
>> The problem should now be fixed in 5dee80d. I tried to enter something
>> in the file open dialog of tiled, and it worked.
>
> Nope, it doesn’t work on the standalone system.

Actually, it does!

Just tried with
/gnu/store/4j4b9j4f5m552yrc2mg53dr6570xq0jk-tiled-0.10.2/ (x86_64), from
a recentish git master.

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-11-27 17:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 14:53 [PATCH] gnu: Add Tiled 宋文武
2014-11-13 15:02 ` Eric Bavier
2014-11-13 15:10   ` 宋文武
2014-11-13 15:17 ` 宋文武
2014-11-14 22:10   ` Ludovic Courtès
2014-11-21 17:07     ` Andreas Enge
2014-11-21 22:17       ` Ludovic Courtès
2014-11-22 12:08         ` Andreas Enge
2014-11-23  4:43           ` iyzsong
2014-11-24 20:32           ` Ludovic Courtès
2014-11-27 17:39             ` Ludovic Courtès
2014-11-13 17:01 ` Ludovic Courtès
2014-11-14 11:27   ` 宋文武

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.