From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.user Subject: Re: Nyacc patches for Mes to avoid bundling? Date: Mon, 08 May 2017 17:37:37 +0200 Organization: AvatarAcademy.nl Message-ID: <87lgq7e4vy.fsf@gnu.org> References: <87bmr93jot.fsf@gnu.org> <1B4686A9-DAC0-4DD4-B11B-78629E0C5339@gmail.com> <20B29595-EC72-4660-815A-0261AD88B519@gmail.com> <87shkj96qi.fsf@gnu.org> <500F7340-E32F-4F6D-89EB-66B94DFF1754@gmail.com> <87o9v78m2y.fsf@gnu.org> <87wp9u6kn2.fsf@gnu.org> <1153D978-92D7-4F34-A5EB-0A0287F4009F@gmail.com> <87pofm6j2j.fsf@gnu.org> <87k25t6r05.fsf@gnu.org> <70FFAE28-410D-4D1A-AF9C-21FC52C895C2@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1494257935 27352 195.159.176.226 (8 May 2017 15:38:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 May 2017 15:38:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon May 08 17:38:44 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kkG-0006xz-Dq for guile-user@m.gmane.org; Mon, 08 May 2017 17:38:44 +0200 Original-Received: from localhost ([::1]:60087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7kkL-0002SZ-VO for guile-user@m.gmane.org; Mon, 08 May 2017 11:38:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7kjQ-0001yh-IK for guile-user@gnu.org; Mon, 08 May 2017 11:37:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7kjN-00086p-RW for guile-user@gnu.org; Mon, 08 May 2017 11:37:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7kjE-00083p-IT; Mon, 08 May 2017 11:37:40 -0400 Original-Received: from peder.onsbrabantnet.nl ([88.159.206.46]:50778 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7kjD-0007fs-Rm; Mon, 08 May 2017 11:37:40 -0400 In-Reply-To: <70FFAE28-410D-4D1A-AF9C-21FC52C895C2@gmail.com> (Matt Wette's message of "Sun, 7 May 2017 07:16:02 -0700") X-Url: http://AvatarAcademy.nl X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13697 Archived-At: --=-=-= Content-Type: text/plain Matt Wette writes: > I have released a 0.78.1 with the following additions: > 1) configure > 2) README.nyacc => README, INSTALL > 3) Makefile.in Wow, great; that's real simple! I fixed two typos (see attached patch 1) and created a Guix[SD] package description in guix.scm (patch 2) that I intend to submit for inclusion into Guix, so that I can unbundle Nyacc from the Mes package. Greetings, janneke --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-configure-Makefile.in-typos.patch >From 15cc53ead5d95889f763a649228801734b4250e8 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 8 May 2017 07:20:55 +0200 Subject: [PATCH 1/2] Fix configure, Makefile.in typos. * Makefile.in (SITE_SCM_GO_DIR): Typo, add missing continuation. * configure (site_scm_go_dir): Typo: site-ccache-dir. --- Makefile.in | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 10dc383..9790245 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,7 @@ install: (cd module; \ make -f Makefile.nyacc GUILE=$(GUILE) \ SITE_SCM_DIR=$(SITE_SCM_DIR) \ - SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR) + SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR) \ install) install-srcs: diff --git a/configure b/configure index 857beda..7541e94 100755 --- a/configure +++ b/configure @@ -70,7 +70,7 @@ fi if [ "X$site_scm_go_dir" == "X" ]; then if [ "X$prefix" == "X" ]; then - SITE_SCM_GO_DIR=`$GUILE -c '(display (%site-cache-dir))'` + SITE_SCM_GO_DIR=`$GUILE -c '(display (%site-ccache-dir))'` else EFF_VER=`$GUILE -c "(display (effective-version))"` SITE_SCM_GO_DIR=$prefix/lib/guile/$EFF_VER/site-ccache -- 2.12.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-Add-guix-package.patch Content-Transfer-Encoding: quoted-printable >From 35e9b3d639d97e9d615487766f0db245596452da Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 8 May 2017 17:31:52 +0200 Subject: [PATCH 2/2] Add guix package. * guix.scm: New file. Enables to setup a build environment, build and install for Guix from git. --- guix.scm | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 109 insertions(+) create mode 100644 guix.scm diff --git a/guix.scm b/guix.scm new file mode 100644 index 0000000..9e846ef --- /dev/null +++ b/guix.scm @@ -0,0 +1,109 @@ +;;; guix.scm -- Guix package definition + +;;; NYACC (Not Yet Another Compiler Compiler!) +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen + +;;; Also borrowing code from: +;;; guile-sdl2 --- FFI bindings for SDL2 +;;; Copyright =C2=A9 2015 David Thompson + +;;; This library is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public +;;; License as published by the Free Software Foundation; either +;;; version 3 of the License, or (at your option) any later version. +;;; +;;; This library 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public Licen= se +;;; along with this library; if not, see + +;;; Commentary: +;; +;; GNU Guix development package. To build and install, run: +;; +;; guix package -f guix.scm +;; +;; To build it, but not install it, run: +;; +;; guix build -f guix.scm +;; +;; To use as the basis for a development environment, run: +;; +;; guix environment -l guix.scm +;; +;;; Code: + +(use-modules (srfi srfi-1) + (srfi srfi-26) + (ice-9 match) + (ice-9 popen) + (ice-9 rdelim) + (gnu packages) + (gnu packages guile) + ((guix build utils) #:select (with-directory-excursion)) + (guix build-system gnu) + (guix gexp) + (guix download) + (guix licenses) + (guix packages)) + +(define %source-dir (dirname (current-filename))) + +(define git-file? + (let* ((pipe (with-directory-excursion %source-dir + (open-pipe* OPEN_READ "git" "ls-files"))) + (files (let loop ((lines '())) + (match (read-line pipe) + ((? eof-object?) + (reverse lines)) + (line + (loop (cons line lines)))))) + (status (close-pipe pipe))) + (lambda (file stat) + (match (stat:type stat) + ('directory #t) + ((or 'regular 'symlink) + (any (cut string-suffix? <> file) files)) + (_ #f))))) + +(define-public nyacc + (package + (name "nyacc") + (version "0.78.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://download.savannah.gnu.org/releases/nyacc/" + name "-" version ".tar.gz")) + (patches (search-patches "0001-Fix-configure-Makefile.in-typ= os.patch")) + (sha256 + (base32 "01grl34za9avzbawvwgx8m2c1mjmjyafkbv5j366h6vyhm8ghd= xy")))) + (build-system gnu-build-system) + (native-inputs + `(("guile" ,guile-2.2))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'setenv + (lambda _ + ;; quiet warnings + (setenv "GUILE_AUTO_COMPILE" "0") + #t))))) + (synopsis "a LALR(1) Parser Generator in Guile") + (description + "NYACC is a LALR(1) Parser Generator Implemented in Guile.=20 +The syntax and nomenclature should be considered not stable.") + (home-page "") + (license (list gpl3+ lgpl3+)))) + +(define nyacc.git + (package + (inherit nyacc) + (name "nyacc.git") + (version "git") + (source (local-file %source-dir #:recursive? #t #:select? git-file?)))) + +;; Return it here so `guix build/environment/package' can consume it direc= tly. +nyacc.git --=20 2.12.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--