unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (Failed) attempt at packaging CGoban
@ 2019-06-20  7:42 Maxim Cournoyer
  0 siblings, 0 replies; only message in thread
From: Maxim Cournoyer @ 2019-06-20  7:42 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-20  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20  7:42 (Failed) attempt at packaging CGoban Maxim Cournoyer

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