[PATCH] gnu: Add urho3d.

  • Done
  • quality assurance status badge
Details
3 participants
  • Oleg Pykhalov
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Oleg Pykhalov
Severity
normal
O
O
Oleg Pykhalov wrote on 10 Jan 2018 23:24
(address . guix-patches@gnu.org)
87y3l5ic8f.fsf@gmail.com
Hello Guix,

This patch adds a 3D game engine.
From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Thu, 11 Jan 2018 01:14:41 +0300
Subject: [PATCH] gnu: Add urho3d.

* gnu/packages/game-development.scm (urho3d): New public variable.
---
gnu/packages/game-development.scm | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 363d9a253..69045cf9c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1150,3 +1150,54 @@ features design tools such as a visual editor, can import 3D models and
provide high-quality 3D rendering, it contains an animation editor, and can be
scripted in a Python-like language.")
(license license:expat)))
+
+(define-public urho3d
+ (package
+ (name "urho3d")
+ (version "1.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/urho3d/Urho3D"
+ "/archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1im63n9rx8qq1ks6aq6jrl5ikxg87hqhsy06miqc317hpm1iyav5"))))
+ (build-system cmake-build-system)
+ (inputs `(("libx11" ,libx11)
+ ("libxcursor" ,libxcursor)
+ ("libxext" ,libxext)
+ ("libxi" ,libxi)
+ ("libxinerama" ,libxinerama)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("mesa" ,mesa)
+ ("alsa-lib" ,alsa-lib)
+ ("pulseaudio" ,pulseaudio)))
+ (arguments
+ '(#:tests?
+ #f ; There are no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'use-full-library-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (string-append "../build/Source/ThirdParty"
+ "/SDL/include/generated/SDL_config.h")
+ (("#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \"libasound\\.so\\.2\"")
+ (string-append "#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \""
+ (assoc-ref inputs "alsa-lib")
+ "/lib/libasound.so.2"
+ "\""))
+ (((string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC"
+ " \"libpulse-simple\\.so\\.0\""))
+ (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \""
+ (assoc-ref inputs "pulseaudio")
+ "/lib/libpulse-simple.so.0"
+ "\"")))
+ #t)))))
+ (home-page "https://urho3d.github.io/")
+ (synopsis "Cross-platform 2D and 3D game engine")
+ (description "Lightweight, cross-platform 2D and 3D game engine
+implemented in C++. Inspired by OGRE and Horde3D.")
+ (license license:expat)))
--
2.15.1
Also the latest version of engine could be build with:

Toggle snippet (21 lines)
(define-public urho3d-checkout
(let ((commit "4af4148048a6443154c6f0498d32626d10f1e86b")
(revision "1"))
(package
(inherit urho3d)
(name "urho3d-checkout")
(version (string-append (package-version urho3d) "-" revision "."
(string-take commit 7)))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/urho3d/Urho3D")
(commit commit)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
"1nchxswrkfgzsxghi6c55b27zy9127ni7yvnb4xw2xdddyfm1wl0")))))))--8<---------------cut here---------------end--------------->8---

Thanks,
Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlpWkpAACgkQckbhHGm3
lWm/BRAAzts0nCH+6yQfDertSyeaO34uGRegQuSoAsAd9l7vl9sSto2gdvScnUe8
QjQtKP2DtKRFf8dZsISlDKqkJLU4dz05t86M51j2zXoQY3gLIi/50DmfBH1zMCRD
3N8nRhw+GetWW4o0ikWW4uXghPPZU/8yihqz5sPbz6fCDi0Z3cuP5q5KPN+lFnHo
gE6E2keYH9iJkzTvsEzlM7TBDl1S5rPwr6Qb8nC28MA0YA15dPLPHEpkUuP3+9Ic
WXn3FuCe+dj2tZ1V4vG9XY5e7FuY7nPZO+Ef59JGEaiDOlLJdwT5fiqwNipSiQx0
+9h+x596P5lXDSbe+XZEISHmPgtLcFGMh+T3A5K1xtrFz9nCRtQfRfxxd7+4/Z5A
ddsHtIvHQGDrrGTswxt8N+xxcPPwiUNatsacchw1Yaff4DikQaBNkvs7ogEGtbae
9tT6VyOdUsnOPRmn6apsCDhSEOTXpJIyl8/FVhDbZfq/UqkzmzIjxv5GFML0AS2f
jVUxLm2BemPvga3wEok+ordfYb+SCgIPOXsYL5jrhq0m24DgOq5QBFhZ8vbWGV7f
NpG/vo5o2zJQqBJEnl75nQKcTxu+cQMEyt/CqY+aAutVgplxJVeK99i4cyq0oeac
sq63M65RsTOpxDzVKOry+LJTaXl25XWN27rDYzWJ5TI8dw6Bfks=
=qpid
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 12 Jan 2018 15:01
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 30084@debbugs.gnu.org)
87shbbqiq5.fsf@gnu.org
Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

Toggle quote (7 lines)
> From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Thu, 11 Jan 2018 01:14:41 +0300
> Subject: [PATCH] gnu: Add urho3d.
>
> * gnu/packages/game-development.scm (urho3d): New public variable.

[...]

Toggle quote (4 lines)
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* (string-append "../build/Source/ThirdParty"
> + "/SDL/include/generated/SDL_config.h")

IIUC there’s a bundled copy of SDL, right? Can we instead build against
our SDL?

Ideally, to be safe from bundling, we should “rm -rf ThirdParty” in a
snippet. Is that possible?

Toggle quote (7 lines)
> + (((string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC"
> + " \"libpulse-simple\\.so\\.0\""))
> + (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \""
> + (assoc-ref inputs "pulseaudio")
> + "/lib/libpulse-simple.so.0"
> + "\"")))

Please use a literal string in the ‘substitute*’ pattern (you can use
backslashes to split it on several lines.)

Toggle quote (3 lines)
> + (description "Lightweight, cross-platform 2D and 3D game engine
> +implemented in C++. Inspired by OGRE and Horde3D.")

Full sentences please! :-)


Could you send an updated path?

Thank you,
Ludo’.
O
O
Oleg Pykhalov wrote on 23 Jan 2018 14:29
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 30084@debbugs.gnu.org)
87r2qgput3.fsf@gmail.com
Hello Ludovic,

Thank you for review!

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

Toggle quote (20 lines)
> Hi Oleg,
>
> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> Date: Thu, 11 Jan 2018 01:14:41 +0300
>> Subject: [PATCH] gnu: Add urho3d.
>>
>> * gnu/packages/game-development.scm (urho3d): New public variable.
>
> [...]
>
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (substitute* (string-append "../build/Source/ThirdParty"
>> + "/SDL/include/generated/SDL_config.h")
>
> IIUC there’s a bundled copy of SDL, right? Can we instead build against
> our SDL?

Yes, it's a bundled copy. We probably can, but how? The build system
probably configured look for 'Source/ThirdParty/SDL'. So should we make
a symbolic link like 'Source/ThirdParty/SDL' -> '/gnu/store/…-SDL'?

I'll check this later. Maybe it will search for a system first SDL and
if not find it use their own. Also I have a question about SDL in the
following quote.

Toggle quote (3 lines)
> Ideally, to be safe from bundling, we should “rm -rf ThirdParty” in a
> snippet. Is that possible?

Unfortunately no. The contents of the 'Source/ThirdParty' has much more
than just SDL. It's too much work for now, but a good TODO.

Source/ThirdParty/SDL

AngelScript Assimp boost Box2D Bullet Civetweb Detour DetourCrowd
DetourTileCache FreeType GLEW ik JO kNet LibCpuId LICENSES Lua
LuaJIT LZ4 MojoShader Mustache nanodbc PugiXml rapidjson Recast SDL
SQLite StanHull STB toluapp WebP

Actually I wonder will those libraries and the engine overall play nice
with OUR SDL library? Should we provide a Guix version and bundled
libraries version?

Toggle quote (10 lines)
>> + (((string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC"
>> + " \"libpulse-simple\\.so\\.0\""))
>> + (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \""
>> + (assoc-ref inputs "pulseaudio")
>> + "/lib/libpulse-simple.so.0"
>> + "\"")))
>
> Please use a literal string in the ‘substitute*’ pattern (you can use
> backslashes to split it on several lines.)

OK. Thanks for notice!

Toggle quote (7 lines)
>> + (description "Lightweight, cross-platform 2D and 3D game engine
>> +implemented in C++. Inspired by OGRE and Horde3D.")
>
> Full sentences please! :-)
>
> https://www.gnu.org/software/guix/manual/html_node/Synopses-and-Descriptions.html

Oh, thanks!

Toggle quote (1 lines)
> Could you send an updated path?
From 5a906d8a8a9ff50ed46b5ffc33714b11517e23ca Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Thu, 11 Jan 2018 01:14:41 +0300
Subject: [PATCH] gnu: Add urho3d.

* gnu/packages/game-development.scm (urho3d): New public variable.
---
gnu/packages/game-development.scm | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 0b08b04f5..3c5eae5cd 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1206,3 +1206,54 @@ related games such as Heretic and Hexen. It comes with a 3d preview mode and
a 2D editor view.")
(home-page "http://eureka-editor.sourceforge.net/")
(license license:gpl2+)))
+
+(define-public urho3d
+ (package
+ (name "urho3d")
+ (version "1.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/urho3d/Urho3D"
+ "/archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1im63n9rx8qq1ks6aq6jrl5ikxg87hqhsy06miqc317hpm1iyav5"))))
+ (build-system cmake-build-system)
+ (inputs `(("libx11" ,libx11)
+ ("libxcursor" ,libxcursor)
+ ("libxext" ,libxext)
+ ("libxi" ,libxi)
+ ("libxinerama" ,libxinerama)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("mesa" ,mesa)
+ ("alsa-lib" ,alsa-lib)
+ ("pulseaudio" ,pulseaudio)))
+ (arguments
+ '(#:tests?
+ #f ; There are no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'use-full-library-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "../build/Source/ThirdParty\
+/SDL/include/generated/SDL_config.h"
+ (("#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \"libasound\\.so\\.2\"")
+ (string-append "#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \""
+ (assoc-ref inputs "alsa-lib")
+ "/lib/libasound.so.2"
+ "\""))
+ (((string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC"
+ " \"libpulse-simple\\.so\\.0\""))
+ (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \""
+ (assoc-ref inputs "pulseaudio")
+ "/lib/libpulse-simple.so.0"
+ "\"")))
+ #t)))))
+ (home-page "https://urho3d.github.io/")
+ (synopsis "Cross-platform 2D and 3D game engine")
+ (description "This package provides a lightweight, cross-platform 2D and
+3D game engine implemented in C++. Inspired by OGRE and Horde3D.")
+ (license license:expat)))
--
2.15.1
Oleg.
-----BEGIN PGP SIGNATURE-----

iQIyBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlpnOMgACgkQckbhHGm3
lWmCxw/1HLkVSGoMFS/t6k1tBn24gSZqf/sWR31i8TjkFumpKiCGBRKhtqsgT1Cb
G1RJ8lbGcBtMRT6AErHsb39ZS/yrwaaExKxa11GUbqG3IGnwAClGGcgGmLoLubdH
zkGfDvWQ8QP3xWqPq3hD4slz0VVabEsk88c/CL9no/QjROjZMtftaRs50pdy98LQ
mKUbDFx1iVIn9feyNuChfQtZiiHD/JGJaOmF2mOmX5Fef66O+BEg9cQkSPMR6ab5
gTZD390JgbNGVjQowwSRk4ljYLKFO+HKePgm1cNzaXAQPe1/pSWtO28HJakxY5Ab
U6b4Nj1l0J3yC615zj0m4Diz/Qtm6Juy3fgaSz6jmRdPisJUZkqoklBGqz76Q5X0
PuXNG1RYX0A7HpbN/2LxQcXeic6XWnuJf05bl03lo8InHvYfEVGgPxFjj/8ad4/S
VTIZNpgbQegn/EEckykF4FB5Q8Yu2hsuyrT1V9aRJm+Oa3aa5DBxX7bAHRoWhnw7
n/Irgv5GX1wAQeR9y3R62gudqQWuZd1xfIvXe+hz2YxaDX/cVGcbhmBDvfP4SV44
0dmXZ/1XSW1owjaV1nNx2T/YYc0c2+eSBHk4ieHRHft0PsdMljy2ffiGvopmFvRE
0fyxNl71D7ZRP4MfOhCYaQJqBsBcQlifqIkwnJg7byvWdNcXUA==
=svEF
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 23 Jan 2018 15:07
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 30084@debbugs.gnu.org)
87vafs653b.fsf@gnu.org
Hello,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

