From: Pierre Neidhardt <mail@ambrevar.xyz>
To: 41967@debbugs.gnu.org
Subject: [bug#41967] [PATCH] gnu: Add tesseract.
Date: Sat, 20 Jun 2020 20:07:08 +0200 [thread overview]
Message-ID: <87r1u9392r.fsf@ambrevar.xyz> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 137 bytes --]
The code is free software (zlib) for sure.
I'm not sure about the media files license.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-tesseract.patch --]
[-- Type: text/x-patch, Size: 5158 bytes --]
From e88230cc776517b9ab84fe159d96799041fd8107 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Sat, 20 Jun 2020 19:26:48 +0200
Subject: [PATCH] gnu: Add tesseract.
* gnu/packages/games.scm (tesseract): New variable.
---
gnu/packages/games.scm | 99 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 39669ba1c9..7633e209c1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10817,3 +10817,102 @@ and shovers to get to the goal. Race against the clock to collect coins to
earn extra balls. Also included is Neverputt, which is a 3D miniature golf
game.") ;thanks to Debian for description
(license license:gpl2+))))
+
+(define-public tesseract
+ (let ((svn-revision 2411))
+ (package
+ (name "tesseract")
+ (version (number->string svn-revision))
+ (source
+ (origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url "svn://svn.tuxfamily.org/svnroot/tesseract/main")
+ (revision svn-revision)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1av9jhl2ivbl7wfszyhyna84llvh1z2d8khkmadm8d105addj10q"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file-recursively
+ '("bin" "bin64"
+ "server.bat"
+ "tesseract.bat"
+ "src/lib"
+ "src/lib64"))
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list "CC=gcc")
+ #:tests? #f ; No tests.
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'cd-src
+ (lambda _ (chdir "src") #t))
+ (add-before 'build 'fix-env
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH"
+ (string-append (assoc-ref inputs "sdl2-union")
+ "/include/SDL2:"
+ (or (getenv "CPATH") "")))
+ #t))
+ (add-after 'install 'really-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/tesseract"))
+ (bin (string-append out "/bin/tesseract"))
+ (client (string-append out "/bin/tesseract-client")))
+ (chdir "..") ; Back to root.
+ (for-each
+ (lambda (dir)
+ (mkdir-p (string-append share "/" dir))
+ (copy-recursively dir (string-append share "/" dir)))
+ '("config" "media"))
+ (mkdir-p (string-append out "/bin/"))
+ (copy-file "bin_unix/native_client" client)
+ (copy-file "bin_unix/native_server"
+ (string-append out "/bin/tesseract-server"))
+ (call-with-output-file bin
+ (lambda (p)
+ (format p "#!~a
+TESS_DATA=~a
+TESS_BIN=~a
+TESS_OPTIONS=\"-u$HOME/.tesseract\"
+cd \"$TESS_DATA\"
+exec \"$TESS_BIN\" \"$TESS_OPTIONS\" \"$@\""
+ (which "bash")
+ share
+ client)))
+ (chmod bin #o755)
+ (install-file "src/readme_tesseract.txt"
+ (string-append out "/share/licenses/tesseract/LICENSE"))
+ (let ((icon (string-append out "/share/pixmaps/tesseract.png")))
+ (mkdir-p (dirname icon))
+ (copy-file "media/interface/cube.png" icon)
+ (make-desktop-entry-file
+ (string-append out "/share/applications/tesseract.desktop")
+ #:name "Tesseract"
+ #:comment "First-person shooter with map editing"
+ #:exec "tesseract"
+ #:icon icon
+ #:categories '("Game"))))
+ #t)))))
+ (inputs
+ `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-mixer sdl2-image)))
+ ("zlib" ,zlib)
+ ("libpng" ,libpng)
+ ("libgl" ,mesa)))
+ (home-page "http://tesseract.gg/")
+ (synopsis "First-person shooter with map editing, instagib, DM and CTF")
+ (description "Tesseract is a first-person shooter game focused on
+instagib deathmatch and capture-the-flag gameplay as well as cooperative
+in-game map editing.
+
+Tesseract provides a free software engine derived from @emph{Cube 2:
+Sauerbraten} technology but with upgraded modern rendering techniques. The
+new rendering features include fully dynamic omnidirectional shadows, global
+illumination, HDR lighting, deferred shading, morphological / temporal /
+multisample anti-aliasing, and much more.")
+ (license license:zlib))))
--
2.26.2
next reply other threads:[~2020-06-20 18:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 18:07 Pierre Neidhardt [this message]
2020-06-26 23:04 ` [bug#41967] [PATCH] gnu: Add tesseract Kei
2020-06-27 6:57 ` Pierre Neidhardt
2020-06-28 15:26 ` Kei
2020-06-28 20:04 ` Pierre Neidhardt
2020-06-29 6:12 ` Efraim Flashner
2020-06-29 17:41 ` Msavoritias
2020-06-29 18:23 ` Pierre Neidhardt
2020-06-29 19:19 ` Nicolas Goaziou
2020-06-30 14:38 ` Pierre Neidhardt
2020-06-29 18:23 ` zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1u9392r.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=41967@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).