[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(Failed) attempt at packaging CGoban

From: Maxim Cournoyer
Subject: (Failed) attempt at packaging CGoban
Date: Thu, 20 Jun 2019 16:42:24 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)


I started trying to package CGoban, but it proved more complicated than
I'd like.  I'm not sure it is worth inclusion in Guix given that it is
unmaintained software, but if anyone would like to have a look at it in,
here was my attempt:

--8<---------------cut here---------------start------------->8---
(define-public cgoban
    (name "cgoban")
    (version "1.9.12")
    (source (origin
              (method url-fetch)
              (uri (string-append "";
                                  name "/" name "-" version ".tar.gz"))
    (build-system gnu-build-system)
     `(#:phases (modify-phases %standard-phases
                  (add-after 'unpack 'delete-configure
                    (lambda _
                      (delete-file "configure")
                  (add-after 'delete-configure '
                    (lambda _
                      ;; Work around an issue in Guix/Guile: Throw to key
                      ;; `decoding-error' with args `("peek-char" "input
                      ;; decoding error" 84 #<input: 15>)'.
                      (invoke "iconv" "-f" "ISO-8859-1" "-t" "UTF-8"
                              "" "-o" "")
                      ;; Add template descriptions, required by autoheader.
                      (substitute* ""
                        (("DATE,\\$DATE" all)
                         (string-append all ", [The date]"))
                        (("DATE_FRENCH,\\$DATE_FRENCH" all)
                         (string-append all ", [The date, in French]"))
                        (("AC_DEFINE\\(HAVE_H_ERRNO" all)
                         (string-append all ", [], [Error numbers header 
                        (("AC_DEFINE\\(HAVE_SOCKETS" all)
                         (string-append all ", [], [Sockets header file]"))
                        (("AC_DEFINE\\(LINUX_SOUND" all)
                         (string-append all ", [], [Linux sound header file]"))
                        (("AC_DEFINE\\(SUN_SOUND" all)
                         (string-append all ", [], [Sun sound header file]"))
                        (("VERSION,\\$VERSION" all)
                         (string-append all ", [The version]"))
                        (("AC_DEFINE\\(X11_DISP" all)
                         (string-append all ", [], [X11 display header file]"))
                        ;; XXX: The SYSTEM_TYPE shell variable used in the
                        ;; configure script doesn't work and gets replaced by
                        ;; "" in various places.  It still works, if the
                        ;; configure.h file is placed directly under the
                        ;; "obj-" subdirectory.

                        ;; Using shell variables in AC_CONFIG_HEADER seems to
                        ;; break "autoheader"; use a fixed location instead.
     `(("autoconf" ,autoconf)
       ("automake" ,automake)))
     `(("libx11" ,libx11)
       ("libxpm" ,libxpm)))
    (home-page "";)
    (synopsis "Go board game")
    (description "CGoban (Complete Goban) is a computerized board on which you
can play the game of Go against another player, view and edit smart-go files,
and connect to Go servers on the internet.  It can also interface with
computer Go programs such as GNU Go that speak the Go modem protocol.")
    (license license:gpl2+)))
--8<---------------cut here---------------end--------------->8---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]