From 8698d986db21d6399fb57f1af1e38d6223bf9b92 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Fri, 24 May 2019 20:50:31 -0400 Subject: gnu: supertux: Update to 0.6.0. * gnu/packages/games.scm (supertux): Update to 0.6.0. [source]: Add patches. [arguments]: Add -DUSE_SYSTEM_PHYSFS=ON. Add 'patch-squirrel-path' phase. [inputs]: Add freetype and squirrel. * gnu/packages/patches/supertux-fix-build-with-gcc5.patch, gnu/packages/patches/supertux-unbundle-squirrel.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. --- .../patches/supertux-fix-build-with-gcc5.patch | 75 ++++++++++++++++++++++ .../patches/supertux-unbundle-squirrel.patch | 53 +++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 gnu/packages/patches/supertux-fix-build-with-gcc5.patch create mode 100644 gnu/packages/patches/supertux-unbundle-squirrel.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/supertux-fix-build-with-gcc5.patch b/gnu/packages/patches/supertux-fix-build-with-gcc5.patch new file mode 100644 index 0000000000..6393215ca1 --- /dev/null +++ b/gnu/packages/patches/supertux-fix-build-with-gcc5.patch @@ -0,0 +1,75 @@ +Taken from https://github.com/SuperTux/supertux/commit/a75317ef0a94847d9b6a7833b9c6652ef29edde3. +This patch fixes building with gcc versions earlier than 6. + +From a75317ef0a94847d9b6a7833b9c6652ef29edde3 Mon Sep 17 00:00:00 2001 +From: Ingo Ruhnke +Date: Fri, 28 Dec 2018 22:45:35 +0100 +Subject: [PATCH] Add workaround for backwards compatibilty with gcc5 + +Fixes #1014 +--- + src/video/gl/gl_painter.cpp | 11 ++++++----- + src/video/ttf_surface.cpp | 16 +++++++++------- + 2 files changed, 15 insertions(+), 12 deletions(-) + +diff --git a/src/video/gl/gl_painter.cpp b/src/video/gl/gl_painter.cpp +index 5e0d1e7b1e..32fb7a09b6 100644 +--- a/src/video/gl/gl_painter.cpp ++++ b/src/video/gl/gl_painter.cpp +@@ -37,12 +37,13 @@ namespace { + + inline std::tuple blend_factor(Blend blend) + { ++ using B = std::tuple; + switch(blend) { +- case Blend::NONE: return {GL_ONE, GL_ZERO}; +- case Blend::BLEND: return {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}; +- case Blend::ADD: return {GL_SRC_ALPHA, GL_ONE}; +- case Blend::MOD: return {GL_DST_COLOR, GL_ZERO}; +- default: return {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}; ++ case Blend::NONE: return B(GL_ONE, GL_ZERO); ++ case Blend::BLEND: return B(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ++ case Blend::ADD: return B(GL_SRC_ALPHA, GL_ONE); ++ case Blend::MOD: return B(GL_DST_COLOR, GL_ZERO); ++ default: return B(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + } + +diff --git a/src/video/ttf_surface.cpp b/src/video/ttf_surface.cpp +index 7c9505004f..b41d67b2c8 100644 +--- a/src/video/ttf_surface.cpp ++++ b/src/video/ttf_surface.cpp +@@ -55,12 +55,13 @@ TTFSurface::create(const TTFFont& font, const std::string& text) + SDL_SetSurfaceColorMod(text_surface.get(), 0, 0, 0); + SDL_SetSurfaceBlendMode(text_surface.get(), SDL_BLENDMODE_BLEND); + ++ using P = std::tuple; + const std::initializer_list > positions[] = { + {}, +- {{0, 0}}, +- {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}, +- {{-2, 0}, {2, 0}, {0, -2}, {0, 2}, +- {-1, -1}, {1, -1}, {-1, 1}, {1, 1}} ++ {P{0, 0}}, ++ {P{-1, 0}, P{1, 0}, P{0, -1}, P{0, 1}}, ++ {P{-2, 0}, P{2, 0}, P{0, -2}, P{0, 2}, ++ P{-1, -1}, P{1, -1}, P{-1, 1}, P{1, 1}} + }; + + int shadow_size = std::min(2, font.get_shadow_size()); +@@ -77,11 +78,12 @@ TTFSurface::create(const TTFFont& font, const std::string& text) + SDL_SetSurfaceColorMod(text_surface.get(), 0, 0, 0); + SDL_SetSurfaceBlendMode(text_surface.get(), SDL_BLENDMODE_BLEND); + ++ using P = std::tuple; + const std::initializer_list > positions[] = { + {}, +- {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}, +- {{-2, 0}, {2, 0}, {0, -2}, {0, 2}, +- {-1, -1}, {1, -1}, {-1, 1}, {1, 1}} ++ {P{-1, 0}, P{1, 0}, P{0, -1}, P{0, 1}}, ++ {P{-2, 0}, P{2, 0}, P{0, -2}, P{0, 2}, ++ P{-1, -1}, P{1, -1}, P{-1, 1}, P{1, 1}} + }; + + int border = std::min(2, font.get_border()); diff --git a/gnu/packages/patches/supertux-unbundle-squirrel.patch b/gnu/packages/patches/supertux-unbundle-squirrel.patch new file mode 100644 index 0000000000..054183b75f --- /dev/null +++ b/gnu/packages/patches/supertux-unbundle-squirrel.patch @@ -0,0 +1,53 @@ +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2019-05-24 17:58:19.693090158 -0400 ++++ b/CMakeLists.txt 2019-05-24 17:57:43.349473252 -0400 +@@ -375,44 +375,15 @@ + + include(ConfigureChecks) + +- +-## Also build external/squirrel +- +-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt) +- message(FATAL_ERROR "squirrel submodule is not checked out or ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt is missing") +-endif() +- + set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex) +-ExternalProject_Add(squirrel +- SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/" +- CMAKE_ARGS +- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} +- -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} +- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} +- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} +- -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} +- -DINSTALL_INC_DIR=include) +- +-if(WIN32) +- add_library(squirrel_lib SHARED IMPORTED) +- set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}") +- set_target_properties(squirrel_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/squirrel${CMAKE_LINK_LIBRARY_SUFFIX}") +- add_library(sqstdlib_lib SHARED IMPORTED) +- set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}") +- set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/sqstdlib${CMAKE_LINK_LIBRARY_SUFFIX}") +- +- #For debug run purposes +- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux.bat.in" "${PROJECT_BINARY_DIR}/run_supertux.bat") +-else() +- add_library(squirrel_lib STATIC IMPORTED) +- set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}") +- add_library(sqstdlib_lib STATIC IMPORTED) +- set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}") +-endif() + + include_directories(SYSTEM ${SQUIRREL_PREFIX}/include) + ++add_library(squirrel_lib SHARED IMPORTED) ++set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}") ++add_library(sqstdlib_lib SHARED IMPORTED) ++set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ + ## Also build external/tinygettext + + if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/CMakeLists.txt) -- cgit v1.2.3 From 0d3dbe3f56949ad07d8a3816a8a884d3726d2c7d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 26 May 2019 14:18:26 +0200 Subject: gnu: libevent: Update to 2.1.0. * gnu/packages/patches/libevent-2.1-dns-tests.patch, gnu/packages/patches/libevent-2.1-skip-failing-test.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/libevent.scm (libevent): Update to 2.1.10. [source](patches): Remove. --- gnu/local.mk | 2 -- gnu/packages/libevent.scm | 10 +++------ gnu/packages/patches/libevent-2.1-dns-tests.patch | 26 ---------------------- .../patches/libevent-2.1-skip-failing-test.patch | 24 -------------------- 4 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 gnu/packages/patches/libevent-2.1-dns-tests.patch delete mode 100644 gnu/packages/patches/libevent-2.1-skip-failing-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 57d3590b57..3a199f82f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -989,8 +989,6 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.0-CVE-2016-10196.patch \ %D%/packages/patches/libevent-2.0-CVE-2016-10197.patch \ %D%/packages/patches/libevent-2.0-evbuffer-add-use-last-with-datap.patch \ - %D%/packages/patches/libevent-2.1-dns-tests.patch \ - %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm index 01e1e3b00a..72227c1d95 100644 --- a/gnu/packages/libevent.scm +++ b/gnu/packages/libevent.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015, 2017 Mark H Weaver ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 David Thompson -;;; Copyright © 2017 Marius Bakke +;;; Copyright © 2017, 2019 Marius Bakke ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Pierre Neidhardt @@ -41,7 +41,7 @@ (define-public libevent (package (name "libevent") - (version "2.1.8") + (version "2.1.10") (source (origin (method url-fetch) (uri (string-append @@ -49,11 +49,7 @@ version "-stable/libevent-" version "-stable.tar.gz")) (sha256 (base32 - "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n")) - (patches (search-patches "libevent-2.1-dns-tests.patch" - ;; XXX: Try removing this for > 2.1.8. - ;; https://github.com/libevent/libevent/issues/452 - "libevent-2.1-skip-failing-test.patch")))) + "1c25928gdv495clxk2v1d4gkr5py7ack4gx2n7d13frnld0syr78")))) (build-system gnu-build-system) (arguments ;; This skips some of the tests which fail on armhf and aarch64. diff --git a/gnu/packages/patches/libevent-2.1-dns-tests.patch b/gnu/packages/patches/libevent-2.1-dns-tests.patch deleted file mode 100644 index 091752a49d..0000000000 --- a/gnu/packages/patches/libevent-2.1-dns-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -Disable tests that rely on usable DNS lookups, which aren't available -in build chroots. - ---- libevent-2.0.21-stable/test/regress_dns.c 2013-01-20 22:32:09.000000000 +0100 -+++ libevent-2.0.21-stable/test/regress_dns.c 2013-01-20 22:32:30.000000000 +0100 -@@ -2120,10 +2120,6 @@ - - struct testcase_t dns_testcases[] = { - DNS_LEGACY(server, TT_FORK|TT_NEED_BASE), -- DNS_LEGACY(gethostbyname, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT), -- DNS_LEGACY(gethostbyname6, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT), -- DNS_LEGACY(gethostbyaddr, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT), -- { "resolve_reverse", dns_resolve_reverse, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL }, - { "search_empty", dns_search_empty_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, - { "search", dns_search_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, - { "search_lower", dns_search_lower_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, -@@ -2163,9 +2159,6 @@ - - { "client_fail_requests", dns_client_fail_requests_test, - TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, -- { "client_fail_requests_getaddrinfo", -- dns_client_fail_requests_getaddrinfo_test, -- TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, - - END_OF_TESTCASES - }; diff --git a/gnu/packages/patches/libevent-2.1-skip-failing-test.patch b/gnu/packages/patches/libevent-2.1-skip-failing-test.patch deleted file mode 100644 index d9ea1d422d..0000000000 --- a/gnu/packages/patches/libevent-2.1-skip-failing-test.patch +++ /dev/null @@ -1,24 +0,0 @@ -These fail on 32-bit due to an overflow bug in the test program. - -See test/regress_util.c:1448. - -Upstream bug URL: - -https://github.com/libevent/libevent/issues/452 - -diff --git a/test/regress_util.c b/test/regress_util.c -index ef6a1487..4de501fc 100644 ---- a/test/regress_util.c -+++ b/test/regress_util.c -@@ -1413,9 +1413,9 @@ static struct date_rfc1123_case { - { 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"}, - #ifndef _WIN32 - /** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */ -- { 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */, -+ //{ 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */, - /** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */ -- {253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */, -+ //{253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */, - { 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */, - #endif - { 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */, -- cgit v1.2.3 From db6dd04c3dc0f893931f5cb823755eb792f2e9ee Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 31 May 2019 14:37:16 +0200 Subject: gnu: gtksourceview-2: Fix finding default data. * gnu/packages/patches/gtksourceview-2-add-default-directory.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gtk.scm (gtksourceview-2)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 5 +++- .../gtksourceview-2-add-default-directory.patch | 33 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gtksourceview-2-add-default-directory.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3a199f82f8..55fa90f926 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -897,6 +897,7 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ + %D%/packages/patches/gtksourceview-2-add-default-directory.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ %D%/packages/patches/haskell-mode-unused-variables.patch \ %D%/packages/patches/haskell-mode-make-check.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 62b33a45ba..b864225e3d 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -348,7 +348,10 @@ diagrams.") name "-" version ".tar.bz2")) (sha256 (base32 - "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5")))) + "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5")) + (patches + (search-patches + "gtksourceview-2-add-default-directory.patch")))) (build-system gnu-build-system) (native-inputs `(("intltool" ,intltool) diff --git a/gnu/packages/patches/gtksourceview-2-add-default-directory.patch b/gnu/packages/patches/gtksourceview-2-add-default-directory.patch new file mode 100644 index 0000000000..c4b5052b81 --- /dev/null +++ b/gnu/packages/patches/gtksourceview-2-add-default-directory.patch @@ -0,0 +1,33 @@ +From fc401acb15f15d487c942437b6fb429289dd3c67 Mon Sep 17 00:00:00 2001 +From: Julien Lepiller +Date: Fri, 31 May 2019 13:22:25 +0200 +Subject: [PATCH] Add installation directory as a default directory. + +In Guix, this library is installed in a separate directory in the store, +and it's typically not installed system-wide in a fixed directory. Add +the store path to the set of default directories so dependents can find +default langs and source highlighting scheme. +--- + gtksourceview/gtksourceview-utils.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gtksourceview/gtksourceview-utils.c b/gtksourceview/gtksourceview-utils.c +index 6f06bab..c3467d5 100644 +--- a/gtksourceview/gtksourceview-utils.c ++++ b/gtksourceview/gtksourceview-utils.c +@@ -66,6 +66,12 @@ _gtk_source_view_get_default_dirs (const char *basename, + basename, + NULL)); + ++ /* installed dir */ ++ g_ptr_array_add (dirs, g_build_filename (DATADIR, ++ SOURCEVIEW_DIR, ++ basename, ++ NULL)); ++ + g_ptr_array_add (dirs, NULL); + + return (gchar**) g_ptr_array_free (dirs, FALSE); +-- +2.21.0 + -- cgit v1.2.3 From d4cb92e707c5a8b727027f1593fd82db9acaaaf4 Mon Sep 17 00:00:00 2001 From: Vasile Dumitrascu Date: Thu, 30 May 2019 20:49:32 +0200 Subject: gnu: gnucash: Update to 3.5. * gnu/packages/gnucash.scm (gnucash): Update to 3.5. [source]: Remove unneeded patch. * gnu/packages/patches/gnucash-fix-test-transaction-failure.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. Signed-off-by: Kei Kebreau --- gnu/local.mk | 1 - gnu/packages/gnucash.scm | 5 +- .../gnucash-fix-test-transaction-failure.patch | 54 ---------------------- 3 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 gnu/packages/patches/gnucash-fix-test-transaction-failure.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9b9c6e00ec..d0c1080496 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -866,7 +866,6 @@ dist_patch_DATA = \ %D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ - %D%/packages/patches/gnucash-fix-test-transaction-failure.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm index 5b4da97e5d..e09a7cb0c0 100644 --- a/gnu/packages/gnucash.scm +++ b/gnu/packages/gnucash.scm @@ -54,7 +54,7 @@ ;; directory. (package (name "gnucash") - (version "3.4") + (version "3.5") (source (origin (method url-fetch) @@ -62,8 +62,7 @@ version "/gnucash-" version ".tar.bz2")) (sha256 (base32 - "1ms2wg4sh5gq3rpjmmnp85rh5nc9ahca1imxkvhz4d3yiwy8hm52")) - (patches (search-patches "gnucash-fix-test-transaction-failure.patch")))) + "0ibp7g6aknvnkwkin97kv04ipksy3l18dsz9qysjb7h2nr8hnvbp")))) (build-system cmake-build-system) (inputs `(("guile" ,guile-2.2) diff --git a/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch b/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch deleted file mode 100644 index 7b1b29f06c..0000000000 --- a/gnu/packages/patches/gnucash-fix-test-transaction-failure.patch +++ /dev/null @@ -1,54 +0,0 @@ -# This patch was submitted upstream to: https://bugs.gnucash.org/show_bug.cgi?id=797008. -From c20d74bebca516d0e391724202aad511967fe109 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer -Date: Wed, 2 Jan 2019 14:46:28 -0500 -Subject: [PATCH] tests: Fix a test failure in test-transaction.scm. - -With the New Year upon us, a test which was hard-coded to use 2018 now -failed. - -Fixes issue #797008 (see: -https://bugs.gnucash.org/show_bug.cgi?id=797008). - -* gnucash/report/standard-reports/test/test-transaction.scm: -(trep-tests): Use the current year in the test string instead of a -static one. ---- - gnucash/report/standard-reports/test/test-transaction.scm | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm -index 755aba298..ae3fbd5c1 100644 ---- a/gnucash/report/standard-reports/test/test-transaction.scm -+++ b/gnucash/report/standard-reports/test/test-transaction.scm -@@ -5,6 +5,7 @@ - (use-modules (gnucash report stylesheets)) - (use-modules (gnucash report report-system)) - (use-modules (gnucash report report-system test test-extras)) -+(use-modules (srfi srfi-19)) - (use-modules (srfi srfi-64)) - (use-modules (gnucash engine test srfi64-extras)) - (use-modules (sxml simple)) -@@ -643,7 +644,8 @@ - (set-option! options "General" "Show original currency amount" #t) - (set-option! options "Sorting" "Primary Key" 'date) - (set-option! options "Sorting" "Primary Subtotal for Date Key" 'none) -- (let* ((sxml (options->sxml options "dual columns"))) -+ (let* ((sxml (options->sxml options "dual columns")) -+ (current-year (date->string (current-date) "~y"))) - (test-equal "dual amount column, with original currency headers" - (list "Date" "Num" "Description" "Memo/Notes" "Account" - "Debit (USD)" "Credit (USD)" "Debit" "Credit") -@@ -652,7 +654,8 @@ - (list "Grand Total" "$2,280.00" "$2,280.00") - (get-row-col sxml -1 #f)) - (test-equal "dual amount column, first transaction correct" -- (list "01/03/18" "$103 income" "Root.Asset.Bank" "$103.00" "$103.00") -+ (list (string-append "01/03/" current-year) "$103 income" -+ "Root.Asset.Bank" "$103.00" "$103.00") - (get-row-col sxml 1 #f))) - ) - --- -2.19.0 - -- cgit v1.2.3 From a0c3a2e3a1a37884f795542d1cc8fb4b7bb227ac Mon Sep 17 00:00:00 2001 From: Guillaume LE VAILLANT Date: Tue, 28 May 2019 11:00:58 +0200 Subject: gnu: Add txr. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lisp.scm (txr): New variable. * gnu/packages/patches/txr-shell.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/lisp.scm | 48 +++++++++++++++++++++++++++++ gnu/packages/patches/txr-shell.patch | 59 ++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 gnu/packages/patches/txr-shell.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d0c1080496..55a8fcd361 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1318,6 +1318,7 @@ dist_patch_DATA = \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ + %D%/packages/patches/txr-shell.patch \ %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 167c4433b1..dfc58d469f 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2018 Pierre Langlois ;;; Copyright © 2019 Katherine Cox-Buday ;;; Copyright © 2019 Jesse Gildersleve +;;; Copyright © 2019 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,8 +46,10 @@ #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages ed) + #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) @@ -5321,3 +5324,48 @@ port within a range.") (define-public ecl-find-port (sbcl-package->ecl-package sbcl-find-port)) + +(define-public txr + (package + (name "txr") + (version "216") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.kylheku.com/cgit/txr/snapshot/txr-" + version + ".tar.bz2")) + (patches (search-patches "txr-shell.patch")) + (sha256 + (base32 + "07cxdpc9zsqd0c2668g00dqjpd6zc4mfdn74aarr6d2hpzdhh937")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("cc=gcc") + #:phases (modify-phases %standard-phases + (add-after 'configure 'fix-tests + (lambda _ + (substitute* "tests/017/realpath.tl" + (("/usr/bin") "/")) + (substitute* "tests/017/realpath.expected" + (("/usr/bin") "/")) + #t)) + (replace 'check + (lambda _ + (zero? (system* "make" "tests"))))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (inputs + `(("libffi" ,libffi))) + (synopsis "General-purpose, multi-paradigm programming language") + (description + "TXR is a general-purpose, multi-paradigm programming language. It +comprises two languages integrated into a single tool: a text scanning and +extraction language referred to as the TXR Pattern Language (sometimes just +\"TXR\"), and a general-purpose dialect of Lisp called TXR Lisp. TXR can be +used for everything from \"one liner\" data transformation tasks at the +command line, to data scanning and extracting scripts, to full application +development in a wide-range of areas.") + (home-page "https://nongnu.org/txr/") + (license license:bsd-2))) diff --git a/gnu/packages/patches/txr-shell.patch b/gnu/packages/patches/txr-shell.patch new file mode 100644 index 0000000000..a4abb73eac --- /dev/null +++ b/gnu/packages/patches/txr-shell.patch @@ -0,0 +1,59 @@ +Use the current shell instead of trying to find another one and +failing to do so. + +diff --git a/configure b/configure +index f1adb919..7891b4dc 100755 +--- a/configure ++++ b/configure +@@ -26,28 +26,6 @@ + # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-# +-# The #!/bin/sh might be some legacy piece of crap, +-# not even up to 1990 POSIX.2 spec. So the first step +-# is to look for a better shell in some known places +-# and re-execute ourselves with that interpreter. +-# +- +-if test x$txr_shell = x ; then +- for shell in /bin/bash /usr/bin/bash /usr/xpg4/bin/sh ; do +- if test -x $shell ; then +- txr_shell=$shell +- break +- fi +- done +- if test x$txr_shell = x ; then +- echo "No known POSIX shell found: falling back on /bin/sh, which may not work" +- txr_shell=/bin/sh +- fi +- export txr_shell +- exec $txr_shell $0 ${@+"$@"} +-fi +- + set -u + + # +@@ -190,13 +168,6 @@ while [ $# -gt 0 ] ; do + exit 1 + fi + +- eval "var_exists=\${$var+y}" +- +- if [ "$var_exists" != y ] ; then +- printf "$0: nonexistent option: '%s'\n" "$1" +- exit 1 +- fi +- + eval "$var='$val'" + + eval "var_given_exists=\${${var}_given+y}" +@@ -208,6 +179,8 @@ while [ $# -gt 0 ] ; do + shift + done + ++txr_shell=$CONFIG_SHELL ++ + # + # If --help was given (or --help= or help=) then + # print help and exit. The termination status is failed, to indicate -- cgit v1.2.3