Patchwork (WIP) gforth. looking for someone with interest in this to take over.

login
register
mail settings
Submitter ng0
Date Sept. 23, 2016, 8:36 p.m.
Message ID <87r38apd4u.fsf@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/15965/
State New
Headers show

Comments

ng0 - Sept. 23, 2016, 8:36 p.m.
it's better to focus on one thing, and for me the things I need to focus
on are not including gforth. If anyone wants to take over, feel free to
do so.
=?utf-8?B?5a6L5paH5q2m?= - Sept. 24, 2016, 6:17 a.m.
ng0 <ngillmann@runbox.com> writes:

> [...]
> Subject: [PATCH 1/2] gnu: Add gforth.

Thanks, I applied it with some modifications:

- Rename it to gforth.scm, as it's a GNU package.
- Use synopsis and description from `guix import gnu'.
- Remove inputs except `m4'.  libffcall is used by 'lib.fs' to dlopen
  libraries at runtime, I think it's not useful for Guix.
- Install gforth.el (compile and autoload not done).
ng0 - Sept. 24, 2016, 8:55 a.m.
宋文武 <iyzsong@member.fsf.org> writes:

> ng0 <ngillmann@runbox.com> writes:
>
>> [...]
>> Subject: [PATCH 1/2] gnu: Add gforth.
>
> Thanks, I applied it with some modifications:

Wait a minute. It was functional? My impression was this does not even
build. Maybe I was wrong. Or did you fix it through the modifications
below?

> - Rename it to gforth.scm, as it's a GNU package.

Why? There's colorforth, which I did not append, in the same file as it
is also a forth implementation. And they are not the only ones. I picked
this name as forth is the name of the language, like in lisp.scm,
scheme.scm, etc.
I want to send a patch to rename it to forth.scm and add colorforth into
the file.

> - Use synopsis and description from `guix import gnu'.
> - Remove inputs except `m4'.  libffcall is used by 'lib.fs' to dlopen
>   libraries at runtime, I think it's not useful for Guix.
> - Install gforth.el (compile and autoload not done).
>

Thank you for reviewing and applying

Patch

From d93db05f02603911abaab4911939b3c7930382a3 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Sat, 17 Sep 2016 20:23:34 +0000
Subject: [PATCH 1/2] gnu: Add gforth.

* gnu/packages/forth.scm (gforth): New variable.
---
 gnu/packages/forth.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 gnu/packages/forth.scm

diff --git a/gnu/packages/forth.scm b/gnu/packages/forth.scm
new file mode 100644
index 0000000..2e720d7
--- /dev/null
+++ b/gnu/packages/forth.scm
@@ -0,0 +1,67 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages forth)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages emacs)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages libffcall))
+
+(define-public gforth
+  (package
+    (name "gforth")
+    (version "0.7.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gforth/gforth-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libffcall" ,libffcall)
+       ("linux-libre-headers" ,linux-libre-headers)))
+    ;;("emacs-no-x" ,emacs-no-x)))
+    (native-inputs
+     `(("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("libtool" ,libtool)
+       ("glibc" ,glibc)
+       ("m4" ,m4)))
+    (arguments
+     `(#:parallel-build? #f
+       #:make-flags (list "CC=gcc" "CFLAGS+=-std=gnu99"
+                          (string-append
+                           "PREFIX=" (assoc-ref %outputs "out")))))
+    ;; -std=c99 ??? or -std=gnu99
+    (synopsis
+     "GNU Forth is a fast and portable implementation of the
+ANSI Forth language")
+    (description
+     "Gforth is the Forth implementation of the GNU project.
+Gforth is fully ANS FORTH compliant.")
+    (home-page "https://www.gnu.org/software/gforth/")
+    (license license:gpl3)))
-- 
2.10.0