[PATCH] gnu: Add ogre.

  • Done
  • quality assurance status badge
Details
3 participants
  • Alex Kost
  • manolis837
  • Ricardo Wurmus
Owner
unassigned
Submitted by
manolis837
Severity
normal
M
M
manolis837 wrote on 6 Aug 2017 21:48
(address . guix-patches@gnu.org)(name . Manolis Ragkousis)(address . manolis837@gmail.com)
20170806194810.26105-1-manolis837@gmail.com
From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/graphics.scm (ogre): New variable.
---
gnu/packages/graphics.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (99 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index d0e50106f..584c2445f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -36,11 +36,13 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages check)
#:use-module (gnu packages documentation)
#:use-module (gnu packages haskell)
#:use-module (gnu packages image)
#:use-module (gnu packages python)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate
@@ -60,6 +62,7 @@
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
#:use-module (gnu packages sdl)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
@@ -228,6 +231,70 @@ quaternions and other useful 2D and 3D math functions. Iex is an
exception-handling library.")
(license license:bsd-3)))
+(define-public ogre
+ (package
+ (name "ogre")
+ (version "1.10.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/OGRECave/" name
+ "/archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "1ab354bmwwryxr4zgxchfkm6h4z38mjgif8yn89x640rsrgw5ipj"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'pre-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; It expects googletest source to be downloaded and
+ ;; be in a specific place.
+ (substitute* "Tests/CMakeLists.txt"
+ (("URL(.*)$" _ suffix) (string-append "URL " suffix
+"\t\tURL_HASH MD5=16877098823401d1bf2ed7891d7dce36\n")))
+ #t))
+ (add-before 'build 'pre-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-file (assoc-ref inputs "googletest-source")
+ (string-append (getcwd)
+ "/Tests/googletest-prefix/src/release-1.8.0.tar.gz"))
+ #t)))
+ #:configure-flags
+ (list "-DOGRE_BUILD_TESTS=TRUE"
+ (string-append "-DCMAKE_INSTALL_RPATH="
+ (assoc-ref %outputs "out") "/lib:"
+ (assoc-ref %outputs "out") "/lib/OGRE:"
+ (assoc-ref %build-inputs "googletest") "/lib")
+ "-DOGRE_INSTALL_DOCS=TRUE"
+ "-DOGRE_INSTALL_SAMPLES=TRUE"
+ "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE")))
+ (native-inputs
+ `(("boost" ,boost)
+ ("doxygen" ,doxygen)
+ ("googletest-source" ,(package-source googletest))
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("font-dejavu" ,font-dejavu)
+ ("freeimage" ,freeimage)
+ ("freetype" ,freetype)
+ ("glu" ,glu)
+ ("googletest" ,googletest)
+ ("sdl2" ,sdl2)
+ ("libxaw" ,libxaw)
+ ("libxrandr" ,libxrandr)
+ ("tinyxml" ,tinyxml)
+ ("zziplib" ,zziplib)))
+ (synopsis "Scene-oriented, flexible 3D engine written in C++")
+ (description
+ "OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
+flexible 3D engine written in C++ designed to make it easier and more intuitive
+for developers to produce applications utilising hardware-accelerated 3D
+graphics.")
+ (home-page "http://www.ogre3d.org/")
+ (license license:expat)))
+
(define-public openexr
(package
(name "openexr")
--
2.13.4
A
A
Alex Kost wrote on 12 Aug 2017 22:44
(address . manolis837@gmail.com)(address . 27992@debbugs.gnu.org)
87bmnkldmd.fsf@gmail.com
manolis837@gmail.com (2017-08-06 22:48 +0300) wrote:

[...]
Toggle quote (10 lines)
> +(define-public ogre
> + (package
> + (name "ogre")
> + (version "1.10.7")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/OGRECave/" name
> + "/archive/v" version ".tar.gz"))

Please add 'file-name' to avoid "/gnu/store/…-v1.10.7.tar.gz" name:

(file-name (string-append name "-" version ".tar.gz"))

This is reported by "guix lint ogre".

Toggle quote (10 lines)
> + (sha256
> + (base32
> + "1ab354bmwwryxr4zgxchfkm6h4z38mjgif8yn89x640rsrgw5ipj"))))
> + (build-system cmake-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'pre-configure
> + (lambda* (#:key inputs #:allow-other-keys)

'inputs' are not used here, so just: (lambda _ ...)

Toggle quote (6 lines)
> + ;; It expects googletest source to be downloaded and
> + ;; be in a specific place.
> + (substitute* "Tests/CMakeLists.txt"
> + (("URL(.*)$" _ suffix) (string-append "URL " suffix
> +"\t\tURL_HASH MD5=16877098823401d1bf2ed7891d7dce36\n")))

This string shouldn't start from the beginning of the line. I see the
problem is that a properly indented line would be too long. I would
write it like this:

(substitute* "Tests/CMakeLists.txt"
(("URL(.*)$" _ suffix)
(string-append "URL " suffix
"\t\tURL_HASH "
"MD5=16877098823401d1bf2ed7891d7dce36\n")))

Toggle quote (6 lines)
> + #t))
> + (add-before 'build 'pre-build
> + (lambda* (#:key inputs #:allow-other-keys)
> + (copy-file (assoc-ref inputs "googletest-source")
> + (string-append (getcwd)
> + "/Tests/googletest-prefix/src/release-1.8.0.tar.gz"))
^^^^
same here: (string-append ...) and the next line are not indented
properly. I would write:

(copy-file (assoc-ref inputs "googletest-source")
(string-append (getcwd)
"/Tests/googletest-prefix/src"
"/release-1.8.0.tar.gz"))

The rest looks good to me, thanks!

--
Alex
R
R
Ricardo Wurmus wrote on 16 Aug 2017 16:05
control message for bug #27992
(address . control@debbugs.gnu.org)
E1dhywl-0006UW-Bp@debbugs.gnu.org
tags 27992 moreinfo
R
R
Ricardo Wurmus wrote on 16 Aug 2017 16:08
control message for bug #28049
(address . control@debbugs.gnu.org)
E1dhyzi-0006ZV-UU@debbugs.gnu.org
block 28049 by 27992
M
M
Manolis Ragkousis wrote on 17 Aug 2017 19:03
Re: [bug#27992] [PATCH] gnu: Add ogre.
(name . Alex Kost)(address . alezost@gmail.com)(address . 27992-done@debbugs.gnu.org)
72846512-57b5-abee-be8e-9e5e7c7bd2d7@gmail.com
Hello Alex,

Updated the patch and pushed to master.

Thank you for reviewing :)

Manolis
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 27992
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