From: Andreas Enge <andreas@enge.fr>
To: guix-devel@gnu.org
Subject: [PATCH] Add einstein.
Date: Sat, 27 Feb 2016 19:06:09 +0100 [thread overview]
Message-ID: <20160227180609.GA1450@solar> (raw)
[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]
Hello,
the attached patch adds a game the source code of which has almost
disappeared... So lots of annoying little things to change. I do it (mostly)
in a build phase right now; should I rather use a patch?
The one thing that bothers me is the lack of license: Debian claims it
is gpl2+ and included the package in previous editions; the source code itself
has no hint of a license, the website from archive.org speaks of "free cross-
platform open source" without further detail.
Actually Debian at
http://metadata.ftp-master.debian.org/changelogs/main/e/einstein/unstable_copyright
also gives an author; so at some point in time in some galaxy, more information must
have been available...
There is actually more info in a Debian bug report!
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289339
It points to the following page:
http://www.babichev.info/en/projects/index.html
Looking at:
http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html
"(...) Einstein (...)
All software published under the terms of GNU General Public License."
Following the link leads to here:
http://web.archive.org/web/20150221145051/http://www.gnu.org/licenses/gpl.html
So is this okay to include under gpl3+?
(In which case I would update the patch and also add a pointer to
http://web.archive.org/web/20150222180355/http://www.babichev.info/en/projects/index.html).
Andreas
[-- Attachment #2: 0001-gnu-Add-einstein.patch --]
[-- Type: text/plain, Size: 6152 bytes --]
From 0261d4b0a587f402f76d83ccddf97b2cf70a03e0 Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Sat, 27 Feb 2016 17:21:04 +0100
Subject: [PATCH] gnu: Add einstein.
* gnu/packages/games.scm (einstein): New variable.
* gnu/packages/patches/einstein-install.patch: New file.
* gnu-system.am (dist_patch_DATA): Register patch.
---
gnu-system.am | 1 +
gnu/packages/games.scm | 68 ++++++++++++++++++++++++++++-
gnu/packages/patches/einstein-install.patch | 21 +++++++++
3 files changed, 89 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/einstein-install.patch
diff --git a/gnu-system.am b/gnu-system.am
index 6ccca12..5fff3e8 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -454,6 +454,7 @@ dist_patch_DATA = \
gnu/packages/patches/doxygen-test.patch \
gnu/packages/patches/duplicity-piped-password.patch \
gnu/packages/patches/duplicity-test_selection-tmp.patch \
+ gnu/packages/patches/einstein-install.patch \
gnu/packages/patches/elfutils-tests-ptrace.patch \
gnu/packages/patches/emacs-constants-lisp-like.patch \
gnu/packages/patches/emacs-exec-path.patch \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 991fa24..0fe669d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
@@ -47,6 +47,7 @@
#:use-module (gnu packages audio)
#:use-module (gnu packages avahi)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages game-development)
#:use-module (gnu packages gettext)
@@ -1917,3 +1918,68 @@ Catan. It can be played on a local network, on the internet, and with AI
players.")
(home-page "http://pio.sourceforge.net/")
(license license:gpl2+)))
+
+(define-public einstein
+ (package
+ (name "einstein")
+ (version "2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://http.debian.net/debian/pool/main/e/"
+ "einstein/einstein_2.0.dfsg.2.orig.tar.gz"))
+ (sha256
+ (base32
+ "1hxrlv6n8py48j487i6wbb4n4vd55w0na69r7ccmmr9vmrsw5mlk"))
+ (patches (list (search-patch "einstein-install.patch")))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("freetype" ,freetype)
+ ("sdl" ,sdl)
+ ("sdl-mixer" ,sdl-mixer)
+ ("sdl-ttf" ,sdl-ttf)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("font-dejavu" ,font-dejavu)))
+ (arguments
+ `(#:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (dejavu (string-append (assoc-ref inputs "font-dejavu")
+ "/share/fonts/truetype/DejaVuSans.ttf")))
+ (substitute* "Makefile"
+ (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
+ ;; Replace proprietary fonts by free one.
+ ;; The font is copied during the compile phase into a resources
+ ;; file, so we need to make the ttf file available.
+ (symlink dejavu "res/DejaVuSans.ttf")
+ (substitute* (find-files "." "\\.(cpp|descr)$")
+ (("laudcn2.ttf") "DejaVuSans.ttf")
+ (("luximb.ttf") "DejaVuSans.ttf")
+ (("nova.ttf") "DejaVuSans.ttf"))
+ ;; Fix compilation with current gcc.
+ (substitute* (find-files "." "\\.(cpp|h)$")
+ (("SDL_mixer.h") "SDL/SDL_mixer.h")
+ (("SDL_ttf.h") "SDL/SDL_ttf.h"))
+ (substitute*
+ '("convert.h" "mkres/convert.h")
+ (("iostream") "iostream>\n#include <typeinfo"))
+ (substitute*
+ '("mkres/main.cpp" "mkres/compressor.cpp" "mkres/unicode.cpp"
+ "unicode.cpp")
+ (("exceptions.h") "exceptions.h\"\n#include \"string.h"))
+ #t))))))
+ (synopsis "Logic puzzle game")
+ (description "The goal of this logic game is to open all cards in a 6x6
+grid, using a number of hints as to their relative position. The game idea
+is attributed to Albert Einstein.")
+ ;; The original home page has disappeared.
+ (home-page (string-append "http://web.archive.org/web/20120521062745/"
+ "http://games.flowix.com/en/index.html"))
+ ;; License according to
+ ;; http://metadata.ftp-master.debian.org/changelogs/main/e/einstein/unstable_copyright
+ ;; The source code is a DFSG-sanitized tarball and does not contain any
+ ;; license information.
+ (license license:gpl2+)))
diff --git a/gnu/packages/patches/einstein-install.patch b/gnu/packages/patches/einstein-install.patch
new file mode 100644
index 0000000..23584d0
--- /dev/null
+++ b/gnu/packages/patches/einstein-install.patch
@@ -0,0 +1,21 @@
+Adapted from the 13_makefile.diff patch in Debian.
+
+diff -u -r einstein-2.0.orig/Makefile einstein-2.0/Makefile
+--- einstein-2.0.orig/Makefile 2005-09-25 23:20:30.000000000 +0200
++++ einstein-2.0/Makefile 2016-02-27 17:18:23.844490088 +0100
+@@ -49,10 +49,14 @@
+
+
+ $(TARGET): $(OBJECTS)
++ cd mkres && make
++ cd res && ../mkres/mkres --source resources.descr --output ../einstein.res
+ $(CXX) $(LNFLAGS) $(OBJECTS) -o $(TARGET)
+
+ clean:
+ rm -f $(OBJECTS) core* *core $(TARGET) *~
++ cd res && rm -f einstein.res
++ cd mkres && make clean
+
+ depend:
+ @makedepend $(SOURCES) 2> /dev/null
+
--
2.6.3
next reply other threads:[~2016-02-27 18:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 18:06 Andreas Enge [this message]
2016-02-28 15:06 ` [PATCH] Add einstein Ricardo Wurmus
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=20160227180609.GA1450@solar \
--to=andreas@enge.fr \
--cc=guix-devel@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).