From d61a894bfa3670c0742e72222af02ede820fd6cd Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 20 May 2017 16:24:19 +0100 Subject: gnu: gnome: Add deja-dup. * gnu/packages/gnome.scm (deja-dup): New variable. * gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch file entry. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3eccc879b0..60ad007a28 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -565,6 +565,7 @@ dist_patch_DATA = \ %D%/packages/patches/cyrus-sasl-CVE-2013-4122.patch \ %D%/packages/patches/dblatex-remove-multirow.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ + %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/doc++-include-directives.patch \ -- cgit 1.4.1 From 726ecfeb3ae9eb4baacf042e2dd34b1e377dccfa Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 25 Jul 2017 17:06:51 +0200 Subject: gnu: Add guile2.0-bytestructures. * gnu/packages/patches/guile-bytestructures-name-clash.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-bytestructures)[source]: Use it. [arguments]: Unpack the source. [native-inputs]: New field. (guile2.0-bytestructures): New variable. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 22 +++++++++++++-- .../patches/guile-bytestructures-name-clash.patch | 31 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/guile-bytestructures-name-clash.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 60ad007a28..1cc8f08d98 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -668,6 +668,7 @@ dist_patch_DATA = \ %D%/packages/patches/gsl-test-i686.patch \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ + %D%/packages/patches/guile-bytestructures-name-clash.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-present-coding.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index dd852cb3e6..21cc59ef04 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1543,16 +1543,28 @@ is no support for parsing block and inline level HTML.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")))) + "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")) + (patches (search-patches "guile-bytestructures-name-clash.patch")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils) + (ice-9 ftw) (ice-9 match) (ice-9 popen) (ice-9 rdelim)) + ;; Unpack. + (setenv "PATH" + (string-join (list (assoc-ref %build-inputs "tar") + (assoc-ref %build-inputs "xz")) + "/bin:" 'suffix)) + (system* "tar" "xf" (assoc-ref %build-inputs "source")) + (match (scandir ".") + (("." ".." directory) + (chdir directory))) + (let* ((out (assoc-ref %outputs "out")) (guile (assoc-ref %build-inputs "guile")) (effective (read-line @@ -1561,7 +1573,7 @@ is no support for parsing block and inline level HTML.") "-c" "(display (effective-version))"))) (module-dir (string-append out "/share/guile/site/" effective)) - (source (assoc-ref %build-inputs "source")) + (source (getcwd)) (doc (string-append out "/share/doc/scheme-bytestructures")) (sld-files (with-directory-excursion source (find-files "bytestructures/r7" "\\.exports.sld$"))) @@ -1601,6 +1613,9 @@ is no support for parsing block and inline level HTML.") ;; Also copy over the README. (install-file "README.md" doc) #t)))) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) (inputs `(("guile" ,guile-2.2))) (home-page "https://github.com/TaylanUB/scheme-bytestructures") @@ -1613,6 +1628,9 @@ an abstraction over raw memory. It's also more powerful than the C type system, elevating types to first-class status.") (license license:gpl3+))) +(define-public guile2.0-bytestructures + (package-for-guile-2.0 guile-bytestructures)) + (define-public guile-aspell (package (name "guile-aspell") diff --git a/gnu/packages/patches/guile-bytestructures-name-clash.patch b/gnu/packages/patches/guile-bytestructures-name-clash.patch new file mode 100644 index 0000000000..ac834dd504 --- /dev/null +++ b/gnu/packages/patches/guile-bytestructures-name-clash.patch @@ -0,0 +1,31 @@ +This patch works around a name clash between the 'cstring-pointer' module and +the 'cstring-module' variable that occurs in Guile 2.0: + + ice-9/boot-9.scm:109:20: re-exporting local variable: cstring-pointer + +--- guile-bytestructures-20170402.91d042e-checkout/bytestructures/guile.scm 2017-07-25 17:04:32.858289986 +0200 ++++ guile-bytestructures-20170402.91d042e-checkout/bytestructures/guile.scm 2017-07-25 17:04:41.130244725 +0200 +@@ -1,6 +1,6 @@ + (define-module (bytestructures guile)) + +-(import ++(use-modules + (bytestructures guile base) + (bytestructures guile vector) + (bytestructures guile struct) +@@ -8,7 +8,7 @@ + (bytestructures guile pointer) + (bytestructures guile numeric) + (bytestructures guile string) +- (bytestructures guile cstring-pointer)) ++ ((bytestructures guile cstring-pointer) #:prefix cstr:)) + (re-export + make-bytestructure-descriptor + bytestructure-descriptor? +@@ -75,5 +75,5 @@ + + bs:string + +- cstring-pointer ++ cstr:cstring-pointer + ) -- cgit 1.4.1 From c7db7b86cef0cca32c4f22deab4f0d6caf964729 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Mon, 24 Jul 2017 13:51:50 -0400 Subject: gnu: perl-dbd-mysql: Fix CVE-2017-10788. * gnu/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/databases.scm (perl-dbd-mysql)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/databases.scm | 3 +- .../patches/perl-dbd-mysql-CVE-2017-10788.patch | 62 ++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1cc8f08d98..f5255feff6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -904,6 +904,7 @@ dist_patch_DATA = \ %D%/packages/patches/pcre2-CVE-2017-8786.patch \ %D%/packages/patches/perl-file-path-CVE-2017-6512.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ + %D%/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ %D%/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index ee340505e6..7e62452ea6 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1015,7 +1015,8 @@ columns, primary keys, unique constraints and relationships.") "DBD-mysql-" version ".tar.gz")) (sha256 (base32 - "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2")))) + "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2")) + (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch")))) (build-system perl-build-system) ;; Tests require running MySQL server (arguments `(#:tests? #f)) diff --git a/gnu/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch b/gnu/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch new file mode 100644 index 0000000000..74613cb632 --- /dev/null +++ b/gnu/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch @@ -0,0 +1,62 @@ +Fix CVE-2017-10788: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-10788 + +Patch written to match corrected documentation specifications: + +Old: http://web.archive.org/web/20161220021610/https://dev.mysql.com/doc/refman/5.7/en/mysql-stmt-close.html +New: https://dev.mysql.com/doc/refman/5.7/en/mysql-stmt-close.html + +The patch itself is from https://github.com/perl5-dbi/DBD-mysql/issues/120#issuecomment-312420660. + +From 9ce10cfae7138c37c3a0cb2ba2a1d682482943d0 Mon Sep 17 00:00:00 2001 +From: Pali +Date: Sun, 25 Jun 2017 10:07:39 +0200 +Subject: [PATCH] Fix use-after-free after calling mysql_stmt_close() + +Ignore return value from mysql_stmt_close() and also its error message +because it points to freed memory after mysql_stmt_close() was called. +--- + dbdimp.c | 8 ++------ + mysql.xs | 7 ++----- + 2 files changed, 4 insertions(+), 11 deletions(-) + +diff --git a/dbdimp.c b/dbdimp.c +index c60a5f6..a6410e5 100644 +--- a/dbdimp.c ++++ b/dbdimp.c +@@ -4894,12 +4894,8 @@ void dbd_st_destroy(SV *sth, imp_sth_t *imp_sth) { + + if (imp_sth->stmt) + { +- if (mysql_stmt_close(imp_sth->stmt)) +- { +- do_error(DBIc_PARENT_H(imp_sth), mysql_stmt_errno(imp_sth->stmt), +- mysql_stmt_error(imp_sth->stmt), +- mysql_stmt_sqlstate(imp_sth->stmt)); +- } ++ mysql_stmt_close(imp_sth->stmt); ++ imp_sth->stmt= NULL; + } + #endif + +diff --git a/mysql.xs b/mysql.xs +index 55376e1..affde59 100644 +--- a/mysql.xs ++++ b/mysql.xs +@@ -434,11 +434,8 @@ do(dbh, statement, attr=Nullsv, ...) + if (bind) + Safefree(bind); + +- if(mysql_stmt_close(stmt)) +- { +- fprintf(stderr, "\n failed while closing the statement"); +- fprintf(stderr, "\n %s", mysql_stmt_error(stmt)); +- } ++ mysql_stmt_close(stmt); ++ stmt= NULL; + + if (retval == -2) /* -2 means error */ + { +-- +1.7.9.5 -- cgit 1.4.1 From 8ad40a69d16d33cb307cd2a7762ac8ea807bfb92 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Tue, 25 Jul 2017 16:19:45 -0400 Subject: gnu: evince: Update to 3.24.1. * gnu/packages/gnome.scm (evince): Update to 3.24.1. [source]: Remove obsolete patch. * gnu/packages/patches/evince-CVE-2017-1000083.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 5 +- gnu/packages/patches/evince-CVE-2017-1000083.patch | 109 --------------------- 3 files changed, 2 insertions(+), 113 deletions(-) delete mode 100644 gnu/packages/patches/evince-CVE-2017-1000083.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f5255feff6..9dfca9dbb7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -582,7 +582,6 @@ dist_patch_DATA = \ %D%/packages/patches/eudev-rules-directory.patch \ %D%/packages/patches/eudev-conflicting-declaration.patch \ %D%/packages/patches/evilwm-lost-focus-bug.patch \ - %D%/packages/patches/evince-CVE-2017-1000083.patch \ %D%/packages/patches/expat-CVE-2016-0718-fix-regression.patch \ %D%/packages/patches/exim-CVE-2017-1000369.patch \ %D%/packages/patches/fabric-tests.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 1ab59a6303..b670ef7a3e 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -687,16 +687,15 @@ forgotten when the session ends.") (define-public evince (package (name "evince") - (version "3.24.0") + (version "3.24.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) - (patches (search-patches "evince-CVE-2017-1000083.patch")) (sha256 (base32 - "13yw0i68dgqp9alyliy3zifszh7rikkpi1xbz5binvxxgfpraf04")))) + "0dqgzwxl0xfr341r5i8j8hn6j6rhv62lmc6xbzjppcq76hhwb84w")))) (build-system glib-or-gtk-build-system) (arguments `(#:configure-flags '("--disable-nautilus") diff --git a/gnu/packages/patches/evince-CVE-2017-1000083.patch b/gnu/packages/patches/evince-CVE-2017-1000083.patch deleted file mode 100644 index 2ca062f337..0000000000 --- a/gnu/packages/patches/evince-CVE-2017-1000083.patch +++ /dev/null @@ -1,109 +0,0 @@ -Fix CVE-2017-1000083. - -http://seclists.org/oss-sec/2017/q3/128 -https://bugzilla.gnome.org/show_bug.cgi?id=784630 - -Patch copied from upstream source repository: - -https://git.gnome.org/browse/evince/commit/?id=717df38fd8509bf883b70d680c9b1b3cf36732ee - -From 717df38fd8509bf883b70d680c9b1b3cf36732ee Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 6 Jul 2017 20:02:00 +0200 -Subject: comics: Remove support for tar and tar-like commands - -diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c -index 4c74731..641d785 100644 ---- a/backend/comics/comics-document.c -+++ b/backend/comics/comics-document.c -@@ -56,8 +56,7 @@ typedef enum - RARLABS, - GNAUNRAR, - UNZIP, -- P7ZIP, -- TAR -+ P7ZIP - } ComicBookDecompressType; - - typedef struct _ComicsDocumentClass ComicsDocumentClass; -@@ -117,9 +116,6 @@ static const ComicBookDecompressCommand command_usage_def[] = { - - /* 7zip */ - {NULL , "%s l -- %s" , "%s x -y %s -o%s", FALSE, OFFSET_7Z}, -- -- /* tar */ -- {"%s -xOf" , "%s -tf %s" , NULL , FALSE, NO_OFFSET} - }; - - static GSList* get_supported_image_extensions (void); -@@ -364,13 +360,6 @@ comics_check_decompress_command (gchar *mime_type, - comics_document->command_usage = GNAUNRAR; - return TRUE; - } -- comics_document->selected_command = -- g_find_program_in_path ("bsdtar"); -- if (comics_document->selected_command) { -- comics_document->command_usage = TAR; -- return TRUE; -- } -- - } else if (g_content_type_is_a (mime_type, "application/x-cbz") || - g_content_type_is_a (mime_type, "application/zip")) { - /* InfoZIP's unzip program */ -@@ -396,12 +385,6 @@ comics_check_decompress_command (gchar *mime_type, - comics_document->command_usage = P7ZIP; - return TRUE; - } -- comics_document->selected_command = -- g_find_program_in_path ("bsdtar"); -- if (comics_document->selected_command) { -- comics_document->command_usage = TAR; -- return TRUE; -- } - - } else if (g_content_type_is_a (mime_type, "application/x-cb7") || - g_content_type_is_a (mime_type, "application/x-7z-compressed")) { -@@ -425,27 +408,6 @@ comics_check_decompress_command (gchar *mime_type, - comics_document->command_usage = P7ZIP; - return TRUE; - } -- comics_document->selected_command = -- g_find_program_in_path ("bsdtar"); -- if (comics_document->selected_command) { -- comics_document->command_usage = TAR; -- return TRUE; -- } -- } else if (g_content_type_is_a (mime_type, "application/x-cbt") || -- g_content_type_is_a (mime_type, "application/x-tar")) { -- /* tar utility (Tape ARchive) */ -- comics_document->selected_command = -- g_find_program_in_path ("tar"); -- if (comics_document->selected_command) { -- comics_document->command_usage = TAR; -- return TRUE; -- } -- comics_document->selected_command = -- g_find_program_in_path ("bsdtar"); -- if (comics_document->selected_command) { -- comics_document->command_usage = TAR; -- return TRUE; -- } - } else { - g_set_error (error, - EV_DOCUMENT_ERROR, -diff --git a/configure.ac b/configure.ac -index 9e9f831..7eb0f1f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -795,7 +795,7 @@ AC_SUBST(TIFF_MIME_TYPES) - AC_SUBST(APPDATA_TIFF_MIME_TYPES) - AM_SUBST_NOTMAKE(APPDATA_TIFF_MIME_TYPES) - if test "x$enable_comics" = "xyes"; then -- COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7;application/x-ext-cbt" -+ COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7;" - APPDATA_COMICS_MIME_TYPES=$(echo "$COMICS_MIME_TYPES" | sed -e 's/;/<\/mimetype>\n /g') - if test -z "$EVINCE_MIME_TYPES"; then - EVINCE_MIME_TYPES="${COMICS_MIME_TYPES}" --- -cgit v0.12 - -- cgit 1.4.1 From bcd757fdb49753f41a7ee4f0181cdef582705a6a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 26 Jul 2017 11:11:11 +0200 Subject: gnu: mg: Move to (gnu packages text-editors). * gnu/packages/mg.scm: Remove. * gnu/local.mk (GNU_SYSTEM_MODULES): Remove it. * gnu/packages/text-editors.scm (mg): New variable. --- gnu/local.mk | 1 - gnu/packages/mg.scm | 76 ------------------------------------------- gnu/packages/text-editors.scm | 51 +++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 77 deletions(-) delete mode 100644 gnu/packages/mg.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9dfca9dbb7..724c6b6758 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -270,7 +270,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/mes.scm \ %D%/packages/messaging.scm \ %D%/packages/mingw.scm \ - %D%/packages/mg.scm \ %D%/packages/microcom.scm \ %D%/packages/moe.scm \ %D%/packages/monitoring.scm \ diff --git a/gnu/packages/mg.scm b/gnu/packages/mg.scm deleted file mode 100644 index 5df6770009..0000000000 --- a/gnu/packages/mg.scm +++ /dev/null @@ -1,76 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer -;;; Copyright © 2017 Eric Bavier -;;; -;;; 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 . - -(define-module (gnu packages mg) - #:use-module (guix licenses) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module (guix build-system gnu) - #:use-module (gnu packages libbsd) - #:use-module (gnu packages ncurses) - #:use-module (gnu packages pkg-config)) - -(define-public mg - (package - (name "mg") - (version "20161005") - (source (origin - (method url-fetch) - (uri (string-append "http://homepage.boetes.org/software/mg/mg-" - version ".tar.gz")) - (sha256 - (base32 - "0qaydk2cy765n9clghmi5gdnpwn15y2v0fj6r0jcm0v7d89vbz5p")) - (modules '((guix build utils))) - (snippet - '(begin - (substitute* "GNUmakefile" - (("/usr/bin/") "")))))) - (build-system gnu-build-system) - (native-inputs - `(("pkg-config" ,pkg-config))) - (inputs - `(("libbsd" ,libbsd) - ("ncurses" ,ncurses))) - (arguments - ;; No test suite available. - '(#:tests? #f - #:make-flags (list (string-append "prefix=" %output) - "CURSES_LIBS=-lncurses" - "CC=gcc") - #:phases (modify-phases %standard-phases - (delete 'configure) - (add-before 'install 'patch-tutorial-location - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "mg.1" - (("/usr") (assoc-ref outputs "out"))) - #t)) - (add-after 'install 'install-tutorial - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/doc/mg"))) - (install-file "tutorial" doc) - #t)))))) - (home-page "http://homepage.boetes.org/software/mg/") - (synopsis "Microscopic GNU Emacs clone") - (description - "Mg (mg) is a GNU Emacs style editor, with which it is \"broadly\" -compatible. This is a portable version of the mg maintained by the OpenBSD -team.") - (license public-domain))) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 56049eb510..756c2beab2 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2017 Feng Shu ;;; Copyright © 2017 ng0 +;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,6 +36,7 @@ #:use-module (gnu packages gcc) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) + #:use-module (gnu packages libbsd) #:use-module (gnu packages lua) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) @@ -228,3 +230,52 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on 16, 32, and 64-bit CPUs.") (supported-systems '("x86_64-linux" "i686-linux")) (license license:gpl2+))) + +(define-public mg + (package + (name "mg") + (version "20161005") + (source (origin + (method url-fetch) + (uri (string-append "http://homepage.boetes.org/software/mg/mg-" + version ".tar.gz")) + (sha256 + (base32 + "0qaydk2cy765n9clghmi5gdnpwn15y2v0fj6r0jcm0v7d89vbz5p")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "GNUmakefile" + (("/usr/bin/") "")))))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libbsd" ,libbsd) + ("ncurses" ,ncurses))) + (arguments + ;; No test suite available. + '(#:tests? #f + #:make-flags (list (string-append "prefix=" %output) + "CURSES_LIBS=-lncurses" + "CC=gcc") + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'install 'patch-tutorial-location + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "mg.1" + (("/usr") (assoc-ref outputs "out"))) + #t)) + (add-after 'install 'install-tutorial + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/mg"))) + (install-file "tutorial" doc) + #t)))))) + (home-page "http://homepage.boetes.org/software/mg/") + (synopsis "Microscopic GNU Emacs clone") + (description + "Mg (mg) is a GNU Emacs style editor, with which it is \"broadly\" +compatible. This is a portable version of the mg maintained by the OpenBSD +team.") + (license license:public-domain))) -- cgit 1.4.1