Toggle quote (26 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hi Oleg,
>>
>> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>>
>>> From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
>>> From: Oleg Pykhalov <go.wigust@gmail.com>
>>> Date: Thu, 11 Jan 2018 01:14:41 +0300
>>> Subject: [PATCH] gnu: Add urho3d.
>>>
>>> * gnu/packages/game-development.scm (urho3d): New public variable.
>>
>> [...]
>>
>>> + (lambda* (#:key inputs #:allow-other-keys)
>>> + (substitute* (string-append "../build/Source/ThirdParty"
>>> + "/SDL/include/generated/SDL_config.h")
>>
>> IIUC there’s a bundled copy of SDL, right? Can we instead build against
>> our SDL?
>
> Yes, it's a bundled copy. We probably can, but how? The build system
> probably configured look for 'Source/ThirdParty/SDL'. So should we make
> a symbolic link like 'Source/ThirdParty/SDL' -> '/gnu/store/…-SDL'?

Rather, we should adjust CMakeLists.txt (if needed) so that it links
against our copy of SDL, like Fis Trivial did with ‘rct’ today.

Toggle quote (13 lines)
>> Ideally, to be safe from bundling, we should “rm -rf ThirdParty” in a
>> snippet. Is that possible?
>
> Unfortunately no. The contents of the 'Source/ThirdParty' has much more
> than just SDL. It's too much work for now, but a good TODO.
>
> Source/ThirdParty/SDL
>
> AngelScript Assimp boost Box2D Bullet Civetweb Detour DetourCrowd
> DetourTileCache FreeType GLEW ik JO kNet LibCpuId LICENSES Lua
> LuaJIT LZ4 MojoShader Mustache nanodbc PugiXml rapidjson Recast SDL
> SQLite StanHull STB toluapp WebP

Ouch, that’s a lot of stuff! We should at least remove boost, FreeType,
GLEW, Lua, LuaJIT, LZ4, SDL, and SQLite, for which we have packages.

Toggle quote (4 lines)
> Actually I wonder will those libraries and the engine overall play nice
> with OUR SDL library? Should we provide a Guix version and bundled
> libraries version?

We’ll have to try; hopefully they’re shipping an unmodified SDL.

Toggle quote (7 lines)
> From 5a906d8a8a9ff50ed46b5ffc33714b11517e23ca Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Thu, 11 Jan 2018 01:14:41 +0300
> Subject: [PATCH] gnu: Add urho3d.
>
> * gnu/packages/game-development.scm (urho3d): New public variable.

Could you please try unbundling the things mentioned above, and add a
FIXME for those we’re not unbundling yet? We should try and see how
difficult it is; for ‘rct’ it was OK.

Thank you!

Ludo’.
L
L
Leo Famulari wrote on 13 Feb 2019 01:12
(no subject)
(address . control@debbugs.gnu.org)
20190213001219.GB2568@jasmine.lan
tag 30084 moreinfo
L
L
Leo Famulari wrote on 22 Mar 2020 21:42
Re: [bug#30084] [PATCH] gnu: Add urho3d.
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 30084@debbugs.gnu.org)
20200322204230.GA19668@jasmine.lan
On Thu, Jan 11, 2018 at 01:24:16AM +0300, Oleg Pykhalov wrote:
Toggle quote (7 lines)
> From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Thu, 11 Jan 2018 01:14:41 +0300
> Subject: [PATCH] gnu: Add urho3d.
>
> * gnu/packages/game-development.scm (urho3d): New public variable.

What is the status of this patch? Do you still intend to add it to Guix
or can we close the ticket?
O
O
Oleg Pykhalov wrote on 23 Mar 2020 08:54
(name . Leo Famulari)(address . leo@famulari.name)
87y2rrld4i.fsf@gmail.com
Hello Leo,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (11 lines)
> On Thu, Jan 11, 2018 at 01:24:16AM +0300, Oleg Pykhalov wrote:
>> From 186090075a1ae515bb4893763e7c528568e15939 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> Date: Thu, 11 Jan 2018 01:14:41 +0300
>> Subject: [PATCH] gnu: Add urho3d.
>>
>> * gnu/packages/game-development.scm (urho3d): New public variable.
>
> What is the status of this patch? Do you still intend to add it to Guix
> or can we close the ticket?

I'm not sure about the time when I will prepare the package without
built-in third-party dependencies. So we could close the ticket until.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl54a00ACgkQFn+OpQAa
+pyg3BAAvb/VdsLw8oYVejT4wEdTo3x+75ILPMIymIDrIdfPNjGQ2z0E/dfUjjdu
7/4uOtSrZqIBCRYgDAcrfC/icH9nLW7UUZeEtmMepXI67KvMiNqpNTcohNx4ua4V
+LzZcStI3GtKOnpOPG8+tc4AQ35REKRyCx2ZVD7UeM5SV0NKeOC8iaMWJ+d+Bq9A
V2tPQtNemtYEHKwd2kDFHKRdzC7T9e4kIZydd7weWAH3fon6UWVjLh8E2K39l1oy
JtIuNkb36IpjaXXvbBcnSUoNUTV3VHxBW/dzeFMOpGZe7igroAS9/PU8J0JOb4Rj
R8WjokwjxiKZgjvFK5RxkFReTzXhS3hYKAAax72knZ/SWIVzgtzSc4urgvMo9wfx
k5ivpp+Iz8RRYyyO0NZsaIIwHEtb79+XITFEyo88bKlRS9Kq305VpX0OJV6EEAg4
vHzWA00rlHcLDtJbfLVCDjUVlJrym5hBVKMahpXAW0jYaLbLiPFdbVYUOwm8K71l
Sb41sbWsWyqiDVK0Mg4fCXQhb/Dkt3ydM9sj5AHaPv+9DrRmt+zzWyWfoxynLPwx
1AdFIY5K+G1JTzojJO2byG6IxGaYu0EF5KsgPhzJzx1X7V4dqU3OvPoZXlTszIrG
4pA96Io0+xxEWvRjvJTBrIT3pUxS7cG+lrDk2Jt48FlO2Sn2DHI=
=lQaj
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 30084@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 30084
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch