guix-devel
[Top][All Lists]
Advanced

[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)

Hello,

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
  (package
    (name "cgoban")
    (version "1.9.12")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://www.igoweb.org/~wms/comp/";
                                  name "/" name "-" version ".tar.gz"))
              (sha256
               (base32
                "1q90zasgh8vmkgaad1njz65cikfq27g77mh3d31cpzlkyz9b1s5r"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases (modify-phases %standard-phases
                  (add-after 'unpack 'delete-configure
                    (lambda _
                      (delete-file "configure")
                      #t))
                  (add-after 'delete-configure 'fix-configure.in
                    (lambda _
                      ;; Work around an issue in Guix/Guile: Throw to key
                      ;; `decoding-error' with args `("peek-char" "input
                      ;; decoding error" 84 #<input: configure.in 15>)'.
                      (invoke "iconv" "-f" "ISO-8859-1" "-t" "UTF-8"
                              "configure.in" "-o" "configure.in")
                      ;; Add template descriptions, required by autoheader.
                      (substitute* "configure.in"
                        (("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 
file]"))
                        (("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.
                        (("AC_CONFIG_HEADER.*")
                         
"AC_CONFIG_HEADERS([obj-/configure.h:configure.h.in])\n"))
                      #t)))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)))
    (inputs
     `(("libx11" ,libx11)
       ("libxpm" ,libxpm)))
    (home-page "http://www.igoweb.org/~wms/comp/cgoban/index.html";)
    (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]