From 9a6808e0c00d6acb00b7be4aa573f252fa7d9635 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 21 Oct 2018 11:54:44 +0200 Subject: gnu: tophat: Update to 2.1.1. * gnu/packages/bioinformatics.scm (tophat): Update to 2.1.1. * gnu/packages/patches/tophat-build-with-later-seqan.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- .../patches/tophat-build-with-later-seqan.patch | 24 ---------------------- 1 file changed, 24 deletions(-) delete mode 100644 gnu/packages/patches/tophat-build-with-later-seqan.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/tophat-build-with-later-seqan.patch b/gnu/packages/patches/tophat-build-with-later-seqan.patch deleted file mode 100644 index fc742e2a7d..0000000000 --- a/gnu/packages/patches/tophat-build-with-later-seqan.patch +++ /dev/null @@ -1,24 +0,0 @@ -This patch resolves a build failure when building TopHat 2.1.0 with SeqAn 1.4. -This is the relevant part of a patch originally posted here: -https://lists.fu-berlin.de/pipermail/seqan-dev/2014-July/msg00001.html - ---- a/src/segment_juncs.cpp -+++ b/src/segment_juncs.cpp -@@ -2050,10 +2050,13 @@ void juncs_from_ref_segs(RefSequenceTabl - typedef map MotifMap; - - MotifMap ims; -- -- seqan::DnaStringReverseComplement rev_donor_dinuc(donor_dinuc); -- seqan::DnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); -- -+ -+ typedef seqan::ModifiedString< -+ seqan::ModifiedString > >, -+ seqan::ModReverse> ConstDnaStringReverseComplement; -+ ConstDnaStringReverseComplement rev_donor_dinuc(donor_dinuc); -+ ConstDnaStringReverseComplement rev_acceptor_dinuc(acceptor_dinuc); -+ - if (talkative) - fprintf(stderr, "Collecting potential splice sites in islands\n"); - -- cgit 1.4.1 From 7321920cd3c9c1d7532024dfcdb958cce54b6368 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 21 Oct 2018 12:51:31 +0200 Subject: gnu: crossmap: Update to 0.2.9. * gnu/packages/bioinformatics.scm (crossmap): Update to 0.2.9. * gnu/packages/patches/crossmap-allow-system-pysam.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 25 +---- .../patches/crossmap-allow-system-pysam.patch | 121 --------------------- 3 files changed, 6 insertions(+), 141 deletions(-) delete mode 100644 gnu/packages/patches/crossmap-allow-system-pysam.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c167e6753c..c76908f92f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -634,7 +634,6 @@ dist_patch_DATA = \ %D%/packages/patches/cracklib-fix-buffer-overflow.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ - %D%/packages/patches/crossmap-allow-system-pysam.patch \ %D%/packages/patches/clucene-contribs-lib.patch \ %D%/packages/patches/cube-nocheck.patch \ %D%/packages/patches/cursynth-wave-rand.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 795b0f208e..6469e9e1a1 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1894,31 +1894,18 @@ time.") (define-public crossmap (package (name "crossmap") - (version "0.2.1") + (version "0.2.9") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/crossmap/CrossMap-" - version ".tar.gz")) + (uri (pypi-uri "CrossMap" version)) (sha256 (base32 - "07y179f63d7qnzdvkqcziwk9bs3k4zhp81q392fp1hwszjdvy22f")) - ;; This patch has been sent upstream already and is available - ;; for download from Sourceforge, but it has not been merged. - (patches (search-patches "crossmap-allow-system-pysam.patch")) - (modules '((guix build utils))) - (snippet '(begin - ;; remove bundled copy of pysam - (delete-file-recursively "lib/pysam") - #t)))) + "1byhclrqnqpvc1rqkfh4jwj6yhn0x9y7jk47i0qcjlhk0pjkw92p")))) (build-system python-build-system) - (arguments - `(#:python ,python-2 - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-env - (lambda _ (setenv "CROSSMAP_USE_SYSTEM_PYSAM" "1") #t))))) + (arguments `(#:python ,python-2)) (inputs - `(("python-numpy" ,python2-numpy) + `(("python-bx-python" ,python2-bx-python) + ("python-numpy" ,python2-numpy) ("python-pysam" ,python2-pysam) ("zlib" ,zlib))) (native-inputs diff --git a/gnu/packages/patches/crossmap-allow-system-pysam.patch b/gnu/packages/patches/crossmap-allow-system-pysam.patch deleted file mode 100644 index 611c4ff74d..0000000000 --- a/gnu/packages/patches/crossmap-allow-system-pysam.patch +++ /dev/null @@ -1,121 +0,0 @@ -This patch modifies the build process such that the bundled copy of pysam does -not need to be built if CROSSMAP_USE_SYSTEM_PYSAM is set and the pysam module -can be imported. - -Upstream has agreed to apply the patch in the next maintenance release of -crossmap. The patch has already been uploaded to -http://sourceforge.net/projects/crossmap/files/patch/. - -diff --git a/setup.py b/setup.py ---- a/setup.py 2015-02-26 15:28:49.771189185 +0100 -+++ b/setup.py 2015-02-26 15:55:03.440327752 +0100 -@@ -19,6 +19,15 @@ - except: - have_numpy = False - -+try: -+ import pysam -+ if os.environ['CROSSMAP_USE_SYSTEM_PYSAM']: -+ have_pysam = True -+ else: -+ have_pysam = False -+except ImportError: -+ have_pysam = False -+ - if platform.system()=='Windows': - print >> sys.stderr, "Sorry, Windows platform is not supported!" - sys.exit() -@@ -165,49 +174,50 @@ - - - #================= pysam samtools ==================== -- extensions.append(Extension( -- "pysam.csamtools", -- csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\ -- glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\ -- os_c_files + \ -- glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ), -- library_dirs=[], -- include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os, -- libraries=[ "z", ], -- language="c", -- define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], -- )) -- -- extensions.append(Extension( -- "pysam.ctabix", -- tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\ -- os_c_files + \ -- glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ), -- library_dirs=[], -- include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os, -- libraries=[ "z", ], -- language="c", -- define_macros = [('_FILE_OFFSET_BITS','64'), -- ('_USE_KNETFILE','')], -- )) -- -- extensions.append(Extension( -- "pysam.TabProxies", -- tabproxies_sources + os_c_files, -- library_dirs=[], -- include_dirs= include_os, -- libraries=[ "z", ], -- language="c", -- )) -- -- extensions.append(Extension( -- "pysam.cvcf", -- cvcf_sources + os_c_files, -- library_dirs=[], -- include_dirs= ["lib/tabix",] + include_os, -- libraries=[ "z", ], -- language="c", -- )) -+ if not have_pysam: -+ extensions.append(Extension( -+ "pysam.csamtools", -+ csamtools_sources + [ "lib/pysam/%s" % x for x in ("pysam_util.c", )] +\ -+ glob.glob( os.path.join( "lib/samtools", "*.pysam.c" )) +\ -+ os_c_files + \ -+ glob.glob( os.path.join( "lib/samtools", "*", "*.pysam.c" ) ), -+ library_dirs=[], -+ include_dirs=[ "lib/samtools", "lib/pysam" ] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ define_macros = [('_FILE_OFFSET_BITS','64'),('_USE_KNETFILE','')], -+ )) -+ -+ extensions.append(Extension( -+ "pysam.ctabix", -+ tabix_sources + [ "lib/pysam/%s" % x for x in ( "tabix_util.c", )] +\ -+ os_c_files + \ -+ glob.glob( os.path.join( "lib/tabix", "*.pysam.c" ) ), -+ library_dirs=[], -+ include_dirs=[ "lib/tabix", "lib/pysam" ] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ define_macros = [('_FILE_OFFSET_BITS','64'), -+ ('_USE_KNETFILE','')], -+ )) -+ -+ extensions.append(Extension( -+ "pysam.TabProxies", -+ tabproxies_sources + os_c_files, -+ library_dirs=[], -+ include_dirs= include_os, -+ libraries=[ "z", ], -+ language="c", -+ )) -+ -+ extensions.append(Extension( -+ "pysam.cvcf", -+ cvcf_sources + os_c_files, -+ library_dirs=[], -+ include_dirs= ["lib/tabix",] + include_os, -+ libraries=[ "z", ], -+ language="c", -+ )) - - - return extensions -- cgit 1.4.1 From 7a1e62ca67849f9ca19ded4d26c542021db71e38 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 21 Oct 2018 14:00:07 +0200 Subject: gnu: delly: Update to 0.7.9. * gnu/packages/bioinformatics.scm (delly): Update to 0.7.9. [source]: Fetch from git. [arguments]: Add phase install-templates; use default install phase. [native-inputs]: Remove python-2. [home-page]: Use new home page. * gnu/packages/patches/delly-use-system-libraries.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 40 ++++++++-------- .../patches/delly-use-system-libraries.patch | 56 ---------------------- 3 files changed, 20 insertions(+), 77 deletions(-) delete mode 100644 gnu/packages/patches/delly-use-system-libraries.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c76908f92f..d155b4c613 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -642,7 +642,6 @@ dist_patch_DATA = \ %D%/packages/patches/datamash-arm-tests.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ - %D%/packages/patches/delly-use-system-libraries.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/diffutils-getopt.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index bc21848367..78debbc873 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2155,42 +2155,42 @@ identify enrichments with functional annotations of the genome.") (define-public delly (package (name "delly") - (version "0.7.7") + (version "0.7.9") (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/tobiasrausch/delly/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/dellytools/delly.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0dkwy3pyxmi6dhh1lpsr3698ri5sslw9qz67hfys0bz8dgrqwabj")) - (patches (search-patches "delly-use-system-libraries.patch")))) + (base32 "034jqsxswy9gqdh2zkgc1js99qkv75ks4xvzgmh0284sraagv61z")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "src/htslib") + #t)))) (build-system gnu-build-system) (arguments `(#:tests? #f ; There are no tests to run. - #:make-flags '("PARALLEL=1") ; Allow parallel execution at run-time. + #:make-flags + (list "PARALLEL=1" ; Allow parallel execution at run-time. + (string-append "prefix=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure) ; There is no configure phase. - (replace 'install - (lambda _ - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (templates (string-append (assoc-ref %outputs "out") + (add-after 'install 'install-templates + (lambda* (#:key outputs #:allow-other-keys) + (let ((templates (string-append (assoc-ref outputs "out") "/share/delly/templates"))) - (mkdir-p bin) (mkdir-p templates) (copy-recursively "excludeTemplates" templates) - (install-file "src/cov" bin) - (install-file "src/delly" bin) - (install-file "src/dpe" bin))))))) - (native-inputs - `(("python" ,python-2))) + #t)))))) (inputs `(("boost" ,boost) ("htslib" ,htslib) ("zlib" ,zlib) ("bzip2" ,bzip2))) - (home-page "https://github.com/tobiasrausch/delly") + (home-page "https://github.com/dellytools/delly") (synopsis "Integrated structural variant prediction method") (description "Delly is an integrated structural variant prediction method that can discover and genotype deletions, tandem duplications, inversions and diff --git a/gnu/packages/patches/delly-use-system-libraries.patch b/gnu/packages/patches/delly-use-system-libraries.patch deleted file mode 100644 index 3315c2a176..0000000000 --- a/gnu/packages/patches/delly-use-system-libraries.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/Makefile 2017-04-09 12:48:15.000000000 +0200 -+++ b/Makefile 2017-06-21 14:26:02.749282787 +0200 -@@ -9,8 +9,8 @@ - - # Flags - CXX=g++ --CXXFLAGS += -isystem ${SEQTK_ROOT} -isystem ${BOOST_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing --LDFLAGS += -L${SEQTK_ROOT} -L${BOOST_ROOT}/stage/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -+CXXFLAGS += -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing -+LDFLAGS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time - - # Additional flags for release/debug - ifeq (${PARALLEL}, 1) -@@ -23,7 +23,7 @@ - ifeq (${STATIC}, 1) - LDFLAGS += -static -static-libgcc -pthread -lhts -lz - else -- LDFLAGS += -lhts -lz -Wl,-rpath,${SEQTK_ROOT},-rpath,${BOOST_ROOT}/stage/lib -+ LDFLAGS += -lhts -lz - endif - ifeq (${DEBUG}, 1) - CXXFLAGS += -g -O0 -fno-inline -DDEBUG -@@ -41,29 +41,17 @@ - DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp) - - # Targets --TARGETS = .htslib .bcftools .boost src/delly src/cov src/dpe -+TARGETS = src/delly src/cov src/dpe - - all: $(TARGETS) - --.htslib: $(HTSLIBSOURCES) -- cd src/htslib && make && make lib-static && cd ../../ && touch .htslib -- --.bcftools: $(HTSLIBSOURCES) -- cd src/bcftools && make && cd ../../ && touch .bcftools -- --.boost: $(BOOSTSOURCES) -- cd src/modular-boost && ./bootstrap.sh --prefix=${PWD}/src/modular-boost --without-icu --with-libraries=iostreams,filesystem,system,program_options,date_time && ./b2 && ./b2 headers && cd ../../ && touch .boost -- --src/delly: .htslib .bcftools .boost $(DELLYSOURCES) -- $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) -- --src/cov: .htslib .bcftools .boost $(DELLYSOURCES) -+src/cov: $(DELLYSOURCES) - $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) - --src/dpe: .htslib .bcftools .boost $(DELLYSOURCES) -+src/dpe: $(DELLYSOURCES) - $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) - - clean: - cd src/htslib && make clean - cd src/modular-boost && ./b2 --clean-all -- rm -f $(TARGETS) $(TARGETS:=.o) .htslib .boost .bcftools -+ rm -f $(TARGETS) $(TARGETS:=.o) -- cgit 1.4.1 From 9861bcd182b1ba89a93630a2178b170a088f0a6b Mon Sep 17 00:00:00 2001 From: Meiyo Peng Date: Thu, 18 Oct 2018 10:30:35 +0800 Subject: gnu: liblxqt: Update to 0.13.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lxqt.scm (liblxqt): Update to 0.13.0. [source]: Remove patches. [home-page]: Use HTTPS. * gnu/packages/patches/liblxqt-include.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: 宋文武 --- gnu/local.mk | 1 - gnu/packages/lxqt.scm | 39 ++++++++++++++++++++---------- gnu/packages/patches/liblxqt-include.patch | 14 ----------- 3 files changed, 26 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/liblxqt-include.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d155b4c613..47883f829e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -885,7 +885,6 @@ dist_patch_DATA = \ %D%/packages/patches/libjxr-fix-function-signature.patch \ %D%/packages/patches/libjxr-fix-typos.patch \ %D%/packages/patches/libotr-test-auth-fix.patch \ - %D%/packages/patches/liblxqt-include.patch \ %D%/packages/patches/libmad-armv7-thumb-pt1.patch \ %D%/packages/patches/libmad-armv7-thumb-pt2.patch \ %D%/packages/patches/libmad-frame-length.patch \ diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index 57dd5b9c2f..c4d0662e99 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -32,7 +32,9 @@ #:use-module (gnu packages glib) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages qt)) + #:use-module (gnu packages polkit) + #:use-module (gnu packages qt) + #:use-module (gnu packages xorg)) (define-public libqtxdg (package @@ -72,29 +74,40 @@ in Qt.") (define-public liblxqt (package (name "liblxqt") - (version "0.9.0") + (version "0.13.0") (source (origin (method url-fetch) - (uri - (string-append "https://github.com/lxde/" name - "/archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append + "https://github.com/lxqt/" name "/releases/download/" + version "/" name "-" version ".tar.xz")) (sha256 - (base32 - "0mbl3qc0yfgfsndqrw8vg8k5irsy0pg2wrad8nwv0aphphd4n7rg")) - (patches (search-patches "liblxqt-include.patch")))) + (base32 "0fba0nq5b9fvvmklcikcd4nwhzlp5d6k1q1f80r34kncdzfvj7dl")))) (build-system cmake-build-system) (arguments - `(#:tests? #f)) - (native-inputs `(("pkg-config" ,pkg-config))) + `(#:tests? #f ; no tests + #:configure-flags + ;; TODO: prefetch translations files from 'lxqt-l10n'. + '("-DPULL_TRANSLATIONS=NO") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda _ + (substitute* "CMakeLists.txt" + (("DESTINATION \"\\$\\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\\}") + "DESTINATION \"${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions")) + #t))))) (inputs `(("kwindowsystem" ,kwindowsystem) ("libqtxdg" ,libqtxdg) - ("qtbase" ,qtbase) + ("libxscrnsaver" ,libxscrnsaver) + ("polkit-qt" ,polkit-qt) + ("qtsvg" ,qtsvg) ("qttools" ,qttools) ("qtx11extras" ,qtx11extras))) - (home-page "http://lxqt.org/") + (native-inputs + `(("lxqt-build-tools" ,lxqt-build-tools))) + (home-page "https://lxqt.org/") (synopsis "Core utility library for all LXQt components") (description "liblxqt provides the basic libraries shared by the components of the LXQt desktop environment.") diff --git a/gnu/packages/patches/liblxqt-include.patch b/gnu/packages/patches/liblxqt-include.patch deleted file mode 100644 index 4e8cf04789..0000000000 --- a/gnu/packages/patches/liblxqt-include.patch +++ /dev/null @@ -1,14 +0,0 @@ -Patch to fix build with Qt 5.5, taken from upstream: - https://github.com/lxde/liblxqt/commit/7303ea207de0771d6f450a31ec4a1ce69202869b - -diff -u -r liblxqt-0.9.0.orig/lxqtnotification.h liblxqt-0.9.0/lxqtnotification.h ---- liblxqt-0.9.0.orig/lxqtnotification.h 2015-07-27 22:49:05.365166482 +0200 -+++ liblxqt-0.9.0/lxqtnotification.h 2015-07-27 22:49:36.897606619 +0200 -@@ -25,6 +25,7 @@ - #ifndef LXQTNOTIFICATION_H - #define LXQTNOTIFICATION_H - -+#include - #include - #include "lxqtglobals.h" - -- cgit 1.4.1 From e027a494fd5e6025e645ce9f36cccca39a77d327 Mon Sep 17 00:00:00 2001 From: Nikolai Merinov Date: Tue, 16 Oct 2018 02:32:11 +0500 Subject: gnu: rust: Work around rust 1.25...1.27 reproducibility issues. * gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch file. * gnu/packages/rust.scm (rust-1.19): Use system libssh2 library. during cargo build. Note: libgit2 still bundled, because cargo tests assume specific libgit2 minor release. (rust-1.23): Inherit native-inputs from previous package. (rust-1.25): Switch back to llvm 3.9.1 as workaround for https://github.com/rust-lang/rust/issues/50556 issue. (rust-1.27): Apply changes from https://github.com/rust-lang-nursery/mdBook/pull/692 to make generation of "searchindex.js" files reproducible. Disable cargo test that required llvm 6. --- gnu/local.mk | 1 + ...roducible-builds-by-forcing-window.search.patch | 25 +++++++++++++ gnu/packages/rust.scm | 41 ++++++++++------------ 3 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6ae7ff42f5..c46f3a8c4a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1131,6 +1131,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ + %D%/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ diff --git a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch new file mode 100644 index 0000000000..ef7bf53b5d --- /dev/null +++ b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch @@ -0,0 +1,25 @@ +From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 +From: Tim Ryan +Date: Mon, 14 May 2018 06:22:21 -0400 +Subject: [PATCH] Support reproducible builds by forcing window.search to use + stable key ordering. (#692) +See +--- + src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +index d49772f8b..1ee66a511 100644 +--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { + searchoptions, + index, + }; ++ ++ // By converting to serde_json::Value as an intermediary, we use a ++ // BTreeMap internally and can force a stable ordering of map keys. ++ let json_contents = serde_json::to_value(&json_contents)?; + let json_contents = serde_json::to_string(&json_contents)?; + + Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 40633854ae..9a7d207dcf 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -480,7 +480,8 @@ test = { path = \"../libtest\" } `(("jemalloc" ,jemalloc-4.5.0) ("llvm" ,llvm-3.9.1) ("openssl" ,openssl) - ("libcurl" ,curl))) ; For "cargo" + ("libssh2" ,libssh2) ; For "cargo" + ("libcurl" ,curl))) ; For "cargo" ;; rustc invokes gcc, so we need to set its search paths accordingly. ;; Note: duplicate its value here to cope with circular dependencies among @@ -649,18 +650,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (name "rust") (version "1.23.0") (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l")) + ;; Use rust-bootstrap@1.22 package to build rust 1.23 (native-inputs - `(("bison" ,bison) ; For the tests - ("cmake" ,cmake) - ("flex" ,flex) ; For the tests - ("gdb" ,gdb) ; For the tests - ("git" ,git) - ("procps" ,procps) ; For the tests - ("python-2" ,python-2) - ("rustc-bootstrap" ,rust-bootstrap) - ("cargo-bootstrap" ,rust-bootstrap "cargo") - ("pkg-config" ,pkg-config) ; For "cargo" - ("which" ,which))) + (alist-replace "cargo-bootstrap" (list rust-bootstrap "cargo") + (alist-replace "rustc-bootstrap" (list rust-bootstrap) + (package-native-inputs rust-1.20)))) (arguments (substitute-keyword-arguments (package-arguments rust-1.20) ((#:phases phases) @@ -692,6 +686,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine")) #t))))))))) +;;; Rust 1.25 release support work with llvm 6--but build with llvm 6 is +;;; not determenistic due to . +;;; Keep using llvm 3.9.1 until builds become determenistic (define-public rust-1.25 (let ((base-rust (rust-bootstrapped-package rust-1.24 "1.25.0" @@ -699,10 +696,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" #:patches '("rust-1.25-accept-more-detailed-gdb-lines.patch")))) (package (inherit base-rust) - (inputs - ;; Use LLVM 6.0 - (alist-replace "llvm" (list llvm) - (package-inputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) ((#:phases phases) @@ -713,14 +706,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ;; This test wants to update the crate index. (("fn no_index_update") "#[ignore]\nfn no_index_update")) #t)) - (add-after 'configure 'enable-codegen-tests - (lambda _ - (substitute* "config.toml" - (("codegen-tests = false") "")) - #t)) ;; FIXME: Re-enable this test if it's indeed supposed to work. ;; See . - (add-after 'enable-codegen-tests 'disable-nil-enum-test + (add-after 'configure 'disable-nil-enum-test (lambda _ (substitute* "src/test/debuginfo/nil-enum.rs" (("ignore-lldb") "ignore-gdb")) @@ -795,7 +783,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" #:patches '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" - "rust-1.25-accept-more-detailed-gdb-lines.patch")))) + "rust-1.25-accept-more-detailed-gdb-lines.patch" + "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) (package (inherit base-rust) (arguments @@ -808,4 +797,10 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ;; `prefix' directory should exist before `install' call (mkdir-p (assoc-ref outputs "out")) (mkdir-p (assoc-ref outputs "cargo")) + #t)) + (add-after 'patch-cargo-tests 'disable-thinlto-test + (lambda* _ + ;; thinlto required llvm 6.0 for work + (substitute* "src/tools/cargo/tests/testsuite/path.rs" + (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works")) #t))))))))) -- cgit 1.4.1 From e9a041577a4c63d86ff9164bd0e0d46e59db6122 Mon Sep 17 00:00:00 2001 From: Tomáš Čech Date: Sun, 21 Oct 2018 18:18:13 +0200 Subject: gnu: Add telegram-purple. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/messaging.scm (telegram-purple): New variable. * gnu/packages/patches/telegram-purple-adjust-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/messaging.scm | 82 ++++++++++++++++++++++ .../patches/telegram-purple-adjust-test.patch | 14 ++++ 3 files changed, 97 insertions(+) create mode 100644 gnu/packages/patches/telegram-purple-adjust-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c46f3a8c4a..ba86d556a0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1166,6 +1166,7 @@ dist_patch_DATA = \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ + %D%/packages/patches/telegram-purple-adjust-test.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/thefuck-test-environ.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 42fb3733bb..0090fe12ce 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -1763,4 +1763,86 @@ non-interoperable protocol, which allows it to support features like group messaging that aren’t available to clients that connect over XMPP.") (license license:expat))) +(define-public telegram-purple + (package + (name "telegram-purple") + (version "1.3.1") + (home-page "https://github.com/majn/telegram-purple") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)) + (recursive? #t))) + (sha256 + (base32 + "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "Makefile.in" + ;; By default these two directories point to Pidgin's own + ;; prefix. + (("^PLUGIN_DIR_PURPLE=.*") + (string-append + "exec_prefix := @exec_prefix@\n" + "PLUGIN_DIR_PURPLE := @libdir@/purple-2\n")) + (("^DATA_ROOT_DIR_PURPLE=.*") + "DATA_ROOT_DIR_PURPLE := @datarootdir@\n") + + ;; Honor sysconfdir instead of trying to write to /etc. + (("DESTDIR\\)/etc/telegram-purple") + "DESTDIR)@sysconfdir@/telegram-purple")) + #t)) + (patches (search-patches "telegram-purple-adjust-test.patch")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("which" ,which))) + (inputs + `(("pidgin" ,pidgin) + ("libgcrypt" ,libgcrypt) + ("libwebp" ,libwebp) + ("glib" ,glib) + ("gettext" ,gnu-gettext) + ("gtk+" ,gtk+-2) + ("zlib" ,zlib))) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; We're using release tag for repository checkout - let's prepare + ;; header defining GIT_COMMIT manually instead of running git to + ;; identify version which is being compiled. Git repository + ;; is removed anyway and only source code is kept. + (add-after 'unpack 'prepare-commit.h + (lambda _ + (with-output-to-file "./commit.h" + (lambda () + (display + (string-append "//generated by guix, use version instead of " + "commit\n" + "#ifndef GIT_COMMIT\n" + "# define GIT_COMMIT \"v" + ,version "\"\n" + "#endif\n")))) + #t)) + (add-before 'configure 'set-SHELL-variables + ;; Set these environment variables so that 'tgl/configure' uses the + ;; right shell and not /bin/sh. + (lambda _ + (let ((bash (which "bash"))) + (setenv "SHELL" bash) + (setenv "CONFIG_SHELL" bash) + #t)))))) + (synopsis "Telegram messaging support for Pidgin") + (description + "Telegram-purple is a plugin for Libpurple, the communication library +used by the Pidgin instant messaging client, that adds support for the +Telegram messenger.") + + ;; Code under tgl/ (the Telegram library) is LGPLv2.1+, but the plugin + ;; itself is GPLv2+. + (license license:gpl2+))) + ;;; messaging.scm ends here diff --git a/gnu/packages/patches/telegram-purple-adjust-test.patch b/gnu/packages/patches/telegram-purple-adjust-test.patch new file mode 100644 index 0000000000..db3b497d5d --- /dev/null +++ b/gnu/packages/patches/telegram-purple-adjust-test.patch @@ -0,0 +1,14 @@ +This test incorrectly expects the libpurple search path to initially +contain exactly one element. Remove this incorrect assertion. + +--- telegram-purple-1.3.1-checkout/test/loadtest.c 2018-10-27 16:25:06.258459600 +0200 ++++ telegram-purple-1.3.1-checkout/test/loadtest.c 2018-10-27 16:25:11.830434770 +0200 +@@ -156,7 +156,7 @@ static void tdf_inject_plugin (void) { + printf ("Injecting our module into purple_plugins_* ...\n"); + purple_plugins_init (); + GList *search_paths = purple_plugins_get_search_paths (); +- assert (!search_paths->prev && !search_paths->next && search_paths->data); ++ assert (!search_paths->prev && search_paths->data); + GList *new_paths = g_list_append (search_paths, g_strdup ("bin/")); + assert (new_paths == search_paths); + // Load "my" path before the default. -- cgit 1.4.1 From 20a3df0fd3353fe00a3cfde36317e0c8f4fc1187 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 27 Oct 2018 23:53:57 +0300 Subject: gnu: mailutils: Update to 3.5. * gnu/packages/mail.scm (mailutils): Update to 3.5. [source]: Remove patch, remove snippet. [native-inputs]: Remove flex, bison. [inputs]: Remove guile-2.0, add guile-2.2. * gnu/packages/patches/mailutils-uninitialized-memory.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/mail.scm | 24 ++---- .../patches/mailutils-uninitialized-memory.patch | 87 ---------------------- 3 files changed, 5 insertions(+), 107 deletions(-) delete mode 100644 gnu/packages/patches/mailutils-uninitialized-memory.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ba86d556a0..56c434d0a8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -938,7 +938,6 @@ dist_patch_DATA = \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/lxsession-use-gapplication.patch \ %D%/packages/patches/lyx-2.2.3-fix-test.patch \ - %D%/packages/patches/mailutils-uninitialized-memory.patch \ %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mariadb-gcc-ice.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index e7e440bcf7..7d6ea741d7 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -126,24 +126,14 @@ (define-public mailutils (package (name "mailutils") - (version "3.4") + (version "3.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mailutils/mailutils-" - version ".tar.bz2")) + version ".tar.xz")) (sha256 (base32 - "1dn71p85wlyisnwsb485sk3q5v393k3dizsa9fmimskdwjwgk3ch")) - (patches - (search-patches "mailutils-uninitialized-memory.patch")) - (snippet - ;; For a rebuild of the Flex/Bison byproducts touched by the - ;; patch above. - '(begin - (for-each delete-file - '("mh/mh_alias_lex.c" - "libmailutils/cfg/parser.c")) - #t)))) + "1wx275w38fwni2abc8g7g3irbk332vr34byxd72zqfdiznsqgims")))) (build-system gnu-build-system) (arguments '(#:phases @@ -197,16 +187,12 @@ #:configure-flags '("--sysconfdir=/etc") #:parallel-tests? #f)) (native-inputs - ;; Note: Bison and Flex needed due to - ;; 'mailutils-uninitialized-memory.patch'. - `(("bison" ,bison) - ("flex" ,flex) - ("perl" ,perl))) ;for 'gylwrap' + `(("perl" ,perl))) ;for 'gylwrap' (inputs `(("dejagnu" ,dejagnu) ("m4" ,m4) ("texinfo" ,texinfo) - ("guile" ,guile-2.0) + ("guile" ,guile-2.2) ("gnutls" ,gnutls) ("ncurses" ,ncurses) ("readline" ,readline) diff --git a/gnu/packages/patches/mailutils-uninitialized-memory.patch b/gnu/packages/patches/mailutils-uninitialized-memory.patch deleted file mode 100644 index ef4daf94cb..0000000000 --- a/gnu/packages/patches/mailutils-uninitialized-memory.patch +++ /dev/null @@ -1,87 +0,0 @@ -Without this patch, the MH test suite would fail when building with -glibc 2.26, with 'ali' segfaulting like this: - - Core was generated by `/tmp/guix-build-mailutils-3.4.drv-0/mailutils-3.4/mh/.libs/ali -a ./Mail/mh_ali'. - Program terminated with signal SIGSEGV, Segmentation fault. - #0 0x00007f8eac263a14 in hash ( - name=0x72642e342e332d73 , hash_num=0) at assoc.c:102 - 102 for (i = 0; *name; name++) - (gdb) bt - #0 0x00007f8eac263a14 in hash ( - name=0x72642e342e332d73 , hash_num=0) at assoc.c:102 - #1 0x00007f8eac263e6b in assoc_find_slot (assoc=0xaa59e0, - name=0x72642e342e332d73 , install=0x0, slot=0x7ffcddcbf2b8) at assoc.c:219 - #2 0x00007f8eac264124 in mu_assoc_lookup (assoc=0xaa59e0, - name=0x72642e342e332d73 , dataptr=0x7ffcddcbf2e0) at assoc.c:308 - #3 0x00007f8eac29e8ac in mu_ident_deref ( - name=0x72642e342e332d73 ) at ident.c:98 - #4 0x00007f8eac29f8a6 in mu_locus_point_deinit (pt=0xaa5718) at locus.c:48 - #5 0x00007f8eac29fa1b in mu_locus_range_deinit (lr=0xaa5718) at locus.c:99 - #6 0x00007f8eac29f9db in mu_locus_range_copy (dest=0xaa5718, - src=0x622be0 ) at locus.c:89 - #7 0x0000000000408a2a in push_source (name=0xaa74bc "mh_aliases2", fail=1) - at mh_alias_lex.l:170 - -commit b330af9008e4c9168b379867b854f5900a539ad7 -Author: Sergey Poznyakoff -Date: Sat Nov 18 10:15:48 2017 +0200 - - Fix the use of uninitialized memory - - * mh/mh_alias_lex.l (push_source): Initialize locus range prior to copying - to it. - * libmailutils/cfg/parser.y (mu_cfg_tree_create_node): Likewise. - * libmu_sieve/util.c: (mu_sieve_value_create): Likewise. - -diff --git a/libmailutils/cfg/parser.y b/libmailutils/cfg/parser.y -index 4503c7781..3436b8d90 100644 ---- a/libmailutils/cfg/parser.y -+++ b/libmailutils/cfg/parser.y -@@ -1134,10 +1134,9 @@ mu_cfg_tree_create_node (struct mu_cfg_tree *tree, - - np = mu_alloc (size); - np->type = type; -+ mu_locus_range_init (&np->locus); - if (loc) - mu_locus_range_copy (&np->locus, loc); -- else -- memset (&np->locus, 0, sizeof np->locus); - p = (char*) (np + 1); - np->tag = p; - strcpy (p, tag); -diff --git a/libmu_sieve/sieve-lex.l b/libmu_sieve/sieve-lex.l -index fd145bfe1..f14e80194 100644 ---- a/libmu_sieve/sieve-lex.l -+++ b/libmu_sieve/sieve-lex.l -@@ -190,6 +190,7 @@ push_source (const char *name) - { - ctx = mu_sieve_malloc (mu_sieve_machine, sizeof (*ctx)); - ctx->trk = trk; -+ mu_locus_range_init (&ctx->incl_range); - mu_locus_range_copy (&ctx->incl_range, &yylloc); - ctx->i_node = sieve_source_inode; - ctx->input = input_stream; -diff --git a/libmu_sieve/util.c b/libmu_sieve/util.c -index 8d62a60c2..7d71b5509 100644 ---- a/libmu_sieve/util.c -+++ b/libmu_sieve/util.c -@@ -55,6 +55,7 @@ mu_sieve_value_create (mu_sieve_machine_t mach, mu_sieve_data_type type, - val->locus.end.mu_line = locus->end.mu_line; - val->locus.end.mu_col = locus->end.mu_col; - -+ mu_locus_range_init (&val->locus); - mu_locus_range_copy (&val->locus, locus); - switch (type) - { -diff --git a/mh/mh_alias_lex.l b/mh/mh_alias_lex.l -index 371353ed3..b97264b38 100644 ---- a/mh/mh_alias_lex.l -+++ b/mh/mh_alias_lex.l -@@ -167,6 +167,7 @@ push_source (const char *name, int fail) - { - ctx = mu_alloc (sizeof (*ctx)); - ctx->trk = trk; -+ mu_locus_range_init (&ctx->incl_range); - mu_locus_range_copy (&ctx->incl_range, &yylloc); - ctx->exec_p = exec_p; - ctx->i_node = ali_source_inode; -- cgit 1.4.1 From 24fc8f055df2138eaea74589c7f04793812f7bd8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 30 Oct 2018 11:08:10 +0200 Subject: gnu: zathura-pdf-mupdf: Update to 0.3.4. * gnu/packages/pdf.scm (zathura-pdf-mupdf): Update to 0.3.4. [source]: Remove patch. * gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../zathura-pdf-mupdf-link-to-jpeg-libraries.patch | 55 ---------------------- gnu/packages/pdf.scm | 6 +-- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 56c434d0a8..5f72879658 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1246,7 +1246,6 @@ dist_patch_DATA = \ %D%/packages/patches/xinetd-fix-fd-leak.patch \ %D%/packages/patches/xinetd-CVE-2013-4342.patch \ %D%/packages/patches/xmodmap-asprintf.patch \ - %D%/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch \ %D%/packages/patches/zathura-plugindir-environment-variable.patch MISC_DISTRO_FILES = \ diff --git a/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch b/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch deleted file mode 100644 index 63e058bbef..0000000000 --- a/gnu/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Tobias Geerinckx-Rice -Date: Mon, 18 Jun 2018 02:37:41 +0200 -Subject: zathura-pdf-mupdf: Link to JPEG libraries. - -As of version 0.3.3, zathura-pdf-mupdf no longer links to some required -JPEG libraries, leading to such errors as: - - $ zathura foo.pdf - error: Could not load plugin '/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so' (/gnu/store/...-profile/lib/zathura/libpdf-mupdf.so: undefined symbol: jpeg_resync_to_restart). - -The patch below, copied verbatim from Arch[0], fixes that. -Its description happens to match our reality, too. - -[0]: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/zathura-pdf-mupdf ---- -From 3fb0ff750373d45d4f5172ce1d41b74183cd07e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= -Date: Sat, 24 Mar 2018 14:31:18 +0100 -Subject: [PATCH] Explicitly link against jbig2dec, openjp2, and jpeg -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Normally these are statically linked into libmupdfthird, but we delete -those to make mupdf use the system libraries. Previously -zathura-pdf-mupdf explicitly linked against them, but this is -technically incorrect since they are supposed to be in libmupdfthird so -that was removed. This commit essentially reverts that in the new build -system. - -Signed-off-by: Johannes Löthberg ---- - meson.build | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 3b0d7b7..ae2fc9c 100644 ---- a/meson.build -+++ b/meson.build -@@ -22,7 +22,11 @@ cairo = dependency('cairo') - mupdf = cc.find_library('mupdf') - mupdfthird = cc.find_library('mupdfthird') - --build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird] -+jbig2dec = cc.find_library('jbig2dec') -+openjp2 = cc.find_library('openjp2') -+jpeg = cc.find_library('jpeg') -+ -+build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird, jbig2dec, openjp2, jpeg] - - # defines - defines = [ --- -2.16.3 - diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 061a65a0dc..4c3e983497 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -415,17 +415,15 @@ using the DjVuLibre library.") (define-public zathura-pdf-mupdf (package (name "zathura-pdf-mupdf") - (version "0.3.3") + (version "0.3.4") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-pdf-mupdf" "/download/zathura-pdf-mupdf-" version ".tar.xz")) - (patches - (search-patches "zathura-pdf-mupdf-link-to-jpeg-libraries.patch")) (sha256 (base32 - "1zbdqimav4wfgimpy3nfzl10qj7vyv23rdy2z5z7z93jwbp2rc2j")))) + "166d5nz47ixzwj4pixsd5fd9qvjf5v34cdqi3p72vr23pswk2hyn")))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("jbig2dec" ,jbig2dec) -- cgit 1.4.1 From 46cb1c97cb27904b5dea3d153d817130711a2e0a Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Fri, 26 Oct 2018 18:22:32 +0200 Subject: gnu: rust: Accept more detailed gdb lines for simple enums. * gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch: Modify. * gnu/packages/rust.scm (rust-1.25)[arguments]<#:phases>[disable-nil-enum-test]: Delete phase. --- .../rust-1.25-accept-more-detailed-gdb-lines.patch | 16 ++++++++++++++++ gnu/packages/rust.scm | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch index 6ffc897297..f40a12d382 100644 --- a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch +++ b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch @@ -92,3 +92,19 @@ diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs ru // gdb-command:print univariant // gdbg-check:$4 = {{__0 = -1}} +--- orig/rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-09-13 10:24:33.783565071 +0200 ++++ rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-10-26 18:19:20.404564587 +0200 +@@ -17,11 +17,11 @@ + + // gdb-command:print first + // gdbg-check:$1 = {} +-// gdbr-check:$1 = ++// gdbr-check:$1 = nil_enum::ANilEnum + + // gdb-command:print second + // gdbg-check:$2 = {} +-// gdbr-check:$2 = ++// gdbr-check:$2 = nil_enum::AnotherNilEnum + + #![allow(unused_variables)] + #![feature(omit_gdb_pretty_printer_section)] diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index cd4656ea03..f2794be8a6 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -706,13 +706,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ;; This test wants to update the crate index. (("fn no_index_update") "#[ignore]\nfn no_index_update")) #t)) - ;; FIXME: Re-enable this test if it's indeed supposed to work. - ;; See . - (add-after 'configure 'disable-nil-enum-test - (lambda _ - (substitute* "src/test/debuginfo/nil-enum.rs" - (("ignore-lldb") "ignore-gdb")) - #t)) (replace 'patch-aarch64-test (lambda _ (substitute* "src/librustc_metadata/dynamic_lib.rs" -- cgit 1.4.1 From 4df3e06210405dda92d0e9749b8434a095e1277e Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 15 Oct 2018 11:58:37 +0200 Subject: gnu: rust: Document upstream's assessment. * gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch: Add URL. --- gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch index f40a12d382..a2bad55117 100644 --- a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch +++ b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch @@ -1,5 +1,6 @@ GDB responds with some overly detailed lines - which makes the tests fail. Patch rust to accept those instead. +See . diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs --- orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:24:33.775565159 +0200 +++ rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:25:56.322513658 +0200 -- cgit 1.4.1 From 1d9a9d27ae4d7981a0df749708b683859ee5c58e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 31 Oct 2018 01:27:07 +0100 Subject: gnu: meandmyshadow: Update to 0.5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/games.scm (meandmyshadow): Update to 0.5. [source]: Add unreleased bugfix patch. [arguments]: Remove obsolete ‘set-sdl'paths’ phase. [inputs]: Switch to SDL 2. Add lua. Remove libx11, mesa, and glu. * gnu/packages/patches/meandmyshadow-define-paths-earlier.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/games.scm | 38 ++++++---------- .../meandmyshadow-define-paths-earlier.patch | 50 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 26 deletions(-) create mode 100644 gnu/packages/patches/meandmyshadow-define-paths-earlier.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5f72879658..6075e47956 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -951,6 +951,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ + %D%/packages/patches/meandmyshadow-define-paths-earlier.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e28dd9fa83..250f6151ef 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -572,7 +572,7 @@ automata. The following features are available: (define-public meandmyshadow (package (name "meandmyshadow") - (version "0.4.1") + (version "0.5") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/meandmyshadow/" @@ -580,37 +580,23 @@ automata. The following features are available: "-src.tar.gz")) (sha256 (base32 - "0wl5dc75qy001s6043cx0vr2l5y2qfv1cldqnwill9sfygqj9p95")))) + "1b6qf83vdfv8jwn2jq9ywmda2qn2f5914i7mwfy04m17wx593m3m")) + (patches (search-patches + ;; This will not be needed in the next release. + "meandmyshadow-define-paths-earlier.patch")))) (build-system cmake-build-system) (arguments - '(#:tests? #f ; there are no tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-sdl'paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "cmake/Modules/FindSDL_gfx.cmake" - (("/usr/local/include/SDL") - (string-append (assoc-ref inputs "sdl") - "/include/SDL"))) - ;; Because SDL provides lib/libX11.so.6 we need to explicitly - ;; link with libX11, even though we're using the GL backend. - (substitute* "CMakeLists.txt" - (("\\$\\{X11_LIBRARIES\\}") "-lX11")) - #t))))) + `(#:tests? #f)) ; there are no tests (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("sdl" ,(sdl-union (list sdl - sdl-image - sdl-gfx - sdl-mixer - sdl-ttf))) - ("libx11" ,libx11) ; needed by sdl's libX11 + `(("curl" ,curl) ("libarchive" ,libarchive) - ("openssl" ,openssl) - ("mesa" ,mesa) - ("glu" ,glu) - ("curl" ,curl))) + ("lua" ,lua) + ("sdl" ,(sdl-union (list sdl2 + sdl2-image + sdl2-mixer + sdl2-ttf))))) (home-page "http://meandmyshadow.sourceforge.net/") (synopsis "Puzzle/platform game") (description "Me and My Shadow is a puzzle/platform game in which you try diff --git a/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch b/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch new file mode 100644 index 0000000000..505cbd23fe --- /dev/null +++ b/gnu/packages/patches/meandmyshadow-define-paths-earlier.patch @@ -0,0 +1,50 @@ +From: Tobias Geerinckx-Rice +Date: Wed, 31 Oct 2018 02:24:26 +0100 +Subject: [PATCH] gnu: meandmyshadow: Define paths earlier. + +The following patch was taken verbatim from the upstream repository[0] +and will be included in the next release. + +[0]: https://github.com/acmepjz/meandmyshadow/pull/29 +--- +From 4847e6b5755258a1e0534f2d4b91dce2ce3b459e Mon Sep 17 00:00:00 2001 +From: Dmitry Marakasov +Date: Wed, 24 Oct 2018 23:31:19 +0300 +Subject: [PATCH] Define paths earlier in CMakeLists.txt + +At the very least, paths should be defined before Configure_File(), otherwise empty DATAROOTDIR is substituted in config.h +--- + CMakeLists.txt | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e79639a..6321d9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,13 @@ Project (meandmyshadow) + CMake_Minimum_Required (VERSION 3.1) + Set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + ++#Path options ++Set (BINDIR "bin" CACHE STRING "Where to install binaries") ++Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") ++Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") ++Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") ++ ++#Options + Option (DEBUG_MODE "Compile the game with debug mode enabled" OFF) + Option (DISABLED_DEBUG_STUFF "Enable this you'll see a lot of annoying script debug messages which will lag the game." OFF) + +@@ -164,12 +171,6 @@ Target_Link_Libraries ( + ${LUA_LIBRARIES} + ) + +-#Path options +-Set (BINDIR "bin" CACHE STRING "Where to install binaries") +-Set (DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Sets the root of data directories to a non-default location") +-Set (ICONDIR "${DATAROOTDIR}/icons" CACHE STRING "Sets the icon directory for desktop entry to a non-default location.") +-Set (DESKTOPDIR "${DATAROOTDIR}/applications" CACHE STRING "Sets the desktop file directory for desktop entry to a non-default location.") +- + #Install locations + Install (DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${DATAROOTDIR}/meandmyshadow/) + Install (FILES AUTHORS DESTINATION ${DATAROOTDIR}/meandmyshadow/) -- cgit 1.4.1 From c16913d34df610f5e1560ab8da953e32b3a4e7d7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 31 Oct 2018 21:56:36 +0200 Subject: gnu: myrepos: Update to 1.20180726. * gnu/packages/version-control.scm (myrepos): Update to 1.20180726. [source]: Remove patch. * gnu/packages/patches/myrepos-CVE-2018-7032.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/myrepos-CVE-2018-7032.patch | 69 ------------------------ gnu/packages/version-control.scm | 5 +- 3 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 gnu/packages/patches/myrepos-CVE-2018-7032.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6075e47956..3207cecb72 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -973,7 +973,6 @@ dist_patch_DATA = \ %D%/packages/patches/mupen64plus-ui-console-notice.patch \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/mutt-store-references.patch \ - %D%/packages/patches/myrepos-CVE-2018-7032.patch \ %D%/packages/patches/net-tools-bitrot.patch \ %D%/packages/patches/netcdf-date-time.patch \ %D%/packages/patches/netcdf-tst_h_par.patch \ diff --git a/gnu/packages/patches/myrepos-CVE-2018-7032.patch b/gnu/packages/patches/myrepos-CVE-2018-7032.patch deleted file mode 100644 index ce9493e5f9..0000000000 --- a/gnu/packages/patches/myrepos-CVE-2018-7032.patch +++ /dev/null @@ -1,69 +0,0 @@ -http://source.myrepos.branchable.com/?p=source.git;a=patch;h=40a3df21c73f1bb1b6915cc6fa503f50814664c8 -This can be removed with the next release. It was modified slightly to apply - -From 40a3df21c73f1bb1b6915cc6fa503f50814664c8 Mon Sep 17 00:00:00 2001 -From: Paul Wise -Date: Sun, 11 Feb 2018 21:57:49 +0800 -Subject: [PATCH] Mitigate vulnerabilities caused by some git remotes being - able to execute code - -Set GIT_PROTOCOL_FROM_USER=0 with git versions newer than 2.12. - -Prevent remote websites from causing cloning of local repositories. - -Manually whitelist known-safe protocols (http, https, git, ssh) -when using git versions older than 2.12. - -Fixes: CVE-2018-7032 -Fixes: https://bugs.debian.org/840014 -Suggestions-by: Jakub Wilk -Reported-by: Jakub Wilk ---- - webcheckout | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/webcheckout b/webcheckout -index e98da5c..de497ba 100755 ---- a/webcheckout -+++ b/webcheckout -@@ -71,6 +71,16 @@ use Getopt::Long; - use warnings; - use strict; - -+# Mitigate some git remote types being dangerous -+my $git_unsafe = 1; -+my $git_version = `git --version`; -+$git_version =~ s{^git version }{}; -+my ($major, $minor) = split(/\./, $git_version); -+if (int($major) >= 2 && int($minor) >= 12) { -+ $ENV{GIT_PROTOCOL_FROM_USER} = 0; -+ $git_unsafe = 0; -+} -+ - # What to download. - my $url; - -@@ -89,7 +99,17 @@ my $destdir; - - # how to perform checkouts - my %handlers=( -- git => sub { doit("git", "clone", shift, $destdir) }, -- svn => sub { doit("svn", "checkout", shift, $destdir) }, -- bzr => sub { doit("bzr", "branch", shift, $destdir) }, -+ git => sub { -+ my $git_url = shift; -+ # Reject unsafe URLs with older versions of git -+ # that do not already check the URL safety. -+ if ($git_unsafe && $git_url !~ m{^(?:(?:https?|git|ssh):[^:]|(?:[-_.A-Za-z0-9]+@)?[-_.A-Za-z0-9]+:(?!:|//))}) { -+ print STDERR "potentially unsafe git URL, may fail, touch local files or execute arbitrary code\n"; -+ return 1; -+ } -+ # Reject cloning local directories too, webcheckout is for remote repos -+ doit(qw(git -c protocol.file.allow=user clone --), $git_url, $destdir) -+ }, -+ svn => sub { doit(qw(svn checkout --), shift, $destdir) }, -+ bzr => sub { doit(qw(bzr branch --), shift, $destdir) }, - ); --- -2.11.0 - diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index ccb1f5dacc..df0b2f0122 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1730,7 +1730,7 @@ modification time.") (define-public myrepos (package (name "myrepos") - (version "1.20171231") + (version "1.20180726") (source (origin (method git-fetch) @@ -1739,8 +1739,7 @@ modification time.") (commit version))) (file-name (string-append name "-" version "-checkout")) (sha256 - (base32 "10q7lpx152xnkk701fscn4dq99q9znnmv3bc2482khhjg7z8rps0")) - (patches (search-patches "myrepos-CVE-2018-7032.patch")))) + (base32 "0jphw61plm8cgklja6hs639xhdvxgvjwbr6jpvjwpp7hc5gmhms5")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) -- cgit 1.4.1 From 208e82297cb5d67eea8fd9b1fbb06e9505b4607b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 5 Nov 2018 19:45:01 +0100 Subject: gnu: xapian: Update to 1.4.9. * gnu/packages/patches/xapian-revert-5489fb2f8.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/search.scm (xapian): Update to 1.4.9. [source](patches): Remove. (python-xapian-bindings): Update to 1.4.9. --- gnu/local.mk | 1 - gnu/packages/patches/xapian-revert-5489fb2f8.patch | 23 ---------------------- gnu/packages/search.scm | 7 +++---- 3 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/xapian-revert-5489fb2f8.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3207cecb72..1f9f6b36f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1230,7 +1230,6 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch \ %D%/packages/patches/x265-detect512-all-arches.patch \ - %D%/packages/patches/xapian-revert-5489fb2f8.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ %D%/packages/patches/xf86-video-geode-glibc-2.20.patch \ diff --git a/gnu/packages/patches/xapian-revert-5489fb2f8.patch b/gnu/packages/patches/xapian-revert-5489fb2f8.patch deleted file mode 100644 index 7b78e2abb5..0000000000 --- a/gnu/packages/patches/xapian-revert-5489fb2f8.patch +++ /dev/null @@ -1,23 +0,0 @@ -Revert this upstream commit which breaks a test case in "notmuch": - -https://git.xapian.org/?p=xapian;a=commitdiff;h=5489fb2f838c0f0b0a593b4c17df282a93a1fe5a - -See the notmuch FAQ entry: - -https://notmuchmail.org/faq/#index12h2 - -This should be fixed for later releases. - -diff --git a/backends/glass/glass_postlist.cc b/xapian-core/backends/glass/glass_postlist.cc -index 80e578b85..a47f14a68 100644 ---- a/backends/glass/glass_postlist.cc -+++ b/backends/glass/glass_postlist.cc -@@ -759,7 +759,7 @@ GlassPostList::open_nearby_postlist(const std::string & term_, - (void)need_pos; - if (term_.empty()) - RETURN(NULL); -- if (!this_db.get() || this_db->postlist_table.is_modified()) -+ if (!this_db.get() || this_db->postlist_table.is_writable()) - RETURN(NULL); - RETURN(new GlassPostList(this_db, term_, cursor->clone())); - } diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 284771ab60..8237d51771 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -46,15 +46,14 @@ (define-public xapian (package (name "xapian") - (version "1.4.7") + (version "1.4.9") ;; Note: When updating Xapian, remember to update xapian-bindings below. (source (origin (method url-fetch) (uri (string-append "https://oligarchy.co.uk/xapian/" version "/xapian-core-" version ".tar.xz")) - (patches (search-patches "xapian-revert-5489fb2f8.patch")) (sha256 - (base32 "1lxmlds3v5s1gng9nk1rvmln1zcksrw5ds509y0glylwch5qmw0k")))) + (base32 "1k7m7m9jld96k16ansfw2w3c354pvd8ibhnrb6dw012g06fw7sfd")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) ("util-linux" ,util-linux))) @@ -92,7 +91,7 @@ rich set of boolean query operators.") "/xapian-bindings-" version ".tar.xz")) (sha256 (base32 - "0sjf9ck3a6p7xnd84w09l6s0xn2g03k9a9417f4mjnywfq9pa6a5")))) + "0ll3z3418r7bzxs4kyini2cbci5xl8i5scl3wyx88s2v4ak56bcz")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-python3") -- cgit 1.4.1 From 3bd83e6db2982d0b419945dd6ea4174d1a880c6d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 5 Nov 2018 23:24:19 +0100 Subject: gnu: qtbase: Remove obsolete patch. This patch is no longer needed since 7930cfc98923eda64ec4a37d56b19f96f86f5f59 was merged to core-updates. * gnu/packages/patches/qtbase-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/qt.scm (qtbase)[source](patches): Drop it. --- gnu/local.mk | 1 - gnu/packages/patches/qtbase-glibc-compat.patch | 50 -------------------------- gnu/packages/qt.scm | 3 +- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 gnu/packages/patches/qtbase-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4f1d6306b1..93bf44ac9b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1097,7 +1097,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qt4-ldflags.patch \ - %D%/packages/patches/qtbase-glibc-compat.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ diff --git a/gnu/packages/patches/qtbase-glibc-compat.patch b/gnu/packages/patches/qtbase-glibc-compat.patch deleted file mode 100644 index 15a2540b3a..0000000000 --- a/gnu/packages/patches/qtbase-glibc-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix qmake build with glibc 2.28. - -Taken from upstream: -https://code.qt.io/cgit/qt/qtbase.git/commit/?id=25feee4e061b99edab79503d81f5bd045c6c8e3d - -diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h -index 3469ebe5e6..c5585ea32a 100644 ---- a/src/corelib/global/qconfig-bootstrapped.h -+++ b/src/corelib/global/qconfig-bootstrapped.h -@@ -98,10 +98,18 @@ - #define QT_NO_QOBJECT - #define QT_FEATURE_process -1 - #define QT_FEATURE_regularexpression -1 --#define QT_FEATURE_renameat2 -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_renameat2 -1 -+#endif - #define QT_FEATURE_sharedmemory -1 - #define QT_FEATURE_slog2 -1 --#define QT_FEATURE_statx -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_statx -1 -+#endif - #define QT_FEATURE_syslog -1 - #define QT_NO_SYSTEMLOCALE - #define QT_FEATURE_systemsemaphore -1 -diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp -index 0c9cdb8667..deb4a9f220 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory(); - # include - # include - # include --# include - - // in case linux/fs.h is too old and doesn't define it: - #ifndef FICLONE -@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp - # endif - - # if !QT_CONFIG(statx) && defined(SYS_statx) -+# include - static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) - { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } - # elif !QT_CONFIG(statx) && !defined(SYS_statx) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 1dd21101b2..cffebc7bff 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -508,8 +508,7 @@ system, and the core design of Django is reused in Grantlee.") (base32 "01q1rn5rp9biq3z38953z2hgm4nirvp2jfv8wg7isnld8v1yg0b3")) ;; Use TZDIR to avoid depending on package "tzdata". - (patches (search-patches "qtbase-use-TZDIR.patch" - "qtbase-glibc-compat.patch")) + (patches (search-patches "qtbase-use-TZDIR.patch")) (modules '((guix build utils))) (snippet ;; corelib uses bundled harfbuzz, md4, md5, sha3 -- cgit 1.4.1 From 418dd6adb5de1bc26ff9bac1cb0dc7822be52112 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 6 Nov 2018 15:13:16 +0100 Subject: gnu: jq: Update to 1.6. * gnu/packages/web.scm (jq): Update to 1.6. [source]: Remove upstreamed patch. * gnu/packages/patches/jq-CVE-2015-8863.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/jq-CVE-2015-8863.patch | 45 ----------------------------- gnu/packages/web.scm | 8 ++--- 3 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 gnu/packages/patches/jq-CVE-2015-8863.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1f9f6b36f8..c2075f7d09 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -834,7 +834,6 @@ dist_patch_DATA = \ %D%/packages/patches/jemalloc-arm-address-bits.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/json-glib-fix-tests-32bit.patch \ - %D%/packages/patches/jq-CVE-2015-8863.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/khmer-use-libraries.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ diff --git a/gnu/packages/patches/jq-CVE-2015-8863.patch b/gnu/packages/patches/jq-CVE-2015-8863.patch deleted file mode 100644 index 20b3bb3f06..0000000000 --- a/gnu/packages/patches/jq-CVE-2015-8863.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2015-8863 (Off-by-one error in the tokenadd function in -jv_parse.c in jq allows remote attackers to cause a denial of service -(crash) via a long JSON-encoded number, which triggers a heap-based -buffer overflow): - - - -Copied from upstream code repository: - - - -From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001 -From: Nicolas Williams -Date: Sat, 24 Oct 2015 17:24:57 -0500 -Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105) - -This was an off-by one: the NUL terminator byte was not allocated on -resize. This was triggered by JSON-encoded numbers longer than 256 -bytes. ---- - jv_parse.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/jv_parse.c b/jv_parse.c -index 3102ed4..84245b8 100644 ---- a/jv_parse.c -+++ b/jv_parse.c -@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) { - - static void tokenadd(struct jv_parser* p, char c) { - assert(p->tokenpos <= p->tokenlen); -- if (p->tokenpos == p->tokenlen) { -+ if (p->tokenpos >= (p->tokenlen - 1)) { - p->tokenlen = p->tokenlen*2 + 256; - p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen); - } -@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) { - TRY(value(p, v)); - } else { - // FIXME: better parser -- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid -+ p->tokenbuf[p->tokenpos] = 0; - char* end = 0; - double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end); - if (end == 0 || *end != 0) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 447a899544..86e748f950 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -4166,7 +4166,7 @@ It uses the uwsgi protocol for all the networking/interprocess communications.") (define-public jq (package (name "jq") - (version "1.5") + (version "1.6") (source (origin (method url-fetch) (uri (string-append "https://github.com/stedolan/" name @@ -4174,11 +4174,7 @@ It uses the uwsgi protocol for all the networking/interprocess communications.") "/" name "-" version ".tar.gz")) (sha256 (base32 - "0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4")) - ;; This patch has been pushed and the vulnerability will be - ;; fixed in the next release after 1.5. - ;; https://github.com/stedolan/jq/issues/995 - (patches (search-patches "jq-CVE-2015-8863.patch")))) + "1a76f46a652i2g333kfvrl6mp2w7whf6h1yly519izg4y967h9cn")))) (inputs `(("oniguruma" ,oniguruma))) (native-inputs -- cgit 1.4.1 From 4cceb1432a381b100d416e6451e63b278e626710 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 6 Nov 2018 17:08:46 +0100 Subject: gnu: libgit2: Work around test failures on 32-bit platforms. * gnu/packages/patches/libgit2-oom-test.patch: New file. * gnu/packages/version-control.scm (libgit2)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/libgit2-oom-test.patch | 62 +++++++++++++++++++++++++++++ gnu/packages/version-control.scm | 3 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libgit2-oom-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c2075f7d09..bfe93159dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -876,6 +876,7 @@ dist_patch_DATA = \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ + %D%/packages/patches/libgit2-oom-test.patch \ %D%/packages/patches/libgdata-fix-tests.patch \ %D%/packages/patches/libgdata-glib-duplicate-tests.patch \ %D%/packages/patches/libgnome-encoding.patch \ diff --git a/gnu/packages/patches/libgit2-oom-test.patch b/gnu/packages/patches/libgit2-oom-test.patch new file mode 100644 index 0000000000..9667d1c0da --- /dev/null +++ b/gnu/packages/patches/libgit2-oom-test.patch @@ -0,0 +1,62 @@ +Fix a test failure on 32-bit platforms as reported +at . + +From 415a8ae9c9b6ac18f0524b6af8e58408b426457d Mon Sep 17 00:00:00 2001 +From: Edward Thomson +Date: Thu, 13 Sep 2018 13:27:07 +0100 +Subject: [PATCH] tests: don't run buf::oom on 32-bit systems + +On a 32-bit Linux systems, the value large enough to make malloc +guarantee a failure is also large enough that valgrind considers it +"fishy". Skip this test on those systems entirely. +--- + tests/buf/oom.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/tests/buf/oom.c b/tests/buf/oom.c +index 2741a8ddf2..ec3bad9979 100644 +--- a/tests/buf/oom.c ++++ b/tests/buf/oom.c +@@ -11,12 +11,8 @@ + */ + #if defined(GIT_ARCH_64) && defined(__linux__) + # define TOOBIG 0x0fffffffffffffff +-#elif defined(__linux__) +-# define TOOBIG 0x0fffffff + #elif defined(GIT_ARCH_64) + # define TOOBIG 0xffffffffffffff00 +-#else +-# define TOOBIG 0xffffff00 + #endif + + /** +@@ -25,13 +21,18 @@ + * will fail. And because the git_buf_grow() wrapper always + * sets mark_oom, the code in git_buf_try_grow() will free + * the internal buffer and set it to git_buf__oom. +- * ++ * + * We initialized the internal buffer to (the static variable) + * git_buf__initbuf. The purpose of this test is to make sure + * that we don't try to free the static buffer. ++ * ++ * Skip this test entirely on 32-bit platforms; a buffer large enough ++ * to guarantee malloc failures is so large that valgrind considers ++ * it likely to be an error. + */ + void test_buf_oom__grow(void) + { ++#ifdef GIT_ARCH_64 + git_buf buf = GIT_BUF_INIT; + + git_buf_clear(&buf); +@@ -40,6 +41,9 @@ void test_buf_oom__grow(void) + cl_assert(git_buf_oom(&buf)); + + git_buf_free(&buf); ++#else ++ cl_skip(); ++#endif + } + + void test_buf_oom__grow_by(void) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index b9a2ff2ea0..04d28044dd 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -469,7 +469,8 @@ everything from small to very large projects with speed and efficiency.") (sha256 (base32 "15kp4sq72kh762bm7dgspyrk0a6siarvll3k7nrhs0xy77idf80g")) - (patches (search-patches "libgit2-mtime-0.patch")) + (patches (search-patches "libgit2-mtime-0.patch" + "libgit2-oom-test.patch")) ;; Remove bundled software. (snippet '(begin -- cgit 1.4.1 From 152bebd9e0c7fc0863d6b82af014e61a8cb6a488 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 7 Nov 2018 20:24:18 +0100 Subject: gnu: gemma: Update to 0.98. * gnu/local.mk (dist_patch_DATA): Remove patch. * gnu/packages/patches/gemma-intel-compat.patch: Remove file. * gnu/packages/bioinformatics.scm (gemma): Update to 0.98. [source]: Remove patch. [inputs]: Add eigen, gfortran:lib, and openblas. [arguments]: Add phase "find-eigen". --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 19 +++++++++--- gnu/packages/patches/gemma-intel-compat.patch | 44 --------------------------- 3 files changed, 15 insertions(+), 49 deletions(-) delete mode 100644 gnu/packages/patches/gemma-intel-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bfe93159dc..9a8330aa41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -722,7 +722,6 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-freetype-test-failure.patch \ %D%/packages/patches/gdm-CVE-2018-14424.patch \ - %D%/packages/patches/gemma-intel-compat.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 3cd0e03587..5337b7bf02 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2829,7 +2829,7 @@ comment or quality sections.") (define-public gemma (package (name "gemma") - (version "0.96") + (version "0.98") (source (origin (method git-fetch) (uri (git-reference @@ -2838,11 +2838,13 @@ comment or quality sections.") (file-name (git-file-name name version)) (sha256 (base32 - "0sa4mllp7890v5pss0mm02ik8yixl7az3vprcw3kp7qmr9gwrdai")) - (patches (search-patches "gemma-intel-compat.patch")))) + "1s3ncnbn45r2hh1cvrqky1kbqq6546biypr4f5mkw1kqlrgyh0yg")))) (inputs - `(("gsl" ,gsl) + `(("eigen" ,eigen) + ("gfortran" ,gfortran "lib") + ("gsl" ,gsl) ("lapack" ,lapack) + ("openblas" ,openblas) ("zlib" ,zlib))) (build-system gnu-build-system) (arguments @@ -2857,6 +2859,15 @@ comment or quality sections.") #:phases (modify-phases %standard-phases (delete 'configure) + (add-after 'unpack 'find-eigen + (lambda* (#:key inputs #:allow-other-keys) + ;; Ensure that Eigen headers can be found + (setenv "CPLUS_INCLUDE_PATH" + (string-append (getenv "CPLUS_INCLUDE_PATH") + ":" + (assoc-ref inputs "eigen") + "/include/eigen3")) + #t)) (add-before 'build 'bin-mkdir (lambda _ (mkdir-p "bin") diff --git a/gnu/packages/patches/gemma-intel-compat.patch b/gnu/packages/patches/gemma-intel-compat.patch deleted file mode 100644 index f12ec56d9b..0000000000 --- a/gnu/packages/patches/gemma-intel-compat.patch +++ /dev/null @@ -1,44 +0,0 @@ -From da1ed24209121f7b0f03f360b1029d7125a38e70 Mon Sep 17 00:00:00 2001 -From: Efraim Flashner -Date: Tue, 4 Jul 2017 12:44:53 +0300 -Subject: [PATCH] Add NO_INTEL_COMPAT flag to Makefile. - -see also: https://github.com/xiangzhou/GEMMA/pull/47 - ---- - Makefile | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index 5bb8748..712b1ad 100644 ---- a/Makefile -+++ b/Makefile -@@ -11,6 +11,7 @@ - SYS = LNX - # Leave blank after "=" to disable; put "= 1" to enable - WITH_LAPACK = 1 -+NO_INTEL_COMPAT = - FORCE_32BIT = - FORCE_DYNAMIC = - DIST_NAME = gemma-0.96 -@@ -64,10 +65,13 @@ endif - HDR += $(SRC_DIR)/lapack.h - endif - --ifdef FORCE_32BIT -- CPPFLAGS += -m32 --else -- CPPFLAGS += -m64 -+ifdef NO_INTEL_COMPAT -+ else -+ ifdef FORCE_32BIT -+ CPPFLAGS += -m32 -+ else -+ CPPFLAGS += -m64 -+ endif - endif - - ifdef FORCE_DYNAMIC --- -2.13.2 - -- cgit 1.4.1 From 1badc85068ee0be2a028c1b94a3dd285901bc391 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 27 Sep 2018 18:41:50 +0200 Subject: gnu: ceph: Update to 13.2.2. * gnu/packages/patches/ceph-skip-unittest_blockdev.patch: Adjust for 13.2.2. * gnu/packages/patches/ceph-rocksdb-compat.patch: Delete file. * gnu/packages/patches/ceph-detect-rocksdb.patch, gnu/packages/patches/ceph-volume-respect-PATH.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/storage.scm (ceph): Update to 13.2.2. [source]: Don't remove src/dpdk, which has been moved to src/spdk/dpdk and is purged elsewhere. Drop bundled rapidjson. Adjust patch list. [arguments]: Add "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" and "-DWITH_SPDK=OFF" to #:configure-flags. Drop obsolete "-DWITH_EMBEDDED". Add workaround for . Remove obsolete test substitution. Rework 'wrap-python-script' to be less verbose and wrap more scripts. [native-inputs]: Add GCC-7. [inputs]: Add OATH-TOOLKIT, RAPIDJSON and PYTHON2-SIX. --- gnu/local.mk | 3 +- gnu/packages/patches/ceph-detect-rocksdb.patch | 24 +++++++++ gnu/packages/patches/ceph-rocksdb-compat.patch | 63 ---------------------- .../patches/ceph-skip-unittest_blockdev.patch | 20 +++---- .../patches/ceph-volume-respect-PATH.patch | 22 ++++++++ gnu/packages/storage.scm | 43 +++++++++------ 6 files changed, 82 insertions(+), 93 deletions(-) create mode 100644 gnu/packages/patches/ceph-detect-rocksdb.patch delete mode 100644 gnu/packages/patches/ceph-rocksdb-compat.patch create mode 100644 gnu/packages/patches/ceph-volume-respect-PATH.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 93bf44ac9b..86f081f7cf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -608,10 +608,11 @@ dist_patch_DATA = \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ + %D%/packages/patches/ceph-detect-rocksdb.patch \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ - %D%/packages/patches/ceph-rocksdb-compat.patch \ %D%/packages/patches/ceph-skip-collect-sys-info-test.patch \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ + %D%/packages/patches/ceph-volume-respect-PATH.patch \ %D%/packages/patches/chmlib-inttypes.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ %D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch \ diff --git a/gnu/packages/patches/ceph-detect-rocksdb.patch b/gnu/packages/patches/ceph-detect-rocksdb.patch new file mode 100644 index 0000000000..badad6d1b9 --- /dev/null +++ b/gnu/packages/patches/ceph-detect-rocksdb.patch @@ -0,0 +1,24 @@ +Help the build system find system RocksDB. + +Taken from this upstream commit: +https://github.com/ceph/ceph/commit/2ac26bd0e01fd6c82bd59936cf25c25173f7775a + +diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake +index f8369f73fc..5926647348 100644 +--- a/cmake/modules/Findrocksdb.cmake ++++ b/cmake/modules/Findrocksdb.cmake +@@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb) + + if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") + foreach(ver "MAJOR" "MINOR" "PATCH") +- file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE ++ file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE + REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$" +- "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}") +- unset(${ROCKDB_VER_${ver}_LINE}) ++ "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}") ++ unset(${ROCKSDB_VER_${ver}_LINE}) + endforeach() + set(ROCKSDB_VERSION_STRING + "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}") diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch deleted file mode 100644 index 1a3c6b0b23..0000000000 --- a/gnu/packages/patches/ceph-rocksdb-compat.patch +++ /dev/null @@ -1,63 +0,0 @@ -Fix compatibility with newer versions of RocksDB. - -Adapted from this upstream patch, with some additional changes for 12.2: -https://github.com/ceph/ceph/commit/9d73a7121fdb1ae87cb1aa6f7d9d7a13f329ae68 - -diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc -index 8660afe1886d..bc0de79e23cb 100644 ---- a/src/kv/RocksDBStore.cc -+++ b/src/kv/RocksDBStore.cc -@@ -505,7 +505,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -532,13 +532,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); -@@ -558,7 +558,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -586,13 +586,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); diff --git a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch index 43b9984862..407bd93278 100644 --- a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch +++ b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch @@ -4,25 +4,21 @@ This test tries to walk a sysfs path and hits a null pointer exception. Expected: (dir) != (nullptr), actual: NULL vs 8-byte object <00-00 00-00 00-00 00-00> diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt -index 5172663898..ac84085eaa 100644 --- a/src/test/common/CMakeLists.txt +++ b/src/test/common/CMakeLists.txt -@@ -12,15 +12,6 @@ target_link_libraries(get_command_descriptions +@@ -12,15 +12,6 @@ ${CMAKE_DL_LIBS} ) -if(HAVE_BLKID) --# unittest_blkdev --add_executable(unittest_blkdev -- test_blkdev.cc -- ) --add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev) --target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES}) --endif(HAVE_BLKID) +- # unittest_blkdev +- add_executable(unittest_blkdev +- test_blkdev.cc +- ) +- add_ceph_unittest(unittest_blkdev) +- target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES}) +-endif() - # unittest_bloom_filter add_executable(unittest_bloom_filter test_bloom_filter.cc --- -2.11.1 - diff --git a/gnu/packages/patches/ceph-volume-respect-PATH.patch b/gnu/packages/patches/ceph-volume-respect-PATH.patch new file mode 100644 index 0000000000..08a9a15ddd --- /dev/null +++ b/gnu/packages/patches/ceph-volume-respect-PATH.patch @@ -0,0 +1,22 @@ +Look for required tools in $PATH instead of just a handful locations. + +diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py +index b637f023a4..14516e1c65 100644 +--- a/src/ceph-volume/ceph_volume/util/system.py ++++ b/src/ceph-volume/ceph_volume/util/system.py +@@ -33,14 +33,7 @@ def generate_uuid(): + + def which(executable): + """find the location of an executable""" +- locations = ( +- '/usr/local/bin', +- '/bin', +- '/usr/bin', +- '/usr/local/sbin', +- '/usr/sbin', +- '/sbin', +- ) ++ locations = os.getenv('PATH').split(':') + + for location in locations: + executable_path = os.path.join(location, executable) diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index 11f6f9d7e8..5051ccd986 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -26,6 +26,7 @@ #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) + #:use-module (gnu packages authentication) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -35,6 +36,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages disk) + #:use-module (gnu packages gcc) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gperf) #:use-module (gnu packages jemalloc) @@ -51,18 +53,19 @@ (define-public ceph (package (name "ceph") - (version "12.2.5") + (version "13.2.2") (source (origin (method url-fetch) (uri (string-append "https://download.ceph.com/tarballs/ceph-" version ".tar.gz")) (sha256 (base32 - "1ydc3mfvc0vpnpfnfmissvsrsj4jyxgzc2pcl1a4vdr3bwkcglp3")) + "0h483n9iy0fkbqrhf7k0dzspwdpcaswkjwmc5n5c600fr6s1v9pk")) (patches (search-patches "ceph-skip-unittest_blockdev.patch" "ceph-skip-collect-sys-info-test.patch" - "ceph-rocksdb-compat.patch" + "ceph-detect-rocksdb.patch" + "ceph-volume-respect-PATH.patch" "ceph-disable-cpu-optimizations.patch")) (modules '((guix build utils))) (snippet @@ -76,7 +79,7 @@ ;"src/zstd" ;"src/civetweb" "src/test/downloads" - "src/dpdk" + "src/rapidjson" "src/spdk" "src/rocksdb" "src/boost")) @@ -100,13 +103,14 @@ (assoc-ref %build-inputs "keyutils") "/include") "-DCMAKE_INSTALL_LOCALSTATEDIR=/var" "-DENABLE_SHARED=ON" - "-DWITH_EMBEDDED=OFF" "-DWITH_SYSTEM_ROCKSDB=ON" "-DWITH_SYSTEM_BOOST=ON" "-DWITH_PYTHON3=ON" ;; TODO: Enable these when available in Guix. + "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv "-DWITH_BABELTRACE=OFF" "-DWITH_LTTNG=OFF" + "-DWITH_SPDK=OFF" "-DWITH_XFS=OFF" "-DWITH_XIO=OFF" ;; Use jemalloc instead of tcmalloc. @@ -184,9 +188,6 @@ ;; /tmp/ceph-disk-virtualenv/bin/ceph-disk, but somehow ;; src/ceph-disk/CMakeLists.txt fails to create it. (substitute* "src/test/CMakeLists.txt" - ;; FIXME: "create cannot load compressor of type zlib" - ;; "libceph_zlib.so: undefined symbol: isal_deflate" - (("^add_subdirectory\\(compressor\\)") "") ;; FIXME: These tests fails because `ceph-disk' ;; is not available. (("^add_ceph_test\\(test-ceph-helpers\\.sh.*$") "\n") @@ -235,6 +236,11 @@ (("^add_ceph_test\\(osd-copy-from\\.sh.*$") "\n") (("^add_ceph_test\\(osd-fast-mark-down\\.sh.*$") "\n")) #t))) + (add-before 'configure 'gcc-workaround + (lambda _ + (unsetenv "C_INCLUDE_PATH") + (unsetenv "CPLUS_INCLUDE_PATH") + #t)) (add-before 'check 'set-check-environment (lambda _ ;; Run tests in parallel. @@ -262,28 +268,28 @@ (add-after 'install 'wrap-python-scripts (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (ceph (string-append out "/bin/ceph")) - (ceph-disk (string-append out "/bin/ceph-disk")) - (ceph-detect-init (string-append - out "/bin/ceph-detect-init")) - + (scripts '("ceph" "ceph-mgr" "ceph-volume" + "ceph-detect-init" + "ceph-disk")) ;deprecated (prettytable (assoc-ref inputs "python2-prettytable")) - + (six (assoc-ref inputs "python2-six")) (sitedir (lambda (package) (string-append package "/lib/python2.7/site-packages"))) (PYTHONPATH (string-append (sitedir out) ":" + (sitedir six) ":" (sitedir prettytable)))) (for-each (lambda (executable) - (wrap-program executable + (wrap-program (string-append out "/bin/" executable) `("PYTHONPATH" ":" prefix (,PYTHONPATH)))) - (list ceph ceph-disk ceph-detect-init)) + scripts) #t)))))) (outputs '("out" "lib")) (native-inputs - `(("gperf" ,gperf) + `(("gcc" ,gcc-7) ;7 or later is required + ("gperf" ,gperf) ("pkg-config" ,pkg-config) ("python-cython" ,python-cython) ("python-sphinx" ,python-sphinx) @@ -329,13 +335,16 @@ ("libatomic-ops" ,libatomic-ops) ("lua" ,lua) ("lz4" ,lz4) + ("oath-toolkit" ,oath-toolkit) ("openldap" ,openldap) ("openssl" ,openssl) ("nss" ,nss) ("parted" ,parted) ("python@2" ,python-2) ("python2-prettytable" ,python2-prettytable) ;used by ceph_daemon.py + ("python2-six" ,python2-six) ;for ceph-mgr + plugins ("python@3" ,python-3) + ("rapidjson" ,rapidjson) ("rocksdb" ,rocksdb) ("snappy" ,snappy) ("udev" ,eudev) -- cgit 1.4.1 From b44b1f08f6945ea8370746cfdadb44c7dea9ea3e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 7 Nov 2018 23:13:02 +0200 Subject: gnu: hplip: Remove bundled non-free blobs. This fixes . * gnu/packages/cups.scm (hplip)[source]: Add patch. Update snippet to remove non-free code and binary blobs. * gnu/packages/patches/hplip-remove-imageprocessor.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/cups.scm | 6 +- .../patches/hplip-remove-imageprocessor.patch | 232 +++++++++++++++++++++ 3 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/hplip-remove-imageprocessor.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9a8330aa41..c627577e41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -808,6 +808,7 @@ dist_patch_DATA = \ %D%/packages/patches/higan-remove-march-native-flag.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \ + %D%/packages/patches/hplip-remove-imageprocessor.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ %D%/packages/patches/icecat-CVE-2018-12383.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 4259648c69..04a533de02 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -405,9 +405,13 @@ device-specific programs to convert and print many types of files.") (base32 "0g3q5mm2crjyc1z4z6gv4lam6sc5d3diz704djrnpqadk4q3h290")) (modules '((guix build utils))) + (patches (search-patches "hplip-remove-imageprocessor.patch")) (snippet - ;; Fix type mismatch. '(begin + ;; Delete non-free blobs + (for-each delete-file (find-files "." "\\.so$")) + (delete-file "prnt/hpcups/ImageProcessor.h") + ;; Fix type mismatch. (substitute* "prnt/hpcups/genPCLm.cpp" (("boolean") "bool")) #t)))) diff --git a/gnu/packages/patches/hplip-remove-imageprocessor.patch b/gnu/packages/patches/hplip-remove-imageprocessor.patch new file mode 100644 index 0000000000..cde3ecba2d --- /dev/null +++ b/gnu/packages/patches/hplip-remove-imageprocessor.patch @@ -0,0 +1,232 @@ +This patch is based heavily on the Debian patch. + +https://salsa.debian.org/printing-team/hplip/raw/debian/3.18.10+dfsg0-1/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch + +--- + Makefile.am | 22 +++------------------- + Makefile.in | 33 +++++---------------------------- + prnt/hpcups/HPCupsFilter.cpp | 21 --------------------- + 3 files changed, 8 insertions(+), 68 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ef6480f..ecada5c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER + dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py + endif #HPLIP_CLASS_DRIVER + +-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so ++dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template + dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv + + if !HPLIP_CLASS_DRIVER +@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp + prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + prnt/hpcups/genPCLm.h \ + common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +- prnt/hpcups/ImageProcessor.h ++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + + hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +@@ -679,21 +678,10 @@ printpluginsdir=$(cupsfilterdir) + + + dist_filter_DATA = hpcups hpps dat2drv +-dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so + endif #HPLIP_CLASS_DRIVER + + install-data-hook: + if HPLIP_BUILD +- if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ +- cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ +- chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +- ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \ +- fi; \ +- if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \ +- cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \ +- chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ +- ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ +- fi + if !HPLIP_CLASS_DRIVER + # If scanner build, add hpaio entry to sane dll.conf. + if [ "$(scan_build)" = "yes" ]; then \ +@@ -874,10 +862,6 @@ if HPLIP_CLASS_DRIVER + rm -rf $(distdir)/setup.py + rm -rf $(distdir)/systray.py + rm -rf $(distdir)/timedate.py +- rm -rf $(distdir)/prnt/plugins/lj-arm32.so +- rm -rf $(distdir)/prnt/plugins/lj-arm64.so +- rm -rf $(distdir)/prnt/plugins/lj-x86_32.so +- rm -rf $(distdir)/prnt/plugins/lj-x86_64.so + rm -rf $(distdir)/hpijs-drv + rm -rf $(distdir)/prnt/hpcups/ + rm -rf $(distdir)/prnt/ps/ +diff --git a/Makefile.in b/Makefile.in +index 910a268..cd44203 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -103,7 +103,7 @@ DIST_COMMON = $(am__configure_deps) \ + + # ip library + @HPLIP_BUILD_TRUE@am__append_12 = libhpip.la +-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so ++@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_14 = dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@am__append_15 = scan/sane/hpaio.desc \ + @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ installer/text_install.py \ +@@ -500,8 +500,7 @@ am__hpcups_SOURCES_DIST = prnt/hpcups/HPCupsFilter.cpp \ + prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + prnt/hpcups/genPCLm.h common/utils.c common/utils.h \ + prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +- prnt/hpcups/ImageProcessor.h ++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + @HPCUPS_INSTALL_TRUE@am_hpcups_OBJECTS = \ + @HPCUPS_INSTALL_TRUE@ hpcups-HPCupsFilter.$(OBJEXT) \ + @HPCUPS_INSTALL_TRUE@ hpcups-dbuscomm.$(OBJEXT) \ +@@ -723,8 +722,7 @@ am__dist_locatedriver_DATA_DIST = locatedriver + am__dist_models_DATA_DIST = data/models/models.dat + am__dist_noinst_DATA_DIST = prnt/drv/hpijs.drv.in.template \ + prnt/drv/hpcups.drv.in.template \ +- prnt/hpcups/libImageProcessor-x86_64.so \ +- prnt/hpcups/libImageProcessor-x86_32.so scan/sane/hpaio.desc \ ++ scan/sane/hpaio.desc \ + installer/text_install.py data/localization/hplip_de.ts \ + data/localization/hplip_es.ts data/localization/hplip_fr.ts \ + data/localization/hplip_it.ts data/localization/hplip_pt.ts \ +@@ -1932,11 +1930,6 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-designjet_z6810ps_42in-ps.ppd.gz \ + ppd/classppd/ps/hp-postscript-inkjet.ppd.gz \ + ppd/classppd/ps/hp-postscript-laserjet-pro.ppd.gz \ + ppd/classppd/ps/hp-postscript-laserjet.ppd.gz +-am__dist_printplugins_DATA_DIST = prnt/plugins/hbpl1-arm32.so \ +- prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so \ +- prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so \ +- prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so \ +- prnt/plugins/lj-x86_64.so + am__dist_prnt_DATA_DIST = prnt/cups.py prnt/__init__.py prnt/ldl.py \ + prnt/pcl.py prnt/colorcal.py + am__dist_rules_DATA_DIST = data/rules/56-hpmud.rules \ +@@ -4665,11 +4658,10 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs + @HPCUPS_INSTALL_TRUE@ prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \ + @HPCUPS_INSTALL_TRUE@ prnt/hpcups/genPCLm.h \ + @HPCUPS_INSTALL_TRUE@ common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \ +-@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \ +-@HPCUPS_INSTALL_TRUE@ prnt/hpcups/ImageProcessor.h ++@HPCUPS_INSTALL_TRUE@ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp + + @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS) +-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS) ++@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS) + #else + #hpcupsdir = $(cupsfilterdir) + #hpcups_PROGRAMS = hpcups +@@ -4717,7 +4709,6 @@ ppddir = $(hpppddir) + @HPLIP_CLASS_DRIVER_TRUE@filterdir = $(cupsfilterdir) + @HPLIP_CLASS_DRIVER_TRUE@printpluginsdir = $(cupsfilterdir) + @HPLIP_CLASS_DRIVER_TRUE@dist_filter_DATA = hpcups hpps dat2drv +-@HPLIP_CLASS_DRIVER_TRUE@dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so + all: all-am + + .SUFFIXES: +@@ -9380,16 +9371,6 @@ uninstall-am: uninstall-apparmor_abstractionDATA \ + + + install-data-hook: +-@HPLIP_BUILD_TRUE@ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ +-@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ +-@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +-@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \ +-@HPLIP_BUILD_TRUE@ fi; \ +-@HPLIP_BUILD_TRUE@ if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \ +-@HPLIP_BUILD_TRUE@ cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \ +-@HPLIP_BUILD_TRUE@ chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ +-@HPLIP_BUILD_TRUE@ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ +-@HPLIP_BUILD_TRUE@ fi + # If scanner build, add hpaio entry to sane dll.conf. + @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ if [ "$(scan_build)" = "yes" ]; then \ + @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@ $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \ +@@ -9556,10 +9537,6 @@ dist-hook: + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/setup.py + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/systray.py + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/timedate.py +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-arm32.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-arm64.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-x86_32.so +-@HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/plugins/lj-x86_64.so + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/hpijs-drv + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/hpcups/ + @HPLIP_CLASS_DRIVER_TRUE@ rm -rf $(distdir)/prnt/ps/ +diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp +index 5b282d8..0bacfaf 100644 +--- a/prnt/hpcups/HPCupsFilter.cpp ++++ b/prnt/hpcups/HPCupsFilter.cpp +@@ -31,7 +31,6 @@ + \*****************************************************************************/ + + #include "HPCupsFilter.h" +-#include "ImageProcessor.h" + + #include + #include +@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + + + sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); +- image_processor_t* imageProcessor = imageProcessorCreate(); + + while (cupsRasterReadHeader2(cups_raster, &cups_header)) + { + +- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); +- } +- + current_page_number++; + + if (current_page_number == 1) { +@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + color_raster = rgbRaster; + black_raster = kRaster; + +- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); +- } +- +- + if ((y == 0) && !is_ljmono) { + //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer + //may not skip blank lines before actual data +@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + } + } // for() loop end + +- result = imageProcessorEndPage(imageProcessor); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); +- } +- +- + m_Job.NewPage(); + if (err != NO_ERROR) { + break; +@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + rgbRaster = NULL; + } + +- imageProcessorDestroy(imageProcessor); +- + unlink(hpPreProcessedRasterFile); + return ret_status; + } +-- +2.19.1 + -- cgit 1.4.1 From 86c6928ea39aff622124030c20404ce94dae9b49 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 8 Nov 2018 09:46:42 +0100 Subject: gnu: vsearch: Update to 2.9.1. * gnu/packages/bioinformatics.scm (vsearch): Update to 2.9.1. * gnu/packages/patches/vsearch-unbundle-cityhash.patch: Update. --- gnu/packages/bioinformatics.scm | 4 ++-- gnu/packages/patches/vsearch-unbundle-cityhash.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 9954fcf20b..d9362ea4c6 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -6825,7 +6825,7 @@ SELECT or UPDATE queries to an end-point.") (define-public vsearch (package (name "vsearch") - (version "2.8.0") + (version "2.9.1") (source (origin (method git-fetch) @@ -6835,7 +6835,7 @@ SELECT or UPDATE queries to an end-point.") (file-name (git-file-name name version)) (sha256 (base32 - "0lrw6n75gmqkxl053yi2pwwvnzwf1r79ypzxgv6m0kw6df5fwv6r")) + "0vhrpjfdf75ba04b24xknp41790cvcgwl0vgpy7qbzj5xh2521ss")) (patches (search-patches "vsearch-unbundle-cityhash.patch")) (snippet '(begin diff --git a/gnu/packages/patches/vsearch-unbundle-cityhash.patch b/gnu/packages/patches/vsearch-unbundle-cityhash.patch index b1ecb1f063..2a2ab13a73 100644 --- a/gnu/packages/patches/vsearch-unbundle-cityhash.patch +++ b/gnu/packages/patches/vsearch-unbundle-cityhash.patch @@ -6,7 +6,7 @@ index e56a8a2..4adcc48 100644 if TARGET_PPC AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -mcpu=power8 else --AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g +-AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -march=x86-64 -mtune=generic +AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -lcityhash endif @@ -39,7 +39,7 @@ index e56a8a2..4adcc48 100644 - if TARGET_WIN --libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g -D_MSC_VER +-libcityhash_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-sign-compare -D_MSC_VER -__top_builddir__bin_vsearch_LDFLAGS = -static -__top_builddir__bin_vsearch_LDADD = libregex.a libcityhash.a libcpu_ssse3.a libcpu_sse2.a +__top_builddir__bin_vsearch_LDFLAGS = -static -lcityhash @@ -47,7 +47,7 @@ index e56a8a2..4adcc48 100644 else --libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g +-libcityhash_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-sign-compare - if TARGET_PPC -__top_builddir__bin_vsearch_LDADD = libcityhash.a libcpu.a -- cgit 1.4.1 From e4b62e229e9dfb7da158a3a5c7a26b149b41c8ab Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Fri, 9 Nov 2018 01:06:21 -0500 Subject: gnu: wxmaxima: Update to 18.10.1. * gnu/packages/maths.scm (wxmaxima): Update to 18.10.1. [source]: Update URL and remove patch. * gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/maths.scm | 10 ++++----- ...xmaxima-do-not-use-old-gnuplot-parameters.patch | 26 ---------------------- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c627577e41..68a87b1255 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1228,7 +1228,6 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-fix-zeroed-keys.patch \ %D%/packages/patches/wpa-supplicant-fix-nonce-reuse.patch \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ - %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch \ %D%/packages/patches/x265-detect512-all-arches.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 808ab5345b..0d040bf296 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2763,18 +2763,16 @@ point numbers.") (define-public wxmaxima (package (name "wxmaxima") - (version "18.02.0") + (version "18.10.1") (source (origin (method url-fetch) - (uri (string-append "https://github.com/andrejv/" name "/archive" - "/Version-" version ".tar.gz")) + (uri (string-append "https://github.com/wxMaxima-developers/" name + "/archive/Version-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "03kr2rgfp4hcf3is8m8d8f9hj660c3xgrc50vrrfpixx4syh6wvj")) - (patches - (search-patches "wxmaxima-do-not-use-old-gnuplot-parameters.patch")))) + "0c2blq65r0am509p3rjqpwqk6vl5r2yg1p9nh2jczf80vhi3ldas")))) (build-system cmake-build-system) (native-inputs `(("gettext" ,gettext-minimal))) diff --git a/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch b/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch deleted file mode 100644 index 345101bd3a..0000000000 --- a/gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch +++ /dev/null @@ -1,26 +0,0 @@ -This fixes the wxplot2d plotting issue found at -https://github.com/andrejv/wxmaxima/issues/973. - -From 5a0693c97ceaa4935b908f1e478126896952f399 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Gunter=20K=C3=B6nigsmann?= -Date: Mon, 19 Feb 2018 05:37:35 +0100 -Subject: [PATCH] Seems I accidentally made wxMaxima to default to parameters - for old gnuplots. Resolves #973 - ---- - data/wxmathml.lisp.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/wxmathml.lisp.in b/data/wxmathml.lisp.in -index a32e3fc3..4e19acaf 100644 ---- a/data/wxmathml.lisp.in -+++ b/data/wxmathml.lisp.in -@@ -43,7 +43,7 @@ - (defvar $wxsubscripts t - "Recognize TeX-style subscripts") - (defvar $wxplot_pngcairo nil "Use gnuplot's pngcairo terminal for new plots?") --(defmvar $wxplot_old_gnuplot t) -+(defmvar $wxplot_old_gnuplot nil) - - (defun $wxstatusbar (status) - (format t "~a~%" status)) -- cgit 1.4.1 From 3b144946164641f806fbbf27ac592c7c717ea6c6 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 10 Nov 2018 13:42:50 -0500 Subject: gnu: icecat: Update to 60.3.0-gnu1. * gnu/packages/gnuzilla.scm (icecat): Update to 60.3.0-gnu1. [source]: Switch back to the normal source URI. Remove patches that are no longer applicable. * gnu/packages/patches/icecat-CVE-2018-12383.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnuzilla.scm | 68 +-------------- gnu/packages/patches/icecat-CVE-2018-12383.patch | 103 ----------------------- 3 files changed, 3 insertions(+), 169 deletions(-) delete mode 100644 gnu/packages/patches/icecat-CVE-2018-12383.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 68a87b1255..48ee438a6e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -811,7 +811,6 @@ dist_patch_DATA = \ %D%/packages/patches/hplip-remove-imageprocessor.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ - %D%/packages/patches/icecat-CVE-2018-12383.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1dd0e930d3..36ac0dfe6a 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -482,83 +482,21 @@ security standards.") (define-public icecat (package (name "icecat") - (version "60.2.0-gnu1") + (version "60.3.0-gnu1") (source (origin (method url-fetch) - ;; Temporary URL pending official release: - (uri "https://alpha.gnu.org/gnu/gnuzilla/60.2.0/icecat-60.2.0-gnu1.tar.bz2") - #; (uri (string-append "mirror://gnu/gnuzilla/" (first (string-split version #\-)) "/" name "-" version ".tar.bz2")) (sha256 (base32 - "0lqx7g79x15941rhjr3qsfwsny6vzc7d7abdmvjy6jjbqkqlc1zl")) + "0icnl64nxcyf7dprpdpygxhabsvyhps8c3ixysj9bcdlj9q34ib1")) (patches (list (search-patch "icecat-avoid-bundled-libraries.patch") (search-patch "icecat-use-system-graphite2+harfbuzz.patch") - (search-patch "icecat-use-system-media-libs.patch") - (mozilla-patch "icecat-CVE-2018-12385.patch" "80a4a7ef2813" "1vgcbimpnfjqj934v0cryq1g13xac3wfmd4jyhcb5s60x8xyssf5") - (search-patch "icecat-CVE-2018-12383.patch") - (mozilla-patch "icecat-bug-1489744.patch" "6546ee839d30" "11mhvj77r789b428bfxqq5wdx8yr7lbrdjzr8qjj6fw197pldn51") - (mozilla-patch "icecat-CVE-2018-12386.patch" "4808fcb2e6ca" "05sc881l7sh8bag8whd2ggdn198lskqcxq8f41scfpqscw6xs5d5") - (mozilla-patch "icecat-CVE-2018-12387.patch" "b8f5c37486e1" "0lvmbh126m695kgdbasy1y5xh9n1j08cwdhn071mgvj6yn8cns5z") - (mozilla-patch "icecat-bug-1464751.patch" "d5d00faf0465" "1mj7dbb06brwrk0mvap0z4lfl2hwz1cj6dwjvdrisxm046pdw98i") - (mozilla-patch "icecat-bug-1472538.patch" "11462f2b98f2" "1nxgh0plzilylx8r73r7d74pv66qwjqxmd7nqii33p0snl2jjfzs") - (mozilla-patch "icecat-bug-1478685.patch" "098585dc86fc" "1b0x4qdh6isvffmibvc8ad8z62m3iky9q6jq0z6gyvn8q252cqal") - (mozilla-patch "icecat-bug-1486080.patch" "3f8d57d936ea" "0pz2c18wcgj44v0j8my9xbm90m4bsjcvzmavj569fi8bh6s6zz8p") - (mozilla-patch "icecat-bug-1423278.patch" "878ceaee5634" "0i47s5nvrx9vqbnj6s9y9f4ffww20p8nviqa6frg676y1188xlyl") - (mozilla-patch "icecat-CVE-2018-12390-pt01.patch" "87be1b98ec9a" "15f4l18c7hz9aqn89gg3dwmdidfwgn10dywgpzydm8mps45amx7j") - (mozilla-patch "icecat-bug-1484559.patch" "99e58b5307ce" "02fdgbliwzi2r2376wg6k1rky1isfka0smac4ii2cll01jhpfrn6") - (mozilla-patch "icecat-CVE-2018-12390-pt02.patch" "f25ce451a492" "18nzg39iyxza1686180qk9cc88l5j2hf1h35d62lrqmdgd9vcj33") - (mozilla-patch "icecat-CVE-2018-12390-pt03.patch" "35c26bc231df" "0qh8d4z6y03h5xh7djci26a01l6zq667lg2k11f6zzg7z2j0h67x") - (mozilla-patch "icecat-bug-1488061.patch" "050d0cfa8e3d" "05ql798ynbyz5pvyri4b95j4ixmgnny3zl7sd2ckfrrbm9mxh627") - (mozilla-patch "icecat-bug-1434963-pt1.patch" "1e6dad87efed" "1v00a6cmgswjk54041jyv1ib129fxshpzwk6mn6lr0v5hylk3bx9") - (mozilla-patch "icecat-bug-1434963-pt2.patch" "6558c46df9ea" "0vdy9dm9w5k1flhcfxwvvff0aa415b5mgmmq5r37i83686768xfb") - (mozilla-patch "icecat-bug-1434963-pt3.patch" "686fcfa8abd6" "0ihqr11aq4b0y7mx7bwn8yzn25mv3k2gdphm951mj1g85qg35ann") - (mozilla-patch "icecat-bug-1491132.patch" "14120e0c74d6" "188c5fbhqqhmlk88p70l6d97skh7xy4jhqdby1ri3h9ix967515j") - (mozilla-patch "icecat-bug-1492065.patch" "ec4b5969c6ae" "18gfwn15kh0826vlg6lhrx3q4gv82i7v1k3y5jp72mvrjq154gy0") - (mozilla-patch "icecat-bug-1492064.patch" "528cabdd9665" "0rdwpkfma24hn8namfb9saw4rgi9yyyj4af5h2ijrvadw6r8lyyn") - (mozilla-patch "icecat-bug-1489757.patch" "46f19852aaa6" "0dga7mw847klm8x6il2fyzpjxqxxgx1q5cya658f1w66kxms1f29") - (mozilla-patch "icecat-bug-1492897.patch" "c3a48066f383" "09n6sdck4jzzmznzrq0iixg5nsgrc5ibpdfsh3i7ppwad3fsy2m3") - (mozilla-patch "icecat-bug-1492915.patch" "2d280e557331" "11x2n61pw5way9cg8lbrfl3lqvgfnbmcs1fwm78i06kmfwj0msk3") - (mozilla-patch "icecat-CVE-2018-12390-pt04.patch" "b80f94262165" "1hw43h4sgf77x323745rixyp6cci3fb6d3fnp33q82m4ssdb5623") - (mozilla-patch "icecat-bug-1492484.patch" "1b3e6759cf3a" "1yn2cd2227ncg90c88ymdi5fyfs4hk335bd16vkkgljs0924yy0m") - (mozilla-patch "icecat-bug-1493590.patch" "d9fe3b2025fc" "06783hj1aqms2f9a3mp18bk8hgijk3pz70bpccn173v4w0zlbbd4") - (mozilla-patch "icecat-CVE-2018-12390-pt05.patch" "20c59797e994" "1vxnhpirjsj040hrq9xmq2xhkpq4l5mnnzqy0nda92dfh47zvidj") - (mozilla-patch "icecat-CVE-2018-12390-pt06.patch" "1749661dfd28" "0g0sj2fgp3asj0yvxksnhrc59yxncn35bz5nzlvkpgdf7h06gscd") - (mozilla-patch "icecat-CVE-2018-12390-pt07.patch" "a511a9242406" "1hhfrvdmkccnhs4skbi06174x37rmvf4ic86xawyyzr67yga73b2") - (mozilla-patch "icecat-bug-1495404.patch" "3232bb3b622f" "1pnaxf8r9h0wldjc4qgl7z3rk34fpz9h1vd3zmhswa6mvyln5jhg") - (mozilla-patch "icecat-bug-1465388.patch" "a9577451dcc2" "0v29s0v3vv9vblkcachhh46qvwjcrmv2bkcdb7sj2asc503l0lqv") - (mozilla-patch "icecat-CVE-2018-12390-pt08.patch" "e965f6f6ed75" "0hh091854xj5j0x1r8pg46xmn00fqi5n212xhzbdpgyf96rsf513") - (mozilla-patch "icecat-bug-1445528.patch" "8a503e022a29" "1y2ll3h0yz8sfdddjmk90qjfxcr1ffhw7a9ww3yw26gyhnbpg404") - (mozilla-patch "icecat-bug-1409570.patch" "8d326641d1c0" "0w29s6dixi7b7q3nicshrp29n9sj5awssdln00yx664m8a8a8ihs") - (mozilla-patch "icecat-bug-1496094.patch" "6cdd6d88eca9" "1ssqa4fy2xpbr63ph3av3hkpl92g4yszx402fq9d2xn9482q43dp") - (mozilla-patch "icecat-CVE-2018-12391.patch" "0fa07c704ca4" "055xdyb3g2l4rj188235i579qnr50v19q36jjpliws9nik129iqy") - (mozilla-patch "icecat-bug-1462162.patch" "739e898cb7c8" "17m9y0pskmqx15dkgkw4k93njph14mpsf37wb1azwkq3xx7s0fhx") - (mozilla-patch "icecat-bug-1492764.patch" "16310ab35452" "1kq5r3w9i4n6q9msmw2qsqa0jd4qw1mjlyyz8aq14fwlbkhvv199") - (mozilla-patch "icecat-CVE-2018-12390-pt09.patch" "9b669d047d55" "063ig49gx9468nvc9w8259j819qfdjvq0sbbz8n4kj5r6hcxjc5l") - (mozilla-patch "icecat-CVE-2018-12390-pt10.patch" "9d51e65c797a" "0m23cq9zl22w80dvx5rlgpbam1l3d6v56h7g9wzamzl21bwxq9fv") - (mozilla-patch "icecat-CVE-2018-12390-pt11.patch" "efc0596dd381" "1alvbb6wvawxxh6isisk9c40vhdiv59fy0af0n10yn1dgy8ffv5i") - (mozilla-patch "icecat-CVE-2018-12393.patch" "c4fb48bb5d28" "09izww9dsg9n8cish8f3y7phxibsnd12bfkcxd7rzcdhg10nr4pl") - (mozilla-patch "icecat-CVE-2018-12390-pt12.patch" "b3359becd7b1" "188byxmbgrvrid2fcz34w5xdvaw571frxx1c6nqaa9k03iljdzjr") - (mozilla-patch "icecat-CVE-2018-12390-pt13.patch" "791c8ecf252d" "02h37594aba0pklxm3g7w1wv8vz9xmcf30fd0az8pfaccsklmx74") - (mozilla-patch "icecat-bug-1494328.patch" "333276fac37c" "0qyq42jl0al63m6pwj9gva7nj82l76szzbj7sklsygx0a9mqs13z") - (mozilla-patch "icecat-CVE-2018-12397.patch" "cb73374a0e4e" "0x2s1nwgwdag9df5hkwzvjj0qznp5c3d6w6y63rn2y287jn9m3vl") - (mozilla-patch "icecat-CVE-2018-12392.patch" "f6bb138ad0ab" "0f0z9dsyw2a11p4p31mdyic571153jpfgy2q04i4v6dmmcz76pm3") - (mozilla-patch "icecat-CVE-2018-12396.patch" "f27145bd5502" "0vznmlm1fbl3ynax2zpi6xxzr9qp9b83afr3mv90jgrhlgpzdbcz") - (mozilla-patch "icecat-CVE-2018-12395-pt1.patch" "133a99a8f3ca" "0im7m4jmc273mg9kih0i70hxsgzy04j6ydm9zmaz2933hkhdf4iw") - (mozilla-patch "icecat-CVE-2018-12395-pt2.patch" "82176a4a9b14" "0g3yqx4854d4mx5a0ghb7p7saj6y5d5bm2lfhabvkwybcd477zmc") - (mozilla-patch "icecat-bug-1474265.patch" "e8abd9a8ce6e" "1q2sv5h081rvnhsx6g1y8a43hwv6hsg0cr6zdcij58mkgzf6hyvd") - (mozilla-patch "icecat-bug-1492737-pt1.patch" "eeb9060379dc" "1d2mf0x4rni7anvi0sgra4dg87fmc6g7zhizzl9jv2x8va27ycbp") - (mozilla-patch "icecat-bug-1492737-pt2.patch" "99eae0d15092" "0f9j6cvhrbrrxa95p4pkcn285r9wmi9yj13nwj5x0gkglwx6idbk") - (mozilla-patch "icecat-CVE-2018-12389-pt1.patch" "23b23e12c548" "0nsdycggki5rhh59yvmh41nf1ahjmgii89fx38jryprhspy3wg62") - (mozilla-patch "icecat-CVE-2018-12390-pt14.patch" "023133ff02ec" "1g22qxnmgiy8bgrn2nv6har6vpz4p2h5pdas8ib1yyz7p2ic8652") - (mozilla-patch "icecat-CVE-2018-12390-pt15.patch" "9461988ff462" "0yq2cr5grqskr0kz4nxcwmnywy9g0xyv6k6q44i490jcj8x2y1vw") - (mozilla-patch "icecat-CVE-2018-12390-pt16.patch" "09939be135d8" "1546xlk368v4hnjd3hf4w868i6m8r4wfd34qxz4wg1cdpr4m5mik") - (mozilla-patch "icecat-CVE-2018-12389-pt2.patch" "ea9412b18ca8" "0fmdncrylbmjh0bcb6dmw1rq7zww8a0v9v9p1pxqfz0vbc6v9l5d"))) + (search-patch "icecat-use-system-media-libs.patch"))) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/icecat-CVE-2018-12383.patch b/gnu/packages/patches/icecat-CVE-2018-12383.patch deleted file mode 100644 index 17ca0f3773..0000000000 --- a/gnu/packages/patches/icecat-CVE-2018-12383.patch +++ /dev/null @@ -1,103 +0,0 @@ -Based on upstream changeset: - https://hg.mozilla.org/releases/mozilla-esr60/rev/300efdbc9fe1 -but with the git binary patch and related test changes omitted, -and adapted to apply cleanly to GNU IceCat. - -# HG changeset patch -# User David Keeler -# Date 1531860660 25200 -# Node ID 300efdbc9fe1f9165428c7934861033935b5abfa -# Parent 80a4a7ef281374dbb2afda8edac54665b14b9ef8 -Bug 1475775 - Clean up old NSS DB file after upgrade if necessary. r=franziskus, r=mattn, a=RyanVM - -Reviewers: franziskus, mattn - -Bug #: 1475775 - -Differential Revision: https://phabricator.services.mozilla.com/D2202 - -diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp ---- a/security/manager/ssl/nsNSSComponent.cpp -+++ b/security/manager/ssl/nsNSSComponent.cpp -@@ -1935,16 +1935,61 @@ AttemptToRenameBothPKCS11ModuleDBVersion - NS_NAMED_LITERAL_CSTRING(sqlModuleDBFilename, "pkcs11.txt"); - nsresult rv = AttemptToRenamePKCS11ModuleDB(profilePath, - legacyModuleDBFilename); - if (NS_FAILED(rv)) { - return rv; - } - return AttemptToRenamePKCS11ModuleDB(profilePath, sqlModuleDBFilename); - } -+ -+// When we changed from the old dbm database format to the newer sqlite -+// implementation, the upgrade process left behind the existing files. Suppose a -+// user had not set a password for the old key3.db (which is about 99% of -+// users). After upgrading, both the old database and the new database are -+// unprotected. If the user then sets a password for the new database, the old -+// one will not be protected. In this scenario, we should probably just remove -+// the old database (it would only be relevant if the user downgraded to a -+// version of IceCat before 58, but we have to trade this off against the -+// user's old private keys being unexpectedly unprotected after setting a -+// password). -+// This was never an issue on Android because we always used the new -+// implementation. -+static void -+MaybeCleanUpOldNSSFiles(const nsACString& profilePath) -+{ -+ UniquePK11SlotInfo slot(PK11_GetInternalKeySlot()); -+ if (!slot) { -+ return; -+ } -+ // Unfortunately we can't now tell the difference between "there already was a -+ // password when the upgrade happened" and "there was not a password but then -+ // the user added one after upgrading". -+ bool hasPassword = PK11_NeedLogin(slot.get()) && -+ !PK11_NeedUserInit(slot.get()); -+ if (!hasPassword) { -+ return; -+ } -+ nsCOMPtr dbFile = do_CreateInstance("@mozilla.org/file/local;1"); -+ if (!dbFile) { -+ return; -+ } -+ nsresult rv = dbFile->InitWithNativePath(profilePath); -+ if (NS_FAILED(rv)) { -+ return; -+ } -+ NS_NAMED_LITERAL_CSTRING(keyDBFilename, "key3.db"); -+ rv = dbFile->AppendNative(keyDBFilename); -+ if (NS_FAILED(rv)) { -+ return; -+ } -+ // Since this isn't a directory, the `recursive` argument to `Remove` is -+ // irrelevant. -+ Unused << dbFile->Remove(false); -+} - #endif // ifndef ANDROID - - // Given a profile directory, attempt to initialize NSS. If nocertdb is true, - // (or if we don't have a profile directory) simply initialize NSS in no DB mode - // and return. Otherwise, first attempt to initialize in read/write mode, and - // then read-only mode if that fails. If both attempts fail, we may be failing - // to initialize an NSS DB collection that has FIPS mode enabled. Attempt to - // ascertain if this is the case, and if so, rename the offending PKCS#11 module -@@ -1966,16 +2011,19 @@ InitializeNSSWithFallbacks(const nsACStr - - // Try read/write mode. If we're in safeMode, we won't load PKCS#11 modules. - #ifndef ANDROID - PRErrorCode savedPRErrorCode1; - #endif // ifndef ANDROID - SECStatus srv = ::mozilla::psm::InitializeNSS(profilePath, false, !safeMode); - if (srv == SECSuccess) { - MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("initialized NSS in r/w mode")); -+#ifndef ANDROID -+ MaybeCleanUpOldNSSFiles(profilePath); -+#endif // ifndef ANDROID - return NS_OK; - } - #ifndef ANDROID - savedPRErrorCode1 = PR_GetError(); - PRErrorCode savedPRErrorCode2; - #endif // ifndef ANDROID - // That failed. Try read-only mode. - srv = ::mozilla::psm::InitializeNSS(profilePath, true, !safeMode); -- cgit 1.4.1 From 5ac2b2717f8d4b05c39c5717843d40bb1a493364 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 11 Nov 2018 10:29:56 +0200 Subject: gnu: python-networkx2: Remove variable. * gnu/packages/python.scm (python-networkx2): Remove variable. * gnu/packages/patches/python-networkx2-reproducible-build.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../python-networkx2-reproducible-build.patch | 29 ---------------------- gnu/packages/python.scm | 19 -------------- 3 files changed, 49 deletions(-) delete mode 100644 gnu/packages/patches/python-networkx2-reproducible-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 545a7d173f..15088a56a2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1080,7 +1080,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ - %D%/packages/patches/python-networkx2-reproducible-build.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ diff --git a/gnu/packages/patches/python-networkx2-reproducible-build.patch b/gnu/packages/patches/python-networkx2-reproducible-build.patch deleted file mode 100644 index 8274767ab8..0000000000 --- a/gnu/packages/patches/python-networkx2-reproducible-build.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c065b972ed294769a41936d6b9feb336473af5d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= -Date: Sat, 4 Nov 2017 15:28:47 +0100 -Subject: Fix SOURCE_DATE_EPOCH ignored bug (#2735) - -* Fix SOURCE_DATE_EPOCH ignored bug - -Fix a bug in networkx/release.py that makes build -non-reproducible. ---- - networkx/release.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/networkx/release.py b/networkx/release.py -index e81fc0c0..6322cf0d 100644 ---- a/networkx/release.py -+++ b/networkx/release.py -@@ -135,7 +135,7 @@ def get_revision(): - - def get_info(dynamic=True): - # Date information -- date_info = datetime.datetime.now() -+ date_info = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) - date = time.asctime(date_info.timetuple()) - - revision, version, version_info, vcs_info = None, None, None, None --- -2.14.2 - diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d90805071b..f4592829a0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5208,25 +5208,6 @@ of the structure, dynamics, and functions of complex networks.") (define-public python2-networkx (package-with-python2 python-networkx)) -;; Define new package, because the current version of python-colormath does -;; not build against 2.0. -(define-public python-networkx2 - (package (inherit python-networkx) - (name "python-networkx2") - (version "2.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "networkx" version ".zip")) - (sha256 - (base32 - "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd")) - (patches - (search-patches "python-networkx2-reproducible-build.patch")))))) - -(define-public python2-networkx2 - (package-with-python2 python-networkx2)) - (define-public python-datrie (package (name "python-datrie") -- cgit 1.4.1 From 95176544d54cbc8c7c2bacd96e19b4a1411afbff Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 11 Nov 2018 10:41:32 +0200 Subject: gnu: python-paste: Update to 3.0.4. * gnu/packages/python-web.scm (python-paste): Update to 3.0.4. [source]: Remove patch, add snippet to remove one test. [native-inputs]: Add python-pytest, python-pytest-runner. * gnu/packages/patches/python-paste-remove-website-test.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../patches/python-paste-remove-website-test.patch | 21 --------------------- gnu/packages/python-web.scm | 18 ++++++++++++------ 3 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/python-paste-remove-website-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 15088a56a2..31dafdd42b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1086,7 +1086,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ - %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ diff --git a/gnu/packages/patches/python-paste-remove-website-test.patch b/gnu/packages/patches/python-paste-remove-website-test.patch deleted file mode 100644 index 93417fbe75..0000000000 --- a/gnu/packages/patches/python-paste-remove-website-test.patch +++ /dev/null @@ -1,21 +0,0 @@ -Remove the test to see if the Python Paste website is up. - -Obviously without network access there is no way for us to check this, and -it's pretty strange to test a project's website when you really mean to test -the project anyhow... - ---- a/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -+++ b/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -@@ -1,12 +1,3 @@ - from paste import proxy - from paste.fixture import TestApp - --def test_paste_website(): -- # Not the most robust test... -- # need to test things like POSTing to pages, and getting from pages -- # that don't set content-length. -- app = proxy.Proxy('http://pythonpaste.org') -- app = TestApp(app) -- res = app.get('/') -- assert 'documentation' in res -- diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 6a8b1f21fb..e158df2000 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Eric Dvorsak -;;; Copyright © 2015, 2016, 2017 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge @@ -2628,19 +2628,25 @@ available in Django, but is a standalone package.") (define-public python-paste (package (name "python-paste") - (version "2.0.3") + (version "3.0.4") (source (origin (method url-fetch) (uri (pypi-uri "Paste" version)) (sha256 (base32 - "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3")) - (patches (search-patches "python-paste-remove-website-test.patch" - "python-paste-remove-timing-test.patch")))) + "01w26w9jyfkh0mfydhfz3dwy3pj3fw7mzvj0lna3vs8hyx1hwl0n")) + (patches (search-patches "python-paste-remove-timing-test.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; This test calls out to the internet. + (delete-file "tests/test_proxy.py") #t)))) (build-system python-build-system) (native-inputs - `(("python-nose" ,python-nose))) + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner) + ("python-nose" ,python-nose))) (propagated-inputs `(("python-six" ,python-six))) (home-page "http://pythonpaste.org") -- cgit 1.4.1 From 8c5749f1b5255e37a6ef7b43e48fe0bbc57ce209 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 11 Nov 2018 16:59:53 +0100 Subject: gnu: python-cffi: Fix test failure on i686. * gnu/packages/patches/python-cffi-x87-stack-clean.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/libffi.scm (python-cffi)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/libffi.scm | 3 ++- .../patches/python-cffi-x87-stack-clean.patch | 29 ++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-cffi-x87-stack-clean.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 31dafdd42b..3e355ac9b3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1078,6 +1078,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ + %D%/packages/patches/python-cffi-x87-stack-clean.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index d1b910bd07..01a5ea2049 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -88,7 +88,8 @@ conversions for values passed between the two languages.") (method url-fetch) (uri (pypi-uri "cffi" version)) (sha256 - (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9")))) + (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9")) + (patches (search-patches "python-cffi-x87-stack-clean.patch")))) (build-system python-build-system) (outputs '("out" "doc")) (inputs diff --git a/gnu/packages/patches/python-cffi-x87-stack-clean.patch b/gnu/packages/patches/python-cffi-x87-stack-clean.patch new file mode 100644 index 0000000000..50243505ee --- /dev/null +++ b/gnu/packages/patches/python-cffi-x87-stack-clean.patch @@ -0,0 +1,29 @@ +Fix test that fails on i686: + +https://bitbucket.org/cffi/cffi/issues/382 + +This is a squashed version of these commits: +https://bitbucket.org/cffi/cffi/commits/ef09637b2314 +https://bitbucket.org/cffi/cffi/commits/7a76a3815340 + +diff -r 99940f1f5402 testing/cffi0/test_function.py +--- a/testing/cffi0/test_function.py Tue Feb 27 21:18:33 2018 +0100 ++++ b/testing/cffi0/test_function.py Sun Nov 11 16:26:23 2018 +0100 +@@ -45,14 +45,14 @@ + assert x != math.sin(1.23) # rounding effects + assert abs(x - math.sin(1.23)) < 1E-6 + +- def test_sin_no_return_value(self): ++ def test_lround_no_return_value(self): + # check that 'void'-returning functions work too + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" +- void sin(double x); ++ void lround(double x); + """) + m = ffi.dlopen(lib_m) +- x = m.sin(1.23) ++ x = m.lround(1.23) + assert x is None + + def test_dlopen_filename(self): -- cgit 1.4.1 From 021bf6af182099dbb0178e19a2f461aeb0eef686 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 13 Nov 2018 10:33:27 -0500 Subject: gnu: Poppler: Fix CVE-2018-19149. * gnu/packages/patches/poppler-CVE-2018-19149.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pdf.scm (poppler)[replacement]: New field. (poppler/fixed): New variable. (poppler-qt4, poppler-qt5): Use package/inherit. --- gnu/local.mk | 1 + gnu/packages/patches/poppler-CVE-2018-19149.patch | 80 +++++++++++++++++++++++ gnu/packages/pdf.scm | 13 +++- 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/poppler-CVE-2018-19149.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 48ee438a6e..23a6cb34b5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1046,6 +1046,7 @@ dist_patch_DATA = \ %D%/packages/patches/plink-1.07-unclobber-i.patch \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ + %D%/packages/patches/poppler-CVE-2018-19149.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ %D%/packages/patches/potrace-tests.patch \ diff --git a/gnu/packages/patches/poppler-CVE-2018-19149.patch b/gnu/packages/patches/poppler-CVE-2018-19149.patch new file mode 100644 index 0000000000..3641f5f078 --- /dev/null +++ b/gnu/packages/patches/poppler-CVE-2018-19149.patch @@ -0,0 +1,80 @@ +Fix CVE-2018-19149: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19149 +https://gitlab.freedesktop.org/poppler/poppler/issues/664 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/poppler/poppler/commit/f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 + +From f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Fri, 20 Apr 2018 11:38:13 +0200 +Subject: [PATCH] Fix crash on missing embedded file + +Check whether an embedded file is actually present in the PDF +and show warning in that case. + +https://bugs.freedesktop.org/show_bug.cgi?id=106137 +https://gitlab.freedesktop.org/poppler/poppler/issues/236 +--- + glib/poppler-attachment.cc | 26 +++++++++++++++++--------- + glib/poppler-document.cc | 3 ++- + 2 files changed, 19 insertions(+), 10 deletions(-) + +diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc +index c6502e9d..11ba5bb5 100644 +--- a/glib/poppler-attachment.cc ++++ b/glib/poppler-attachment.cc +@@ -111,17 +111,25 @@ _poppler_attachment_new (FileSpec *emb_file) + attachment->description = _poppler_goo_string_to_utf8 (emb_file->getDescription ()); + + embFile = emb_file->getEmbeddedFile(); +- attachment->size = embFile->size (); ++ if (embFile != NULL && embFile->streamObject()->isStream()) ++ { ++ attachment->size = embFile->size (); + +- if (embFile->createDate ()) +- _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime); +- if (embFile->modDate ()) +- _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime); ++ if (embFile->createDate ()) ++ _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime); ++ if (embFile->modDate ()) ++ _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime); + +- if (embFile->checksum () && embFile->checksum ()->getLength () > 0) +- attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (), +- embFile->checksum ()->getLength ()); +- priv->obj_stream = embFile->streamObject()->copy(); ++ if (embFile->checksum () && embFile->checksum ()->getLength () > 0) ++ attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (), ++ embFile->checksum ()->getLength ()); ++ priv->obj_stream = embFile->streamObject()->copy(); ++ } ++ else ++ { ++ g_warning ("Missing stream object for embedded file"); ++ g_clear_object (&attachment); ++ } + + return attachment; + } +diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc +index 83f6aea6..ea319344 100644 +--- a/glib/poppler-document.cc ++++ b/glib/poppler-document.cc +@@ -670,7 +670,8 @@ poppler_document_get_attachments (PopplerDocument *document) + attachment = _poppler_attachment_new (emb_file); + delete emb_file; + +- retval = g_list_prepend (retval, attachment); ++ if (attachment != NULL) ++ retval = g_list_prepend (retval, attachment); + } + return g_list_reverse (retval); + } +-- +2.19.1 + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index dc966b64d8..9ffc5cb9bb 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -82,6 +82,7 @@ (define-public poppler (package (name "poppler") + (replacement poppler/fixed) (version "0.63.0") (source (origin (method url-fetch) @@ -127,6 +128,14 @@ (license license:gpl2+) (home-page "https://poppler.freedesktop.org/"))) +(define poppler/fixed + (package + (inherit poppler) + (source (origin + (inherit (package-source poppler)) + (patches (append (origin-patches (package-source poppler)) + (search-patches "poppler-CVE-2018-19149.patch"))))))) + (define-public poppler-data (package (name "poppler-data") @@ -158,14 +167,14 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.") license:gpl2)))) (define-public poppler-qt4 - (package (inherit poppler) + (package/inherit poppler (name "poppler-qt4") (inputs `(("qt-4" ,qt-4) ,@(package-inputs poppler))) (synopsis "Qt4 frontend for the Poppler PDF rendering library"))) (define-public poppler-qt5 - (package (inherit poppler) + (package/inherit poppler (name "poppler-qt5") (inputs `(("qtbase" ,qtbase) ,@(package-inputs poppler))) -- cgit 1.4.1 From 03592a6f882f5b4309f77c3dc3e65559d7b7cb75 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 31 Oct 2018 00:24:04 -0400 Subject: gnu: emacs-realgud: Patch configure.ac to repair the build. This fixes https://bugs.gnu.org/33196, a build problem caused by a defective Elisp snippet in a check in configure.ac. * gnu/packages/patches/emacs-realgud-fix-configure-ac.patch: Add patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/emacs.scm (emacs-realgud)[source]: Use it. --- gnu/local.mk | 2 ++ gnu/packages/emacs.scm | 6 ++++- .../patches/emacs-realgud-fix-configure-ac.patch | 27 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-realgud-fix-configure-ac.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 23a6cb34b5..2a90a85a6c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -19,6 +19,7 @@ # Copyright © 2018 Amirouche Boubekki # Copyright © 2018 Oleg Pykhalov # Copyright © 2018 Stefan Stefanović +# Copyright © 2018 Maxim Cournoyer # # This file is part of GNU Guix. # @@ -663,6 +664,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ + %D%/packages/patches/emacs-realgud-fix-configure-ac.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/eudev-rules-directory.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3e32998a9f..ce1add3915 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -3659,7 +3659,11 @@ after buffer changes.") version ".tar")) (sha256 (base32 - "108wgxg7fb4byaiasgvbxv2hq7b00biq9f0mh9hy6vw4160y5w24")))) + "108wgxg7fb4byaiasgvbxv2hq7b00biq9f0mh9hy6vw4160y5w24")) + (patches + ;; Patch awaiting inclusion upstream (see: + ;; https://github.com/realgud/realgud/pull/226). + (search-patches "emacs-realgud-fix-configure-ac.patch")))) (build-system emacs-build-system) (arguments `(#:tests? #t diff --git a/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch b/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch new file mode 100644 index 0000000000..8165857c87 --- /dev/null +++ b/gnu/packages/patches/emacs-realgud-fix-configure-ac.patch @@ -0,0 +1,27 @@ +From a293690f29407ac54a218d6d20c2142e1a0319d1 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Wed, 31 Oct 2018 00:08:34 -0400 +Subject: [PATCH] configure.ac: Fix NO_CHECK_EMACS_PACKAGES elisp. + +Remove the extraneous trailing parenthesis. +--- + configure.ac | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index de0d932..69bcea7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,7 @@ AC_MSG_NOTICE("Checking prerequiste packages") + $EMACS -batch -q --no-site-file -eval \ + '(dolist (package + (quote (cl-lib loc-changes load-relative test-simple))) +- (require package)) +- )' ++ (require package))' + fi + if test $? -ne 0 ; then + AC_MSG_ERROR([Can't continue until above error is corrected.]) +-- +2.19.0 + -- cgit 1.4.1 From 7ed018e8a2f885246461ad65420bf39d741d343c Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 20 Oct 2016 23:26:49 -0500 Subject: gnu: Add TomsFastMath. * gnu/packages/multiprecision.scm (tomsfastmath): New variable. * gnu/packages/patches/tomsfastmath-constness.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/multiprecision.scm | 66 ++++++++++++++++++++ gnu/packages/patches/tomsfastmath-constness.patch | 76 +++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 gnu/packages/patches/tomsfastmath-constness.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2a90a85a6c..e3aa0cd4cd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1178,6 +1178,7 @@ dist_patch_DATA = \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/ttfautohint-source-date-epoch.patch \ + %D%/packages/patches/tomsfastmath-constness.patch \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 4f5eac16b9..71e1efcd8c 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -26,6 +26,7 @@ (define-module (gnu packages multiprecision) #:use-module (guix licenses) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages m4) #:use-module (gnu packages gcc) #:use-module (guix packages) @@ -225,3 +226,68 @@ minor changes to the source code. In most cases only a few type statements and (for Fortran-90 programs) read/write statements need to be changed. PSLQ and numerical quadrature programs are included.") (license bsd-3))) + +(define-public tomsfastmath + (package + (name "tomsfastmath") + (version "0.13.0") + (synopsis "Large integer arithmetic library") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/libtom/tomsfastmath/" + "releases/download/v" version "/" + "tfm-" (version-major+minor version) ".tar.bz2")) + (sha256 + (base32 + "01rlsvp6lskk2a0gfdi24ak5h8vdwi6kqbvbwjnmb92r0zrfdvwd")) + (patches (search-patches "tomsfastmath-constness.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("libtool" ,libtool))) + (arguments + `(#:make-flags (list "-f" "makefile.shared" + (string-append "LIBPATH=" %output "/lib") + (string-append "INCPATH=" %output "/include") + "GROUP=root" "USER=root" + "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) ;no configuration + (replace 'check + (lambda* (#:key make-flags #:allow-other-keys) + (and (zero? (apply system* "make" + "stest" "test_standalone" + make-flags)) + (zero? (system* "./stest")) + (zero? (system* "./test"))))) + (add-before 'install 'install-nogroup + (lambda _ + ;; Let permissions inherit from the current process + (substitute* "makefile.shared" + (("-g \\$\\(GROUP\\) -o \\$\\(USER\\)") "")) + #t)) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((docdir (string-append (assoc-ref outputs "out") + "/share/doc/tomsfastmath"))) + (install-file "doc/tfm.pdf" docdir) + #t))) + (add-after 'install 'install-pc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pc-dir (string-append out "/lib/pkgconfig"))) + (call-with-output-file "tomsfastmath.pc" + (lambda (port) + (format port "~ +Name: TomsFastMath +Description: ~a +Version: ~a +Libs: -L~a/lib -ltfm~%" + ,synopsis ,version out))) + (install-file "tomsfastmath.pc" pc-dir) + #t)))))) + (home-page "http://www.libtom.org/TomsFastMath/") + (description "TomsFastMath is a large integer library written in portable +ISO C. It is a port of LibTomMath with optional support for inline assembler +multiplies.") + (license public-domain))) diff --git a/gnu/packages/patches/tomsfastmath-constness.patch b/gnu/packages/patches/tomsfastmath-constness.patch new file mode 100644 index 0000000000..7c6ab5bbec --- /dev/null +++ b/gnu/packages/patches/tomsfastmath-constness.patch @@ -0,0 +1,76 @@ +From dac089515901d6bf315cd15a6e744b8d2c02c1cb Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Sat, 31 Oct 2015 22:48:07 +0100 +Subject: [PATCH] tfm: make a few functions static + +clamav expects them to be static and it does not seem bad to do so. + +Signed-off-by: Sebastian Andrzej Siewior +--- + src/bin/fp_read_radix.c | 2 +- + src/bin/fp_read_signed_bin.c | 2 +- + src/bin/fp_read_unsigned_bin.c | 2 +- + src/headers/tfm.h | 6 +++--- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/bin/fp_read_radix.c b/src/bin/fp_read_radix.c +index 0b5e826..431afa0 100644 +--- a/src/bin/fp_read_radix.c ++++ b/src/bin/fp_read_radix.c +@@ -9,7 +9,7 @@ + */ + #include + +-int fp_read_radix(fp_int *a, char *str, int radix) ++int fp_read_radix(fp_int *a, const char *str, int radix) + { + int y, neg; + char ch; +diff --git a/src/bin/fp_read_signed_bin.c b/src/bin/fp_read_signed_bin.c +index e2b8003..6467d19 100644 +--- a/src/bin/fp_read_signed_bin.c ++++ b/src/bin/fp_read_signed_bin.c +@@ -9,7 +9,7 @@ + */ + #include + +-void fp_read_signed_bin(fp_int *a, unsigned char *b, int c) ++void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c) + { + /* read magnitude */ + fp_read_unsigned_bin (a, b + 1, c - 1); +diff --git a/src/bin/fp_read_unsigned_bin.c b/src/bin/fp_read_unsigned_bin.c +index 3ee64c0..2ee89cb 100644 +--- a/src/bin/fp_read_unsigned_bin.c ++++ b/src/bin/fp_read_unsigned_bin.c +@@ -9,7 +9,7 @@ + */ + #include + +-void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c) ++void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c) + { + /* zero the int */ + fp_zero (a); +diff --git a/src/headers/tfm.h b/src/headers/tfm.h +index af87b56..f406388 100644 +--- a/src/headers/tfm.h ++++ b/src/headers/tfm.h +@@ -467,14 +467,14 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback + int fp_count_bits(fp_int *a); + + int fp_unsigned_bin_size(fp_int *a); +-void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c); ++void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c); + void fp_to_unsigned_bin(fp_int *a, unsigned char *b); + + int fp_signed_bin_size(fp_int *a); +-void fp_read_signed_bin(fp_int *a, unsigned char *b, int c); ++void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c); + void fp_to_signed_bin(fp_int *a, unsigned char *b); + +-int fp_read_radix(fp_int *a, char *str, int radix); ++int fp_read_radix(fp_int *a, const char *str, int radix); + + int fp_radix_size(fp_int *a, int radix, int *size); + int fp_toradix(fp_int *a, char *str, int radix); -- cgit 1.4.1 From 0a41123f01d5d2466d6f533be3644ac8c9a2bdf9 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Fri, 28 Oct 2016 22:42:59 -0500 Subject: gnu: Add ClamAV. * gnu/packages/antivirus.scm: New file. * gnu/packages/patches/clamav-system-tomsfastmath.patch, gnu/packages/patches/clamav-config-llvm-libs.patch: New files. * gnu/local.mk (GNU_SYSTEM_MODULES): Add new module. (dist_patch_DATA): Add patches. Co-authored-by: Christopher Baines --- gnu/local.mk | 4 +- gnu/packages/antivirus.scm | 156 +++++++++++++++++++++ gnu/packages/patches/clamav-config-llvm-libs.patch | 14 ++ .../patches/clamav-system-tomsfastmath.patch | 102 ++++++++++++++ 4 files changed, 275 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/antivirus.scm create mode 100644 gnu/packages/patches/clamav-config-llvm-libs.patch create mode 100644 gnu/packages/patches/clamav-system-tomsfastmath.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e3aa0cd4cd..7073416633 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -61,6 +61,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/android.scm \ %D%/packages/animation.scm \ %D%/packages/anthy.scm \ + %D%/packages/antivirus.scm \ %D%/packages/apl.scm \ %D%/packages/apr.scm \ %D%/packages/aspell.scm \ @@ -614,7 +615,8 @@ dist_patch_DATA = \ %D%/packages/patches/ceph-skip-collect-sys-info-test.patch \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ %D%/packages/patches/chmlib-inttypes.patch \ - %D%/packages/patches/clang-3.5-libc-search-path.patch \ + %D%/packages/patches/clamav-config-llvm-libs.patch \ + %D%/packages/patches/clamav-system-tomsfastmath.patch \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ %D%/packages/patches/clang-6.0-libc-search-path.patch \ %D%/packages/patches/clang-runtime-asan-build-fixes.patch \ diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm new file mode 100644 index 0000000000..95749761bd --- /dev/null +++ b/gnu/packages/antivirus.scm @@ -0,0 +1,156 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016, 2017, 2018 Eric Bavier +;;; Copyright © 2018 Christopher Baines +;;; +;;; 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 antivirus) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bison) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages flex) + #:use-module (gnu packages llvm) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pcre) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages tls) + #:use-module (gnu packages web) + #:use-module (gnu packages xml)) + +(define-public clamav + (package + (name "clamav") + (version "0.100.2") + (source (origin + (method url-fetch) + (uri (string-append "https://www.clamav.net/downloads/production/" + "clamav-" version ".tar.gz")) + (sha256 + (base32 + "1mkd41sxbjkfjinpx5b9kb85q529gj2s3d0klysssqhysh64ybja")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file-recursively + '("win32" ;unnecessary + "libclamav/c++/llvm" ;use system llvm + "libclamunrar")))) ;non-free license + (patches + (search-patches "clamav-system-tomsfastmath.patch" + "clamav-config-llvm-libs.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("check" ,check) ;for tests + ("flex" ,flex) + ("pkg-config" ,pkg-config) + ;; The tomsfastmath patch touches configure.ac and Makefile.am + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (inputs + `(("bzip2" ,bzip2) + ("libcurl" ,curl) + ("libjson" ,json-c) + ("libltdl" ,libltdl) + ("libmspack" ,libmspack) + ("llvm" ,llvm-3.6) ;requires <3.7, for JIT/verifier + ("ncurses" ,ncurses) + ("openssl" ,libressl) + ("pcre" ,pcre "bin") ;for pcre-config + ("sasl" ,cyrus-sasl) ;for linking curl with libtool + ("tomsfastmath" ,tomsfastmath) + ("xml" ,libxml2) + ("zlib" ,zlib))) + (arguments + `(#:configure-flags + (let-syntax ((with (syntax-rules () + ((_ name) + (string-append "--with-" name "=" + (assoc-ref %build-inputs name)))))) + (list "--disable-unrar" + "--enable-llvm" + "--with-system-llvm" + "--with-system-libmspack" + "--without-included-ltdl" + (with "xml") + (with "openssl") + (with "libjson") + (with "pcre") + (with "zlib") + (with "libcurl") + ;; For sanity, specifying --enable-* flags turns + ;; "support unavailable" warnings into errors. + "--enable-bzip2" + "--enable-check" + "--sysconfdir=/etc/clamav" + ;; Default database directory needs to be writeable + "--with-dbdir=/var/db/clamav")) + ;; install sample .conf files to %output/etc rather than /etc/clamav + #:make-flags (list (string-append "sysconfdir=" %output "/etc")) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'reconf + (lambda _ (zero? (system* "autoreconf" "-vfi")))) + (add-before 'configure 'patch-llvm-config + (lambda _ + (substitute* '("libclamav/c++/detect.cpp" + "libclamav/c++/ClamBCRTChecks.cpp" + "libclamav/c++/bytecode2llvm.cpp") + (("llvm/Config/config.h") "llvm/Config/llvm-config.h")) + ;; `llvm-config --libfiles` inappropriately lists lib*.a + ;; libraries, rather than the lib*.so's that our llvm + ;; contains. They're used only for listing extra build + ;; dependencies, so ignore them until that's fixed. + (substitute* "libclamav/c++/Makefile.in" + (("@LLVMCONFIG_LIBFILES@") "")) + #t)) + (add-before 'check 'skip-clamd-tests + ;; XXX: The check?_clamd tests fail inside the build + ;; chroot, but pass outside. + (lambda _ + (substitute* "unit_tests/Makefile" + (("check2_clamd.sh.*check4_clamd.sh") "")) + #t))))) + (home-page "https://www.clamav.net") + (synopsis "Antivirus engine") + (description + "Clam AntiVirus is an anti-virus toolkit, designed especially for e-mail +scanning on mail gateways. It provides a number of utilities including a +flexible and scalable multi-threaded daemon, a command line scanner, and +advanced tool for automatic database updates. The core of the package is an +anti-virus engine available in the form of a shared library.") + (license (list license:gpl2+ ;ClamAV itself + license:lgpl2.1 ;libclamav/mspack.[ch] + license:public-domain ;libclamav/7z/*, libclamav/rijndael.[ch], etc... + (package-license bzip2) ;modified bzip2 source in libclamav/nsis + license:bsd-2 ;several files in libclamav + license:bsd-3 ;libclamav/{regex,qsort.c,swf.[ch] + license:ncsa ;libclamav/c++/PointerTracking.cpp + license:zlib ;libclamav/inf*.h + license:x11 ;libclamav/lzw + (license:non-copyleft "libclamav/strlcat.c") ;"OpenBSD" license + license:asl2.0 ;libclamav/yara* + license:expat)))) ;shared/getopt.[ch] diff --git a/gnu/packages/patches/clamav-config-llvm-libs.patch b/gnu/packages/patches/clamav-config-llvm-libs.patch new file mode 100644 index 0000000000..054264ee2e --- /dev/null +++ b/gnu/packages/patches/clamav-config-llvm-libs.patch @@ -0,0 +1,14 @@ +Our llvm does not contain a single top-level library, so consult llvm-config +for the libraries that need to be linked against. + +--- clamav-0.100.2/libclamav/c++/configure.ac 2018-09-19 14:29:07.000000000 -0500 ++++ clamav-0.100.2/libclamav/c++/configure.ac 2018-10-06 21:45:09.377249158 -0500 +@@ -105,7 +105,7 @@ + + if test "x$llvm_linking" = "xdynamic"; then + AC_SUBST(LLVMCONFIG_LDFLAGS, [`$llvmconfig --ldflags`]) +- AC_SUBST(LLVMCONFIG_LIBS, [-lLLVM-$llvmver]) ++ AC_SUBST(LLVMCONFIG_LIBS, [`$llvmconfig --libs $llvmcomp`]) + AC_SUBST(LLVMCONFIG_LIBFILES, []) + else + if test $llvmver_test -ge 350; then diff --git a/gnu/packages/patches/clamav-system-tomsfastmath.patch b/gnu/packages/patches/clamav-system-tomsfastmath.patch new file mode 100644 index 0000000000..07ab79f3f7 --- /dev/null +++ b/gnu/packages/patches/clamav-system-tomsfastmath.patch @@ -0,0 +1,102 @@ +From 756ff89526b5ffaa7a4f49b1bbecf2ecbd6f85f9 Mon Sep 17 00:00:00 2001 +From: Andreas Cadhalpun +Date: Wed, 11 Mar 2015 20:03:15 +0100 +Subject: add support for system tomsfastmath + +Patch-Name: add-support-for-system-tomsfastmath.patch +--- + configure.ac | 2 ++ + libclamav/Makefile.am | 10 ++++++++-- + libclamav/bignum.h | 6 +++++- + libclamav/xdp.c | 2 +- + m4/reorganization/libs/tomsfastmath.m4 | 12 ++++++++++++ + 5 files changed, 28 insertions(+), 4 deletions(-) + create mode 100644 m4/reorganization/libs/tomsfastmath.m4 + +--- a/configure.ac ++++ b/configure.ac +@@ -82,6 +82,7 @@ m4_include([m4/reorganization/libs/xml.m + m4_include([m4/reorganization/libs/openssl.m4]) + m4_include([m4/reorganization/libs/json.m4]) + m4_include([m4/reorganization/libs/pcre.m4]) ++m4_include([m4/reorganization/libs/tomsfastmath.m4]) + + AM_MAINTAINER_MODE + m4_include([m4/reorganization/libs/libz.m4]) +@@ -285,6 +286,7 @@ else + fi + CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara]) + CL_MSG_STATUS([fts ],[yes],[$lfs_fts_msg]) ++CL_MSG_STATUS([tomsfastmath],[yes],[$tomsfastmath_msg]) + + + # Yep, downgrading the compiler avoids the bug too: +--- a/libclamav/Makefile.am ++++ b/libclamav/Makefile.am +@@ -496,8 +496,10 @@ libclamav_la_SOURCES += yara_arena.c \ + yara_clam.h + endif + +-libclamav_la_SOURCES += bignum.h\ +- bignum_fast.h\ ++libclamav_la_SOURCES += bignum.h ++ ++if !SYSTEM_TOMSFASTMATH ++libclamav_la_SOURCES += bignum_fast.h\ + tomsfastmath/addsub/fp_add.c\ + tomsfastmath/addsub/fp_add_d.c\ + tomsfastmath/addsub/fp_addmod.c\ +@@ -579,6 +581,10 @@ libclamav_la_SOURCES += bignum.h\ + tomsfastmath/sqr/fp_sqr_comba_generic.c\ + tomsfastmath/sqr/fp_sqr_comba_small_set.c\ + tomsfastmath/sqr/fp_sqrmod.c ++else ++libclamav_la_CFLAGS += $(TOMSFASTMATH_CFLAGS) ++libclamav_la_LIBADD += $(TOMSFASTMATH_LIBS) ++endif + + .PHONY: version.h.tmp + version.c: version.h +--- a/libclamav/bignum.h ++++ b/libclamav/bignum.h +@@ -1,9 +1,13 @@ + #ifndef BIGNUM_H_ + #define BIGNUM_H_ + ++#if HAVE_SYSTEM_TOMSFASTMATH ++#include ++#else + #define TFM_CHECK +- + #include "bignum_fast.h" ++#endif ++ + typedef fp_int mp_int; + #define mp_cmp fp_cmp + #define mp_toradix_n(a,b,c,d) fp_toradix_n(a,b,c,d) +--- a/libclamav/xdp.c ++++ b/libclamav/xdp.c +@@ -57,7 +57,7 @@ + #include "scanners.h" + #include "conv.h" + #include "xdp.h" +-#include "bignum_fast.h" ++#include "bignum.h" + #include "filetypes.h" + + static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz); +--- /dev/null ++++ b/m4/reorganization/libs/tomsfastmath.m4 +@@ -0,0 +1,12 @@ ++dnl Check for system tomsfastmath ++PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no]) ++ ++AM_CONDITIONAL([SYSTEM_TOMSFASTMATH], [test "x$have_system_tomsfastmath" = "xyes"]) ++ ++if test "x$have_system_tomsfastmath" = "xyes"; then ++ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [1], [link against system-wide tomsfastmath library]) ++ tomsfastmath_msg="External, $TOMSFASTMATH_CFLAGS $TOMSFASTMATH_LIBS" ++else ++ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [0], [don't link against system-wide tomsfastmath library]) ++ tomsfastmath_msg="Internal" ++fi -- cgit 1.4.1 From af50b4abc0b577f7892dafce1a5e6f57150b88b0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 18 Nov 2018 10:18:42 +0100 Subject: gnu: qt@5: Fix build failure on glibc 2.28. * gnu/packages/patches/qt-5-renameat2.patch: New file. * gnu/packages/qt.scm (qt)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/qt-5-renameat2.patch | 35 +++++++++++++++++++++++++++++++ gnu/packages/qt.scm | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qt-5-renameat2.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c4299fcbe4..447f08d201 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1099,6 +1099,7 @@ dist_patch_DATA = \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ + %D%/packages/patches/qt-5-renameat2.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/quilt-test-fix-regex.patch \ diff --git a/gnu/packages/patches/qt-5-renameat2.patch b/gnu/packages/patches/qt-5-renameat2.patch new file mode 100644 index 0000000000..036070c7ff --- /dev/null +++ b/gnu/packages/patches/qt-5-renameat2.patch @@ -0,0 +1,35 @@ +Avoid conflicting declaration of 'renameat2' on glibc 2.28 +(see .) + +Patch from +by Andreas Müller . + +--- + src/corelib/io/qfilesystemengine_unix.cpp | 11 ++++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp +index be6ce48d0cb..1bf1bebc7f1 100644 +--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp ++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp +@@ -98,6 +98,17 @@ extern "C" NSString *NSTemporaryDirectory(); + # define FICLONE _IOW(0x94, 9, int) + #endif + ++// renameat2/statx features for non bootstrapped build ++#ifndef QT_BOOTSTRAPPED ++#ifdef __GLIBC_PREREQ ++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++#else ++# define QT_FEATURE_renameat2 -1 ++# define QT_FEATURE_statx -1 ++#endif ++#endif ++ + # if defined(Q_OS_ANDROID) + // renameat2() and statx() are disabled on Android because quite a few systems + // come with sandboxes that kill applications that make system calls outside a +-- +2.14.4 + diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index cffebc7bff..c4407fea29 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Andreas Enge ;;; Copyright © 2015 Sou Bunnbu -;;; Copyright © 2015 Ludovic Courtès +;;; Copyright © 2015, 2018 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2016, 2017 Nils Gillmann ;;; Copyright © 2016 Thomas Danckaert @@ -121,6 +121,7 @@ system, and the core design of Django is reused in Grantlee.") (sha256 (base32 "10faac59jvz6dxxljdkaknlxazpnaxgvqdcszabfbbkc1f24n466")) + (patches (search-patches "qt-5-renameat2.patch")) (modules '((guix build utils))) (snippet '(begin -- cgit 1.4.1 From 564cf93f2aca60171b4b97559ffc6c952e73e8ed Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 17 Nov 2018 17:55:44 +0100 Subject: gnu: ocaml: Update to 4.7.0. Update ocaml to the latest version and fixes dependent packages by updating them or by adding new inputs, such as ocaml-num and ocamlbuild, that were removed from the core ocaml package. Rename packages that cannot be built with the new compiler with an ocaml4.02 prefix. Add ocaml4.02 dependencies. * gnu/packages/ocaml.scm (ocaml): Update to 4.7.0. (ocaml-4.02, ocamlbuild, camlp4-4.02, ocaml-num, ocaml4.02-menhir) (ocaml4.02-lablgtk, ocaml4.02-findlib, ocaml4.02-ounit, ocaml4.02-camlzip) (ocaml4.02-ocamlmod, ocaml4.02-zarith, ocaml4.02-qcheck, ocaml4.02-qtest) (ocaml4.02-stringext, ocaml4.02-bisect, dune, ocaml-migrate-parsetree) (ocaml-ppx-tools-versioned, ocaml-ppx-tools-versioned) (ocaml4.02-bitstring, ocaml4.02-result, ocaml4.02-topkg, ocaml4.02-rresult) (ocaml4.02-sqlite3, ocaml4.02-csv, ocaml4.02-mtime, ocaml4.02-cmdliner) (ocaml4.02-fmt, ocaml4.02-astring, ocaml4.02-alcotest, ocaml4.02-ppx-tools) (ocaml4.02-react, ocaml4.02-ssl, ocaml4.02-lwt, ocaml-lwt-log) (ocaml4.02-lwt-log, ocaml4.02-logs, ocaml4.02-fpath, ocaml4.02-bos) (ocaml4.02-xmlm, ocaml4.02-ulex, ocaml4.02-uchar, ocaml4.02-uutf) (ocaml4.02-jsonm, ocaml4.02-ocurl, ocaml4.02-base64, ocaml4.02-omake) (ocaml4.02-batteries, ocaml4.02-pcre, ocaml4.02-oasis) (ocaml4.02-js-build-tools, ocaml4.02-cppo, ocaml-seq, ocaml4.02-seq) (ocaml4.02-re, ocaml4.02-ocplib-endian, ocaml4.02-easy-format) (ocaml4.02-piqilib, ocaml4.02-uuidm, ocaml4.02-graph, ocaml4.02-piqi) (ocaml4.02-camomile, ocaml4.02-zed, ocaml4.02-lambda-term): New packages. (opam): Update to 2.0.0. (camlp4): Update to 4.07+1. (camlp5): Update to 7.06. (hevea): Update to 2.32. (coq)[inputs]: Add ocaml-num. (emacs-tuareg): Update to 2.2.0. (ocaml-menhir)[native-inputs]: Add ocamlbuild. (ocaml-lablgtk): Update to 2.18.6. (unison)[inputs]: Use ocaml-4.02. (ocaml-findlib): Update to 1.8.0. (ocaml-ounit)[native-inputs]: Add ocamlbuild. (ocamlmod): Update to 0.0.9. (ocaml-frontc)[arguments]: Use ocaml-4.02. (ocaml-qcheck)[native-inputs]: Add ocamlbuild. (ocaml-qtest)[native-inputs]: Remove ocaml-findlib and add ocamlbuild. (ocaml-stringext)[native-inputs]: Add ocamlbuild. (ocaml-bisect): Update to 1.3.1. (ocaml4.01-bisect): Downgrade to 1.3. (ocaml-bitstring): Update to 3.1.0. (ocaml-topkg)[native-inputs]: Add ocamlbuild. (ocaml-rresult)[native-inputs]: Add ocamlbuild. (ocaml-sqlite3)[native-inputs]: Add ocamlbuild. (ocaml-csv)[native-inputs]: Add ocamlbuild. (ocaml-mtime)[native-inputs]: Add ocamlbuild. (ocaml-cmdliner)[native-inputs]: Add ocamlbuild. (ocaml-fmt)[native-inputs]: Add ocamlbuild. (ocaml-astring)[native-inputs]: Add ocamlbuild. (ocaml-alcotest)[native-inputs]: Add ocamlbuild. (ocaml-ppx-tools)[native-inputs]: Add ocamlbuild. (ocaml-react)[native-inputs]: Add ocamlbuild. (ocaml-ssl)[arguments]: Return #t in phases. (ocaml-lwt): Update to 4.1.0. (ocaml-logs)[native-inputs]: Add ocamlbuild. (ocaml-fpath)[native-inputs]: Add ocamlbuild. (ocaml-bos)[native-inputs]: Add ocamlbuild. (ocaml-xmlm): Update to 1.3.0. (ocaml-ulex): Update to 1.2.0. (ocaml-uchar)[native-inputs]: Add ocamlbuild. (ocaml-uutf): Update to 1.0.1. (ocaml-jsonm): Update to 1.0.1. (ocaml-ocurl): Update to 0.8.2. (ocaml-base64)[native-inputs]: Add ocamlbuild. (ocamlify)[native-inputs]: Use ocaml-4.02. (omake): Update to 0.10.3. (ocaml-batteries): Update to 2.9.0. (ocaml-pcre)[native-inputs]: Add ocamlbuild. (ocaml-expect): Update 0.0.6. (ocaml4.02-fileutils): Update to 0.5.3. (ocaml-oasis): Update 0.4.11. (ocaml-js-build-tools)[native-inputs]: Add ocamlbuild. (ocaml-bin-prot): Rename to ocaml4.02-bin-prot. (ocaml-fieldslib): Rename to ocaml4.02-fieldslib. (ocaml-ppx-core): Rename to ocaml4.02-ppx-core. (ocaml-ppx-optcomp): Rename to ocaml4.02-ppx-optcomp. (ocaml-ppx-driver): Rename to ocaml4.02-ppx-driver. (ocaml-cppo): Update to 1.6.5. (ocaml-ppx-deriving): Rename to ocaml4.02-ppx-deriving. (ocaml-ppx-type-conv): Rename to ocaml4.02-ppx-type-conv. (ocaml-ppx-inline-test): Rename to ocaml4.02-ppx-inline-test. (ocaml-ppx-bench): Rename to ocaml4.02-ppx-bench. (ocaml-ppx-compare): Rename to ocaml4.02-ppx-compare. (ocaml-sexplib): Rename to ocaml4.02-sexplib. (ocaml-typerep): Rename to ocaml4.02-typerep. (ocaml-variantslib): Rename to ocaml4.02-variantslib. (ocaml-ppx-sexp-conv): Rename to ocaml4.02-ppx-sexp-conv. (ocaml-ppx-variants-conv): Rename to ocaml4.02-ppx-variants-conv. (ocaml-ppx-here): Rename to ocaml4.02-ppx-here. (ocaml-ppx-assert): Rename to ocaml4.02-ppx-assert. (ocaml-ppx-enumerate): Rename to ocaml4.02-ppx-enumerate. (ocaml-ppx-let): Rename to ocaml4.02-ppx-let. (ocaml-ppx-typerep-conv): Rename to ocaml4.02-ppx-typerep-conv. (ocaml-ppx-sexp-value): Rename to ocaml4.02-ppx-sexp-value. (ocaml-ppx-pipebang): Rename to ocaml4.02-ppx-pipebang. (ocaml-ppx-bin-prot): Rename to ocaml4.02-ppx-bin-prot. (ocaml-ppx-fail): Rename to ocaml4.02-ppx-fail. (ocaml-ppx-custom-printf): Rename to ocaml4.02-ppx-custom-printf. (ocaml-ppx-sexp-message): Rename to ocaml4.02-ppx-sexp-message. (ocaml-ppx-fields-conv): Rename to ocaml4.02-ppx-fields-conv. (ocaml-re): Update to 1.8.0. (ocaml-ppx-expect): Rename to ocaml4.02-ppx-expect. (ocaml-ppx-jane): Rename to ocaml4.02-ppx-jane. (ocaml-core-kernel): Rename to ocaml4.02-core-kernel. (ocaml-async-kernel): Rename to ocaml4.02-async-kernel. (ocaml-async-rpc-kernel): Rename to ocaml4.02-async-rpc-kernel. (ocaml-core): Rename to ocaml4.02-core. (ocaml-async-unix): Rename to ocaml4.02-async-unix. (ocaml-async-extra): Rename to ocaml4.02-async-extra. (ocaml-async): Rename to ocaml4.02-async. (ocaml-ocplib-endian)[native-inputs]: Update to 1.0. (ocaml-cstruct): Rename to ocaml4.02-cstruct. (ocaml-hex): Rename to ocaml4.02-hex. (ocaml-ezjsonm): Rename to ocaml4.02-ezjsonm. (ocaml-uri): Rename to ocaml4.02-uri. (optcomp): Use ocaml-4.02. (ocaml-piqilib): Update to 0.6.14. (ocaml-uuidm)[native-inputs]: Add ocamlbuild. (ocaml-graph): Update to 1.8.8. (ocaml-piqi): Update to 0.7.6. (bap): Update to 1.3.0. (ocaml-camomile): Update to 1.0.1. (ocaml-jbuilder): Use ocaml-4.02. (ocaml-lambda-term): Update to 1.13. (ocaml-utop): Update to 2.2.0. (ocaml-integers)[native-inputs]: Add ocamlbuild. (ocaml-ctypes): Update to 0.14.0. (ocaml-ocb-stubblr)[native-inputs]: Add ocamlbuild. (ocaml-tsdl)[native-inputs]: Add ocamlbuild. * gnu/packages/machine-learning.scm (ocaml-mcl): Use ocaml-4.02. * gnu/packages/maths.scm (cubicle): Update to 1.1.2. * gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch: Update patch. * guix/build-system/ocaml.scm: (default-ocaml4.02, default-ocaml4.02-findlib) (package-with-ocaml4.02, strip-ocaml4.02-variant): New variables. --- gnu/packages/machine-learning.scm | 5 +- gnu/packages/maths.scm | 30 +- gnu/packages/ocaml.scm | 2328 ++++++++++++++------ ...ml-bisect-fix-camlp4-in-another-directory.patch | 246 ++- guix/build-system/ocaml.scm | 24 +- 5 files changed, 1893 insertions(+), 740 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 990a6c771a..09c525ff20 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2018 Mark Meyer ;;; Copyright © 2018 Ben Woodcroft ;;; Copyright © 2018 Fis Trivial +;;; Copyright © 2018 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -300,7 +301,9 @@ networks) based on simulation of (stochastic) flow in graphs.") "1l5jbhwjpsj38x8b9698hfpkv75h8hn3kj0gihjhn8ym2cwwv110")))) (build-system ocaml-build-system) (arguments - `(#:phases + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:phases (modify-phases %standard-phases (add-before 'configure 'patch-paths (lambda _ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 05570789a0..82abc22994 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2018 Adam Massmann ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Eric Brown +;;; Copyright © 2018 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -3988,37 +3989,52 @@ theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") (define-public cubicle (package (name "cubicle") - (version "1.1.1") + (version "1.1.2") (source (origin (method url-fetch) (uri (string-append "http://cubicle.lri.fr/cubicle-" version ".tar.gz")) (sha256 (base32 - "1sny9c4fm14k014pk62ibpwbrjjirkx8xmhs9jg7q1hk7y7x3q2h")))) + "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q")))) (build-system gnu-build-system) (native-inputs - `(("ocaml" ,ocaml) + `(("automake" ,automake) + ("ocaml" ,ocaml) ("which" ,(@@ (gnu packages base) which)))) (propagated-inputs - `(("z3" ,z3))) + `(("ocaml-num" ,ocaml-num) + ("z3" ,z3))) (arguments `(#:configure-flags (list "--with-z3") + #:make-flags (list "QUIET=") #:tests? #f #:phases (modify-phases %standard-phases (add-before 'configure 'configure-for-release (lambda _ (substitute* "Makefile.in" - (("SVNREV=") "#SVNREV=")))) + (("SVNREV=") "#SVNREV=")) + #t)) (add-before 'configure 'fix-/bin/sh (lambda _ (substitute* "configure" - (("/bin/sh") (which "sh"))))) + (("-/bin/sh") (string-append "-" (which "sh")))) + #t)) (add-before 'configure 'fix-smt-z3wrapper.ml (lambda _ (substitute* "Makefile.in" - (("\\\\n") ""))))))) + (("\\\\n") "")) + #t)) + (add-before 'configure 'fix-ocaml-num + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile.in" + (("= \\$\\(FUNCTORYLIB\\)") + (string-append "= -I " + (assoc-ref inputs "ocaml-num") + "/lib/ocaml/site-lib" + " $(FUNCTORYLIB)"))) + #t))))) (home-page "http://cubicle.lri.fr/") (synopsis "Model checker for array-based systems") (description "Cubicle is a model checker for verifying safety properties diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 6b55e84fed..e1323582a2 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Eric Bavier ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016, 2018 Efraim Flashner -;;; Copyright © 2016, 2017 Julien Lepiller +;;; Copyright © 2016-2018 Julien Lepiller ;;; Copyright © 2017 Ben Woodcroft ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Peter Kreye @@ -120,7 +120,7 @@ "/lib/ocaml/site-lib")) #:phases (modify-phases %standard-phases (delete 'configure)))) -(define-public ocaml +(define-public ocaml-4.02 (package (name "ocaml") (version "4.02.3") @@ -145,7 +145,8 @@ (files (list "lib/ocaml" "lib/ocaml/site-lib"))) (search-path-specification (variable "CAML_LD_LIBRARY_PATH") - (files (list "lib/ocaml/site-lib/stubslibs"))))) + (files (list "lib/ocaml/site-lib/stubslibs" + "lib/ocaml/site-lib/stublibs"))))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config))) @@ -228,7 +229,7 @@ functional, imperative and object-oriented styles of programming.") (define-public ocaml-4.01 (package - (inherit ocaml) + (inherit ocaml-4.02) (version "4.01.0") (source (origin (method url-fetch) @@ -240,7 +241,7 @@ functional, imperative and object-oriented styles of programming.") (base32 "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7")))) (arguments - (substitute-keyword-arguments (package-arguments ocaml) + (substitute-keyword-arguments (package-arguments ocaml-4.02) ((#:phases phases) `(modify-phases ,phases (replace 'build @@ -256,10 +257,78 @@ functional, imperative and object-oriented styles of programming.") (string-append "TOPDIR=" (getcwd) "/..")))))))))))) +(define-public ocaml-4.07 + (package + (inherit ocaml-4.02) + (version "4.07.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://caml.inria.fr/pub/distrib/ocaml-" + (version-major+minor version) + "/ocaml-" version ".tar.xz")) + (sha256 + (base32 + "03wzkzv6w4rdiiva20g5amz0n4x75swpjl8d80468p6zm8hgfnzl")))) + (arguments + (substitute-keyword-arguments (package-arguments ocaml-4.02) + ((#:phases phases) + `(modify-phases ,phases + (delete 'prepare-socket-test) + (replace 'check + (lambda _ + (with-directory-excursion "testsuite" + (invoke "make" "all")) + #t)))))))) + +(define-public ocaml ocaml-4.07) + +(define-public ocamlbuild + (package + (name "ocamlbuild") + (version "0.13.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/ocamlbuild/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1320cfkixs1xlng5av04pa5qjb3ynvi2kl3k1ngqzg5fpi29b0vr")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:tests? #f; tests require findlib + #:make-flags + (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out")) + (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out") + "/bin") + (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out") + "/lib/ocaml/site-lib") + (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out") + "/share/man")) + #:phases + (modify-phases %standard-phases + (delete 'bootstrap) + (delete 'configure) + (add-before 'build 'findlib-environment + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib")) + (setenv "OCAMLFIND_LDCONF" "ignore") + #t)))))) + (native-inputs + `(("ocaml" ,ocaml))) + (home-page "https://github.com/ocaml/ocamlbuild") + (synopsis "OCaml build tool") + (description "OCamlbuild is a generic build tool, that has built-in rules + for building OCaml library and programs.") + (license license:lgpl2.1+))) + (define-public opam (package (name "opam") - (version "1.2.2") + (version "2.0.0") (source (origin (method url-fetch) ;; Use the '-full' version, which includes all the dependencies. @@ -271,7 +340,7 @@ functional, imperative and object-oriented styles of programming.") ) (sha256 (base32 - "004gwn6rbpcb53y3rpb3v23vk39rp2xmf0liyd5iy12ij8bigrhm")))) + "09gdpxiqmyr6z78l85d7pwhiwrycdi2xi1b2mafqr1sk9z5lzbcx")))) (build-system gnu-build-system) (arguments '(;; Sometimes, 'make -jX' would fail right after ./configure with @@ -321,7 +390,7 @@ Git-friendly development workflow.") ;; The 'LICENSE' file waives some requirements compared to LGPLv3. (license license:lgpl3))) -(define-public camlp4 +(define-public camlp4-4.02 (package (name "camlp4") (version "4.02+6") @@ -334,9 +403,9 @@ Git-friendly development workflow.") "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342")) (file-name (string-append name "-" version ".tar.gz")))) (build-system gnu-build-system) - (native-inputs `(("ocaml" ,ocaml) + (native-inputs `(("ocaml" ,ocaml-4.02) ("which" ,which))) - (inputs `(("ocaml" ,ocaml))) + (inputs `(("ocaml" ,ocaml-4.02))) (arguments '(#:tests? #f ;no documented test target ;; a race-condition will lead byte and native targets to mkdir _build @@ -377,17 +446,42 @@ syntax of OCaml.") ;; against the library to be released under any terms. (license license:lgpl2.0))) +(define-public camlp4-4.07 + (package + (inherit camlp4-4.02) + (name "camlp4") + (version "4.07+1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/camlp4/archive/" + version ".tar.gz")) + (sha256 + (base32 + "143hhxv1i6aq413z0i1pynrjcfl2g5gnh5r3863v6h9z0riqknzc")) + (file-name (string-append name "-" version ".tar.gz")))) + (properties + `((ocaml4.02-variant . ,(delay camlp4-4.02)))) + (native-inputs + `(("ocaml" ,ocaml-4.07) + ("ocamlbuild" ,ocamlbuild) + ("which" ,which))) + (inputs + `(("ocaml" ,ocaml-4.07))))) + +(define-public camlp4 camlp4-4.07) + (define-public camlp5 (package (name "camlp5") - (version "6.14") + (version "7.06") (source (origin (method url-fetch) - (uri (string-append "http://camlp5.gforge.inria.fr/distrib/src/" - name "-" version ".tgz")) + (uri (string-append "https://github.com/camlp5/camlp5/archive/rel" + (string-delete #\. version) ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1ql04iyvclpyy9805kpddc4ndjb5d0qg4shhi2fc6bixi49fvy89")))) + "08kr0h2rq3jh3kzqh5f6pr589bqw3y76z8k59ad2kdh50fjgp8xy")))) (build-system gnu-build-system) (inputs `(("ocaml" ,ocaml))) @@ -404,6 +498,11 @@ syntax of OCaml.") (invoke "./configure" "--prefix" out "--mandir" mandir)))) + (add-before 'build 'fix-/bin-references + (lambda _ + (substitute* "config/Makefile" + (("/bin/rm") "rm")) + #t)) (replace 'build (lambda _ (invoke "make" "-j" (number->string @@ -427,17 +526,19 @@ concrete syntax of the language (Quotations, Syntax Extensions).") (define-public hevea (package (name "hevea") - (version "2.28") + (version "2.32") (source (origin (method url-fetch) (uri (string-append "http://hevea.inria.fr/old/" name "-" version ".tar.gz")) (sha256 (base32 - "14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd")))) + "1s4yqphfcr1pf5mcj5c84mvmd107k525iiym5jdwsxz0ka0ccmfy")))) (build-system gnu-build-system) (inputs `(("ocaml" ,ocaml))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild))) (arguments `(#:tests? #f ; no test suite #:make-flags (list (string-append "PREFIX=" %output)) @@ -455,6 +556,50 @@ concrete syntax of the language (Quotations, Syntax Extensions).") written in Objective Caml.") (license license:qpl))) +(define-public ocaml-num + (package + (name "ocaml-num") + (version "1.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/num/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1xlkd0svc0mgq5s7nrm2rjrsvg15i9wxqkc1kvwjp6sv8vv8bb04")))) + (build-system ocaml-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'fix-makefile + (lambda* (#:key outputs #:allow-other-keys) + ;; This package supposes we install to the same directory as + ;; the ocaml package. + (substitute* "src/META" + (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out") + "/lib/ocaml/site-lib\""))) + (substitute* "src/Makefile" + (("\\) \\$\\(STDLIBDIR\\)") + (string-append ") " (assoc-ref outputs "out") + "/lib/ocaml/site-lib"))) + #t)) + (add-after 'install 'fix-stubslib + (lambda* (#:key outputs #:allow-other-keys) + (format #t "~a~%" (find-files "." ".*.so")) + (let ((stubdir (string-append (assoc-ref outputs "out") + "/lib/ocaml/site-lib"))) + (mkdir-p stubdir) + (install-file "src/dllnums.so" stubdir)) + #t))))) + (home-page "https://github.com/ocaml/num") + (synopsis "Arbitrary-precision integer and rational arithmetic") + (description "OCaml-Num contains the legacy Num library for +arbitrary-precision integer and rational arithmetic that used to be part of +the OCaml core distribution.") + (license license:lgpl2.1+))); with linking exception + (define-public coq (package (name "coq") @@ -478,7 +623,8 @@ written in Objective Caml.") (inputs `(("lablgtk" ,lablgtk) ("python" ,python-2) - ("camlp5" ,camlp5))) + ("camlp5" ,camlp5) + ("ocaml-num" ,ocaml-num))) (arguments `(#:phases (modify-phases %standard-phases @@ -598,7 +744,7 @@ provers.") (define-public emacs-tuareg (package (name "emacs-tuareg") - (version "2.0.10") + (version "2.2.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/ocaml/tuareg/archive/" @@ -606,7 +752,7 @@ provers.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1r2smclcs63n74lcyckbp90j09wyjdngn816cqzfkw54iwh3hd7q")))) + "1ynpfc170f9jqx49biji9npfkvfpflbm29xf24wc7fnxxayr49ig")))) (build-system gnu-build-system) (native-inputs `(("emacs" ,emacs-minimal) ("opam" ,opam))) @@ -650,6 +796,8 @@ Emacs.") (build-system gnu-build-system) (inputs `(("ocaml" ,ocaml))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild))) (arguments `(#:parallel-build? #f ; Parallel build causes failure #:tests? #f ; No check target @@ -660,6 +808,8 @@ Emacs.") (let ((out (assoc-ref outputs "out"))) (setenv "PREFIX" out)) #t))))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-menhir)))) (home-page "http://gallium.inria.fr/~fpottier/menhir") (synopsis "Parser generator") (description "Menhir is a parser generator. It turns high-level grammar @@ -671,17 +821,26 @@ Knuth’s LR(1) parser construction technique.") ;; are QPL licensed. (license (list license:gpl2+ license:qpl)))) +(define-public ocaml4.02-menhir + (package + (inherit ocaml-menhir) + (name "ocaml4.02-menhir") + (inputs `(("ocaml" ,ocaml-4.02))) + (native-inputs '()))) + (define-public lablgtk (package (name "lablgtk") - (version "2.18.5") + (version "2.18.6") (source (origin (method url-fetch) - (uri (ocaml-forge-uri name version 1627)) + (uri (ocaml-forge-uri name version 1726)) (sha256 (base32 - "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib")))) + "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d")))) (build-system gnu-build-system) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-lablgtk)))) (native-inputs `(("camlp4" ,camlp4) ("ocaml" ,ocaml) @@ -732,6 +891,23 @@ libglade (and it an generate OCaml code from .glade files), libpanel, librsvg and quartz.") (license license:lgpl2.1))) +(define-public ocaml4.02-lablgtk + (package + (inherit lablgtk) + (name "ocaml4.02-lablgtk") + (version "2.18.5") + (source (origin + (method url-fetch) + (uri (ocaml-forge-uri name version 1627)) + (sha256 + (base32 + "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib")))) + (native-inputs + `(("camlp4" ,camlp4-4.02) + ("ocaml" ,ocaml-4.02) + ("findlib" ,ocaml4.02-findlib) + ("pkg-config" ,pkg-config))))) + (define-public unison (package (name "unison") @@ -792,12 +968,13 @@ libpanel, librsvg and quartz.") (outputs '("out" "doc")) ; 1.9 MiB of documentation (native-inputs - `(("ocaml" ,ocaml) + `(("ocaml" ,ocaml-4.02) ;; For documentation ("ghostscript" ,ghostscript) ("texlive" ,texlive) ("hevea" ,hevea) - ("lynx" ,lynx))) + ("lynx" ,lynx) + ("which" ,which))) (arguments `(#:parallel-build? #f #:parallel-tests? #f @@ -827,6 +1004,14 @@ libpanel, librsvg and quartz.") (let ((doc (string-append (assoc-ref outputs "doc") "/share/doc/unison"))) (mkdir-p doc) + ;; This is a workaround to prevent a build failure. Running + ;; make docs somehow allows it to pass, but the generated + ;; documentation is not pretty. + (catch #t + (lambda _ + (invoke "make" "docs" + "TEXDIRECTIVES=\\\\draftfalse")) + (lambda _ #t)) ;; This file needs write-permissions, because it's ;; overwritten by 'docs' during documentation generation. (chmod "src/strings.ml" #o600) @@ -856,14 +1041,14 @@ to the other.") (define-public ocaml-findlib (package (name "ocaml-findlib") - (version "1.7.3") + (version "1.8.0") (source (origin (method url-fetch) (uri (string-append "http://download.camlcity.org/download/" "findlib" "-" version ".tar.gz")) (sha256 (base32 - "12xx8si1qv3xz90qsrpazjjk4lc1989fzm97rsmc4diwla7n15ni")))) + "1b97zqjdriqd2ikgh4rmqajgxwdwn013riji5j53y3xvcmnpsyrb")))) (build-system gnu-build-system) (native-inputs `(("camlp4" ,camlp4) @@ -912,6 +1097,15 @@ compilation and linkage, there are new frontends of the various OCaml compilers that can directly deal with packages.") (license license:x11))) +(define-public ocaml4.02-findlib + (package + (inherit ocaml-findlib) + (name "ocaml4.02-findlib") + (native-inputs + `(("camlp4" ,camlp4-4.02) + ("m4" ,m4) + ("ocaml" ,ocaml-4.02))))) + (define-public ocaml4.01-findlib (package (inherit ocaml-findlib) @@ -933,7 +1127,8 @@ compilers that can directly deal with packages.") "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f")))) (build-system ocaml-build-system) (native-inputs - `(("libxml2" ,libxml2))) ; for xmllint + `(("libxml2" ,libxml2) ; for xmllint + ("ocamlbuild" ,ocamlbuild))) (arguments `(#:phases (modify-phases %standard-phases @@ -947,6 +1142,9 @@ other XUnit testing frameworks.") (define-public ocaml4.01-ounit (package-with-ocaml4.01 ocaml-ounit)) +(define-public ocaml4.02-ounit + (package-with-ocaml4.02 ocaml-ounit)) + (define-public camlzip (package (name "camlzip") @@ -1007,19 +1205,23 @@ files in these formats.") (base32 "0syh72jk9s0qwjmmfrkqchaj98m020ii082jn38pwnmb6v3p02wk"))))))) +(define-public ocaml4.02-camlzip + (package-with-ocaml4.02 camlzip)) + (define-public ocamlmod (package (name "ocamlmod") - (version "0.0.8") + (version "0.0.9") (source (origin (method url-fetch) - (uri (ocaml-forge-uri name version 1544)) + (uri (ocaml-forge-uri name version 1702)) (sha256 (base32 - "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g")))) + "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa")))) (build-system ocaml-build-system) (native-inputs - `(("ounit" ,ocaml-ounit))) + `(("ounit" ,ocaml-ounit) + ("ocamlbuild" ,ocamlbuild))) (arguments `(#:phases (modify-phases %standard-phases @@ -1030,6 +1232,9 @@ files in these formats.") (description "Generate modules from OCaml source files.") (license license:lgpl2.1+))) ; with an exception +(define-public ocaml4.02-ocamlmod + (package-with-ocaml4.02 ocamlmod)) + (define-public ocaml-zarith (package (name "ocaml-zarith") @@ -1060,6 +1265,9 @@ over big integers. Small integers are represented as Caml unboxed integers, for speed and space economy.") (license license:lgpl2.1+))) ; with an exception +(define-public ocaml4.02-zarith + (package-with-ocaml4.02 ocaml-zarith)) + (define-public ocaml-frontc (package (name "ocaml-frontc") @@ -1073,7 +1281,9 @@ for speed and space economy.") "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g")))) (build-system ocaml-build-system) (arguments - `(#:phases + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:phases (modify-phases %standard-phases (delete 'configure) (add-after 'install 'install-meta @@ -1116,7 +1326,8 @@ GNU CC attributes. It provides also a C pretty printer as an example of use.") "1zs1pg5cb1iry554v3cdmmiglsrwmsqa9x8zxmzb118fnk5d3ha6")))) (build-system ocaml-build-system) (native-inputs - `(("ounit" ,ocaml-ounit))) + `(("ounit" ,ocaml-ounit) + ("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/c-cube/qcheck") (synopsis "QuickCheck inspired property-based testing for OCaml") (description "QuickCheck inspired property-based testing for OCaml. This @@ -1125,6 +1336,9 @@ generated instances of the type. It provides combinators for generating instances and printing them.") (license license:lgpl3+))) +(define-public ocaml4.02-qcheck + (package-with-ocaml4.02 ocaml-qcheck)) + (define-public ocaml-qtest (package (name "ocaml-qtest") @@ -1139,7 +1353,7 @@ instances and printing them.") "1ff4if64mc9c7wmhjdgnlnh6k6a713piqzr4043zzj4s5pw7smxk")))) (build-system ocaml-build-system) (native-inputs - `(("findlib" ,ocaml-findlib))) + `(("ocamlbuild" ,ocamlbuild))) (propagated-inputs `(("ounit" ,ocaml-ounit) ("qcheck" ,ocaml-qcheck))) @@ -1161,6 +1375,9 @@ to use -- to sophisticated random generation of test cases.") (define-public ocaml4.01-qtest (package-with-ocaml4.01 ocaml-qtest)) +(define-public ocaml4.02-qtest + (package-with-ocaml4.02 ocaml-qtest)) + (define-public ocaml-stringext (package (name "ocaml-stringext") @@ -1175,7 +1392,8 @@ to use -- to sophisticated random generation of test cases.") "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh")))) (build-system ocaml-build-system) (native-inputs - `(("qtest" ,ocaml-qtest))) + `(("ocamlbuild" ,ocamlbuild) + ("qtest" ,ocaml-qtest))) (home-page "https://github.com/rgrinberg/stringext") (synopsis "Extra string functions for OCaml") (description "Provides a single module named Stringext that provides a grab @@ -1185,17 +1403,21 @@ full_split, cut, rcut, etc..") ;; where it says `mit'. (license license:expat))) +(define-public ocaml4.02-stringext + (package-with-ocaml4.02 ocaml-stringext)) (define-public ocaml-bisect (package (name "ocaml-bisect") - (version "1.3") + (version "1.3.1") (source (origin (method url-fetch) - (uri (ocaml-forge-uri "bisect" version 1051)) + (uri (string-append "https://github.com/gasche/bisect/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0")) + "0p67fppk5ifb63b00kxwrb1xg75hrqhknng3bsdyw3gxxqyjlpmx")) (patches (search-patches "ocaml-bisect-fix-camlp4-in-another-directory.patch")))) @@ -1203,6 +1425,7 @@ full_split, cut, rcut, etc..") (native-inputs `(("camlp4" ,camlp4) ("libxml2" ,libxml2) + ("ocamlbuild" ,ocamlbuild) ("which" ,which))) (propagated-inputs `(("camlp4" ,camlp4))) @@ -1215,9 +1438,11 @@ full_split, cut, rcut, etc..") #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "./configure" "-prefix" - (assoc-ref outputs "out")))))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (invoke "./configure" "-prefix" (assoc-ref outputs "out") + "-ocaml-prefix" (assoc-ref inputs "ocaml") + "-camlp4-prefix" (assoc-ref inputs "camlp4")) + #t))))) (home-page "http://bisect.x9c.fr") (synopsis "Code coverage tool for the OCaml language") (description "Bisect is a code coverage tool for the OCaml language. It is @@ -1225,46 +1450,260 @@ a camlp4-based tool that allows to instrument your application before running tests. After application execution, it is possible to generate a report in HTML format that is the replica of the application source code annotated with code coverage information.") - (properties `((ocaml4.01-variant . ,(delay ocaml4.01-bisect)))) + (properties + `((ocaml4.01-variant . ,(delay ocaml4.01-bisect)) + (ocaml4.02-variant . ,(delay ocaml4.02-bisect)))) (license license:gpl3+))) (define-public ocaml4.01-bisect (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-bisect)))) (package (inherit base) + (version "1.3") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/gasche/bisect/archive/" + version ".tar.gz")) + (file-name (string-append "ocaml-bisect-" version ".tar.gz")) + (sha256 + (base32 + "1ip49jqf0kkbrqf8qspmfjbg9ap9fhvjkg718myzix88dg5rv8d4")))) (arguments `(#:ocaml ,ocaml-4.01 - ;; Camlp4 is included with OCaml 4.01, so do not include it as a - ;; separate input. - ,@(strip-keyword-arguments '(#:make-flags) (package-arguments base)))) + ,@(substitute-keyword-arguments (package-arguments ocaml-bisect) + ((#:make-flags flags) + `(list "all")) + ((#:phases phases) + `(modify-phases ,phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (invoke "./configure" + "-ocaml-prefix" (assoc-ref inputs "ocaml")) + #t))))))) (native-inputs `(,@(alist-delete "camlp4" (package-native-inputs base)))) (propagated-inputs `(,@(alist-delete "camlp4" (package-propagated-inputs base))))))) +(define-public ocaml4.02-bisect + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bisect)))) + (package + (inherit base) + (native-inputs + `(("camlp4" ,camlp4-4.02) + ("libxml2" ,libxml2) + ("which" ,which))) + (propagated-inputs + `(("camlp4" ,camlp4-4.02)))))) + +(define-public dune + (package + (name "dune") + (version "1.2.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml/dune/releases/" + "download/" version "/dune-" version ".tbz")) + (sha256 + (base32 + "00c5dbm4hkdapc2i7pg07b2lj8sv6ly38qr7zid58cdmbmzq21z9")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f; require odoc + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure") + #t))))) + (home-page "https://github.com/ocaml/dune") + (synopsis "OCaml build system") + (description "Dune is a build system that was designed to simplify the +release of Jane Street packages. It reads metadata from @file{dune} files +following a very simple s-expression syntax.") + (license license:expat))) + +(define-public ocaml-migrate-parsetree + (package + (name "ocaml-migrate-parsetree") + (version "1.1.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml-ppx/" + "ocaml-migrate-parsetree/releases/download/v" + version "/ocaml-migrate-parsetree-" + version ".tbz")) + (sha256 + (base32 + "01zjp1q4hryqaxv4apkjd868fycz2kf887r6lkb6x2a545h1lh7f")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "jbuilder" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "jbuilder" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (propagated-inputs + `(("ocamlbuild" ,ocamlbuild) + ("ocaml-result" ,ocaml-result))) + (native-inputs + `(("dune" ,dune))) + (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree") + (synopsis "OCaml parsetree convertor") + (description "This library converts between parsetrees of different OCaml +versions. For each version, there is a snapshot of the parsetree and conversion +functions to the next and/or previous version.") + (license license:lgpl2.1+))) + +(define-public ocaml-ppx-tools-versioned + (package + (name "ocaml-ppx-tools-versioned") + (version "5.2.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml-ppx/" + "ppx_tools_versioned/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh")))) + (build-system ocaml-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "dune" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (native-inputs + `(("dune" ,dune))) + (propagated-inputs + `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree))) + (home-page "https://github.com/let-def/ppx_tools_versioned") + (synopsis "Variant of ppx_tools") + (description "This package is a variant of ppx_tools based on +ocaml-migrate-parsetree") + (license license:expat))) + +(define-public ocaml-ppx-tools-versioned + (package + (name "ocaml-ppx-tools-versioned") + (version "5.2.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ocaml-ppx/" + "ppx_tools_versioned/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "dune" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (native-inputs + `(("dune" ,dune))) + (propagated-inputs + `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree))) + (home-page "https://github.com/let-def/ppx_tools_versioned") + (synopsis "Variant of ppx_tools") + (description "This package is a variant of ppx_tools based on +ocaml-migrate-parsetree") + (license license:expat))) + (define-public ocaml-bitstring (package (name "ocaml-bitstring") - (version "2.1.1") + (version "3.1.0") (source (origin (method url-fetch) - (uri (string-append "https://github.com/xguerin/bitstring" - "/archive/v" version ".tar.gz")) + (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/" + "get/v" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8")) - (patches (search-patches "ocaml-bitstring-fix-configure.patch")))) + "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps")))) (build-system ocaml-build-system) (native-inputs `(("camlp4" ,camlp4) ("time" ,time) ("autoconf" ,autoconf) ("automake" ,automake) - ("bisect" ,ocaml-bisect))) + ("bisect" ,ocaml-bisect) + ("dune" ,dune))) (propagated-inputs - `(("camlp4" ,camlp4))) + `(("camlp4" ,camlp4) + ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned))) (arguments - `(#:configure-flags + `(#:tests? #f; Tests fail to build + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "jbuilder" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-bitstring)))) + (home-page "https://github.com/xguerin/bitstring") + (synopsis "Bitstrings and bitstring matching for OCaml") + (description "Adds Erlang-style bitstrings and matching over bitstrings as +a syntax extension and library for OCaml. You can use this module to both parse +and generate binary formats, files and protocols. Bitstring handling is added +as primitives to the language, making it exceptionally simple to use and very +powerful.") + (license license:isc))) + +(define-public ocaml4.02-bitstring + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bitstring)))) + (package + (inherit base) + (version "2.1.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/xguerin/bitstring" + "/archive/v" version ".tar.gz")) + (file-name (string-append "ocaml-bitstring-" version ".tar.gz")) + (sha256 + (base32 + "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8")) + (patches (search-patches "ocaml-bitstring-fix-configure.patch")))) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:configure-flags (list "CAMLP4OF=camlp4of" "--enable-coverage") #:make-flags (list (string-append "BISECTLIB=" @@ -1280,14 +1719,6 @@ coverage information.") "$(BISECTLIB)/bisect")) #:phases (modify-phases %standard-phases - (add-before 'configure 'fix-configure - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "Makefile.in" - (("@abs_top_builddir@") - (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH")))) - (substitute* "configure" - (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash") - "/bin/sh"))))) (add-after 'install 'link-lib (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1297,15 +1728,24 @@ coverage information.") "/lib/ocaml/site-lib/bitstring"))) (mkdir-p stubs) (symlink (string-append lib "/dllbitstring.so") - (string-append stubs "/dllbitstring.so")))))))) - (home-page "https://github.com/xguerin/bitstring") - (synopsis "Bitstrings and bitstring matching for OCaml") - (description "Adds Erlang-style bitstrings and matching over bitstrings as -a syntax extension and library for OCaml. You can use this module to both parse -and generate binary formats, files and protocols. Bitstring handling is added -as primitives to the language, making it exceptionally simple to use and very -powerful.") - (license license:isc))) + (string-append stubs "/dllbitstring.so"))) + #t)) + (add-before 'configure 'fix-configure + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile.in" + (("@abs_top_builddir@") + (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH")))) + (substitute* "configure" + (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash") + "/bin/sh")))))))) + (native-inputs + `(("camlp4" ,camlp4-4.02) + ("time" ,time) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("bisect" ,ocaml4.02-bisect))) + (propagated-inputs + `(("camlp4" ,camlp4-4.02)))))) (define-public ocaml-result (package @@ -1331,6 +1771,9 @@ powerful.") staying compatible with older version of OCaml should use the Result module defined in this library.") (license license:bsd-3))) + +(define-public ocaml4.02-result + (package-with-ocaml4.02 ocaml-result)) (define-public ocaml-topkg (package @@ -1345,7 +1788,8 @@ defined in this library.") "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8")))) (build-system ocaml-build-system) (native-inputs - `(("opam" ,opam))) + `(("opam" ,opam) + ("ocamlbuild" ,ocamlbuild))) (propagated-inputs `(("result" ,ocaml-result))) (arguments @@ -1361,6 +1805,9 @@ provides an API to describe the files a package installs in a given build configuration and to specify information about the package's distribution, creation and publication procedures.") (license license:isc))) + +(define-public ocaml4.02-topkg + (package-with-ocaml4.02 ocaml-topkg)) (define-public ocaml-rresult (package @@ -1375,7 +1822,8 @@ creation and publication procedures.") "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm")))) (build-system ocaml-build-system) (native-inputs - `(("opam" ,opam))) + `(("opam" ,opam) + ("ocamlbuild" ,ocamlbuild))) (propagated-inputs `(("topkg" ,ocaml-topkg))) (arguments @@ -1392,6 +1840,9 @@ to operate on the result type available from OCaml 4.03 in the standard library.") (license license:isc))) +(define-public ocaml4.02-rresult + (package-with-ocaml4.02 ocaml-rresult)) + (define-public ocaml-sqlite3 (package (name "ocaml-sqlite3") @@ -1407,7 +1858,8 @@ library.") "14c1nir7c6bivajg0vyx853y7la7r5d25g1v5hjb2wfi73r15p1m")))) (build-system ocaml-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("ocamlbuild" ,ocamlbuild) + ("pkg-config" ,pkg-config))) (inputs `(("sqlite" ,sqlite))) (home-page "https://mmottl.github.io/sqlite3-ocaml") @@ -1424,6 +1876,9 @@ coexistence with the old (version 2) SQLite and its OCaml wrapper (define-public ocaml4.01-sqlite3 (package-with-ocaml4.01 ocaml-sqlite3)) +(define-public ocaml4.02-sqlite3 + (package-with-ocaml4.02 ocaml-sqlite3)) + (define-public ocaml-csv (package (name "ocaml-csv") @@ -1439,6 +1894,8 @@ coexistence with the old (version 2) SQLite and its OCaml wrapper (base32 "0rv7x843vn6scxj87hzl01yqrl26rc27lr8s7z6rp9vs745g05zj")))) (build-system ocaml-build-system) + (native-inputs + `(("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/Chris00/ocaml-csv") (synopsis "Pure OCaml functions to read and write CSV") (description @@ -1451,6 +1908,9 @@ manipulate such data.") (define-public ocaml4.01-csv (package-with-ocaml4.01 ocaml-csv)) +(define-public ocaml4.02-csv + (package-with-ocaml4.02 ocaml-csv)) + (define-public ocaml-mtime (package (name "ocaml-mtime") @@ -1464,7 +1924,8 @@ manipulate such data.") "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah")))) (build-system ocaml-build-system) (native-inputs - `(("opam" ,opam))) + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) (propagated-inputs `(("topkg" ,ocaml-topkg))) (arguments @@ -1480,6 +1941,9 @@ manipulate such data.") spans without being subject to operating system calendar time adjustments.") (license license:isc))) +(define-public ocaml4.02-mtime + (package-with-ocaml4.02 ocaml-mtime)) + (define-public ocaml-cmdliner (package (name "ocaml-cmdliner") @@ -1493,7 +1957,8 @@ spans without being subject to operating system calendar time adjustments.") "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx")))) (build-system ocaml-build-system) (native-inputs - `(("opam" ,opam))) + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) (arguments `(#:tests? #f #:build-flags '("native=true" "native-dynlink=true") @@ -1510,6 +1975,9 @@ generation. It supports programs with single or multiple commands and respects most of the POSIX and GNU conventions.") (license license:bsd-3))) +(define-public ocaml4.02-cmdliner + (package-with-ocaml4.02 ocaml-cmdliner)) + (define-public ocaml-fmt (package (name "ocaml-fmt") @@ -1522,10 +1990,13 @@ most of the POSIX and GNU conventions.") (sha256 (base32 "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px")))) (build-system ocaml-build-system) - (native-inputs `(("opam" ,opam) - ("topkg" ,ocaml-topkg))) - (propagated-inputs `(("result" ,ocaml-result) - ("cmdliner" ,ocaml-cmdliner))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (propagated-inputs + `(("result" ,ocaml-result) + ("cmdliner" ,ocaml-cmdliner))) (arguments `(#:tests? #f #:build-flags (list "build" "--with-base-unix" "true" "--with-cmdliner" "true") @@ -1538,6 +2009,9 @@ most of the POSIX and GNU conventions.") functions.") (license license:isc))) +(define-public ocaml4.02-fmt + (package-with-ocaml4.02 ocaml-fmt)) + (define-public ocaml-astring (package (name "ocaml-astring") @@ -1550,13 +2024,16 @@ functions.") (sha256 (base32 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0")))) (build-system ocaml-build-system) - (native-inputs `(("opam" ,opam) - ("topkg" ,ocaml-topkg))) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) (home-page "http://erratique.ch/software/astring") (synopsis "Alternative String module for OCaml") (description "Astring exposes an alternative String module for OCaml. This @@ -1568,6 +2045,9 @@ adds a few missing functions and fully exploits OCaml's newfound string immutability.") (license license:isc))) +(define-public ocaml4.02-astring + (package-with-ocaml4.02 ocaml-astring)) + (define-public ocaml-alcotest (package (name "ocaml-alcotest") @@ -1580,15 +2060,19 @@ immutability.") (base32 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam) - ("topkg" ,ocaml-topkg))) - (propagated-inputs `(("fmt" ,ocaml-fmt) - ("astring" ,ocaml-astring))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (propagated-inputs + `(("fmt" ,ocaml-fmt) + ("astring" ,ocaml-astring))) (home-page "https://github.com/mirage/alcotest") (synopsis "Lightweight OCaml test framework") (description "Alcotest exposes simple interface to perform unit tests. It @@ -1599,25 +2083,44 @@ displayed at the end of the run (with the full logs ready to inspect), with a simple (yet expressive) query language to select the tests to run.") (license license:isc))) +(define-public ocaml4.02-alcotest + (package-with-ocaml4.02 ocaml-alcotest)) + (define-public ocaml-ppx-tools (package (name "ocaml-ppx-tools") - (version "5.0+4.02.0") + (version "5.1+4.06.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/" version ".tar.gz")) (sha256 (base32 - "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc")))) + "0mncpy9v2mcjgnj7s2vqpp2b1ixv54djicfx66ic9wny9d202gj1")))) (build-system ocaml-build-system) - (arguments `(#:phases (modify-phases %standard-phases (delete 'configure)) - #:tests? #f)) + (arguments + `(#:phases (modify-phases %standard-phases (delete 'configure)) + #:tests? #f)) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-ppx-tools)))) (home-page "https://github.com/alainfrisch/ppx_tools") (synopsis "Tools for authors of ppx rewriters and other syntactic tools") (description "Tools for authors of ppx rewriters and other syntactic tools.") (license license:expat))) +(define-public ocaml4.02-ppx-tools + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-ppx-tools)))) + (package + (inherit base) + (version "5.0+4.02.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/" + version ".tar.gz")) + (sha256 (base32 + "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))))) + (define-public ocaml-react (package (name "ocaml-react") @@ -1630,12 +2133,15 @@ simple (yet expressive) query language to select the tests to run.") (sha256 (base32 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8")))) (build-system ocaml-build-system) - (native-inputs `(("opam" ,opam))) - (arguments `(#:tests? #f - #:build-flags (list "native=true" "native-dynlink=true") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) + (arguments + `(#:tests? #f + #:build-flags (list "native=true" "native-dynlink=true") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) (home-page "http://erratique.ch/software/react") (synopsis "Declarative events and signals for OCaml") (description "React is an OCaml module for functional reactive programming @@ -1644,6 +2150,9 @@ events and signals. React doesn't define any primitive event or signal, it lets the client choose the concrete timeline.") (license license:bsd-3))) +(define-public ocaml4.02-react + (package-with-ocaml4.02 ocaml-react)) + (define-public ocaml-ssl (package (name "ocaml-ssl") @@ -1658,20 +2167,23 @@ lets the client choose the concrete timeline.") (sha256 (base32 "0fviq8xhp3qk7pmkl7knchywsipxgb7p0z489hj8qnf2sx8xzdmy")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:make-flags (list "OCAMLFIND_LDCONF=ignore") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - (lambda* (#:key #:allow-other-keys) - (system* "sh" "bootstrap") - (substitute* "src/OCamlMakefile" - (("/bin/sh") (which "bash"))) - (substitute* "configure" - (("/bin/sh") (which "bash")))))))) - (native-inputs `(("autoconf" ,autoconf) - ("automake" ,automake) - ("which" ,which))) + (arguments + `(#:tests? #f + #:make-flags (list "OCAMLFIND_LDCONF=ignore") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'bootstrap + (lambda* (#:key #:allow-other-keys) + (system* "sh" "bootstrap") + (substitute* "src/OCamlMakefile" + (("/bin/sh") (which "bash"))) + (substitute* "configure" + (("/bin/sh") (which "bash"))) + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("which" ,which))) (propagated-inputs `(("openssl" ,openssl))) (home-page "https://github.com/savonet/ocaml-ssl/") (synopsis "OCaml bindings for OpenSSL") @@ -1680,10 +2192,13 @@ lets the client choose the concrete timeline.") through Transport Layer Security (@dfn{TLS}) encrypted connections.") (license license:lgpl2.1))) +(define-public ocaml4.02-ssl + (package-with-ocaml4.02 ocaml-ssl)) + (define-public ocaml-lwt (package (name "ocaml-lwt") - (version "2.6.0") + (version "4.1.0") (source (origin (method url-fetch) @@ -1691,35 +2206,37 @@ through Transport Layer Security (@dfn{TLS}) encrypted connections.") ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz")))) + "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp")))) (build-system ocaml-build-system) (arguments - `(#:configure-flags - (list "--enable-ssl" "--enable-glib" "--enable-react" - "--enable-ppx") + `(#:tests? #f; require lwt_ppx #:phases (modify-phases %standard-phases - (add-before 'configure 'disable-some-checks - (lambda* (#:key #:allow-other-keys) - (substitute* "tests/unix/main.ml" - (("Test_mcast.suite;") "")))) - (add-after 'install 'link-stubs + (replace 'configure + (lambda _ + (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true") + #t)) + (replace 'build + (lambda _ + (invoke "jbuilder" "build" "@install") + #t)) + (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) - (lib (string-append out "/lib/ocaml/site-lib/lwt"))) - (mkdir-p stubs) - (symlink (string-append lib "/dlllwt-glib_stubs.so") - (string-append stubs "/dlllwt-glib_stubs.so")) - (symlink (string-append lib "/dlllwt-unix_stubs.so") - (string-append stubs "/dlllwt-unix_stubs.so")))))))) - (native-inputs `(("pkg-config" ,pkg-config) - ("ppx-tools" ,ocaml-ppx-tools))) - (inputs `(("libev" ,libev) - ("glib" ,glib))) - (propagated-inputs `(("result" ,ocaml-result) - ("ocaml-ssl" ,ocaml-ssl) - ("ocaml-react" ,ocaml-react))) + (invoke "jbuilder" "install" "--prefix" (assoc-ref outputs "out")) + #t))))) + (native-inputs + `(("dune" ,dune) + ("ocaml-cppo" ,ocaml-cppo) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("pkg-config" ,pkg-config) + ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned))) + (inputs + `(("libev" ,libev) + ("glib" ,glib))) + (propagated-inputs + `(("result" ,ocaml-result) + ("ocaml-ssl" ,ocaml-ssl) + ("ocaml-react" ,ocaml-react))) (home-page "https://github.com/ocsigen/lwt") (synopsis "Cooperative threads and I/O in monadic style") (description "Lwt provides typed, composable cooperative threads. These @@ -1728,6 +2245,48 @@ process. Also, in many cases, Lwt threads can interact without the need for locks or other synchronization primitives.") (license license:lgpl2.1))) +(define-public ocaml4.02-lwt + (package-with-ocaml4.02 ocaml-lwt)) + +(define-public ocaml-lwt-log + (package + (name "ocaml-lwt-log") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/aantron/lwt_log/archive/" version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 (base32 + "1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f; require lwt_ppx + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "jbuilder" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "jbuilder" "install" "--prefix" (assoc-ref outputs "out")) + #t))))) + (native-inputs + `(("dune" ,dune))) + (propagated-inputs + `(("lwt" ,ocaml-lwt))) + (home-page "https://github.com/aantron/lwt_log") + (synopsis "Logging library") + (description "This package provides a deprecated logging component for +ocaml lwt.") + (license license:lgpl2.1))) + +(define-public ocaml4.02-lwt-log + (package-with-ocaml4.02 ocaml-lwt-log)) + (define-public ocaml-logs (package (name "ocaml-logs") @@ -1740,18 +2299,22 @@ locks or other synchronization primitives.") (base32 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build" "--with-js_of_ocaml" "false") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam))) - (propagated-inputs `(("fmt" ,ocaml-fmt) - ("lwt" ,ocaml-lwt) - ("mtime" ,ocaml-mtime) - ("result" ,ocaml-result) - ("cmdliner" ,ocaml-cmdliner) - ("topkg" ,ocaml-topkg))) + (arguments + `(#:tests? #f + #:build-flags (list "build" "--with-js_of_ocaml" "false") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) + (propagated-inputs + `(("fmt" ,ocaml-fmt) + ("lwt" ,ocaml-lwt) + ("mtime" ,ocaml-mtime) + ("result" ,ocaml-result) + ("cmdliner" ,ocaml-cmdliner) + ("topkg" ,ocaml-topkg))) (home-page "http://erratique.ch/software/logs") (synopsis "Logging infrastructure for OCaml") (description "Logs provides a logging infrastructure for OCaml. Logging is @@ -1759,6 +2322,9 @@ performed on sources whose reporting level can be set independently. Log message report is decoupled from logging and is handled by a reporter.") (license license:isc))) +(define-public ocaml4.02-logs + (package-with-ocaml4.02 ocaml-logs)) + (define-public ocaml-fpath (package (name "ocaml-fpath") @@ -1771,14 +2337,18 @@ message report is decoupled from logging and is handled by a reporter.") (base32 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam))) - (propagated-inputs `(("topkg" ,ocaml-topkg) - ("astring" ,ocaml-astring))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) + (propagated-inputs + `(("topkg" ,ocaml-topkg) + ("astring" ,ocaml-astring))) (home-page "http://erratique.ch/software/fpath") (synopsis "File system paths for OCaml") (description "Fpath is an OCaml module for handling file system paths with @@ -1786,6 +2356,9 @@ POSIX or Windows conventions. Fpath processes paths without accessing the file system and is independent from any system library.") (license license:isc))) +(define-public ocaml4.02-fpath + (package-with-ocaml4.02 ocaml-fpath)) + (define-public ocaml-bos (package (name "ocaml-bos") @@ -1798,18 +2371,22 @@ file system and is independent from any system library.") (base32 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam))) - (propagated-inputs `(("topkg" ,ocaml-topkg) - ("astring" ,ocaml-astring) - ("fmt" ,ocaml-fmt) - ("fpath" ,ocaml-fpath) - ("logs" ,ocaml-logs) - ("rresult" ,ocaml-rresult))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) + (propagated-inputs + `(("topkg" ,ocaml-topkg) + ("astring" ,ocaml-astring) + ("fmt" ,ocaml-fmt) + ("fpath" ,ocaml-fpath) + ("logs" ,ocaml-logs) + ("rresult" ,ocaml-rresult))) (home-page "http://erratique.ch/software/bos") (synopsis "Basic OS interaction for OCaml") (description "Bos provides support for basic and robust interaction with @@ -1818,26 +2395,31 @@ environment, parse command line arguments, interact with the file system and run command line programs.") (license license:isc))) +(define-public ocaml4.02-bos + (package-with-ocaml4.02 ocaml-bos)) + (define-public ocaml-xmlm (package (name "ocaml-xmlm") - (version "1.2.0") + (version "1.3.0") (source (origin (method url-fetch) (uri (string-append "http://erratique.ch/software/xmlm/releases/" "xmlm-" version ".tbz")) (sha256 (base32 - "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh")))) + "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda* (#:key #:allow-other-keys) - (zero? (system* "pkg/build" "true"))))))) - (native-inputs `(("opam" ,opam))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("ocaml-topkg" ,ocaml-topkg) + ("opam" ,opam))) (home-page "http://erratique.ch/software/xmlm") (synopsis "Streaming XML codec for OCaml") (description "Xmlm is a streaming codec to decode and encode the XML data @@ -1848,32 +2430,41 @@ representation of the data.") (define-public ocaml4.01-xmlm (package-with-ocaml4.01 ocaml-xmlm)) +(define-public ocaml4.02-xmlm + (package-with-ocaml4.02 ocaml-xmlm)) + (define-public ocaml-ulex (package (name "ocaml-ulex") - (version "1.1") + (version "1.2") (source (origin (method url-fetch) - (uri (string-append "http://www.cduce.org/download/ulex-" + (uri (string-append "https://github.com/whitequark/ulex/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0")))) + "16gnbhqs6y2v89vw4igzvxdf2g8ybh5643636824aldcv8sscac0")))) (build-system ocaml-build-system) - (arguments `(#:phases (modify-phases %standard-phases (delete 'configure)) - #:tests? #f - #:make-flags - (list "all.opt" - (string-append "OCAMLBUILD=ocamlbuild -byte-plugin " - "-cflags -I," - (assoc-ref %build-inputs "camlp4") - "/lib/ocaml/site-lib/camlp4")))) - (native-inputs `(("camlp4" ,camlp4))) + (arguments + `(#:phases (modify-phases %standard-phases (delete 'configure)) + #:tests? #f + #:make-flags + (list "all.opt" + (string-append "OCAMLBUILD=ocamlbuild -byte-plugin " + "-cflags -I," (assoc-ref %build-inputs "camlp4") + "/lib/ocaml/site-lib/camlp4")))) + (native-inputs + `(("camlp4" ,camlp4) + ("ocamlbuild" ,ocamlbuild))) (home-page "http://www.cduce.org/download.html#side") (synopsis "Lexer generator for Unicode and OCaml") (description "Lexer generator for Unicode and OCaml.") (license license:expat))) +(define-public ocaml4.02-ulex + (package-with-ocaml4.02 ocaml-ulex)) + (define-public ocaml-uchar (package (name "ocaml-uchar") @@ -1886,39 +2477,49 @@ representation of the data.") (sha256 (base32 "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "native=true" "native-dynlink=true") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam))) + (arguments + `(#:tests? #f + #:build-flags (list "native=true" "native-dynlink=true") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) (home-page "https://github.com/ocaml/uchar") (synopsis "Compatibility library for OCaml's Uchar module") (description "The uchar package provides a compatibility library for the `Uchar` module introduced in OCaml 4.03.") (license license:lgpl2.1))) +(define-public ocaml4.02-uchar + (package-with-ocaml4.02 ocaml-uchar)) + (define-public ocaml-uutf (package (name "ocaml-uutf") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) (uri (string-append "http://erratique.ch/software/uutf/releases/" "uutf-" version ".tbz")) (sha256 (base32 - "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37")))) + "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam) - ("topkg" ,ocaml-topkg))) - (propagated-inputs `(("uchar" ,ocaml-uchar) - ("cmdliner" ,ocaml-cmdliner))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (propagated-inputs + `(("uchar" ,ocaml-uchar) + ("cmdliner" ,ocaml-cmdliner))) (home-page "http://erratique.ch/software/uutf") (synopsis "Non-blocking streaming Unicode codec for OCaml") (description "Uutf is a non-blocking streaming codec to decode and encode @@ -1930,27 +2531,34 @@ Functions are also provided to fold over the characters of UTF encoded OCaml string values and to directly encode characters in OCaml Buffer.t values.") (license license:isc))) +(define-public ocaml4.02-uutf + (package-with-ocaml4.02 ocaml-uutf)) + (define-public ocaml-jsonm (package (name "ocaml-jsonm") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) (uri (string-append "http://erratique.ch/software/jsonm/releases/" "jsonm-" version ".tbz")) (sha256 (base32 - "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62")))) + "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w")))) (build-system ocaml-build-system) - (arguments `(#:tests? #f - #:build-flags (list "build") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs `(("opam" ,opam) - ("topkg" ,ocaml-topkg))) - (propagated-inputs `(("uutf" ,ocaml-uutf) - ("cmdliner" ,ocaml-cmdliner))) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) + ("topkg" ,ocaml-topkg))) + (propagated-inputs + `(("uutf" ,ocaml-uutf) + ("cmdliner" ,ocaml-cmdliner))) (home-page "http://erratique.ch/software/jsonm") (synopsis "Non-blocking streaming JSON codec for OCaml") (description "Jsonm is a non-blocking streaming codec to decode and encode @@ -1958,25 +2566,30 @@ the JSON data format. It can process JSON text without blocking on IO and without a complete in-memory representation of the data.") (license license:isc))) +(define-public ocaml4.02-jsonm + (package-with-ocaml4.02 ocaml-jsonm)) + (define-public ocaml-ocurl (package (name "ocaml-ocurl") - (version "0.7.9") + (version "0.8.2") (source (origin (method url-fetch) (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-" version ".tar.gz")) (sha256 (base32 - "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n")))) + "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9")))) (build-system ocaml-build-system) - (arguments `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'fix-/bin/sh - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "configure" - (("-/bin/sh") (string-append "-" (which "bash"))))))))) - (native-inputs `(("pkg-config" ,pkg-config))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-/bin/sh + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "configure" + (("-/bin/sh") (string-append "-" (which "bash"))))))))) + (native-inputs + `(("pkg-config" ,pkg-config))) (inputs `(("curl" ,curl))) (home-page "http://ocurl.forge.ocamlcore.org/") (synopsis "OCaml bindings for libcurl") @@ -1984,6 +2597,9 @@ without a complete in-memory representation of the data.") multitude of other network protocols (FTP/SMTP/RTSP/etc).") (license license:isc))) +(define-public ocaml4.02-ocurl + (package-with-ocaml4.02 ocaml-ocurl)) + (define-public ocaml-base64 (package (name "ocaml-base64") @@ -2005,6 +2621,7 @@ multitude of other network protocols (FTP/SMTP/RTSP/etc).") (delete 'configure)))) (native-inputs `(("topkg" ,ocaml-topkg) + ("ocamlbuild" ,ocamlbuild) ("opam" ,opam) ("rresult" ,ocaml-rresult) ("bos" ,ocaml-bos) @@ -2016,6 +2633,9 @@ that represent binary data in an ASCII string format by translating it into a radix-64 representation. It is specified in RFC 4648.") (license license:isc))) +(define-public ocaml4.02-base64 + (package-with-ocaml4.02 ocaml-base64)) + (define-public ocamlify (package (name "ocamlify") @@ -2029,7 +2649,9 @@ radix-64 representation. It is specified in RFC 4648.") (build-system ocaml-build-system) ; tests are done during build (arguments - `(#:phases + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:phases (modify-phases %standard-phases (delete 'check)))) (home-page "https://forge.ocamlcore.org/projects/ocamlify") @@ -2043,14 +2665,14 @@ OCaml code.") (define-public omake (package (name "omake") - (version "0.10.1") + (version "0.10.3") (source (origin (method url-fetch) (uri (string-append "http://download.camlcity.org/download/" "omake-" version ".tar.gz")) (sha256 (base32 - "093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj")) + "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz")) (patches (search-patches "omake-fix-non-determinism.patch")))) (build-system ocaml-build-system) (arguments @@ -2063,6 +2685,8 @@ OCaml code.") (lambda* (#:key outputs #:allow-other-keys) (substitute* "mk/osconfig_unix.mk" (("CC = cc") "CC = gcc"))))))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-omake)))) (native-inputs `(("hevea" ,hevea))) (home-page "http://projects.camlcity.org/projects/omake.html") (synopsis "Build system designed for scalability and portability") @@ -2084,28 +2708,66 @@ many additional enhancements, including: license:gpl2)))) ; OMake itself, with ocaml linking exception ; see LICENSE.OMake +(define-public ocaml4.02-omake + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant omake)))) + (package + (inherit base) + (version "0.10.2") + (source (origin + (method url-fetch) + (uri (string-append "http://download.camlcity.org/download/" + "omake-" version ".tar.gz")) + (sha256 + (base32 + "1znnlkpz89hk44byvnl1pr92ym6hwfyyw2qm9clq446r6l2z4m64")) + (patches (search-patches "omake-fix-non-determinism.patch"))))))) + (define-public ocaml-batteries (package (name "ocaml-batteries") - (version "2.5.3") + (version "2.9.0") (source (origin (method url-fetch) - (uri (ocaml-forge-uri "batteries" version 1650)) + (uri (string-append "https://github.com/ocaml-batteries-team/" + "batteries-included/releases/download/v" + version "/batteries-" version ".tar.gz")) (sha256 (base32 - "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n")))) + "0lkdmv2my5hirkswmci2cch341n6wkkj2q8apjhs83sg6528caxi")))) (build-system ocaml-build-system) (native-inputs - `(("qtest" ,ocaml-qtest) + `(("ocamlbuild" ,ocamlbuild) + ("qtest" ,ocaml-qtest) ("bisect" ,ocaml-bisect) ("ounit" ,ocaml-ounit))) + (propagated-inputs + `(("ocaml-num" ,ocaml-num))) (arguments `(#:phases (modify-phases %standard-phases (delete 'check) ; tests are run by the build phase (replace 'build - (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "ocaml" "setup.ml" "-build"))))))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((files + (map (lambda (str) + (substring str 0 (- (string-length str) 1))) + (append + (find-files "src" ".*.mliv") + (find-files "src" ".*.mlv") + (find-files "src" ".*.mlp"))))) + (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num" + "-lflag" "-dllpath-all" files) + (for-each (lambda (file) + (copy-file (string-append "_build/" file) file)) + files)) + (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num" + "-lflag" "-dllpath-all" "build/mkconf.byte") + (copy-file "_build/build/mkconf.byte" "build/mkconf.byte") + (invoke "make" "all") + #t))))) + (properties + `((ocaml4.01-variant . ,(delay ocaml4.01-batteries)) + (ocaml4.02-variant . ,(delay ocaml4.02-batteries)))) (home-page "http://batteries.forge.ocamlcore.org/") (synopsis "Development platform for the OCaml programming language") (description "Define a standard set of libraries which may be expected on @@ -2113,8 +2775,24 @@ every compliant installation of OCaml and organize these libraries into a hierarchy of modules.") (license license:lgpl2.1+))) +(define-public ocaml4.02-batteries + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-batteries)))) + (package + (inherit base) + (version "2.5.3") + (source (origin + (method url-fetch) + (uri (ocaml-forge-uri "batteries" version 1650)) + (sha256 + (base32 + "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n")))) + (propagated-inputs '())))) + (define-public ocaml4.01-batteries - (package-with-ocaml4.01 ocaml-batteries)) + (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml4.02-batteries)))) + (package + (inherit base) + (name "ocaml4.01-batteries")))) (define-public ocaml-pcre (package @@ -2139,9 +2817,11 @@ hierarchy of modules.") (lib (string-append out "/lib/ocaml/site-lib/pcre"))) (mkdir-p stubs) (symlink (string-append lib "/dllpcre_stubs.so") - (string-append stubs "/dllpcre_stubs.so")))))))) + (string-append stubs "/dllpcre_stubs.so"))) + #t))))) (native-inputs `(("batteries" ,ocaml-batteries) + ("ocamlbuild" ,ocamlbuild) ("pcre:bin" ,pcre "bin"))) (propagated-inputs `(("pcre" ,pcre))) (home-page "https://mmottl.github.io/pcre-ocaml") @@ -2151,19 +2831,26 @@ matching and substitution, similar to the functionality offered by the Perl language.") (license license:lgpl2.1+))); with the OCaml link exception +(define-public ocaml4.02-pcre + (package-with-ocaml4.02 ocaml-pcre)) + (define-public ocaml-expect (package (name "ocaml-expect") - (version "0.0.5") + (version "0.0.6") (source (origin (method url-fetch) - (uri (ocaml-forge-uri name version 1372)) + (uri (ocaml-forge-uri name version 1736)) (sha256 (base32 - "07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by")))) + "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0")))) + (arguments + `(#:tests? #f)) (build-system ocaml-build-system) (native-inputs - `(("ocaml-pcre" ,ocaml-pcre) + `(("ocamlbuild" ,ocamlbuild) + ("ocaml-num" ,ocaml-num) + ("ocaml-pcre" ,ocaml-pcre) ("ounit" ,ocaml-ounit))) (propagated-inputs `(("batteries" ,ocaml-batteries))) (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/") @@ -2172,18 +2859,22 @@ language.") can match the question using a regular expression or a timeout.") (license license:lgpl2.1+))) ; with the OCaml static compilation exception -(define-public ocaml-fileutils +(define-public ocaml4.02-fileutils (package - (name "ocaml-fileutils") - (version "0.5.1") + (name "ocaml4.02-fileutils") + (version "0.5.3") (source (origin (method url-fetch) - (uri (ocaml-forge-uri name version 1651)) + (uri (ocaml-forge-uri name version 1728)) (sha256 (base32 - "0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g")))) + "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd")))) (build-system ocaml-build-system) - (native-inputs `(("ounit" ,ocaml-ounit))) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib)) + (native-inputs + `(("ounit" ,ocaml4.02-ounit))) (home-page "http://ocaml-fileutils.forge.ocamlcore.org") (synopsis "Pure OCaml functions to manipulate real file and filename") (description "Library to provide pure OCaml functions to manipulate real @@ -2193,20 +2884,20 @@ file (POSIX like) and filename.") (define-public ocaml-oasis (package (name "ocaml-oasis") - (version "0.4.8") + (version "0.4.11") (source (origin (method url-fetch) - (uri (ocaml-forge-uri name version 1669)) + (uri (ocaml-forge-uri name version 1757)) (sha256 (base32 - "1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy")) + "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq")) (modules '((guix build utils))) (snippet '(begin (substitute* "test/test-main/Test.ml" ;; most of these tests fail because ld cannot find crti.o, but according ;; to the log file, the environment variables {LD_,}LIBRARY_PATH - ;; are set correctly whene LD_LIBRARY_PATH is defined beforhand. + ;; are set correctly when LD_LIBRARY_PATH is defined beforhand. (("TestBaseCompat.tests;") "") (("TestExamples.tests;") "") (("TestFull.tests;") "") @@ -2216,17 +2907,12 @@ file (POSIX like) and filename.") (("TestPluginOMake.tests;") "")) #t)))) (build-system ocaml-build-system) + (arguments + `(#:tests? #f)) (native-inputs - `(("ocamlify" ,ocamlify) - ("ocamlmod" ,ocamlmod) - ("ounit" ,ocaml-ounit) - ("omake" ,omake) - ("ocaml-expect" ,ocaml-expect) - ("ocaml-pcre" ,ocaml-pcre) - ("ocaml-fileutils" ,ocaml-fileutils) - ("camlp4" ,camlp4) - ("texlive" ,texlive) - ("pkg-config" ,pkg-config))) + `(("ocamlbuild" ,ocamlbuild) + ("ocamlify" ,ocamlify) + ("ocamlmod" ,ocamlmod))) (home-page "https://oasis.forge.ocamlcore.org") (synopsis "Integrates a configure, build, install system in OCaml projects") (description "OASIS is a tool to integrate a configure, build and install @@ -2234,6 +2920,9 @@ system in your OCaml projects. It helps to create standard entry points in your build system and allows external tools to analyse your project easily.") (license license:lgpl2.1+))) ; with ocaml static compilation exception +(define-public ocaml4.02-oasis + (package-with-ocaml4.02 ocaml-oasis)) + (define-public ocaml-js-build-tools (package (name "ocaml-js-build-tools") @@ -2242,6 +2931,7 @@ build system and allows external tools to analyse your project easily.") "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6")) (native-inputs `(("oasis" ,ocaml-oasis) + ("ocamlbuild" ,ocamlbuild) ("opam" ,opam))) (build-system ocaml-build-system) (arguments janestreet-arguments) @@ -2256,17 +2946,23 @@ from the oasis build log @end enumerate") (license license:asl2.0))) -(define-public ocaml-bin-prot +(define-public ocaml4.02-js-build-tools + (package-with-ocaml4.02 ocaml-js-build-tools)) + +(define-public ocaml4.02-bin-prot (package - (name "ocaml-bin-prot") + (name "ocaml4.02-bin-prot") (version "113.33.03") (source (janestreet-origin "bin_prot" version "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l")) + (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/bin_prot/") (synopsis "Binary protocol generator") (description "This library contains functionality for reading and writing @@ -2277,17 +2973,20 @@ protocol is also heavily optimized for size, making it ideal for long-term storage of large amounts of data.") (license license:asl2.0))) -(define-public ocaml-fieldslib +(define-public ocaml4.02-fieldslib (package - (name "ocaml-fieldslib") + (name "ocaml4.02-fieldslib") (version "113.33.03") (source (janestreet-origin "fieldslib" version "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv")) + (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/fieldslib/") (synopsis "Syntax extension to record fields") (description "Syntax extension to define first class values representing @@ -2295,18 +2994,21 @@ record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values.") (license license:asl2.0))) -(define-public ocaml-ppx-core +(define-public ocaml4.02-ppx-core (package - (name "ocaml-ppx-core") + (name "ocaml4.02-ppx-core") (version "113.33.03") (source (janestreet-origin "ppx_core" version "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (inputs `(("ppx-tools" ,ocaml-ppx-tools))) - (arguments janestreet-arguments) + (inputs `(("ppx-tools" ,ocaml4.02-ppx-tools))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_core/") (synopsis "Standard library for ppx rewriters") (description "Ppx_core is a standard library for OCaml AST transformers. @@ -2319,20 +3021,23 @@ It contains: @end enumerate") (license license:asl2.0))) -(define-public ocaml-ppx-optcomp +(define-public ocaml4.02-ppx-optcomp (package - (name "ocaml-ppx-optcomp") + (name "ocaml4.02-ppx-optcomp") (version "113.33.03") (source (janestreet-origin "ppx_optcomp" version "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_optcomp/") (synopsis "Optional compilation for OCaml") (description "Ppx_optcomp stands for Optional Compilation. It is a tool @@ -2340,21 +3045,24 @@ used to handle optional compilations of pieces of code depending of the word size, the version of the compiler, ...") (license license:asl2.0))) -(define-public ocaml-ppx-driver +(define-public ocaml4.02-ppx-driver (package - (name "ocaml-ppx-driver") + (name "ocaml4.02-ppx-driver") (version "113.33.03") (source (janestreet-origin "ppx_driver" version "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-optcomp" ,ocaml-ppx-optcomp))) + ("ppx-optcomp" ,ocaml4.02-ppx-optcomp))) (propagated-inputs - `(("ppx-optcomp" ,ocaml-ppx-optcomp) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-optcomp" ,ocaml4.02-ppx-optcomp) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_driver/") (synopsis "Feature-full driver for OCaml AST transformers") (description "A driver is an executable created from a set of OCaml AST @@ -2372,21 +3080,33 @@ provide a tool that can be used to: (define-public ocaml-cppo (package (name "ocaml-cppo") - (version "1.4.1") + (version "1.6.5") (source (origin (method url-fetch) (uri (string-append "https://github.com/mjambon/cppo/archive/v" version ".tar.gz")) (sha256 (base32 - "02gma6nw09vfnd6h7bl3n70lwz7m9z2svplxyfh6h5bf4lqgqzjv")) + "1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (arguments - `(#:phases (modify-phases %standard-phases (delete 'configure)) - #:make-flags (list (string-append "BINDIR=" - (assoc-ref %outputs "out") "/bin")) + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "dune" "build" "@install" "--profile" "release") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))) #:tests? #f)) + (native-inputs + `(("dune" ,dune) + ("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/mjambon/cppo") (synopsis "Equivalent of the C preprocessor for OCaml programs") (description "Cppo is an equivalent of the C preprocessor for OCaml @@ -2399,11 +3119,14 @@ programs. It allows the definition of simple macros and file inclusion. Cpp oi @end enumerate") (license license:bsd-3))) +(define-public ocaml4.02-cppo + (package-with-ocaml4.02 ocaml-cppo)) + ;; this package is not reproducible. This is related to temporary filenames ;; such as findlib_initxxxxx where xxxxx is random. -(define-public ocaml-ppx-deriving +(define-public ocaml4.02-ppx-deriving (package - (name "ocaml-ppx-deriving") + (name "ocaml4.02-ppx-deriving") (version "4.1") (source (origin @@ -2415,15 +3138,17 @@ programs. It allows the definition of simple macros and file inclusion. Cpp oi (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) - ("cppo" ,ocaml-cppo) - ("ounit" ,ocaml-ounit) + `(("js-build-tools" ,ocaml4.02-js-build-tools) + ("cppo" ,ocaml4.02-cppo) + ("ounit" ,ocaml4.02-ounit) ("opam" ,opam))) (propagated-inputs - `(("result" ,ocaml-result) - ("ppx-tools" ,ocaml-ppx-tools))) + `(("result" ,ocaml4.02-result) + ("ppx-tools" ,ocaml4.02-ppx-tools))) (arguments - `(#:phases + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:phases (modify-phases %standard-phases (delete 'configure) (add-before 'install 'fix-environment @@ -2438,90 +3163,100 @@ programs. It allows the definition of simple macros and file inclusion. Cpp oi code based on type definitions, and a set of useful plugins for common tasks.") (license license:expat))) -(define-public ocaml-ppx-type-conv +(define-public ocaml4.02-ppx-type-conv (package - (name "ocaml-ppx-type-conv") + (name "ocaml4.02-ppx-type-conv") (version "113.33.03") (source (janestreet-origin "ppx_type_conv" version "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-deriving" ,ocaml-ppx-deriving) - ("ppx-tools" ,ocaml-ppx-tools) - ("result" ,ocaml-result) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-driver" ,ocaml-ppx-driver))) - (arguments janestreet-arguments) + `(("ppx-deriving" ,ocaml4.02-ppx-deriving) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-driver" ,ocaml4.02-ppx-driver))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_type_conv/") (synopsis "Support Library for type-driven code generators") (description "The type_conv library factors out functionality needed by different preprocessors that generate code from type specifications.") (license license:asl2.0))) -(define-public ocaml-ppx-inline-test +(define-public ocaml4.02-ppx-inline-test (package - (name "ocaml-ppx-inline-test") + (name "ocaml4.02-ppx-inline-test") (version "113.33.03") (source (janestreet-origin "ppx_inline_test" version "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-core" ,ocaml-ppx-core))) + ("ppx-core" ,ocaml4.02-ppx-core))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_inline_test/") (synopsis "Syntax extension for writing in-line tests in ocaml code") (description "Syntax extension for writing in-line tests in ocaml code.") (license license:asl2.0))) -(define-public ocaml-ppx-bench +(define-public ocaml4.02-ppx-bench (package - (name "ocaml-ppx-bench") + (name "ocaml4.02-ppx-bench") (version "113.33.03") (source (janestreet-origin "ppx_bench" version "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-core" ,ocaml-ppx-core))) + ("ppx-core" ,ocaml4.02-ppx-core))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-inline-test" ,ocaml-ppx-inline-test) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-inline-test" ,ocaml4.02-ppx-inline-test) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_bench/") (synopsis "Syntax extension for writing in-line benchmarks in ocaml code") (description "Syntax extension for writing in-line benchmarks in ocaml code.") (license license:asl2.0))) -(define-public ocaml-ppx-compare +(define-public ocaml4.02-ppx-compare (package - (name "ocaml-ppx-compare") + (name "ocaml4.02-ppx-compare") (version "113.33.03") (source (janestreet-origin "ppx_compare" version "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-core" ,ocaml-ppx-core))) + ("ppx-core" ,ocaml4.02-ppx-core))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-type-conv" ,ocaml-ppx-type-conv))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_compare/") (synopsis "Generation of comparison functions from types") (description "Generation of fast comparison functions from type expressions @@ -2532,94 +3267,109 @@ flexibility by allowing you to override them for a specific type and more safety by making sure that you only compare comparable values.") (license license:asl2.0))) -(define-public ocaml-sexplib +(define-public ocaml4.02-sexplib (package - (name "ocaml-sexplib") + (name "ocaml4.02-sexplib") (version "113.33.03") (source (janestreet-origin "sexplib" version "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/sexplib/") (synopsis "Library for serializing OCaml values to and from S-expressions") (description "Sexplib contains functionality for parsing and pretty-printing s-expressions.") (license license:asl2.0))) -(define-public ocaml-typerep +(define-public ocaml4.02-typerep (package - (name "ocaml-typerep") + (name "ocaml4.02-typerep") (version "113.33.03") (source (janestreet-origin "typerep" version "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy")) + (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/typerep/") (synopsis "Typerep is a library for runtime types") (description "Typerep is a library for runtime types.") (license license:asl2.0))) -(define-public ocaml-variantslib +(define-public ocaml4.02-variantslib (package - (name "ocaml-variantslib") + (name "ocaml4.02-variantslib") (version "113.33.03") (source (janestreet-origin "variantslib" version "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n")) + (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) - (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/variantslib") (synopsis "OCaml variants as first class values") (description "OCaml variants as first class values.") (license license:asl2.0))) -(define-public ocaml-ppx-sexp-conv +(define-public ocaml4.02-ppx-sexp-conv (package - (name "ocaml-ppx-sexp-conv") + (name "ocaml4.02-ppx-sexp-conv") (version "113.33.03") (source (janestreet-origin "ppx_sexp_conv" version "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-core" ,ocaml-ppx-core))) + ("ppx-core" ,ocaml4.02-ppx-core))) (propagated-inputs - `(("sexplib" ,ocaml-sexplib) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-type-conv" ,ocaml-ppx-type-conv) - ("ppx-tools" ,ocaml-ppx-tools))) - (arguments janestreet-arguments) + `(("sexplib" ,ocaml4.02-sexplib) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv) + ("ppx-tools" ,ocaml4.02-ppx-tools))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_sexp_conv") (synopsis "Generation of S-expression conversion functions from type definitions") (description "Generation of S-expression conversion functions from type definitions.") (license license:asl2.0))) -(define-public ocaml-ppx-variants-conv +(define-public ocaml4.02-ppx-variants-conv (package - (name "ocaml-ppx-variants-conv") + (name "ocaml4.02-ppx-variants-conv") (version "113.33.03") (source (janestreet-origin "ppx_variants_conv" version "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-core" ,ocaml-ppx-core) - ("variantslib" ,ocaml-variantslib) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-type-conv" ,ocaml-ppx-type-conv))) - (arguments janestreet-arguments) + `(("ppx-core" ,ocaml4.02-ppx-core) + ("variantslib" ,ocaml4.02-variantslib) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_variants_conv") (synopsis "Generation of accessor and iteration functions for ocaml variant types") @@ -2627,65 +3377,74 @@ types") variant types.") (license license:asl2.0))) -(define-public ocaml-ppx-here +(define-public ocaml4.02-ppx-here (package - (name "ocaml-ppx-here") + (name "ocaml4.02-ppx-here") (version "113.33.03") (source (janestreet-origin "ppx_here" version "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_here") (synopsis "Expands [%here] into its location") (description "Expands [%here] into its location.") (license license:asl2.0))) -(define-public ocaml-ppx-assert +(define-public ocaml4.02-ppx-assert (package - (name "ocaml-ppx-assert") + (name "ocaml4.02-ppx-assert") (version "113.33.03") (source (janestreet-origin "ppx_assert" version "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-compare" ,ocaml-ppx-compare) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-driver" ,ocaml-ppx-driver) - ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-type-conv" ,ocaml-ppx-type-conv) - ("ppx-sexplib" ,ocaml-sexplib) - ("ppx-here" ,ocaml-ppx-here))) - (arguments janestreet-arguments) + `(("ppx-compare" ,ocaml4.02-ppx-compare) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv) + ("ppx-sexplib" ,ocaml4.02-sexplib) + ("ppx-here" ,ocaml4.02-ppx-here))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_assert") (synopsis "Assert-like extension nodes that raise useful errors on failure") (description "Assert-like extension nodes that raise useful errors on failure.") (license license:asl2.0))) -(define-public ocaml-ppx-enumerate +(define-public ocaml4.02-ppx-enumerate (package - (name "ocaml-ppx-enumerate") + (name "ocaml4.02-ppx-enumerate") (version "113.33.03") (source (janestreet-origin "ppx_enumerate" version "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-tools" ,ocaml-ppx-tools) - ("ppx-type-conv" ,ocaml-ppx-type-conv) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_enumerate") (synopsis "Generate a list containing all values of a finite type") (description "Ppx_enumerate is a ppx rewriter which generates a definition @@ -2693,174 +3452,198 @@ for the list of all values of a type (for a type which only has finitely many values).") (license license:asl2.0))) -(define-public ocaml-ppx-let +(define-public ocaml4.02-ppx-let (package - (name "ocaml-ppx-let") + (name "ocaml4.02-ppx-let") (version "113.33.03") (source (janestreet-origin "ppx_let" version "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_let") (synopsis "Monadic let-bindings") (description "A ppx rewriter for monadic and applicative let bindings, match expressions, and if expressions.") (license license:asl2.0))) -(define-public ocaml-ppx-typerep-conv +(define-public ocaml4.02-ppx-typerep-conv (package - (name "ocaml-ppx-typerep-conv") + (name "ocaml4.02-ppx-typerep-conv") (version "113.33.03") (source (janestreet-origin "ppx_typerep_conv" version "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-tools" ,ocaml-ppx-tools) - ("ppx-type-conv" ,ocaml-ppx-type-conv) - ("ppx-core" ,ocaml-ppx-core) - ("typerep" ,ocaml-typerep))) - (arguments janestreet-arguments) + `(("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv) + ("ppx-core" ,ocaml4.02-ppx-core) + ("typerep" ,ocaml4.02-typerep))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_typerep_conv") (synopsis "Generation of runtime types from type declarations") (description "Automatic generation of runtime types from type definitions.") (license license:asl2.0))) -(define-public ocaml-ppx-sexp-value +(define-public ocaml4.02-ppx-sexp-value (package - (name "ocaml-ppx-sexp-value") + (name "ocaml4.02-ppx-sexp-value") (version "113.33.03") (source (janestreet-origin "ppx_sexp_value" version "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-here" ,ocaml-ppx-here) - ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-here" ,ocaml4.02-ppx-here) + ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_sexp_value/") (synopsis "Simplify building s-expressions from ocaml values") (description "A ppx rewriter that simplifies building s-expressions from ocaml values.") (license license:asl2.0))) -(define-public ocaml-ppx-pipebang +(define-public ocaml4.02-ppx-pipebang (package - (name "ocaml-ppx-pipebang") + (name "ocaml4.02-ppx-pipebang") (version "113.33.03") (source (janestreet-origin "ppx_pipebang" version "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_pipebang/") (synopsis "Inline reverse application operators `|>` and `|!`") (description "A ppx rewriter that inlines reverse application operators @code{|>} and @code{|!}.") (license license:asl2.0))) -(define-public ocaml-ppx-bin-prot +(define-public ocaml4.02-ppx-bin-prot (package - (name "ocaml-ppx-bin-prot") + (name "ocaml4.02-ppx-bin-prot") (version "113.33.03") (source (janestreet-origin "ppx_bin_prot" version "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("bin-prot" ,ocaml-bin-prot) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-type-conv" ,ocaml-ppx-type-conv) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("bin-prot" ,ocaml4.02-bin-prot) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_bin_prot/") (synopsis "Generation of bin_prot readers and writers from types") (description "Generation of binary serialization and deserialization functions from type definitions.") (license license:asl2.0))) -(define-public ocaml-ppx-fail +(define-public ocaml4.02-ppx-fail (package - (name "ocaml-ppx-fail") + (name "ocaml4.02-ppx-fail") (version "113.33.03") (source (janestreet-origin "ppx_fail" version "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-here" ,ocaml-ppx-here) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-here" ,ocaml4.02-ppx-here) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_fail/") (synopsis "Add location to calls to failwiths") (description "Syntax extension that makes [failwiths] always include a position.") (license license:asl2.0))) -(define-public ocaml-ppx-custom-printf +(define-public ocaml4.02-ppx-custom-printf (package - (name "ocaml-ppx-custom-printf") + (name "ocaml4.02-ppx-custom-printf") (version "113.33.03") (source (janestreet-origin "ppx_custom_printf" version "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-driver" ,ocaml-ppx-driver))) - (arguments janestreet-arguments) + `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-driver" ,ocaml4.02-ppx-driver))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_custom_printf/") (synopsis "Printf-style format-strings for user-defined string conversion") (description "Extensions to printf-style format-strings for user-defined string conversion.") (license license:asl2.0))) -(define-public ocaml-ppx-sexp-message +(define-public ocaml4.02-ppx-sexp-message (package - (name "ocaml-ppx-sexp-message") + (name "ocaml4.02-ppx-sexp-message") (version "113.33.03") (source (janestreet-origin "ppx_sexp_message" version "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-driver" ,ocaml-ppx-driver) - ("ppx-here" ,ocaml-ppx-here) - ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core))) - (arguments janestreet-arguments) + `(("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-here" ,ocaml4.02-ppx-here) + ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_sexp_message/") (synopsis "A ppx rewriter for easy construction of s-expressions") (description "Ppx_sexp_message aims to ease the creation of s-expressions @@ -2869,23 +3652,26 @@ where one needs to construct a s-expression based on various element of the context such as function arguments.") (license license:asl2.0))) -(define-public ocaml-ppx-fields-conv +(define-public ocaml4.02-ppx-fields-conv (package - (name "ocaml-ppx-fields-conv") + (name "ocaml4.02-ppx-fields-conv") (version "113.33.03") (source (janestreet-origin "ppx_fields_conv" version "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam) - ("ppx-core" ,ocaml-ppx-core))) + ("ppx-core" ,ocaml4.02-ppx-core))) (propagated-inputs - `(("fieldslib" ,ocaml-fieldslib) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-type-conv" ,ocaml-ppx-type-conv))) - (arguments janestreet-arguments) + `(("fieldslib" ,ocaml4.02-fieldslib) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-type-conv" ,ocaml4.02-ppx-type-conv))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_fields_conv/") (synopsis "Generation of accessor and iteration functions for ocaml records") (description "Ppx_fields_conv is a ppx rewriter that can be used to define @@ -2894,10 +3680,59 @@ and set record fields, iterate and fold over all fields of a record and create new record values.") (license license:asl2.0))) +(define-public ocaml-seq + (package + (name "ocaml-seq") + (version "0.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/c-cube/seq/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "02lb2d9i12bxrz2ba5wygk2bycan316skqlyri0597q7j9210g8r")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((install-dir (string-append (assoc-ref outputs "out") + "/lib/ocaml/site-lib/seq"))) + (mkdir-p install-dir) + (with-output-to-file (string-append install-dir "/META") + (lambda _ + (display "name=\"seq\" +version=\"[distributed with ocaml]\" +description=\"dummy package for compatibility\" +requires=\"\""))) + #t)))))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-seq)))) + (home-page "https://github.com/c-cube/seq") + (synopsis "OCaml's standard iterator type") + (description "This package is a compatibility package for OCaml's +standard iterator type starting from 4.07.") + (license license:lgpl2.1+))) + +(define-public ocaml4.02-seq + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-seq)))) + (package + (inherit base) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:tests? #f; no tests + #:phases (modify-phases %standard-phases (delete 'configure))))))) + (define-public ocaml-re (package (name "ocaml-re") - (version "1.7.1") + (version "1.8.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/ocaml/ocaml-re//archive/" @@ -2905,9 +3740,27 @@ new record values.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1s3rcr76cgm4p1xmaazc58arkg2lz3zfcp1icm00m6s5ccnkh67b")))) + "1pdb0mr6z5ax6szblr3f5lbdnqq9grm97cmsfjmdma60yrx2rqhd")))) (build-system ocaml-build-system) - (native-inputs `(("ounit" ,ocaml-ounit))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "dune" "build" "@install" "--profile" "release") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (propagated-inputs + `(("ocaml-seq" ,ocaml-seq))) + (native-inputs + `(("dune" ,dune) + ("ounit" ,ocaml-ounit))) (home-page "https://github.com/ocaml/ocaml-re/") (synopsis "Regular expression library for OCaml") (description "Pure OCaml regular expressions with: @@ -2920,32 +3773,38 @@ new record values.") @end enumerate") (license license:expat))) -(define-public ocaml-ppx-expect +(define-public ocaml4.02-re + (package-with-ocaml4.02 ocaml-re)) + +(define-public ocaml4.02-ppx-expect (package - (name "ocaml-ppx-expect") + (name "ocaml4.02-ppx-expect") (version "113.33.03") (source (janestreet-origin "ppx_expect" version "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("fieldslib" ,ocaml-fieldslib) - ("ppx-tools" ,ocaml-ppx-tools) - ("ppx-assert" ,ocaml-ppx-assert) - ("ppx-compare" ,ocaml-ppx-compare) - ("ppx-core" ,ocaml-ppx-core) - ("ppx-custom-printf" ,ocaml-ppx-custom-printf) - ("ppx-driver" ,ocaml-ppx-driver) - ("ppx-fields-conv" ,ocaml-ppx-fields-conv) - ("ppx-inline-test" ,ocaml-ppx-inline-test) - ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-variants-conv" ,ocaml-ppx-variants-conv) - ("re" ,ocaml-re) - ("sexplib" ,ocaml-sexplib) - ("variantslib" ,ocaml-variantslib))) - (arguments janestreet-arguments) + `(("fieldslib" ,ocaml4.02-fieldslib) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("ppx-assert" ,ocaml4.02-ppx-assert) + ("ppx-compare" ,ocaml4.02-ppx-compare) + ("ppx-core" ,ocaml4.02-ppx-core) + ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf) + ("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv) + ("ppx-inline-test" ,ocaml4.02-ppx-inline-test) + ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv) + ("re" ,ocaml4.02-re) + ("sexplib" ,ocaml4.02-sexplib) + ("variantslib" ,ocaml4.02-variantslib))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_expect/") (synopsis "Cram like framework for OCaml") (description "Expect-test is a framework for writing tests in OCaml, similar @@ -2955,66 +3814,72 @@ output-generating code, interleaved with %expect extension expressions to denote the expected output.") (license license:asl2.0))) -(define-public ocaml-ppx-jane +(define-public ocaml4.02-ppx-jane (package - (name "ocaml-ppx-jane") + (name "ocaml4.02-ppx-jane") (version "113.33.03") (source (janestreet-origin "ppx_jane" version "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl")) (build-system ocaml-build-system) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) + `(("js-build-tools" ,ocaml4.02-js-build-tools) ("opam" ,opam))) (propagated-inputs - `(("ppx-assert" ,ocaml-ppx-assert) - ("ppx-bench" ,ocaml-ppx-bench) - ("ppx-bin-prot" ,ocaml-ppx-bin-prot) - ("ppx-compare" ,ocaml-ppx-compare) - ("ppx-custom-printf" ,ocaml-ppx-custom-printf) - ("ppx-deriving" ,ocaml-ppx-deriving) - ("ppx-enumerate" ,ocaml-ppx-enumerate) - ("ppx-expect" ,ocaml-ppx-expect) - ("ppx-fail" ,ocaml-ppx-fail) - ("ppx-fields-conv" ,ocaml-ppx-fields-conv) - ("ppx-here" ,ocaml-ppx-here) - ("ppx-inline-test" ,ocaml-ppx-inline-test) - ("ppx-let" ,ocaml-ppx-let) - ("ppx-pipebang" ,ocaml-ppx-pipebang) - ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("ppx-sexp-message" ,ocaml-ppx-sexp-message) - ("ppx-sexp-value" ,ocaml-ppx-sexp-value) - ("ppx-typerep-conv" ,ocaml-ppx-typerep-conv) - ("ppx-variants-conv" ,ocaml-ppx-variants-conv))) - (arguments janestreet-arguments) + `(("ppx-assert" ,ocaml4.02-ppx-assert) + ("ppx-bench" ,ocaml4.02-ppx-bench) + ("ppx-bin-prot" ,ocaml4.02-ppx-bin-prot) + ("ppx-compare" ,ocaml4.02-ppx-compare) + ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf) + ("ppx-deriving" ,ocaml4.02-ppx-deriving) + ("ppx-enumerate" ,ocaml4.02-ppx-enumerate) + ("ppx-expect" ,ocaml4.02-ppx-expect) + ("ppx-fail" ,ocaml4.02-ppx-fail) + ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv) + ("ppx-here" ,ocaml4.02-ppx-here) + ("ppx-inline-test" ,ocaml4.02-ppx-inline-test) + ("ppx-let" ,ocaml4.02-ppx-let) + ("ppx-pipebang" ,ocaml4.02-ppx-pipebang) + ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("ppx-sexp-message" ,ocaml4.02-ppx-sexp-message) + ("ppx-sexp-value" ,ocaml4.02-ppx-sexp-value) + ("ppx-typerep-conv" ,ocaml4.02-ppx-typerep-conv) + ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv))) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/ppx_jane/") (synopsis "Standard Jane Street ppx rewriters") (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.") (license license:asl2.0))) -(define-public ocaml-core-kernel +(define-public ocaml4.02-core-kernel (package - (name "ocaml-core-kernel") + (name "ocaml4.02-core-kernel") (version "113.33.03") (source (janestreet-origin "core_kernel" version "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y")) (native-inputs - `(("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + `(("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("bin_prot" ,ocaml-bin-prot) - ("ppx-assert" ,ocaml-ppx-assert) - ("ppx-bench" ,ocaml-ppx-bench) - ("ppx-driver" ,ocaml-ppx-driver) - ("ppx-expect" ,ocaml-ppx-expect) - ("ppx-inline-test" ,ocaml-ppx-inline-test) - ("typerep" ,ocaml-typerep) - ("sexplib" ,ocaml-sexplib) - ("variantslib" ,ocaml-variantslib) - ("result" ,ocaml-result) - ("fieldslib" ,ocaml-fieldslib))) + `(("bin_prot" ,ocaml4.02-bin-prot) + ("ppx-assert" ,ocaml4.02-ppx-assert) + ("ppx-bench" ,ocaml4.02-ppx-bench) + ("ppx-driver" ,ocaml4.02-ppx-driver) + ("ppx-expect" ,ocaml4.02-ppx-expect) + ("ppx-inline-test" ,ocaml4.02-ppx-inline-test) + ("typerep" ,ocaml4.02-typerep) + ("sexplib" ,ocaml4.02-sexplib) + ("variantslib" ,ocaml4.02-variantslib) + ("result" ,ocaml4.02-result) + ("fieldslib" ,ocaml4.02-fieldslib))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/core_kernel/") (synopsis "Portable standard library for OCaml") (description "Core is an alternative to the OCaml standard library. @@ -3023,127 +3888,145 @@ Core_kernel is the system-independent part of Core. It is aimed for cases when the full Core is not available, such as in Javascript.") (license license:asl2.0))) -(define-public ocaml-async-kernel +(define-public ocaml4.02-async-kernel (package - (name "ocaml-async-kernel") + (name "ocaml4.02-async-kernel") (version "113.33.03") (source (janestreet-origin "async_kernel" version "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("core-kernel" ,ocaml-core-kernel))) + `(("core-kernel" ,ocaml4.02-core-kernel))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/async_kernel/") (synopsis "Monadic concurrency library") (description "Async-kernel is a library for concurrent programming in OCaml.") (license license:asl2.0))) -(define-public ocaml-async-rpc-kernel +(define-public ocaml4.02-async-rpc-kernel (package - (name "ocaml-async-rpc-kernel") + (name "ocaml4.02-async-rpc-kernel") (version "113.33.03") (source (janestreet-origin "async_rpc_kernel" version "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("async-kernel" ,ocaml-async-kernel))) + `(("async-kernel" ,ocaml4.02-async-kernel))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/async_rpc_kernel/") (synopsis "Platform-independent core of the Async RPC library") (description "Async_rpc_kernel is the platform-independent core of the Async RPC library.") (license license:asl2.0))) -(define-public ocaml-core +(define-public ocaml4.02-core (package - (name "ocaml-core") + (name "ocaml4.02-core") (version "113.33.03") (source (janestreet-origin "core" version "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("core-kernel" ,ocaml-core-kernel))) + `(("core-kernel" ,ocaml4.02-core-kernel))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/core/") (synopsis "Alternative to OCaml's standard library") (description "The Core suite of libraries is an alternative to OCaml's standard library that was developed by Jane Street.") (license license:asl2.0))) -(define-public ocaml-async-unix +(define-public ocaml4.02-async-unix (package - (name "ocaml-async-unix") + (name "ocaml4.02-async-unix") (version "113.33.03") (source (janestreet-origin "async_unix" version "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("async-kernel" ,ocaml-async-kernel) - ("core" ,ocaml-core))) + `(("async-kernel" ,ocaml4.02-async-kernel) + ("core" ,ocaml4.02-core))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/async_unix") (synopsis "Asynchronous execution library for Unix") (description "Async_unix is an asynchronous execution library for Unix.") (license license:asl2.0))) -(define-public ocaml-async-extra +(define-public ocaml4.02-async-extra (package - (name "ocaml-async-extra") + (name "ocaml4.02-async-extra") (version "113.33.03") (source (janestreet-origin "async_extra" version "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("async-rpc-kernel" ,ocaml-async-rpc-kernel) - ("async-unix" ,ocaml-async-unix) - ("core" ,ocaml-core))) + `(("async-rpc-kernel" ,ocaml4.02-async-rpc-kernel) + ("async-unix" ,ocaml4.02-async-unix) + ("core" ,ocaml4.02-core))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/async_extra") (synopsis "Extra functionnalities for the async library") (description "Async_extra provides additional functionnalities for the async library.") (license license:asl2.0))) -(define-public ocaml-async +(define-public ocaml4.02-async (package - (name "ocaml-async") + (name "ocaml4.02-async") (version "113.33.03") (source (janestreet-origin "async" version "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25")) (native-inputs `(("oasis" ,ocaml-oasis) - ("js-build-tools" ,ocaml-js-build-tools) - ("ppx-jane" ,ocaml-ppx-jane) + ("js-build-tools" ,ocaml4.02-js-build-tools) + ("ppx-jane" ,ocaml4.02-ppx-jane) ("opam" ,opam))) (propagated-inputs - `(("async-extra" ,ocaml-async-extra))) + `(("async-extra" ,ocaml4.02-async-extra))) (build-system ocaml-build-system) - (arguments janestreet-arguments) + (arguments + (ensure-keyword-arguments janestreet-arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib))) (home-page "https://github.com/janestreet/async") (synopsis "Monadic concurrency library") (description "Async is a library for concurrent programming in OCaml.") @@ -3162,7 +4045,9 @@ async library.") "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) - (native-inputs `(("cppo" ,ocaml-cppo))) + (native-inputs + `(("cppo" ,ocaml-cppo) + ("ocamlbuild" ,ocamlbuild))) (home-page "https://github.com/OCamlPro/ocplib-endian") (synopsis "Optimised functions to read and write int16/32/64 from strings and bigarrays") @@ -3172,9 +4057,12 @@ strings, bytes and bigstring (Bigarrys of chars), and provides submodules for big- and little-endian, with their unsafe counter-parts.") (license license:lgpl2.1))) -(define-public ocaml-cstruct +(define-public ocaml4.02-ocplib-endian + (package-with-ocaml4.02 ocaml-ocplib-endian)) + +(define-public ocaml4.02-cstruct (package - (name "ocaml-cstruct") + (name "ocaml4.02-cstruct") (version "2.3.1") (source (origin (method url-fetch) @@ -3186,7 +4074,9 @@ big- and little-endian, with their unsafe counter-parts.") (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (arguments - `(#:configure-flags + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:configure-flags (list "--enable-lwt" "--enable-async") #:phases (modify-phases %standard-phases @@ -3199,14 +4089,14 @@ big- and little-endian, with their unsafe counter-parts.") (symlink (string-append lib "/dllcstruct_stubs.so") (string-append stubs "/dllcstruct_stubs.so")))))))) (native-inputs - `(("ounit" ,ocaml-ounit) - ("ppx-tools" ,ocaml-ppx-tools) - ("camlp4" ,camlp4))) + `(("ounit" ,ocaml4.02-ounit) + ("ppx-tools" ,ocaml4.02-ppx-tools) + ("camlp4" ,camlp4-4.02))) (propagated-inputs - `(("ocplib-endian" ,ocaml-ocplib-endian) - ("lwt" ,ocaml-lwt) - ("async" ,ocaml-async) - ("sexplib" ,ocaml-sexplib))) + `(("ocplib-endian" ,ocaml4.02-ocplib-endian) + ("lwt" ,ocaml4.02-lwt) + ("async" ,ocaml4.02-async) + ("sexplib" ,ocaml4.02-sexplib))) (home-page "https://github.com/mirage/ocaml-cstruct") (synopsis "Access C structures via a camlp4 extension") (description "Cstruct is a library and syntax extension to make it easier @@ -3214,9 +4104,9 @@ to access C-like structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the Bigarray module.") (license license:isc))) -(define-public ocaml-hex +(define-public ocaml4.02-hex (package - (name "ocaml-hex") + (name "ocaml4.02-hex") (version "1.0.0") (source (origin (method url-fetch) @@ -3227,15 +4117,19 @@ writing to these structures, and they are accessed via the Bigarray module.") "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) - (propagated-inputs `(("cstruct" ,ocaml-cstruct))) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib)) + (propagated-inputs + `(("cstruct" ,ocaml4.02-cstruct))) (home-page "https://github.com/mirage/ocaml-hex/") (synopsis "Minimal library providing hexadecimal converters") (description "Hex is a minimal library providing hexadecimal converters.") (license license:isc))) -(define-public ocaml-ezjsonm +(define-public ocaml4.02-ezjsonm (package - (name "ocaml-ezjsonm") + (name "ocaml4.02-ezjsonm") (version "0.4.3") (source (origin (method url-fetch) @@ -3247,14 +4141,16 @@ writing to these structures, and they are accessed via the Bigarray module.") (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (native-inputs - `(("alcotest" ,ocaml-alcotest))) + `(("alcotest" ,ocaml4.02-alcotest))) (propagated-inputs - `(("hex" ,ocaml-hex) - ("jsonm" ,ocaml-jsonm) - ("lwt" ,ocaml-lwt) - ("sexplib" ,ocaml-sexplib))) + `(("hex" ,ocaml4.02-hex) + ("jsonm" ,ocaml4.02-jsonm) + ("lwt" ,ocaml4.02-lwt) + ("sexplib" ,ocaml4.02-sexplib))) (arguments - `(#:configure-flags (list "--enable-lwt"))) + `(#:configure-flags (list "--enable-lwt") + #:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib)) (home-page "https://github.com/mirage/ezjsonm/") (synopsis "Read and write JSON data") (description "Ezjsonm provides more convenient (but far less flexible) input @@ -3263,9 +4159,9 @@ the need to write signal code, which is useful for quick scripts that manipulate JSON.") (license license:isc))) -(define-public ocaml-uri +(define-public ocaml4.02-uri (package - (name "ocaml-uri") + (name "ocaml4.02-uri") (version "1.9.2") (source (origin (method url-fetch) @@ -3276,14 +4172,17 @@ JSON.") "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib)) (native-inputs - `(("ounit" ,ocaml-ounit))) + `(("ounit" ,ocaml4.02-ounit))) (propagated-inputs - `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) - ("re" ,ocaml-re) - ("ppx-deriving" ,ocaml-ppx-deriving) - ("sexplib" ,ocaml-sexplib) - ("stringext" ,ocaml-stringext))) + `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv) + ("re" ,ocaml4.02-re) + ("ppx-deriving" ,ocaml4.02-ppx-deriving) + ("sexplib" ,ocaml4.02-sexplib) + ("stringext" ,ocaml4.02-stringext))) (home-page "https://github.com/mirage/ocaml-uri") (synopsis "RFC3986 URI/URL parsing library") (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.") @@ -3312,6 +4211,9 @@ JSON.") Format module of the OCaml standard library.") (license license:bsd-3))) +(define-public ocaml4.02-easy-format + (package-with-ocaml4.02 ocaml-easy-format)) + (define-public optcomp (package (name "optcomp") @@ -3326,13 +4228,15 @@ Format module of the OCaml standard library.") (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (arguments - `(#:use-make? #t + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:use-make? #t #:make-flags (list (string-append "BUILDFLAGS=\"-cflags -I," (assoc-ref %build-inputs "camlp4") "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\"")))) - (native-inputs `(("camlp4" ,camlp4))) - (propagated-inputs `(("camlp4" ,camlp4))) + (native-inputs `(("camlp4" ,camlp4-4.02))) + (propagated-inputs `(("camlp4" ,camlp4-4.02))) (home-page "https://github.com/diml/optcomp") (synopsis "Optional compilation for OCaml") (description "Optcomp provides an optional compilation facility with @@ -3342,14 +4246,14 @@ cpp-like directives.") (define-public ocaml-piqilib (package (name "ocaml-piqilib") - (version "0.6.13") + (version "0.6.14") (source (origin (method url-fetch) (uri (string-append "https://github.com/alavrik/piqi/archive/v" version ".tar.gz")) (sha256 (base32 - "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l")) + "1ssccnwqzfyf7syfq2fv4zyhwayxwd75rhq9y28mvq1w6qbww4l7")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (arguments @@ -3365,14 +4269,17 @@ cpp-like directives.") (let ((out (assoc-ref outputs "out"))) (substitute* "make/OCamlMakefile" (("/bin/sh") (which "bash"))) - (zero? (system* "./configure" "--prefix" out "--ocaml-libdir" - (string-append out "/lib/ocaml/site-lib")))))) + (invoke "./configure" "--prefix" out "--ocaml-libdir" + (string-append out "/lib/ocaml/site-lib"))) + #t)) (add-after 'build 'build-ocaml (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "make" "ocaml")))) + (invoke "make" "ocaml") + #t)) (add-after 'install 'install-ocaml (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "make" "ocaml-install")))) + (invoke "make" "ocaml-install") + #t)) (add-after 'install-ocaml 'link-stubs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -3388,15 +4295,18 @@ cpp-like directives.") (propagated-inputs `(("xmlm" ,ocaml-xmlm) ("ulex" ,ocaml-ulex) - ("optcomp" ,optcomp) ("easy-format" ,ocaml-easy-format) ("base64" ,ocaml-base64))) + (home-page "http://www.cduce.org/download.html#side") (home-page "http://piqi.org") (synopsis "Data serialization and conversion library") (description "Piqilib is the common library used by the piqi command-line tool and piqi-ocaml.") (license license:asl2.0))) +(define-public ocaml4.02-piqilib + (package-with-ocaml4.02 ocaml-piqilib)) + (define-public ocaml-uuidm (package (name "ocaml-uuidm") @@ -3416,7 +4326,8 @@ tool and piqi-ocaml.") (modify-phases %standard-phases (delete 'configure)))) (native-inputs - `(("opam" ,opam))) + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam))) (propagated-inputs `(("cmdliner" ,ocaml-cmdliner) ("topkg" ,ocaml-topkg))) @@ -3427,21 +4338,24 @@ unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122.") (license license:isc))) +(define-public ocaml4.02-uuidm + (package-with-ocaml4.02 ocaml-uuidm)) + (define-public ocaml-graph (package (name "ocaml-graph") - (version "1.8.7") + (version "1.8.8") (source (origin (method url-fetch) (uri (string-append "http://ocamlgraph.lri.fr/download/" "ocamlgraph-" version ".tar.gz")) (sha256 (base32 - "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz")) - (patches (search-patches "ocaml-graph-honor-source-date-epoch.patch")))) + "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr")))) (build-system ocaml-build-system) (arguments `(#:install-target "install-findlib" + #:tests? #f #:phases (modify-phases %standard-phases (add-before 'configure 'set-shell @@ -3454,10 +4368,13 @@ and 4 (random based) according to RFC 4122.") (description "OCamlgraph is a generic graph library for OCaml.") (license license:lgpl2.1))) +(define-public ocaml4.02-graph + (package-with-ocaml4.02 ocaml-graph)) + (define-public ocaml-piqi (package (name "ocaml-piqi") - (version "0.7.5") + (version "0.7.6") (source (origin (method url-fetch) (uri (string-append "https://github.com/alavrik/piqi-ocaml/" @@ -3465,7 +4382,7 @@ and 4 (random based) according to RFC 4122.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0ngz6y8i98i5v2ma8nk6mc83pdsmf2z0ks7m3xi6clfg3zqbddrv")))) + "0da0v2v28aj65b0cwpvvmcqyrfvz94pp3j5zgfdr1jrl5s37c21g")))) (build-system ocaml-build-system) (arguments `(#:make-flags @@ -3477,9 +4394,13 @@ and 4 (random based) according to RFC 4122.") (delete 'configure)))) (native-inputs `(("which" ,which) + ("camlp4" ,camlp4) ("protobuf" ,protobuf))) ; for tests (propagated-inputs - `(("piqilib" ,ocaml-piqilib))) + `(("num" ,ocaml-num) + ("piqilib" ,ocaml-piqilib))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-piqi)))) (home-page "https://github.com/alavrik/piqi-ocaml") (synopsis "Protocol serialization system for OCaml") (description "Piqi is a multi-format data serialization system for OCaml. @@ -3487,67 +4408,73 @@ It provides a uniform interface for serializing OCaml data structures to JSON, XML and Protocol Buffers formats.") (license license:asl2.0))) +(define-public ocaml4.02-piqi + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-piqi)))) + (package + (inherit base) + (propagated-inputs + `(("piqilib" ,ocaml4.02-piqilib)))))) + (define-public bap (package (name "bap") - (version "1.1.0") + (version "1.3.0") (home-page "https://github.com/BinaryAnalysisPlatform/bap") (source (origin (method url-fetch) (uri (string-append home-page "/archive/v" version ".tar.gz")) (sha256 (base32 - "1ms95m4j1qrmy7zqmsn2izh7gq68lnmssl7chyhk977kd3sxj66m")) + "0v95v9mp7mg8fj25ry0w7566zd9xp6cs8nnqj4l38q54fb1hfav9")) (file-name (string-append name "-" version ".tar.gz")))) (build-system ocaml-build-system) (native-inputs - `(("oasis" ,ocaml-oasis) + `(("oasis" ,ocaml4.02-oasis) ("clang" ,clang-3.8) - ("ounit" ,ocaml-ounit))) + ("ounit" ,ocaml4.02-ounit))) (propagated-inputs - `(("core-kernel" ,ocaml-core-kernel) - ("ppx-driver" ,ocaml-ppx-driver) - ("uri" ,ocaml-uri) + `(("core-kernel" ,ocaml4.02-core-kernel) + ("ppx-driver" ,ocaml4.02-ppx-driver) + ("bin-prot" ,ocaml4.02-bin-prot) + ("uri" ,ocaml4.02-uri) ("llvm" ,llvm-3.8) ("gmp" ,gmp) ("clang-runtime" ,clang-runtime) - ("fileutils" ,ocaml-fileutils) - ("cmdliner" ,ocaml-cmdliner) - ("zarith" ,ocaml-zarith) - ("uuidm" ,ocaml-uuidm) - ("camlzip" ,camlzip) + ("fileutils" ,ocaml4.02-fileutils) + ("cmdliner" ,ocaml4.02-cmdliner) + ("zarith" ,ocaml4.02-zarith) + ("uuidm" ,ocaml4.02-uuidm) + ("camlzip" ,ocaml4.02-camlzip) ("frontc" ,ocaml-frontc) - ("ezjsonm" ,ocaml-ezjsonm) - ("ocurl" ,ocaml-ocurl) - ("piqi" ,ocaml-piqi) - ("ocamlgraph" ,ocaml-graph) - ("bitstring" ,ocaml-bitstring) - ("ppx-jane" ,ocaml-ppx-jane) - ("re" ,ocaml-re))) + ("ezjsonm" ,ocaml4.02-ezjsonm) + ("ocurl" ,ocaml4.02-ocurl) + ("piqi" ,ocaml4.02-piqi) + ("ocamlgraph" ,ocaml4.02-graph) + ("bitstring" ,ocaml4.02-bitstring) + ("ppx-jane" ,ocaml4.02-ppx-jane) + ("re" ,ocaml4.02-re))) (inputs `(("llvm" ,llvm-3.8))) (arguments - `(#:use-make? #t + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:use-make? #t #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "./configure" "--prefix" - (assoc-ref outputs "out") - "--libdir" - (string-append - (assoc-ref outputs "out") - "/lib/ocaml/site-lib") - "--with-llvm-version=3.8" - "--with-llvm-config=llvm-config" - "--enable-everything")))) - (add-after 'install 'link-stubs - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) - (lib (string-append out "/lib/ocaml/site-lib/bap-plugin-llvm"))) - (mkdir-p stubs) - (symlink (string-append lib "/dllllvm_plugin_stubs.so") - (string-append stubs "/dllllvm_plugin_stubs.so")))))))) + (lambda* (#:key outputs inputs #:allow-other-keys) + (invoke "./configure" "--prefix" + (assoc-ref outputs "out") + "--libdir" + (string-append + (assoc-ref outputs "out") + "/lib/ocaml/site-lib") + "--with-llvm-version=3.8" + "--with-llvm-config=llvm-config" + "--enable-everything") + (substitute* "plugins/objdump/objdump_main.ml" + (("Re_perl") "Re.Perl")) + (substitute* "oasis/objdump" + (("re.pcre") "re.pcre, re.perl"))))))) (synopsis "Binary Analysis Platform") (description "Binary Analysis Platform is a framework for writing program analysis tools, that target binary files. The framework consists of a plethora @@ -3558,23 +4485,33 @@ the plugins facilitate extensibility, and the frontends serve as entry points.") (define-public ocaml-camomile (package (name "ocaml-camomile") - (version "0.8.5") + (version "1.0.1") (home-page "https://github.com/yoriyuki/Camomile") (source (origin (method url-fetch) - (uri (string-append home-page "/releases/download/rel-" version - "/camomile-" version ".tar.bz2")) + (uri (string-append home-page "/releases/download/" version + "/camomile-" version ".tbz")) (sha256 (base32 - "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045")))) + "01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2")))) (build-system ocaml-build-system) - (native-inputs `(("camlp4" ,camlp4))) + (native-inputs + `(("camlp4" ,camlp4) + ("dune" ,dune))) (arguments `(#:phases (modify-phases %standard-phases - (add-before 'configure 'fix-bin/sh + (delete 'configure) + (replace 'build (lambda _ - (setenv "CONFIG_SHELL" (which "bash"))))))) + (invoke "dune" "build" "@install" "--profile" "release") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))) + #:tests? #f)) (synopsis "Comprehensive Unicode library") (description "Camomile is a Unicode library for OCaml. Camomile provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about @@ -3583,6 +4520,9 @@ library is currently designed for Unicode Standard 3.2.") ;; with an exception for linked libraries to use a different license (license license:lgpl2.0+))) +(define-public ocaml4.02-camomile + (package-with-ocaml4.02 ocaml-camomile)) + (define-public ocaml-jbuilder (package (name "ocaml-jbuilder") @@ -3595,10 +4535,12 @@ library is currently designed for Unicode Standard 3.2.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0gcy52y0mkg450yxwszp3lww303a1154566r8jb4hh5l61dh4dwj")))) + "1cy07pwvbrlysszs938yd74yyvvbgkffpb82qrjph77zf0h2gdi7")))) (build-system ocaml-build-system) (arguments - `(#:phases + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -3606,7 +4548,7 @@ library is currently designed for Unicode Standard 3.2.") (setenv "PREFIX" out)) #t))))) (native-inputs - `(("menhir" ,ocaml-menhir))) + `(("menhir" ,ocaml4.02-menhir))) (propagated-inputs `(("opam" ,opam))) (home-page "https://github.com/janestreet/jbuilder") @@ -3654,10 +4596,13 @@ to write text editors, edition widgets, readlines, etc. You just have to connect an engine to your inputs and rendering functions to get an editor.") (license license:bsd-3))) +(define-public ocaml4.02-zed + (package-with-ocaml4.02 ocaml-zed)) + (define-public ocaml-lambda-term (package (name "ocaml-lambda-term") - (version "1.11") + (version "1.13") (source (origin (method url-fetch) @@ -3665,26 +4610,27 @@ connect an engine to your inputs and rendering functions to get an editor.") version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "10lx1jqgmmfwwlv64di4a8nia9l53v7179z70n9fx6aq5l7r8nba")))) + (base32 "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l")))) (build-system ocaml-build-system) (arguments - `(#:test-target "test" - #:phases + `(#:phases (modify-phases %standard-phases (delete 'configure) - ;; currently, ocaml-lwt is an old version of lwt from before lwt.react - ;; was split into a separate module called lwt_react - (add-before 'build 'use-old-lwt-react-name + (replace 'build (lambda _ - (substitute* "src/jbuild" (("lwt_react") "lwt.react")))) + (invoke "dune" "build" "@install" "--profile" "release") + #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (zero? (system* "jbuilder" "install" "--prefix" out)))))))) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))) + #:tests? #f)) (native-inputs - `(("jbuilder" ,ocaml-jbuilder))) + `(("dune" ,dune))) (propagated-inputs `(("lwt" ,ocaml-lwt) + ("lwt-log" ,ocaml-lwt-log) ("zed" ,ocaml-zed))) (home-page "https://github.com/diml/lambda-term") (synopsis "Terminal manipulation library for OCaml") @@ -3696,18 +4642,21 @@ manipulation than, for example, ncurses, by providing a native OCaml interface instead of bindings to a C library.") (license license:bsd-3))) +(define-public ocaml4.02-lambda-term + (package-with-ocaml4.02 ocaml-lambda-term)) + (define-public ocaml-utop (package (name "ocaml-utop") - (version "2.0.2") + (version "2.2.0") (source (origin (method url-fetch) - (uri (string-append "https://github.com/diml/utop/archive/" + (uri (string-append "https://github.com/ocaml-community/utop/archive/" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0rglznh4prcix8spi3f060jz2gngk7x8vkd291fxs10b88aqcpxf")))) + "1414snwmqaxs1x8wbpjf6fn3jsl01hq0phrr7639xmb5vh15mgd4")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -3761,6 +4710,8 @@ sensitive completion, colors, and more.") #:phases (modify-phases %standard-phases (delete 'configure)))) + (native-inputs + `(("ocamlbuild" ,ocamlbuild))) (inputs `(("topkg" ,ocaml-topkg) ("opam" ,opam))) @@ -3773,7 +4724,7 @@ long and size_t whose sizes depend on the host platform.") (define-public ocaml-ctypes (package (name "ocaml-ctypes") - (version "0.13.1") + (version "0.14.0") (home-page "https://github.com/ocamllabs/ocaml-ctypes") (source (origin (method url-fetch) @@ -3781,10 +4732,11 @@ long and size_t whose sizes depend on the host platform.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "17w0pr5k0zjcjns4y9n36rjpfl35zhvp3h8ggqs9lz12qhshdk2m")))) + "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9")))) (build-system ocaml-build-system) (arguments - `(#:make-flags + `(#:tests? #f; require an old lwt + #:make-flags (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)")) #:phases (modify-phases %standard-phases @@ -3832,7 +4784,8 @@ without writing or generating any C!") `(("topkg" ,ocaml-topkg) ("opam" ,opam))) (native-inputs - `(("astring" ,ocaml-astring))) + `(("astring" ,ocaml-astring) + ("ocamlbuild" ,ocamlbuild))) (synopsis "OCamlbuild plugin for C stubs") (description "Ocb-stubblr is about ten lines of code that you need to repeat over, over, over and over again if you are using ocamlbuild to build @@ -3860,7 +4813,8 @@ OCaml projects that contain C stubs.") (modify-phases %standard-phases (delete 'configure)))) (native-inputs - `(("opam" ,opam) + `(("ocamlbuild" ,ocamlbuild) + ("opam" ,opam) ("pkg-config" ,pkg-config))) (inputs `(("topkg" ,ocaml-topkg) diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch index 2056b42356..fd9a4c9401 100644 --- a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch +++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch @@ -1,16 +1,28 @@ -From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001 +From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001 From: Julien Lepiller -Date: Wed, 14 Dec 2016 14:14:59 +0100 +Date: Fri, 21 Sep 2018 22:31:29 +0200 Subject: [PATCH] fix camlp4 in another directory --- - Makefile | 11 ++++++----- - configure | 13 ++++++++++++- - myocamlbuild.ml | 2 +- - 3 files changed, 19 insertions(+), 7 deletions(-) + Makefile | 11 ++++++----- + configure | 13 ++++++++++++- + tests/Makefile | 2 +- + tests/camlp4-comments/Makefile | 2 +- + tests/camlp4-exclude-file/Makefile | 2 +- + tests/camlp4-exclude/Makefile | 2 +- + tests/camlp4-instrument-fast/Makefile | 2 +- + tests/camlp4-instrument/Makefile | 2 +- + tests/combine-expr/Makefile | 2 +- + tests/ppx-comments/Makefile | 2 +- + tests/ppx-exclude-file/Makefile | 2 +- + tests/ppx-exclude/Makefile | 2 +- + tests/ppx-instrument-fast/Makefile | 2 +- + tests/ppx-instrument/Makefile | 2 +- + tests/report/Makefile | 2 +- + 15 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile -index 4a8ce17..d94a6d5 100644 +index b0980ee..6697922 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build @@ -19,12 +31,12 @@ index 4a8ce17..d94a6d5 100644 PATH_TESTS=$(PATH_BASE)/tests -PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect +PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect - - + + # DEFINITIONS @@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect PROJECT_NAME=bisect - OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild + OCAMLBUILD=ocamlbuild OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX) -OCAMLBUILD_FLAGS=-classic-display -no-links +CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)") @@ -33,22 +45,22 @@ index 4a8ce17..d94a6d5 100644 MODULES_MLPACK=$(PROJECT_NAME).mlpack MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack @@ -80,11 +81,11 @@ veryclean: clean - rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css - + rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css + install: FORCE - cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \ + cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \ - if [ "$(PPX)" = "TRUE" ]; then \ + if [ "$(PPX)" = "TRUE" ]; then \ - cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \ + cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \ - fi; \ -- (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ -+ (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ - if [ -x "$(PATH_OCAMLFIND)" ]; then \ - $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ - $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ + fi; \ +- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ ++ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ + if [ -x "$(PATH_OCAMLFIND)" ]; then \ + $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ + $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ diff --git a/configure b/configure -index bb7ebf4..61a3095 100755 +index bb7ebf4..43ef46b 100755 --- a/configure +++ b/configure @@ -21,7 +21,9 @@ @@ -79,47 +91,193 @@ index bb7ebf4..61a3095 100755 ppx='TRUE';; *) - echo "usage: $0 [-ocaml-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; -+ echo "usage: $0 [-prefix ] [-ocaml-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; ++ echo "usage: $0 [-prefix ] [-ocaml-prefix ] [-camlp4-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; exit 1;; esac shift @@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then exit 1 fi - + +# prefix default value +test -z $prefix && prefix=$ocaml_prefix + # make options make_quiet=`make -f - < Makefile.config ++echo "PREFIX=$prefix" >> Makefile.config echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config +echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config echo "WARNINGS=$devel" >> Makefile.config - echo "NO_CAMLP4=$no_camlp4" >> Makefile.config - echo "PPX=$ppx" >> Makefile.config - echo "MAKE_QUIET=$make_quiet" >> Makefile.config -+echo "PREFIX=$prefix" >> Makefile.config - echo "" >> Makefile.config - echo 'Makefile.config successfully created' -diff --git a/myocamlbuild.ml b/myocamlbuild.ml -index 8aa25fd..09a7d48 100644 ---- a/myocamlbuild.ml -+++ b/myocamlbuild.ml -@@ -70,7 +70,7 @@ let () = - | After_rules -> - let camlp4of = - try -- let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in -+ let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in - Filename.concat path_bin "camlp4of" - with _ -> "camlp4of" in - flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]); --- -2.7.4 +diff --git a/tests/Makefile b/tests/Makefile +index 1aba27f..9642323 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -41,7 +41,7 @@ one: FORCE + else \ + echo "Running tests for '$(NAME)'..." | tee -a _log; \ + (cd $(NAME) && \ +- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \ ++ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \ + COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \ + REPORT=../../_build/src/report/report.byte && \ + cd ..) || echo '*** error' >> _log; \ +diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-comments/Makefile ++++ b/tests/camlp4-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile +index ab13983..e2520fa 100644 +--- a/tests/camlp4-exclude-file/Makefile ++++ b/tests/camlp4-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile +index 18aada4..d71a7bc 100644 +--- a/tests/camlp4-exclude/Makefile ++++ b/tests/camlp4-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile +index f60767f..8506e38 100644 +--- a/tests/camlp4-instrument-fast/Makefile ++++ b/tests/camlp4-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-instrument/Makefile ++++ b/tests/camlp4-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile +index 46ae9eb..e8e2af2 100644 +--- a/tests/combine-expr/Makefile ++++ b/tests/combine-expr/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + + default: clean compile run report + +diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-comments/Makefile ++++ b/tests/ppx-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile +index a575a77..0dd1a20 100644 +--- a/tests/ppx-exclude-file/Makefile ++++ b/tests/ppx-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile +index a517af4..f502a42 100644 +--- a/tests/ppx-exclude/Makefile ++++ b/tests/ppx-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile +index da78bb6..1195988 100644 +--- a/tests/ppx-instrument-fast/Makefile ++++ b/tests/ppx-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-instrument/Makefile ++++ b/tests/ppx-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/report/Makefile b/tests/report/Makefile +index a7ffe44..a968bf9 100644 +--- a/tests/report/Makefile ++++ b/tests/report/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + XMLLINT=$(shell which xmllint) + + default: clean compile run report +-- +2.18.0 diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 34a22ecffa..e5b715f55d 100644 --- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017 Julien Lepiller +;;; Copyright © 2016, 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Ben Woodcroft ;;; ;;; This file is part of GNU Guix. @@ -28,7 +28,9 @@ #:use-module (srfi srfi-1) #:export (%ocaml-build-system-modules package-with-ocaml4.01 + package-with-ocaml4.02 strip-ocaml4.01-variant + strip-ocaml4.02-variant ocaml-build ocaml-build-system)) @@ -82,6 +84,14 @@ (let ((module (resolve-interface '(gnu packages ocaml)))) (module-ref module 'ocaml4.01-findlib))) +(define (default-ocaml4.02) + (let ((ocaml (resolve-interface '(gnu packages ocaml)))) + (module-ref ocaml 'ocaml-4.02))) + +(define (default-ocaml4.02-findlib) + (let ((module (resolve-interface '(gnu packages ocaml)))) + (module-ref module 'ocaml4.02-findlib))) + (define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix #:key variant-property) "Return a procedure of one argument, P. The procedure creates a package @@ -139,12 +149,24 @@ pre-defined variants." "ocaml-" "ocaml4.01-" #:variant-property 'ocaml4.01-variant)) +(define package-with-ocaml4.02 + (package-with-explicit-ocaml (delay (default-ocaml4.02)) + (delay (default-ocaml4.02-findlib)) + "ocaml-" "ocaml4.02-" + #:variant-property 'ocaml4.02-variant)) + (define (strip-ocaml4.01-variant p) "Remove the 'ocaml4.01-variant' property from P." (package (inherit p) (properties (alist-delete 'ocaml4.01-variant (package-properties p))))) +(define (strip-ocaml4.02-variant p) + "Remove the 'ocaml4.02-variant' property from P." + (package + (inherit p) + (properties (alist-delete 'ocaml4.02-variant (package-properties p))))) + (define* (lower name #:key source inputs native-inputs outputs system target (ocaml (default-ocaml)) -- cgit 1.4.1 From 5e369f8ab9e230193194b4d5846a5c78bbc89943 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 12 Nov 2018 15:55:05 +0200 Subject: gnu: Add pinentry-efl. * gnu/packages/gnupg.scm (pinentry-efl): New variable. * gnu/packages/patches/pinentry-efl.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/gnupg.scm | 30 ++ gnu/packages/patches/pinentry-efl.patch | 798 ++++++++++++++++++++++++++++++++ 3 files changed, 829 insertions(+) create mode 100644 gnu/packages/patches/pinentry-efl.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d2f085eaa5..7fc8fb0620 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1045,6 +1045,7 @@ dist_patch_DATA = \ %D%/packages/patches/pinball-missing-separators.patch \ %D%/packages/patches/pinball-src-deps.patch \ %D%/packages/patches/pinball-system-ltdl.patch \ + %D%/packages/patches/pinentry-efl.patch \ %D%/packages/patches/pingus-sdl-libs-config.patch \ %D%/packages/patches/pius.patch \ %D%/packages/patches/pixman-CVE-2016-5296.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index a9169b25af..46ca812a13 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -40,6 +40,8 @@ #:use-module (gnu packages curl) #:use-module (gnu packages crypto) #:use-module (gnu packages emacs) + #:use-module (gnu packages enlightenment) + #:use-module (gnu packages gettext) #:use-module (gnu packages guile) #:use-module (gnu packages openldap) #:use-module (gnu packages perl) @@ -863,6 +865,34 @@ software."))) "Pinentry provides a console and a Qt GUI that allows users to enter a passphrase when @code{gpg} is run and needs it."))) +(define-public pinentry-efl + (package + (inherit pinentry-tty) + (name "pinentry-efl") + (source + (origin + (inherit (package-source pinentry-tty)) + (patches (search-patches "pinentry-efl.patch")))) + (arguments + '(#:configure-flags '("--enable-pinentry-efl") + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (invoke "sh" "autogen.sh")))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gettext-minimal) + ,@(package-native-inputs pinentry-tty))) + (inputs + `(("efl" ,efl) + ,@(package-inputs pinentry-tty))) + (description + "Pinentry provides a console and a graphical interface for the +@dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a +passphrase when @code{gpg} is run and needs it."))) + (define-public pinentry (package (inherit pinentry-gtk2) (name "pinentry"))) diff --git a/gnu/packages/patches/pinentry-efl.patch b/gnu/packages/patches/pinentry-efl.patch new file mode 100644 index 0000000000..5ba79e28df --- /dev/null +++ b/gnu/packages/patches/pinentry-efl.patch @@ -0,0 +1,798 @@ +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commit;h=948105b7a34ec9a9e5479d376b7c86bafee50a01 +This patch can be removed with the next release of pinentry. + +From 948105b7a34ec9a9e5479d376b7c86bafee50a01 Mon Sep 17 00:00:00 2001 +From: "William L. Thomson Jr" +Date: Tue, 29 May 2018 22:50:47 +0100 +Subject: [PATCH] efl: Add an EFL-based pinentry. + +* NEWS: Update. +* Makefile.am: Add new efl subdirectory. +* configure.ac: Add --enable-pinentry-efl option. +* efl/Makefile.am: New file. +* efl/pinentry-efl.c: New file. + +Signed-off-by: Damien Goutte-Gattat +--- + Makefile.am | 8 +- + configure.ac | 44 +++- + efl/Makefile.am | 38 ++++ + efl/pinentry-efl.c | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 716 insertions(+), 2 deletions(-) + create mode 100644 efl/Makefile.am + create mode 100644 efl/pinentry-efl.c + +diff --git a/Makefile.am b/Makefile.am +index 8c8b8e5..b8fd0e1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -82,10 +82,16 @@ else + pinentry_fltk = + endif + ++if BUILD_PINENTRY_EFL ++pinentry_efl = efl ++else ++pinentry_efl = ++endif ++ + SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \ + ${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \ + ${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \ +- ${pinentry_fltk} doc ++ ${pinentry_fltk} ${pinentry_efl} doc + + + install-exec-local: +diff --git a/configure.ac b/configure.ac +index ff6c2e0..e305e44 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -419,6 +419,42 @@ fi + + + dnl ++dnl Check for EFL pinentry programs. ++dnl ++AC_ARG_ENABLE(pinentry-efl, ++ AC_HELP_STRING([--enable-pinentry-efl], [build EFL pinentry]), ++ pinentry_efl=$enableval, pinentry_efl=maybe) ++ ++dnl check for pkg-config ++if test "$pinentry_efl" != "no"; then ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ if test x"${PKG_CONFIG}" = xno ; then ++ pinentry_efl=no ++ fi ++fi ++ ++if test "$pinentry_efl" != "no"; then ++ AC_MSG_CHECKING([for efl]) ++ "${PKG_CONFIG}" --exists 'elementary >= 1.18' ++ if test $? -ne 0 ; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_WARN([efl >= 1.18 is required for efl pinentry]) ++ pinentry_efl=no ++ else ++ AC_MSG_RESULT([yes]) ++ EFL_CFLAGS=`"${PKG_CONFIG}" --cflags ecore-x elementary` ++ EFL_LIBS=`"${PKG_CONFIG}" --libs ecore-x elementary` ++ AC_SUBST(EFL_CFLAGS) ++ AC_SUBST(EFL_LIBS) ++ if test "$pinentry_efl" != "no" ++ then ++ pinentry_efl=yes ++ fi ++ fi ++fi ++AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes") ++ ++dnl + dnl Check for GTK+-2 / GNOME3 pinentry programs. + dnl + AC_ARG_ENABLE(pinentry-gtk2, +@@ -645,7 +681,11 @@ else + if test "$pinentry_tqt" = "yes"; then + PINENTRY_DEFAULT=pinentry-tqt + else +- AC_MSG_ERROR([[No pinentry enabled.]]) ++ if test "$pinentry_efl" = "yes"; then ++ PINENTRY_DEFAULT=pinentry-efl ++ else ++ AC_MSG_ERROR([[No pinentry enabled.]]) ++ fi + fi + fi + fi +@@ -721,6 +761,7 @@ secmem/Makefile + pinentry/Makefile + curses/Makefile + tty/Makefile ++efl/Makefile + emacs/Makefile + gtk+-2/Makefile + gnome3/Makefile +@@ -744,6 +785,7 @@ AC_MSG_NOTICE([ + Curses Pinentry ..: $pinentry_curses + TTY Pinentry .....: $pinentry_tty + Emacs Pinentry ...: $pinentry_emacs ++ EFL Pinentry .....: $pinentry_efl + GTK+-2 Pinentry ..: $pinentry_gtk_2 + GNOME 3 Pinentry .: $pinentry_gnome_3 + Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version +diff --git a/efl/Makefile.am b/efl/Makefile.am +new file mode 100644 +index 0000000..b986a04 +--- /dev/null ++++ b/efl/Makefile.am +@@ -0,0 +1,38 @@ ++# Makefile.am - PIN entry EFL frontend. ++# Copyright (C) 2017 Obsidian-Studios, Inc. ++# Author William L. Thomson Jr. ++# ++# This file is part of PINENTRY. ++# ++# PINENTRY 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 2 of the License, or ++# (at your option) any later version. ++# ++# PINENTRY 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 this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ ++## Process this file with automake to produce Makefile.in ++ ++bin_PROGRAMS = pinentry-efl ++ ++if FALLBACK_CURSES ++ncurses_include = $(NCURSES_INCLUDE) ++libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV) ++else ++ncurses_include = ++libcurses = ++endif ++ ++AM_CPPFLAGS = $(COMMON_CFLAGS) $(EFL_CFLAGS) $(ncurses_include) \ ++ -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry ++LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ ++ $(COMMON_LIBS) $(LIBCAP) $(EFL_LIBS) $(libcurses) ++ ++pinentry_efl_SOURCES = pinentry-efl.c +diff --git a/efl/pinentry-efl.c b/efl/pinentry-efl.c +new file mode 100644 +index 0000000..ca99693 +--- /dev/null ++++ b/efl/pinentry-efl.c +@@ -0,0 +1,623 @@ ++/* pinentry-efl.c ++ Copyright (C) 2017 Obsidian-Studios, Inc. ++ Author William L. Thomson Jr. ++ ++ Based on pinentry-gtk2.c ++ Copyright (C) 1999 Robert Bihlmeyer ++ Copyright (C) 2001, 2002, 2007, 2015 g10 Code GmbH ++ Copyright (C) 2004 by Albrecht Dreß ++ ++ pinentry-efl is a pinentry application for the EFL widget set. ++ It tries to follow the Gnome Human Interface Guide as close as ++ possible. ++ ++ This program 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 2 of the License, or ++ (at your option) any later version. ++ ++ This program 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 this program; if not, write to the Free Software ++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++#include ++#include ++#include ++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wstrict-prototypes" ++#endif ++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) ++#pragma GCC diagnostic pop ++#endif ++ ++#ifdef HAVE_GETOPT_H ++#include ++#else ++#include "getopt.h" ++#endif /* HAVE_GETOPT_H */ ++ ++#include "pinentry.h" ++ ++#ifdef FALLBACK_CURSES ++#include "pinentry-curses.h" ++#endif ++ ++#define PGMNAME "pinentry-efl" ++ ++#ifndef VERSION ++#define VERSION ++#endif ++ ++#define ENTRY_HIDE "Hide entry" ++#define ENTRY_SHOW "Show entry" ++ ++typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t; ++ ++static const int WIDTH = 480; ++static const int BUTTON_HEIGHT = 27; ++static const int BUTTON_WIDTH = 70; ++static const int BUTTON_ICON_SIZE = 13; ++static const int PADDING = 5; ++ ++static Eina_Bool got_input; ++static Ecore_Timer *timer; ++static Evas_Object *check_label; ++static Evas_Object *error_label; ++static Evas_Object *entry; ++static Evas_Object *repeat_entry; ++static Evas_Object *qualitybar; ++static Evas_Object *win; ++static char **pargv; ++static int grab_failed; ++static int passphrase_ok; ++static int confirm_mode; ++static int pargc; ++static confirm_value_t confirm_value; ++static pinentry_t pinentry; ++ ++pinentry_cmd_handler_t pinentry_cmd_handler; ++ ++static void ++quit (void) ++{ ++ evas_object_del(win); ++ elm_exit(); ++ ecore_main_loop_quit (); ++} ++ ++static void ++delete_event (void *data EINA_UNUSED, ++ Evas_Object *obj EINA_UNUSED, ++ void *event EINA_UNUSED) ++{ ++ pinentry->close_button = 1; ++ quit (); ++} ++ ++static void ++changed_text_handler (void *data EINA_UNUSED, ++ Evas_Object *obj, ++ void *event EINA_UNUSED) ++{ ++ const char *s; ++ int length; ++ int percent; ++ ++ got_input = EINA_TRUE; ++ ++ if (pinentry->repeat_passphrase && repeat_entry) ++ { ++ elm_object_text_set (repeat_entry, ""); ++ elm_object_text_set (error_label, ""); ++ } ++ ++ if (!qualitybar || !pinentry->quality_bar) ++ return; ++ ++ s = elm_object_text_get (obj); ++ if (!s) ++ s = ""; ++ length = strlen (s); ++ percent = length? pinentry_inq_quality (pinentry, s, length) : 0; ++ evas_object_color_set(qualitybar, ++ 255 - ( 2.55 * percent ), ++ 2.55 * percent, 0, 255); ++ elm_progressbar_value_set (qualitybar, (double) percent / 100.0); ++} ++ ++static void ++on_check (void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED) ++{ ++ if(elm_check_state_get(obj)) ++ { ++ elm_entry_password_set(entry, EINA_FALSE); ++ elm_object_text_set(check_label,ENTRY_HIDE); ++ } ++ else ++ { ++ elm_entry_password_set(entry, EINA_TRUE); ++ elm_object_text_set(check_label,ENTRY_SHOW); ++ } ++ evas_object_size_hint_min_set(check_label, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ evas_object_size_hint_align_set(check_label, 0, 1); ++} ++ ++static void ++on_click (void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) ++{ ++ if (confirm_mode) ++ { ++ confirm_value = (confirm_value_t) data; ++ quit (); ++ return; ++ } ++ ++ if (data) ++ { ++ const char *s; ++ const char *s2; ++ ++ s = elm_entry_entry_get (entry); ++ if (!s) ++ s = ""; ++ ++ if (pinentry->repeat_passphrase && repeat_entry) ++ { ++ s2 = elm_entry_entry_get (repeat_entry); ++ if (!s2) ++ s2 = ""; ++ if (strcmp (s, s2)) ++ { ++ elm_object_text_set(error_label, ++ pinentry->repeat_error_string? ++ pinentry->repeat_error_string: ++ "not correctly repeated"); ++ elm_object_focus_set(entry,EINA_TRUE); ++ return; ++ } ++ pinentry->repeat_okay = 1; ++ } ++ ++ passphrase_ok = 1; ++ pinentry_setbufferlen (pinentry, strlen (s) + 1); ++ if (pinentry->pin) ++ strncpy (pinentry->pin, s, strlen(s) + 1); ++ } ++ quit (); ++} ++ ++static void ++enter_callback (void *data, Evas_Object * obj, void *event_info EINA_UNUSED) ++{ ++ if (data) ++ elm_object_focus_set (data, 1); ++ else ++ on_click ((void *) CONFIRM_OK, obj, NULL); ++} ++ ++static Eina_Bool ++timeout_cb (const void * data) ++{ ++ pinentry_t pe = (pinentry_t)data; ++ if (!got_input) ++ { ++ ecore_main_loop_quit(); ++ if (pe) ++ pe->specific_err = gpg_error (GPG_ERR_TIMEOUT); ++ } ++ ++ timer = NULL; ++ return ECORE_CALLBACK_DONE; ++} ++ ++static void ++create_window (void) ++{ ++ char *txt; ++ Evas_Object *icon; ++ Evas_Object *obj; ++ Evas_Object *table; ++ int btn_txt_len = 0; ++ int row = 0; ++ int ok_len = 0; ++ ++ win = elm_win_util_dialog_add(NULL,"pinentry","enter pin"); ++ elm_win_autodel_set(win, EINA_TRUE); ++ elm_win_center(win,EINA_TRUE,EINA_TRUE); ++ evas_object_smart_callback_add(win, "delete,request", delete_event, NULL); ++ ++ table = elm_table_add(win); ++ elm_table_padding_set(table,ELM_SCALE_SIZE(PADDING),0); ++ evas_object_size_hint_padding_set (table, ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING), ++ ELM_SCALE_SIZE(PADDING)); ++ evas_object_show(table); ++ ++ if (pinentry->title) ++ { ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->title); ++ elm_win_title_set ( win, txt ); ++ free (txt); ++ } ++ ++ /* Description Label */ ++ if (pinentry->description) ++ { ++ char* aligned; ++ int len; ++ ++ obj = elm_label_add(table); ++ elm_label_line_wrap_set (obj, ELM_WRAP_WORD); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->description); ++ len = strlen(txt)+20; // 20 chars for align tag ++ aligned = calloc(len+1,sizeof(char)); ++ if(aligned) ++ { ++ snprintf(aligned,len, "%s",txt); ++ elm_object_text_set(obj,aligned); ++ free (aligned); ++ } else ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, obj, 1, row, 5, 1); ++ evas_object_show(obj); ++ row++; ++ } ++ if (!confirm_mode && (pinentry->error || pinentry->repeat_passphrase)) ++ { ++ /* Error Label */ ++ if (pinentry->error) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->error); ++ else ++ txt = ""; ++ obj = elm_label_add(table); ++ evas_object_color_set(obj, 255, 0, 0, 255); ++ elm_object_text_set(obj,txt); ++ elm_object_style_set(obj,"slide_bounce"); ++ elm_label_slide_duration_set(obj, 10); ++ elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_ALWAYS); ++ elm_label_slide_go(obj); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, obj, 1, row, 5, 1); ++ evas_object_show(obj); ++ if (pinentry->error) ++ free (txt); ++ row++; ++ } ++ ++ qualitybar = NULL; ++ ++ if (!confirm_mode) ++ { ++ ++ if (pinentry->prompt) ++ { ++ /* Entry/Prompt Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->prompt); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ } ++ ++ entry = elm_entry_add(table); ++ elm_entry_scrollable_set(entry, EINA_TRUE); ++ elm_scroller_policy_set(entry, ++ ELM_SCROLLER_POLICY_OFF, ++ ELM_SCROLLER_POLICY_OFF); ++ elm_entry_password_set(entry, EINA_TRUE); ++ elm_entry_single_line_set(entry, EINA_TRUE); ++ evas_object_size_hint_weight_set(entry, 0, 0); ++ evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, entry, 2, row, 4, 1); ++ evas_object_smart_callback_add(entry, ++ "changed", ++ changed_text_handler, ++ NULL); ++ evas_object_show(entry); ++ row++; ++ ++ /* Check box */ ++ obj = elm_check_add(table); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_smart_callback_add(obj, "changed", on_check, NULL); ++ evas_object_show(obj); ++ ++ /* Check Label */ ++ check_label = elm_label_add(table); ++ on_check((void *)NULL, obj, (void *)NULL); ++ elm_table_pack(table, check_label, 2, row, 4, 1); ++ evas_object_show(check_label); ++ row++; ++ ++ if (pinentry->quality_bar) ++ { ++ /* Quality Bar Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->quality_bar); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ ++ qualitybar = elm_progressbar_add(table); ++ evas_object_color_set(qualitybar, 255, 0, 0, 255); ++ evas_object_show(qualitybar); ++ if (pinentry->quality_bar_tt) ++ elm_object_tooltip_text_set (qualitybar, ++ pinentry->quality_bar_tt); ++ evas_object_size_hint_weight_set(qualitybar, EVAS_HINT_EXPAND, 0); ++ evas_object_size_hint_align_set(qualitybar, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, qualitybar, 2, row, 4, 1); ++ row++; ++ } ++ ++ if (pinentry->repeat_passphrase) ++ { ++ /* Repeat Label */ ++ obj = elm_label_add(table); ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->repeat_passphrase); ++ elm_object_text_set(obj,txt); ++ free (txt); ++ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); ++ elm_table_pack(table, obj, 1, row, 1, 1); ++ evas_object_show(obj); ++ ++ repeat_entry = elm_entry_add(table); ++ elm_entry_scrollable_set(repeat_entry, EINA_TRUE); ++ elm_scroller_policy_set(repeat_entry, ++ ELM_SCROLLER_POLICY_OFF, ++ ELM_SCROLLER_POLICY_OFF); ++ elm_entry_password_set(repeat_entry, EINA_TRUE); ++ elm_entry_single_line_set(repeat_entry, EINA_TRUE); ++ evas_object_size_hint_weight_set(repeat_entry, 0, 0); ++ evas_object_size_hint_align_set(repeat_entry, EVAS_HINT_FILL, 0); ++ elm_table_pack(table, repeat_entry, 2, row, 4, 1); ++ evas_object_smart_callback_add (repeat_entry, "activated", ++ enter_callback, NULL); ++ evas_object_show(repeat_entry); ++ evas_object_smart_callback_add (entry, ++ "activated", ++ enter_callback, ++ repeat_entry); ++ evas_object_smart_callback_add(repeat_entry, ++ "activated", ++ on_click, ++ (void *) CONFIRM_OK); ++ row++; ++ } ++ else ++ evas_object_smart_callback_add(entry, ++ "activated", ++ on_click, ++ (void *) CONFIRM_OK); ++ } ++ ++ /* Cancel Button */ ++ if (!pinentry->one_button) ++ { ++ obj = elm_button_add(table); ++ icon = elm_icon_add (table); ++ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (icon, "dialog-cancel") || ++ elm_icon_standard_set (icon, "window-close")) ++ { ++ evas_object_size_hint_min_set(icon, ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); ++ elm_object_part_content_set(obj, "icon", icon); ++ evas_object_show (icon); ++ } ++ else ++ evas_object_del(icon); ++ if (pinentry->cancel || pinentry->default_cancel) ++ { ++ if(pinentry->cancel) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->cancel); ++ else ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, ++ pinentry->default_cancel); ++ if(txt[0]=='_') ++ elm_object_text_set(obj,txt+1); ++ else ++ elm_object_text_set(obj,txt); ++ btn_txt_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); ++ free (txt); ++ } ++ else ++ elm_object_text_set(obj, "Cancel"); //STOCK_CANCEL ++ evas_object_size_hint_align_set(obj, 0, 0); ++ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) ++ evas_object_size_hint_min_set(obj, ++ btn_txt_len, ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ else ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ elm_table_pack(table, obj, 4, row, 1, 1); ++ evas_object_smart_callback_add(obj, ++ "clicked", ++ on_click, ++ (void *) CONFIRM_CANCEL); ++ evas_object_show(obj); ++ } ++ ++ /* OK Button */ ++ obj = elm_button_add(table); ++ icon = elm_icon_add (table); ++ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (icon, "dialog-ok") || ++ elm_icon_standard_set (icon, "list-add")) ++ { ++ evas_object_size_hint_min_set(icon, ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), ++ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); ++ elm_object_part_content_set(obj, "icon", icon); ++ evas_object_show (icon); ++ } ++ else ++ evas_object_del(icon); ++ if (pinentry->ok || pinentry->default_ok) ++ { ++ if(pinentry->ok) ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->ok); ++ else ++ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->default_ok); ++ if(txt[0]=='_') ++ elm_object_text_set(obj,txt+1); ++ else ++ elm_object_text_set(obj,txt); ++ ok_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); ++ if(ok_len>btn_txt_len) ++ btn_txt_len = ok_len; ++ free (txt); ++ } ++ else ++ elm_object_text_set(obj,"OK"); //STOCK_OK ++ evas_object_size_hint_align_set(obj, 0, 0); ++ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) ++ evas_object_size_hint_min_set(obj, ++ btn_txt_len, ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ else ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(BUTTON_WIDTH), ++ ELM_SCALE_SIZE(BUTTON_HEIGHT)); ++ elm_table_pack(table, obj, 5, row, 1, 1); ++ evas_object_smart_callback_add(obj, "clicked", on_click, (void *) CONFIRM_OK); ++ evas_object_show(obj); ++ ++ /* Key/Lock Icon */ ++ obj = elm_icon_add (win); ++ evas_object_size_hint_aspect_set (obj, EVAS_ASPECT_CONTROL_BOTH, 1, 1); ++ if (elm_icon_standard_set (obj, "dialog-password")) ++ { ++ double ic_size = WIDTH/5; ++ if(row==0) ++ ic_size = ic_size/3.5; ++ else if(row<4) ++ ic_size = ic_size - ic_size/row; ++ evas_object_size_hint_min_set(obj, ++ ELM_SCALE_SIZE(ic_size), ++ ELM_SCALE_SIZE(ic_size)); ++ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); ++ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0.5); ++ elm_table_pack(table, obj, 0, 0, 1, row? row:1); ++ evas_object_show (obj); ++ } ++ else ++ evas_object_del(obj); ++ ++ /* Box for padding */ ++ obj = elm_box_add (win); ++ elm_box_pack_end (obj, table); ++ evas_object_show (obj); ++ ++ elm_win_resize_object_add(win,obj); ++ evas_object_show(win); ++ ++ if(entry) ++ elm_object_focus_set (entry, EINA_TRUE); ++ ++ if (pinentry->timeout > 0) ++ timer = ecore_timer_add (pinentry->timeout, ++ (Ecore_Task_Cb)timeout_cb, ++ pinentry); ++} ++ ++static int ++efl_cmd_handler (pinentry_t pe) ++{ ++ int want_pass = !!pe->pin; ++ ++ got_input = EINA_FALSE; ++ pinentry = pe; ++ confirm_value = CONFIRM_CANCEL; ++ passphrase_ok = 0; ++ confirm_mode = want_pass ? 0 : 1; ++ /* init ecore-x explicitly using DISPLAY since this can launch ++ * from console ++ */ ++ if (pe->display) ++ ecore_x_init (pe->display); ++ elm_init (pargc, pargv); ++ create_window (); ++ ecore_main_loop_begin (); ++ ++ if (timer) ++ { ++ ecore_timer_del (timer); ++ timer = NULL; ++ } ++ ++ if (confirm_value == CONFIRM_CANCEL || grab_failed) ++ pe->canceled = 1; ++ ++ pinentry = NULL; ++ if (want_pass) ++ { ++ if (passphrase_ok && pe->pin) ++ return strlen (pe->pin); ++ else ++ return -1; ++ } ++ else ++ return (confirm_value == CONFIRM_OK) ? 1 : 0; ++} ++ ++int ++main (int argc, char *argv[]) ++{ ++ pinentry_init (PGMNAME); ++ ++#ifdef FALLBACK_CURSES ++ if (pinentry_have_display (argc, argv)) ++ { ++#endif ++ ++ pinentry_cmd_handler = efl_cmd_handler; ++ pargc = argc; ++ pargv = argv; ++ ++#ifdef FALLBACK_CURSES ++ } ++ else ++ { ++ pinentry_cmd_handler = curses_cmd_handler; ++ } ++#endif ++ ++ pinentry_parse_opts (argc, argv); ++ if (pinentry_loop ()) ++ return 1; ++ ++ return 0; ++} +-- +2.8.0.rc3 + -- cgit 1.4.1 From e1f791276144bc1737ab855226d3e66e58909f14 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Nov 2018 10:24:06 +0100 Subject: gnu: casync: Fix build with glibc 2.28. * gnu/packages/patches/casync-renameat2-declaration.patch: New file. * gnu/packages/sync.scm (casync)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/casync-renameat2-declaration.patch | 27 ++++++++++++++++++++++ gnu/packages/sync.scm | 3 ++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/casync-renameat2-declaration.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 358222729a..aeff3f8298 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -607,6 +607,7 @@ dist_patch_DATA = \ %D%/packages/patches/cairo-setjmp-wrapper.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-use-packaged-feedparser.patch \ + %D%/packages/patches/casync-renameat2-declaration.patch \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ diff --git a/gnu/packages/patches/casync-renameat2-declaration.patch b/gnu/packages/patches/casync-renameat2-declaration.patch new file mode 100644 index 0000000000..74c2ca7b3c --- /dev/null +++ b/gnu/packages/patches/casync-renameat2-declaration.patch @@ -0,0 +1,27 @@ +Fix build failure on glibc 2.28 where 'renameat2' would end up being +declared twice: . + +From 625244ca47e8ee1375d2d0092271bfd13b0913ea Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 13 Nov 2018 17:52:48 +0100 +Subject: [PATCH] meson.build: pass -D_GNU_SOURCE when checking for functions + +As described in #166, -D_GNU_SOURCE needs to be passed to the meson function +availability checker. h/t to @tomeon for providing a link to the solution as +well. +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index f42ed16..c0f741e 100644 +--- a/meson.build ++++ b/meson.build +@@ -78,6 +78,6 @@ foreach ident : [ + ['copy_file_range', '''#include + #include '''], + ] +- have = cc.has_function(ident[0], prefix : ident[1]) ++ have = cc.has_function(ident[0], args : '-D_GNU_SOURCE', prefix : ident[1]) + conf.set10('HAVE_' + ident[0].to_upper(), have) + endforeach diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index e0b0af3d96..60e66437a8 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -214,7 +214,8 @@ and does not hamper local file system performance.") (sha256 (base32 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88")) - (file-name (string-append name "-" version "-checkout")))) + (file-name (string-append name "-" version "-checkout")) + (patches (search-patches "casync-renameat2-declaration.patch")))) (build-system meson-build-system) (native-inputs `(("pkg-config" ,pkg-config) -- cgit 1.4.1 From e555bbfc48ebb4ca019d3648324b1900a891cda1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Nov 2018 12:43:57 +0100 Subject: gnu: emacs-pdf-tools: Fix build with recent Poppler. * gnu/packages/patches/emacs-pdf-tools-poppler.patch: New file. * gnu/packages/emacs.scm (emacs-pdf-tools)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/emacs.scm | 3 +- gnu/packages/patches/emacs-pdf-tools-poppler.patch | 41 ++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-pdf-tools-poppler.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index aeff3f8298..4b194d7b13 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -667,6 +667,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ + %D%/packages/patches/emacs-pdf-tools-poppler.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-realgud-fix-configure-ac.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index c386b080e7..dfcee56afe 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1601,7 +1601,8 @@ filters, new key bindings and faces. It can be enabled by (file-name (git-file-name name version)) (sha256 (base32 - "1i4647vax5na73basc5dz4lh9kprir00fh8ps4i0l1y3ippnjs2s")))) + "1i4647vax5na73basc5dz4lh9kprir00fh8ps4i0l1y3ippnjs2s")) + (patches (search-patches "emacs-pdf-tools-poppler.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are no tests diff --git a/gnu/packages/patches/emacs-pdf-tools-poppler.patch b/gnu/packages/patches/emacs-pdf-tools-poppler.patch new file mode 100644 index 0000000000..0477508fa9 --- /dev/null +++ b/gnu/packages/patches/emacs-pdf-tools-poppler.patch @@ -0,0 +1,41 @@ +Fix build issue with recent Poppler: + . + +This combines upstream commits +6cd76dec9aece2a8daa90f17ab77fbf773157a1d..50a5297b82e26cfd52f6c00645ddc1057099d6a7 +for this file. + +diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc +index 0c62f73..427f9df 100644 +--- a/server/poppler-hack.cc ++++ b/server/poppler-hack.cc +@@ -51,7 +51,10 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + double y2; + }; + +- char *_xpoppler_goo_string_to_utf8(GooString *s) ++ // This function does not modify its argument s, but for ++ // compatibility reasons (e.g. getLength in GooString.h before 2015) ++ // with older poppler code, it can't be declared as such. ++ char *_xpoppler_goo_string_to_utf8(/* const */ GooString *s) + { + char *result; + +@@ -85,7 +88,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + // Set the rectangle of an annotation. It was first added in v0.26. + void xpoppler_annot_set_rectangle (PopplerAnnot *a, PopplerRectangle *rectangle) + { +- GooString *state = a->annot->getAppearState (); ++ GooString *state = (GooString*) a->annot->getAppearState (); + char *ustate = _xpoppler_goo_string_to_utf8 (state); + + a->annot->setRect (rectangle->x1, rectangle->y1, +@@ -105,7 +108,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL); + + annot = static_cast(POPPLER_ANNOT (poppler_annot)->annot); +- text = annot->getDate (); ++ text = (GooString*) annot->getDate (); + + return text ? _xpoppler_goo_string_to_utf8 (text) : NULL; + } -- cgit 1.4.1 From f9e5caf9bae93fdafbaa6732b3b4eb45f0126656 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Mon, 12 Nov 2018 02:42:25 +0800 Subject: gnu: teeworlds: Update to 0.7.0 [fixes CVE-2018-18541]. * gnu/packages/games.scm (teeworlds): Update to 0.7.0. [source]: Switch to git-fetch. Remove all bundled libraries except md5. [arguments]: Adjust accordingly. [inputs]: Use sdl2 instead of sdl and python-wrapper instead of python-2. Add json-parser and pnglite. * gnu/packages/patches/teeworlds-use-latest-wavpack.patch: Update it. --- gnu/packages/games.scm | 116 ++++++++++++++------- .../patches/teeworlds-use-latest-wavpack.patch | 72 ++++++++++--- 2 files changed, 136 insertions(+), 52 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index bc5d3d581b..b025dfe232 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2018 Tim Gesthuizen ;;; Copyright © 2018 Madalin Ionel-Patrascu ;;; Copyright © 2018 Benjamin Slade +;;; Copyright © 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -4139,31 +4140,54 @@ small robot living in the nano world, repair its maker.") (define-public teeworlds (package (name "teeworlds") - (version "0.6.4") + (version "0.7.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/teeworlds/teeworlds/" - "archive/" version "-release.tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + ;; do not use auto-generated tarballs + (method git-fetch) + (uri (git-reference + (url "https://github.com/teeworlds/teeworlds.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1mqhp6xjl75l49050cid36wxyjn1qr0vjx1c709dfg1lkvmgs6l3")) - (modules '((guix build utils))) - (snippet - '(begin - (for-each delete-file-recursively - '("src/engine/external/wavpack/" - "src/engine/external/zlib/")) + "0jigg2yikihbivzs7hpljr0mghx1l9v4f1cdr8fbmqv2wb51ah8q")) + (modules '((guix build utils) + (ice-9 ftw) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26))) + (snippet ; remove bundled libraries except md5 + '(let ((base-dir "src/engine/external/")) + (for-each (compose (cut delete-file-recursively <>) + (cut string-append base-dir <>)) + (remove (cut string-match "(^.)|(^md5$)" <>) + (scandir base-dir))) #t)) (patches (search-patches "teeworlds-use-latest-wavpack.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests included + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) + ;; The bundled json-parser uses an old API. + ;; To use the latest non-bundled version, we need to pass the + ;; length of the data in all 'json_parse_ex' calls. + (define (use-latest-json-parser file) + (substitute* file + (("engine/external/json-parser/json\\.h") + "json-parser/json.h") + (("json_parse_ex\\(&JsonSettings, pFileData, aError\\);") + "json_parse_ex(&JsonSettings, + pFileData, + strlen(pFileData), + aError);"))) + ;; Embed path to assets. (substitute* "src/engine/shared/storage.cpp" (("#define DATA_DIR.*") @@ -4173,50 +4197,68 @@ small robot living in the nano world, repair its maker.") "\""))) ;; Bam expects all files to have a recent time stamp. - (for-each (lambda (file) - (utime file 1 1)) + (for-each (cut utime <> 1 1) (find-files ".")) ;; Do not use bundled libraries. (substitute* "bam.lua" - (("if config.zlib.value == 1 then") - "if true then") - (("wavpack = .*") - "wavpack = {} -settings.link.libs:Add(\"wavpack\")\n")) + (("local json = Compile.+$") + "local json = nil +settings.link.libs:Add(\"jsonparser\")") + (("local png = Compile.+$") + "local png = nil +settings.link.libs:Add(\"pnglite\")") + (("local wavpack = Compile.+$") + "local wavpack = nil +settings.link.libs:Add(\"wavpack\")") + (("if config\\.zlib\\.value == 1") + "if config.zlib.value")) + (substitute* "src/engine/client/graphics_threaded.cpp" + (("engine/external/pnglite/pnglite\\.h") + "pnglite.h")) (substitute* "src/engine/client/sound.cpp" - (("#include ") - "#include ")) + (("engine/external/wavpack/wavpack\\.h") + "wavpack/wavpack.h")) + (for-each use-latest-json-parser + '("src/game/client/components/countryflags.cpp" + "src/game/client/components/menus_settings.cpp" + "src/game/client/components/skins.cpp" + "src/game/client/localization.cpp" + "src/game/editor/auto_map.h" + "src/game/editor/editor.cpp")) #t)) (replace 'build (lambda _ - (zero? (system* "bam" "-a" "-v" "release")))) + (invoke "bam" "-a" "-v" "conf=release"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (data (string-append out "/share/teeworlds/data"))) - (mkdir-p bin) - (mkdir-p data) - (for-each (lambda (file) - (install-file file bin)) - '("teeworlds" "teeworlds_srv")) - (copy-recursively "data" data) + (let* ((arch ,(system->linux-architecture + (or (%current-target-system) + (%current-system)))) + (build (string-append "build/" arch "/release/")) + (data-built (string-append build "data/")) + (out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (data (string-append out "/share/teeworlds/data/"))) + (for-each (cut install-file <> bin) + (map (cut string-append build <>) + '("teeworlds" "teeworlds_srv"))) + (copy-recursively data-built data) #t)))))) - ;; FIXME: teeworlds bundles the sources of "pnglite", a two-file PNG - ;; library without a build system. (inputs `(("freetype" ,freetype) ("glu" ,glu) + ("json-parser" ,json-parser) ("mesa" ,mesa) - ("sdl-union" ,(sdl-union (list sdl - sdl-mixer - sdl-image))) + ("pnglite" ,pnglite) + ("sdl2" ,sdl2) + ("sdl2-image" ,sdl2-image) + ("sdl2-mixer" ,sdl2-mixer) ("wavpack" ,wavpack) ("zlib" ,zlib))) (native-inputs `(("bam" ,bam) - ("python" ,python-2) + ("python" ,python-wrapper) ("pkg-config" ,pkg-config))) (home-page "https://www.teeworlds.com") (synopsis "2D retro multiplayer shooter game") diff --git a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch index e9fd991087..3ad1340d2e 100644 --- a/gnu/packages/patches/teeworlds-use-latest-wavpack.patch +++ b/gnu/packages/patches/teeworlds-use-latest-wavpack.patch @@ -1,10 +1,20 @@ -Downloaded from https://anonscm.debian.org/cgit/pkg-games/teeworlds.git/plain/debian/patches/new-wavpack.patch. +Downloaded from https://salsa.debian.org/games-team/teeworlds/raw/master/debian/patches/new-wavpack.patch. -This patch lets us build teeworlds with wavpack 5.1.0. +From: Markus Koschany +Date: Thu, 25 Oct 2018 20:52:27 +0200 +Subject: new-wavpack +Make wavpack compatible with Debian's version. +--- + src/engine/client/sound.cpp | 33 +++++++++++++++------------------ + src/engine/client/sound.h | 4 ---- + 2 files changed, 15 insertions(+), 22 deletions(-) + +diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp +index 048ec24..80de3c5 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp -@@ -328,17 +328,14 @@ void CSound::RateConvert(int SampleID) +@@ -325,10 +325,6 @@ void CSound::RateConvert(int SampleID) pSample->m_NumFrames = NumFrames; } @@ -12,10 +22,10 @@ This patch lets us build teeworlds with wavpack 5.1.0. -{ - return io_read(ms_File, pBuffer, Size); -} -- - int CSound::LoadWV(const char *pFilename) + + ISound::CSampleHandle CSound::LoadWV(const char *pFilename) { - CSample *pSample; +@@ -336,6 +332,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) int SampleID = -1; char aError[100]; WavpackContext *pContext; @@ -24,17 +34,18 @@ This patch lets us build teeworlds with wavpack 5.1.0. // don't waste memory on sound when we are stress testing if(g_Config.m_DbgStress) -@@ -351,19 +348,23 @@ int CSound::LoadWV(const char *pFilename - if(!m_pStorage) - return -1; +@@ -349,25 +347,29 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + return CSampleHandle(); + lock_wait(m_SoundLock); - ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); - if(!ms_File) + File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL, aWholePath, sizeof(aWholePath)); + if(!File) { dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename); - return -1; + lock_unlock(m_SoundLock); + return CSampleHandle(); } + else + { @@ -43,7 +54,14 @@ This patch lets us build teeworlds with wavpack 5.1.0. SampleID = AllocID(); if(SampleID < 0) - return -1; + { +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } pSample = &m_aSamples[SampleID]; - pContext = WavpackOpenFileInput(ReadData, aError); @@ -51,7 +69,29 @@ This patch lets us build teeworlds with wavpack 5.1.0. if (pContext) { int m_aSamples = WavpackGetNumSamples(pContext); -@@ -419,9 +420,6 @@ int CSound::LoadWV(const char *pFilename +@@ -385,8 +387,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(pSample->m_Channels > 2) + { + dbg_msg("sound/wv", "file is not mono or stereo. filename='%s'", pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -401,8 +403,8 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) + if(BitsPerSample != 16) + { + dbg_msg("sound/wv", "bps is %d, not 16, filname='%s'", BitsPerSample, pFilename); +- io_close(ms_File); +- ms_File = 0; ++ io_close(File); ++ File = 0; + lock_unlock(m_SoundLock); + return CSampleHandle(); + } +@@ -429,9 +431,6 @@ ISound::CSampleHandle CSound::LoadWV(const char *pFilename) dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError); } @@ -61,14 +101,16 @@ This patch lets us build teeworlds with wavpack 5.1.0. if(g_Config.m_Debug) dbg_msg("sound/wv", "loaded %s", pFilename); -@@ -527,7 +525,5 @@ void CSound::StopAll() - lock_unlock(m_SoundLock); +@@ -560,7 +559,5 @@ bool CSound::IsPlaying(CSampleHandle SampleID) + return Ret; } -IOHANDLE CSound::ms_File = 0; - IEngineSound *CreateEngineSound() { return new CSound; } +diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h +index ff357c0..cec2cde 100644 --- a/src/engine/client/sound.h +++ b/src/engine/client/sound.h @@ -21,10 +21,6 @@ public: @@ -81,4 +123,4 @@ This patch lets us build teeworlds with wavpack 5.1.0. - virtual bool IsSoundEnabled() { return m_SoundEnabled != 0; } - virtual int LoadWV(const char *pFilename); + virtual CSampleHandle LoadWV(const char *pFilename); -- cgit 1.4.1 From 7ff3f3d22caaf03948a60ae691313db28f4fab06 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Nov 2018 01:47:36 +0100 Subject: gnu: python-scikit-learn: Update to 0.20.1. * gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/machine-learning.scm (python-scikit-learn): Update to 0.20.1. [source](patches): Remove. [arguments]: Skip network tests with pytest instead of deleting files. Make sure $HOME is writable. (python2-scikit-learn): Rewrite in terms of PACKAGE-WITH-PYTHON2. --- gnu/local.mk | 1 - gnu/packages/machine-learning.scm | 35 +++++----------------- ...hon-scikit-learn-fix-test-non-determinism.patch | 25 ---------------- 3 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e56f8a28dc..b67958d083 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1090,7 +1090,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ - %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 09c525ff20..4b2447ece0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -706,7 +706,7 @@ computing environments.") (define-public python-scikit-learn (package (name "python-scikit-learn") - (version "0.19.2") + (version "0.20.1") (source (origin (method git-fetch) @@ -716,9 +716,7 @@ computing environments.") (file-name (git-file-name name version)) (sha256 (base32 - "1dk9hdj01c0bny4ps78b7869fjw9gr6qklxf6wyql8h6nh4k19xm")) - (patches (search-patches - "python-scikit-learn-fix-test-non-determinism.patch")))) + "0qv7ir1fy9vjar3llc72yxmfja3gxm5icdf0y3q57vsn3wcdglkz")))) (build-system python-build-system) (arguments `(#:phases @@ -729,11 +727,11 @@ computing environments.") (lambda _ ;; Restrict OpenBLAS threads to prevent segfaults while testing! (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t)) + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + (invoke "pytest" "sklearn" "-m" "not network"))) ;; FIXME: This fails with permission denied (delete 'reset-gzip-timestamps)))) (inputs @@ -753,24 +751,7 @@ data analysis.") (license license:bsd-3))) (define-public python2-scikit-learn - (let ((parent (package-with-python2 python-scikit-learn))) - (package (inherit parent) - (arguments - (substitute-keyword-arguments (package-arguments parent) - ((#:phases phases) - `(modify-phases ,phases - (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Some tests expect to be able to write to HOME. - (setenv "HOME" "/tmp") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_kddcup99.py") - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t))))))))) + (package-with-python2 python-scikit-learn)) (define-public python-autograd (let* ((commit "442205dfefe407beffb33550846434baa90c4de7") diff --git a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch b/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch deleted file mode 100644 index 90328cc0eb..0000000000 --- a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch +++ /dev/null @@ -1,25 +0,0 @@ -This patch stops a test sometimes failing because of non-determinism. See -https://github.com/scikit-learn/scikit-learn/pull/9542 - -From ff9f6db6e8b59c2b3528c8137ed4054f57c1d7c4 Mon Sep 17 00:00:00 2001 -From: Hanmin Qin -Date: Sun, 13 Aug 2017 22:13:49 +0800 -Subject: [PATCH] add random_state - ---- - sklearn/tests/test_kernel_ridge.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sklearn/tests/test_kernel_ridge.py b/sklearn/tests/test_kernel_ridge.py -index 4750a096ac6..979875870b6 100644 ---- a/sklearn/tests/test_kernel_ridge.py -+++ b/sklearn/tests/test_kernel_ridge.py -@@ -10,7 +10,7 @@ - from sklearn.utils.testing import assert_array_almost_equal - - --X, y = make_regression(n_features=10) -+X, y = make_regression(n_features=10, random_state=0) - Xcsr = sp.csr_matrix(X) - Xcsc = sp.csc_matrix(X) - Y = np.array([y, y]).T -- cgit 1.4.1 From 37751b480fccde4db000fc4072f5e23af46fa829 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 22 Nov 2018 21:55:29 +0100 Subject: gnu: podofo: Add patch to fix build. * gnu/packages/patches/podofo-cmake-3.12.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pdf.scm (podofo)[source]: Add patch. --- gnu/local.mk | 1 + gnu/packages/patches/podofo-cmake-3.12.patch | 19 +++++++++++++++++++ gnu/packages/pdf.scm | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/podofo-cmake-3.12.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b67958d083..4a63faa22d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1055,6 +1055,7 @@ dist_patch_DATA = \ %D%/packages/patches/plink-1.07-unclobber-i.patch \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ + %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/poppler-CVE-2018-19149.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch new file mode 100644 index 0000000000..0a3c19b21a --- /dev/null +++ b/gnu/packages/patches/podofo-cmake-3.12.patch @@ -0,0 +1,19 @@ +The build fails with cmake 3.12.0. This patch will be obsolete with the next +release. + +https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch + + +--- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 ++++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 +@@ -2,10 +2,3 @@ + TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) + SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") + ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) +- +-# Copy the test samples over to the build tree +-ADD_CUSTOM_COMMAND( +- TARGET TokenizerTest +- POST_BUILD +- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" +- ) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 28737c36e4..b89d49fd52 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -557,7 +557,8 @@ interaction.") "/podofo-" version ".tar.gz")) (sha256 (base32 - "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")))) + "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")) + (patches (search-patches "podofo-cmake-3.12.patch")))) (build-system cmake-build-system) (native-inputs `(("cppunit" ,cppunit) -- cgit 1.4.1 From 74e35e8c94193a03cb1db61934340540ce0884a3 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Tue, 20 Nov 2018 16:32:16 -0800 Subject: gnu: Add u-boot-pinebook. * gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch: New file. * gnu/packages/patches/u-boot-pinebook-syscon-node.patch: New file. * gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch: New file. * gnu/packages/patches/u-boot-pinebook-video-bridge.patch: New file. * gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch: New file. * gnu/packages/patches/u-boot-pinebook-dts.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/bootloaders.scm (u-boot-pinebook): New exported variable. * gnu/bootloader/u-boot.scm (u-boot-pinebook-bootloader): New exported variable. * gnu/system/install.scm (pinebook-installation-os): New exported variable. --- gnu/bootloader/u-boot.scm | 6 + gnu/local.mk | 6 + gnu/packages/bootloaders.scm | 16 + .../patches/u-boot-pinebook-a64-update-dts.patch | 1485 ++++++++++++++++++++ gnu/packages/patches/u-boot-pinebook-dts.patch | 388 +++++ .../patches/u-boot-pinebook-mmc-calibration.patch | 98 ++ .../patches/u-boot-pinebook-r_i2c-controller.patch | 70 + .../patches/u-boot-pinebook-syscon-node.patch | 38 + .../patches/u-boot-pinebook-video-bridge.patch | 50 + gnu/system/install.scm | 6 + 10 files changed, 2163 insertions(+) create mode 100644 gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch create mode 100644 gnu/packages/patches/u-boot-pinebook-dts.patch create mode 100644 gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch create mode 100644 gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch create mode 100644 gnu/packages/patches/u-boot-pinebook-syscon-node.patch create mode 100644 gnu/packages/patches/u-boot-pinebook-video-bridge.patch (limited to 'gnu/packages/patches') diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index b5fab14e14..1c6f322bc4 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -32,6 +32,7 @@ u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-pine64-plus-bootloader + u-boot-pinebook-bootloader u-boot-puma-rk3399-bootloader u-boot-wandboard-bootloader)) @@ -168,6 +169,11 @@ (inherit u-boot-allwinner64-bootloader) (package u-boot-pine64-plus))) +(define u-boot-pinebook-bootloader + (bootloader + (inherit u-boot-allwinner64-bootloader) + (package u-boot-pinebook))) + (define u-boot-puma-rk3399-bootloader (bootloader (inherit u-boot-bootloader) diff --git a/gnu/local.mk b/gnu/local.mk index 7fc8fb0620..c56278e933 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1186,6 +1186,12 @@ 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/u-boot-pinebook-a64-update-dts.patch \ + %D%/packages/patches/u-boot-pinebook-mmc-calibration.patch \ + %D%/packages/patches/u-boot-pinebook-r_i2c-controller.patch \ + %D%/packages/patches/u-boot-pinebook-dts.patch \ + %D%/packages/patches/u-boot-pinebook-syscon-node.patch \ + %D%/packages/patches/u-boot-pinebook-video-bridge.patch \ %D%/packages/patches/unrtf-CVE-2016-10091.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 328e834bc2..0c11639150 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -579,6 +579,22 @@ board-independent tools."))) (define-public u-boot-pine64-plus (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu")) +(define-public u-boot-pinebook + (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu"))) + (package + (inherit base) + (source (origin + (inherit (package-source u-boot)) + (patches (search-patches + ;; Add patches to enable Pinebook support from sunxi + ;; maintainer tree: git://git.denx.de/u-boot-sunxi.git + "u-boot-pinebook-a64-update-dts.patch" + "u-boot-pinebook-syscon-node.patch" + "u-boot-pinebook-mmc-calibration.patch" + "u-boot-pinebook-video-bridge.patch" + "u-boot-pinebook-r_i2c-controller.patch" + "u-boot-pinebook-dts.patch"))))))) + (define-public u-boot-bananapi-m2-ultra (make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf")) diff --git a/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch new file mode 100644 index 0000000000..9d0a08c8bf --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch @@ -0,0 +1,1485 @@ +From 1b39a1834ed182bbd8036a5cd74a9ea111fa4691 Mon Sep 17 00:00:00 2001 +From: Andre Przywara +Date: Mon, 29 Oct 2018 00:56:47 +0000 +Subject: [PATCH 03/13] sunxi: A64: Update .dts/.dtsi files +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Update the .dts/.dtsi file from the Linux sunxi/dt64-for-4.20 tree: +commit 679294497be31596e1c9c61507746d72b6b05f26 +Author: Rodrigo Exterckötter Tjäder +Date: Wed Sep 26 19:48:24 2018 +0000 + arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay + +Signed-off-by: Andre Przywara +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + arch/arm/dts/sun50i-a64-amarula-relic.dts | 168 +++++++++++++- + arch/arm/dts/sun50i-a64-bananapi-m64.dts | 34 ++- + arch/arm/dts/sun50i-a64-nanopi-a64.dts | 89 +++++++- + arch/arm/dts/sun50i-a64-olinuxino.dts | 103 ++++++++- + arch/arm/dts/sun50i-a64-orangepi-win.dts | 179 ++++++++++++++- + arch/arm/dts/sun50i-a64-pine64.dts | 32 ++- + arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 32 ++- + arch/arm/dts/sun50i-a64-sopine.dtsi | 15 ++ + arch/arm/dts/sun50i-a64.dtsi | 313 +++++++++++++++++++++++++-- + 9 files changed, 920 insertions(+), 45 deletions(-) + +diff --git a/arch/arm/dts/sun50i-a64-amarula-relic.dts b/arch/arm/dts/sun50i-a64-amarula-relic.dts +index f3b4e93ece..6cb2b7f0c8 100644 +--- a/arch/arm/dts/sun50i-a64-amarula-relic.dts ++++ b/arch/arm/dts/sun50i-a64-amarula-relic.dts +@@ -22,11 +22,11 @@ + stdout-path = "serial0:115200n8"; + }; + +- reg_vcc3v3: vcc3v3 { +- compatible = "regulator-fixed"; +- regulator-name = "vcc3v3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; ++ wifi_pwrseq: wifi-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&rtc 1>; ++ clock-names = "ext_clock"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ + }; + }; + +@@ -34,10 +34,34 @@ + status = "okay"; + }; + ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dcdc1>; ++ /* ++ * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but ++ * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with ++ * 0Ohm register to vcc-io-wifi so eldo1 is used. ++ */ ++ vqmmc-supply = <®_eldo1>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&r_pio>; ++ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; +- vmmc-supply = <®_vcc3v3>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; +@@ -48,9 +72,138 @@ + status = "okay"; + }; + ++&r_rsb { ++ status = "okay"; ++ ++ axp803: pmic@3a3 { ++ compatible = "x-powers,axp803"; ++ reg = <0x3a3>; ++ interrupt-parent = <&r_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ ++ }; ++}; ++ ++#include "axp803.dtsi" ++ ++®_aldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "avdd-csi"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pl"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1040000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-name = "vdd-cpux"; ++}; ++ ++/* DCDC3 is polyphased with DCDC2 */ ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dcdc6 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-hdmi-dsi-sensor"; ++}; ++ ++®_dldo2 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-mipi"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "dovdd-csi"; ++}; ++ ++®_dldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi-io"; ++}; ++ ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ ++®_eldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "cpvdd"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "dvdd-csi"; ++}; ++ ++®_fldo1 { ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-1v2-hsic"; ++}; ++ ++/* ++ * The A64 chip cannot work without this regulator off, although ++ * it seems to be only driving the AR100 core. ++ * Maybe we don't still know well about CPUs domain. ++ */ ++®_fldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +@@ -61,5 +214,6 @@ + + &usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; + status = "okay"; + }; +diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +index 0716b14411..ef1c90401b 100644 +--- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts ++++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts +@@ -60,6 +60,17 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -86,6 +97,10 @@ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -103,6 +118,17 @@ + status = "okay"; + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; +@@ -151,7 +177,7 @@ + + &mmc2 { + pinctrl-names = "default"; +- pinctrl-0 = <&mmc2_pins>; ++ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; + vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; +@@ -296,9 +322,13 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts +index e2dce48fa2..31884dbc88 100644 +--- a/arch/arm/dts/sun50i-a64-nanopi-a64.dts ++++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts +@@ -51,12 +51,44 @@ + compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ blue { ++ label = "nanopi-a64:blue:status"; ++ gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ ++ }; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&rtc 1>; ++ clock-names = "ext_clock"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ ++ }; ++}; ++ ++&de { ++ status = "okay"; + }; + + &ehci0 { +@@ -67,6 +99,26 @@ + status = "okay"; + }; + ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_dcdc1>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + /* i2c1 connected with gpio headers like pine64, bananapi */ + &i2c1 { + pinctrl-names = "default"; +@@ -78,6 +130,13 @@ + bias-pull-up; + }; + ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -88,6 +147,24 @@ + status = "okay"; + }; + ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dcdc1>; ++ vqmmc-supply = <®_dldo4>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ rtl8189etv: wifi@1 { ++ reg = <1>; ++ interrupt-parent = <&r_pio>; ++ interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -125,9 +202,9 @@ + + ®_dcdc1 { + regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "vcc-3v"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; + }; + + ®_dcdc2 { +@@ -195,9 +272,13 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts +index 3b3081b10e..f7a4bccaa5 100644 +--- a/arch/arm/dts/sun50i-a64-olinuxino.dts ++++ b/arch/arm/dts/sun50i-a64-olinuxino.dts +@@ -51,6 +51,7 @@ + compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; + }; + +@@ -58,12 +59,74 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb1-vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */ ++ status = "okay"; ++ }; ++ + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_dcdc1>; ++ allwinner,tx-delay-ps = <600>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -92,6 +155,14 @@ + }; + }; + ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ + &r_rsb { + status = "okay"; + +@@ -100,6 +171,7 @@ + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ + }; + }; + +@@ -142,10 +214,14 @@ + + /* DCDC3 is polyphased with DCDC2 */ + ++/* ++ * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal ++ * 1.35V that the PMIC can drive. ++ */ + ®_dcdc5 { + regulator-always-on; +- regulator-min-microvolt = <1500000>; +- regulator-max-microvolt = <1500000>; ++ regulator-min-microvolt = <1360000>; ++ regulator-max-microvolt = <1360000>; + regulator-name = "vcc-ddr3"; + }; + +@@ -180,6 +256,11 @@ + regulator-name = "vcc-wifi-io"; + }; + ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ + ®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +@@ -214,8 +295,24 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usbphy { + status = "okay"; ++ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; ++ usb1_vbus-supply = <®_usb1_vbus>; + }; +diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts +index bf42690a33..b0c64f7579 100644 +--- a/arch/arm/dts/sun50i-a64-orangepi-win.dts ++++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts +@@ -1,5 +1,6 @@ + /* + * Copyright (C) 2017 Jagan Teki ++ * Copyright (C) 2017-2018 Samuel Holland + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -51,23 +52,127 @@ + compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64"; + + aliases { ++ ethernet0 = &emac; + serial0 = &uart0; ++ serial1 = &uart1; ++ serial2 = &uart2; ++ serial3 = &uart3; ++ serial4 = &uart4; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status { ++ label = "orangepi:green:status"; ++ gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ }; ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */ ++ status = "okay"; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb1-vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */ ++ status = "okay"; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ ++ }; ++}; ++ ++&de { ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; + }; + + &ehci1 { + status = "okay"; + }; + ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-supply = <®_gmac_3v3>; ++ status = "okay"; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&mdio { ++ ext_rgmii_phy: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <1>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_dcdc1>; +- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ ++ disable-wp; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dldo2>; ++ vqmmc-supply = <®_dldo4>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&ohci0 { + status = "okay"; + }; + +@@ -89,9 +194,8 @@ + #include "axp803.dtsi" + + ®_aldo1 { +- regulator-always-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; + regulator-name = "afvcc-csi"; + }; + +@@ -163,12 +267,23 @@ + regulator-name = "vcc-wifi-io"; + }; + ++®_drivevbus { ++ regulator-name = "usb0-vbus"; ++ status = "okay"; ++}; ++ + ®_eldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; + }; + ++®_eldo3 { ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "dvdd-csi"; ++}; ++ + ®_fldo1 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; +@@ -191,13 +306,65 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ ++&spi0 { ++ status = "okay"; ++ ++ spi-flash@0 { ++ compatible = "mxicy,mx25l1606e", "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <80000000>; ++ m25p,fast-read; ++ status = "okay"; ++ }; ++}; ++ ++/* On debug connector */ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +-&usbphy { ++/* Bluetooth */ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ status = "okay"; ++}; ++ ++/* On Pi-2 connector, RTS/CTS optional */ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pins>; ++ status = "disabled"; ++}; ++ ++/* On Pi-2 connector, RTS/CTS optional */ ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart3_pins>; ++ status = "disabled"; ++}; ++ ++/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart4_pins>; ++ status = "disabled"; ++}; ++ ++&usb_otg { ++ dr_mode = "otg"; + status = "okay"; + }; + ++&usbphy { ++ usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ ++ usb0_vbus-supply = <®_drivevbus>; ++ usb1_vbus-supply = <®_usb1_vbus>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts +index a75825798a..c077b6c1f4 100644 +--- a/arch/arm/dts/sun50i-a64-pine64.dts ++++ b/arch/arm/dts/sun50i-a64-pine64.dts +@@ -62,6 +62,21 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++}; ++ ++&de { ++ status = "okay"; + }; + + &ehci0 { +@@ -82,6 +97,17 @@ + + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; +@@ -229,6 +255,10 @@ + regulator-name = "vcc-rtc"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + /* On Euler connector */ + &spdif { + status = "disabled"; +@@ -237,7 +267,7 @@ + /* On Exp and Euler connectors */ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +index abe179de35..53fcc9098d 100644 +--- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts ++++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts +@@ -61,6 +61,17 @@ + stdout-path = "serial0:115200n8"; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + reg_vcc1v8: vcc1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8"; +@@ -69,6 +80,10 @@ + }; + }; + ++&de { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -86,6 +101,17 @@ + status = "okay"; + }; + ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ + &mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; +@@ -134,9 +160,13 @@ + regulator-name = "vcc-wifi"; + }; + ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ + &uart0 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + +diff --git a/arch/arm/dts/sun50i-a64-sopine.dtsi b/arch/arm/dts/sun50i-a64-sopine.dtsi +index 43418bd881..6723b8695e 100644 +--- a/arch/arm/dts/sun50i-a64-sopine.dtsi ++++ b/arch/arm/dts/sun50i-a64-sopine.dtsi +@@ -45,6 +45,8 @@ + + #include "sun50i-a64.dtsi" + ++#include ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; +@@ -52,6 +54,7 @@ + non-removable; + disable-wp; + bus-width = <4>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + status = "okay"; + }; + +@@ -66,6 +69,18 @@ + }; + }; + ++&spi0 { ++ status = "okay"; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ }; ++}; ++ + #include "axp803.dtsi" + + ®_aldo2 { +diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi +index 7a083637c4..f3a66f8882 100644 +--- a/arch/arm/dts/sun50i-a64.dtsi ++++ b/arch/arm/dts/sun50i-a64.dtsi +@@ -43,9 +43,12 @@ + */ + + #include ++#include + #include + #include + #include ++#include ++#include + + / { + interrupt-parent = <&gic>; +@@ -57,17 +60,21 @@ + #size-cells = <1>; + ranges; + +-/* +- * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU. +- * However there is no support for this clock on A64 yet, so we depend +- * on the upstream clocks here to keep them (and thus CLK_MIXER0) up. +- */ + simplefb_lcd: framebuffer-lcd { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "mixer0-lcd0"; + clocks = <&ccu CLK_TCON0>, +- <&ccu CLK_DE>, <&ccu CLK_BUS_DE>; ++ <&display_clocks CLK_MIXER0>; ++ status = "disabled"; ++ }; ++ ++ simplefb_hdmi: framebuffer-hdmi { ++ compatible = "allwinner,simple-framebuffer", ++ "simple-framebuffer"; ++ allwinner,pipeline = "mixer1-lcd1-hdmi"; ++ clocks = <&display_clocks CLK_MIXER1>, ++ <&ccu CLK_TCON1>, <&ccu CLK_HDMI>; + status = "disabled"; + }; + }; +@@ -81,6 +88,7 @@ + device_type = "cpu"; + reg = <0>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu1: cpu@1 { +@@ -88,6 +96,7 @@ + device_type = "cpu"; + reg = <1>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu2: cpu@2 { +@@ -95,6 +104,7 @@ + device_type = "cpu"; + reg = <2>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; + + cpu3: cpu@3 { +@@ -102,7 +112,20 @@ + device_type = "cpu"; + reg = <3>; + enable-method = "psci"; ++ next-level-cache = <&L2>; + }; ++ ++ L2: l2-cache { ++ compatible = "cache"; ++ cache-level = <2>; ++ }; ++ }; ++ ++ de: display-engine { ++ compatible = "allwinner,sun50i-a64-display-engine"; ++ allwinner,pipelines = <&mixer0>, ++ <&mixer1>; ++ status = "disabled"; + }; + + osc24M: osc24M_clk { +@@ -168,10 +191,92 @@ + #size-cells = <1>; + ranges; + ++ de2@1000000 { ++ compatible = "allwinner,sun50i-a64-de2"; ++ reg = <0x1000000 0x400000>; ++ allwinner,sram = <&de2_sram 1>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x1000000 0x400000>; ++ ++ display_clocks: clock@0 { ++ compatible = "allwinner,sun50i-a64-de2-clk"; ++ reg = <0x0 0x100000>; ++ clocks = <&ccu CLK_DE>, ++ <&ccu CLK_BUS_DE>; ++ clock-names = "mod", ++ "bus"; ++ resets = <&ccu RST_BUS_DE>; ++ #clock-cells = <1>; ++ #reset-cells = <1>; ++ }; ++ ++ mixer0: mixer@100000 { ++ compatible = "allwinner,sun50i-a64-de2-mixer-0"; ++ reg = <0x100000 0x100000>; ++ clocks = <&display_clocks CLK_BUS_MIXER0>, ++ <&display_clocks CLK_MIXER0>; ++ clock-names = "bus", ++ "mod"; ++ resets = <&display_clocks RST_MIXER0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mixer0_out: port@1 { ++ reg = <1>; ++ ++ mixer0_out_tcon0: endpoint { ++ remote-endpoint = <&tcon0_in_mixer0>; ++ }; ++ }; ++ }; ++ }; ++ ++ mixer1: mixer@200000 { ++ compatible = "allwinner,sun50i-a64-de2-mixer-1"; ++ reg = <0x200000 0x100000>; ++ clocks = <&display_clocks CLK_BUS_MIXER1>, ++ <&display_clocks CLK_MIXER1>; ++ clock-names = "bus", ++ "mod"; ++ resets = <&display_clocks RST_MIXER1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mixer1_out: port@1 { ++ reg = <1>; ++ ++ mixer1_out_tcon1: endpoint { ++ remote-endpoint = <&tcon1_in_mixer1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ + syscon: syscon@1c00000 { +- compatible = "allwinner,sun50i-a64-system-controller", +- "syscon"; ++ compatible = "allwinner,sun50i-a64-system-control"; + reg = <0x01c00000 0x1000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ sram_c: sram@18000 { ++ compatible = "mmio-sram"; ++ reg = <0x00018000 0x28000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x00018000 0x28000>; ++ ++ de2_sram: sram-section@0 { ++ compatible = "allwinner,sun50i-a64-sram-c"; ++ reg = <0x0000 0x28000>; ++ }; ++ }; + }; + + dma: dma-controller@1c02000 { +@@ -185,6 +290,75 @@ + #dma-cells = <1>; + }; + ++ tcon0: lcd-controller@1c0c000 { ++ compatible = "allwinner,sun50i-a64-tcon-lcd", ++ "allwinner,sun8i-a83t-tcon-lcd"; ++ reg = <0x01c0c000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>; ++ clock-names = "ahb", "tcon-ch0"; ++ clock-output-names = "tcon-pixel-clock"; ++ resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; ++ reset-names = "lcd", "lvds"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon0_in: port@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ tcon0_in_mixer0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&mixer0_out_tcon0>; ++ }; ++ }; ++ ++ tcon0_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ tcon1: lcd-controller@1c0d000 { ++ compatible = "allwinner,sun50i-a64-tcon-tv", ++ "allwinner,sun8i-a83t-tcon-tv"; ++ reg = <0x01c0d000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>; ++ clock-names = "ahb", "tcon-ch1"; ++ resets = <&ccu RST_BUS_TCON1>; ++ reset-names = "lcd"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon1_in: port@0 { ++ reg = <0>; ++ ++ tcon1_in_mixer1: endpoint { ++ remote-endpoint = <&mixer1_out_tcon1>; ++ }; ++ }; ++ ++ tcon1_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ tcon1_out_hdmi: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&hdmi_in_tcon1>; ++ }; ++ }; ++ }; ++ }; ++ + mmc0: mmc@1c0f000 { + compatible = "allwinner,sun50i-a64-mmc"; + reg = <0x01c0f000 0x1000>; +@@ -227,6 +401,11 @@ + #size-cells = <0>; + }; + ++ sid: eeprom@1c14000 { ++ compatible = "allwinner,sun50i-a64-sid"; ++ reg = <0x1c14000 0x400>; ++ }; ++ + usb_otg: usb@1c19000 { + compatible = "allwinner,sun8i-a33-musb"; + reg = <0x01c19000 0x0400>; +@@ -356,7 +535,7 @@ + }; + + mmc2_pins: mmc2-pins { +- pins = "PC1", "PC5", "PC6", "PC8", "PC9", ++ pins = "PC5", "PC6", "PC8", "PC9", + "PC10","PC11", "PC12", "PC13", + "PC14", "PC15", "PC16"; + function = "mmc2"; +@@ -364,6 +543,18 @@ + bias-pull-up; + }; + ++ mmc2_ds_pin: mmc2-ds-pin { ++ pins = "PC1"; ++ function = "mmc2"; ++ drive-strength = <30>; ++ bias-pull-up; ++ }; ++ ++ pwm_pin: pwm_pin { ++ pins = "PD22"; ++ function = "pwm"; ++ }; ++ + rmii_pins: rmii_pins { + pins = "PD10", "PD11", "PD13", "PD14", "PD17", + "PD18", "PD19", "PD20", "PD22", "PD23"; +@@ -394,7 +585,7 @@ + function = "spi1"; + }; + +- uart0_pins_a: uart0 { ++ uart0_pb_pins: uart0-pb-pins { + pins = "PB8", "PB9"; + function = "uart0"; + }; +@@ -474,15 +665,6 @@ + status = "disabled"; + }; + +- pwm: pwm@1c21400 { +- compatible = "allwinner,sun50i-a64-pwm", +- "allwinner,sun5i-a13-pwm"; +- reg = <0x01c21400 0x8>; +- clocks = <&osc24M>; +- #pwm-cells = <3>; +- status = "disabled"; +- }; +- + uart0: serial@1c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; +@@ -617,8 +799,6 @@ + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + status = "disabled"; +- #address-cells = <1>; +- #size-cells = <0>; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; +@@ -638,11 +818,69 @@ + #interrupt-cells = <3>; + }; + ++ pwm: pwm@1c21400 { ++ compatible = "allwinner,sun50i-a64-pwm", ++ "allwinner,sun5i-a13-pwm"; ++ reg = <0x01c21400 0x400>; ++ clocks = <&osc24M>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_pin>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ ++ hdmi: hdmi@1ee0000 { ++ compatible = "allwinner,sun50i-a64-dw-hdmi", ++ "allwinner,sun8i-a83t-dw-hdmi"; ++ reg = <0x01ee0000 0x10000>; ++ reg-io-width = <1>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, ++ <&ccu CLK_HDMI>; ++ clock-names = "iahb", "isfr", "tmds"; ++ resets = <&ccu RST_BUS_HDMI1>; ++ reset-names = "ctrl"; ++ phys = <&hdmi_phy>; ++ phy-names = "hdmi-phy"; ++ status = "disabled"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi_in: port@0 { ++ reg = <0>; ++ ++ hdmi_in_tcon1: endpoint { ++ remote-endpoint = <&tcon1_out_hdmi>; ++ }; ++ }; ++ ++ hdmi_out: port@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ hdmi_phy: hdmi-phy@1ef0000 { ++ compatible = "allwinner,sun50i-a64-hdmi-phy"; ++ reg = <0x01ef0000 0x10000>; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, ++ <&ccu 7>; ++ clock-names = "bus", "mod", "pll-0"; ++ resets = <&ccu RST_BUS_HDMI0>; ++ reset-names = "phy"; ++ #phy-cells = <0>; ++ }; ++ + rtc: rtc@1f00000 { + compatible = "allwinner,sun6i-a31-rtc"; + reg = <0x01f00000 0x54>; + interrupts = , + ; ++ clock-output-names = "rtc-osc32k", "rtc-osc32k-out"; ++ clocks = <&osc32k>; ++ #clock-cells = <1>; + }; + + r_intc: interrupt-controller@1f00c00 { +@@ -664,6 +902,29 @@ + #reset-cells = <1>; + }; + ++ r_i2c: i2c@1f02400 { ++ compatible = "allwinner,sun50i-a64-i2c", ++ "allwinner,sun6i-a31-i2c"; ++ reg = <0x01f02400 0x400>; ++ interrupts = ; ++ clocks = <&r_ccu CLK_APB0_I2C>; ++ resets = <&r_ccu RST_APB0_I2C>; ++ status = "disabled"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ r_pwm: pwm@1f03800 { ++ compatible = "allwinner,sun50i-a64-pwm", ++ "allwinner,sun5i-a13-pwm"; ++ reg = <0x01f03800 0x400>; ++ clocks = <&osc24M>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_pwm_pin>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ + r_pio: pinctrl@1f02c00 { + compatible = "allwinner,sun50i-a64-r-pinctrl"; + reg = <0x01f02c00 0x400>; +@@ -675,6 +936,16 @@ + interrupt-controller; + #interrupt-cells = <3>; + ++ r_i2c_pl89_pins: r-i2c-pl89-pins { ++ pins = "PL8", "PL9"; ++ function = "s_i2c"; ++ }; ++ ++ r_pwm_pin: pwm { ++ pins = "PL10"; ++ function = "s_pwm"; ++ }; ++ + r_rsb_pins: rsb { + pins = "PL0", "PL1"; + function = "s_rsb"; +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-dts.patch b/gnu/packages/patches/u-boot-pinebook-dts.patch new file mode 100644 index 0000000000..48c004fdfc --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-dts.patch @@ -0,0 +1,388 @@ +From b972831c3cd24f3c9bb0995ed61db8f8239f3391 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick +Date: Mon, 5 Nov 2018 20:24:31 -0800 +Subject: [PATCH 10/13] sunxi: DT: add support for Pinebook + +Pinebook is a laptop produced by Pine64, with USB-connected keyboard, +USB-connected touchpad and an eDP LCD panel connected via a RGB-eDP +bridge from Analogix. + +Signed-off-by: Vasily Khoruzhick +Acked-by: Maxime Ripard +Tested-by: Maxime Ripard +Cc: Vagrant Cascadian +Reviewed-by: Jagan Teki +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi | 15 ++ + arch/arm/dts/sun50i-a64-pinebook.dts | 294 +++++++++++++++++++++++++++ + configs/pinebook_defconfig | 22 ++ + 4 files changed, 332 insertions(+) + create mode 100644 arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi + create mode 100644 arch/arm/dts/sun50i-a64-pinebook.dts + create mode 100644 configs/pinebook_defconfig + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 3093c1185e..eae6b9ee5d 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -406,6 +406,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ + sun50i-a64-orangepi-win.dtb \ + sun50i-a64-pine64-plus.dtb \ + sun50i-a64-pine64.dtb \ ++ sun50i-a64-pinebook.dtb \ + sun50i-a64-sopine-baseboard.dtb + dtb-$(CONFIG_MACH_SUN9I) += \ + sun9i-a80-optimus.dtb \ +diff --git a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi +new file mode 100644 +index 0000000000..a99b7171d0 +--- /dev/null ++++ b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi +@@ -0,0 +1,15 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2018 Vasily Khoruzhick ++ * ++ */ ++ ++/* The ANX6345 eDP-bridge is on r_i2c */ ++&r_i2c { ++ anx6345: edp-bridge@38 { ++ compatible = "analogix,anx6345"; ++ reg = <0x38>; ++ reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ ++ status = "okay"; ++ }; ++}; +diff --git a/arch/arm/dts/sun50i-a64-pinebook.dts b/arch/arm/dts/sun50i-a64-pinebook.dts +new file mode 100644 +index 0000000000..ec537c5297 +--- /dev/null ++++ b/arch/arm/dts/sun50i-a64-pinebook.dts +@@ -0,0 +1,294 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ * Copyright (C) 2017 Icenowy Zheng ++ * Copyright (C) 2018 Vasily Khoruzhick ++ * ++ */ ++ ++/dts-v1/; ++ ++#include "sun50i-a64.dtsi" ++ ++#include ++#include ++#include ++ ++/ { ++ model = "Pinebook"; ++ compatible = "pine64,pinebook", "allwinner,sun50i-a64"; ++ ++ aliases { ++ serial0 = &uart0; ++ ethernet0 = &rtl8723cs; ++ }; ++ ++ vdd_bl: regulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "bl-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ ++ enable-active-high; ++ }; ++ ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 0>; ++ brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>; ++ default-brightness-level = <2>; ++ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ ++ power-supply = <&vdd_bl>; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ ++ framebuffer-lcd { ++ panel-supply = <®_dc1sw>; ++ dvdd25-supply = <®_dldo2>; ++ dvdd12-supply = <®_fldo1>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ lid_switch { ++ label = "Lid Switch"; ++ gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */ ++ linux,input-type = ; ++ linux,code = ; ++ linux,can-disable; ++ wakeup-source; ++ }; ++ }; ++ ++ reg_vcc3v3: vcc3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ ++ }; ++}; ++ ++&ehci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins>; ++ vmmc-supply = <®_dcdc1>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; ++ disable-wp; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ vmmc-supply = <®_dldo4>; ++ vqmmc-supply = <®_eldo1>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ rtl8723cs: wifi@1 { ++ reg = <1>; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>; ++ vmmc-supply = <®_dcdc1>; ++ vqmmc-supply = <®_eldo1>; ++ bus-width = <8>; ++ non-removable; ++ cap-mmc-hw-reset; ++ mmc-hs200-1_8v; ++ status = "okay"; ++}; ++ ++&ohci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&pwm { ++ status = "okay"; ++}; ++ ++&r_rsb { ++ status = "okay"; ++ ++ axp803: pmic@3a3 { ++ compatible = "x-powers,axp803"; ++ reg = <0x3a3>; ++ interrupt-parent = <&r_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++/* The ANX6345 eDP-bridge is on r_i2c */ ++&r_i2c { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_i2c_pl89_pins>; ++ status = "okay"; ++}; ++ ++#include "axp803.dtsi" ++ ++®_aldo1 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vcc-csi"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pl"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc1sw { ++ regulator-name = "vcc-lcd"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-3v3"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-name = "vdd-cpux"; ++}; ++ ++/* DCDC3 is polyphased with DCDC2 */ ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dcdc6 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-hdmi"; ++}; ++ ++®_dldo2 { ++ regulator-min-microvolt = <2500000>; ++ regulator-max-microvolt = <2500000>; ++ regulator-name = "vcc-edp"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avdd-csi"; ++}; ++ ++®_dldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_eldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "cpvdd"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vdd-1v8-csi"; ++}; ++ ++®_fldo1 { ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "vcc-1v2-hsic"; ++}; ++ ++®_fldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_ldo_io0 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-usb"; ++ status = "okay"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ ++&simplefb_hdmi { ++ vcc-hdmi-supply = <®_dldo1>; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pb_pins>; ++ status = "okay"; ++}; ++ ++&usb_otg { ++ dr_mode = "host"; ++}; ++ ++&usbphy { ++ usb0_vbus-supply = <®_ldo_io0>; ++ usb1_vbus-supply = <®_ldo_io0>; ++ status = "okay"; ++}; +diff --git a/configs/pinebook_defconfig b/configs/pinebook_defconfig +new file mode 100644 +index 0000000000..5294dbd2eb +--- /dev/null ++++ b/configs/pinebook_defconfig +@@ -0,0 +1,22 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_SPL=y ++CONFIG_MACH_SUN50I=y ++CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y ++CONFIG_DRAM_CLK=552 ++CONFIG_DRAM_ZQ=3881949 ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 ++CONFIG_R_I2C_ENABLE=y ++# CONFIG_CMD_FLASH is not set ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook" ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_SUNXI=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y ++# CONFIG_USB_GADGET is not set ++CONFIG_VIDEO_BRIDGE=y ++CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch new file mode 100644 index 0000000000..118bdf8e0c --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch @@ -0,0 +1,98 @@ +From 20940ef2a397446a209350900d3bd618c3fd5b94 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick +Date: Mon, 5 Nov 2018 20:24:28 -0800 +Subject: [PATCH 07/13] mmc: sunxi: add support for automatic delay calibration + +A64 and H6 support automatic delay calibration and Linux driver uses it +instead of hardcoded delays. Add support for it to u-boot driver. + +Fixes eMMC instability on Pinebook + +Signed-off-by: Vasily Khoruzhick +Acked-by: Maxime Ripard +Tested-by: Maxime Ripard +Reviewed-by: Andre Przywara +Cc: Vagrant Cascadian +Reviewed-by: Jagan Teki +--- + arch/arm/include/asm/arch-sunxi/mmc.h | 6 +++++- + drivers/mmc/sunxi_mmc.c | 21 ++++++++++++++++++++- + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h +index d98c53faaa..f2deafddd2 100644 +--- a/arch/arm/include/asm/arch-sunxi/mmc.h ++++ b/arch/arm/include/asm/arch-sunxi/mmc.h +@@ -46,7 +46,9 @@ struct sunxi_mmc { + u32 cbda; /* 0x94 */ + u32 res2[26]; + #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6) +- u32 res3[64]; ++ u32 res3[17]; ++ u32 samp_dl; ++ u32 res4[46]; + #endif + u32 fifo; /* 0x100 / 0x200 FIFO access address */ + }; +@@ -130,5 +132,7 @@ struct sunxi_mmc { + #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16) + #define SUNXI_MMC_COMMON_RESET (1 << 18) + ++#define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7) ++ + struct mmc *sunxi_mmc_init(int sdc_no); + #endif /* _SUNXI_MMC_H */ +diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c +index 39f15eb423..147eb9b4d5 100644 +--- a/drivers/mmc/sunxi_mmc.c ++++ b/drivers/mmc/sunxi_mmc.c +@@ -99,11 +99,16 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) + { + unsigned int pll, pll_hz, div, n, oclk_dly, sclk_dly; + bool new_mode = false; ++ bool calibrate = false; + u32 val = 0; + + if (IS_ENABLED(CONFIG_MMC_SUNXI_HAS_NEW_MODE) && (priv->mmc_no == 2)) + new_mode = true; + ++#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) ++ calibrate = true; ++#endif ++ + /* + * The MMC clock has an extra /2 post-divider when operating in the new + * mode. +@@ -174,7 +179,11 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) + val = CCM_MMC_CTRL_MODE_SEL_NEW; + setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW); + #endif +- } else { ++ } else if (!calibrate) { ++ /* ++ * Use hardcoded delay values if controller doesn't support ++ * calibration ++ */ + val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) | + CCM_MMC_CTRL_SCLK_DLY(sclk_dly); + } +@@ -228,6 +237,16 @@ static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc) + rval &= ~SUNXI_MMC_CLK_DIVIDER_MASK; + writel(rval, &priv->reg->clkcr); + ++#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN50I_H6) ++ /* A64 supports calibration of delays on MMC controller and we ++ * have to set delay of zero before starting calibration. ++ * Allwinner BSP driver sets a delay only in the case of ++ * using HS400 which is not supported by mainline U-Boot or ++ * Linux at the moment ++ */ ++ writel(SUNXI_MMC_CAL_DL_SW_EN, &priv->reg->samp_dl); ++#endif ++ + /* Re-enable Clock */ + rval |= SUNXI_MMC_CLK_ENABLE; + writel(rval, &priv->reg->clkcr); +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch new file mode 100644 index 0000000000..824a16b9db --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch @@ -0,0 +1,70 @@ +From 31a4ac4d79d75baeede3edfa95515fd4169ef502 Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick +Date: Mon, 5 Nov 2018 20:24:30 -0800 +Subject: [PATCH 09/13] sun50i: A64: add support for R_I2C controller + +Allwinner A64 has a I2C controller, which is in the R_ MMIO zone and has +two groups of pinmuxes on PL bank, so it's called R_I2C. + +Add support for this I2C controller and the pinmux which doesn't conflict +with RSB. + +Signed-off-by: Vasily Khoruzhick +Acked-by: Maxime Ripard +Tested-by: Maxime Ripard +Cc: Vagrant Cascadian +Acked-by: Jagan Teki +--- + arch/arm/include/asm/arch-sunxi/gpio.h | 1 + + arch/arm/mach-sunxi/Kconfig | 1 + + board/sunxi/board.c | 6 ++++++ + 3 files changed, 8 insertions(+) + +diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h +index 6a5eafc3d3..2daf23f6f5 100644 +--- a/arch/arm/include/asm/arch-sunxi/gpio.h ++++ b/arch/arm/include/asm/arch-sunxi/gpio.h +@@ -211,6 +211,7 @@ enum sunxi_gpio_number { + #define SUN8I_H3_GPL_R_TWI 2 + #define SUN8I_A23_GPL_R_TWI 3 + #define SUN8I_GPL_R_UART 2 ++#define SUN50I_GPL_R_TWI 2 + + #define SUN9I_GPN_R_RSB 3 + +diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig +index 6277abc3cc..560dc9b25d 100644 +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -278,6 +278,7 @@ config MACH_SUN50I + select ARM64 + select DM_I2C + select PHY_SUN4I_USB ++ select SUN6I_PRCM + select SUNXI_DE2 + select SUNXI_GEN_SUN6I + select SUPPORT_SPL +diff --git a/board/sunxi/board.c b/board/sunxi/board.c +index b196d48674..64ccbc7245 100644 +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -168,10 +168,16 @@ void i2c_init_board(void) + #endif + + #ifdef CONFIG_R_I2C_ENABLE ++#ifdef CONFIG_MACH_SUN50I ++ clock_twi_onoff(5, 1); ++ sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI); ++ sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI); ++#else + clock_twi_onoff(5, 1); + sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI); + sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI); + #endif ++#endif + } + + #if defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_ENV_IS_IN_FAT) +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-syscon-node.patch b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch new file mode 100644 index 0000000000..9289645bec --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-syscon-node.patch @@ -0,0 +1,38 @@ +From ababb5920e8992c9bb7956df3cc85dc68d27dfe8 Mon Sep 17 00:00:00 2001 +From: Andre Przywara +Date: Mon, 29 Oct 2018 00:56:48 +0000 +Subject: [PATCH 04/13] sunxi: A64: Re-add syscon to DT node + +The sun50i-a64.dtsi changes introduced in Linux v4.19-rc1 changed the +compatible name for the syscon controller, dropping the generic "syscon" +fallback. Using this new DT node will make the Ethernet driver in every +older kernel (or non-Linux kernels) fail to initialise the MAC device. + +To allow booting distribution kernels (from installer images via UEFI, +for instance), re-add the syscon compatible string as a fallback. This +works with both older and newer kernels. + +Signed-off-by: Andre Przywara +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + arch/arm/dts/sun50i-a64.dtsi | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi +index f3a66f8882..ff41abc96a 100644 +--- a/arch/arm/dts/sun50i-a64.dtsi ++++ b/arch/arm/dts/sun50i-a64.dtsi +@@ -259,7 +259,8 @@ + }; + + syscon: syscon@1c00000 { +- compatible = "allwinner,sun50i-a64-system-control"; ++ compatible = "allwinner,sun50i-a64-system-control", ++ "syscon"; + reg = <0x01c00000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; +-- +2.11.0 + diff --git a/gnu/packages/patches/u-boot-pinebook-video-bridge.patch b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch new file mode 100644 index 0000000000..8c6ca8a992 --- /dev/null +++ b/gnu/packages/patches/u-boot-pinebook-video-bridge.patch @@ -0,0 +1,50 @@ +From 8336a43792a103c13d939b3925cb75322911f7fb Mon Sep 17 00:00:00 2001 +From: Vasily Khoruzhick +Date: Mon, 5 Nov 2018 20:24:29 -0800 +Subject: [PATCH 08/13] dm: video: bridge: don't fail to activate bridge if + reset or sleep GPIO is missing + +Both GPIOs are optional, so we shouldn't fail if any is missing. +Without this fix reset is not deasserted if sleep GPIO is missing. + +Signed-off-by: Vasily Khoruzhick +Acked-by: Maxime Ripard +Tested-by: Maxime Ripard +Reviewed-by: Andre Przywara +Cc: Vagrant Cascadian +--- + drivers/video/bridge/video-bridge-uclass.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c +index cd4959cc71..5fecb4cfd5 100644 +--- a/drivers/video/bridge/video-bridge-uclass.c ++++ b/drivers/video/bridge/video-bridge-uclass.c +@@ -106,13 +106,19 @@ static int video_bridge_pre_probe(struct udevice *dev) + int video_bridge_set_active(struct udevice *dev, bool active) + { + struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); +- int ret; ++ int ret = 0; + + debug("%s: %d\n", __func__, active); +- ret = dm_gpio_set_value(&uc_priv->sleep, !active); +- if (ret) +- return ret; +- if (active) { ++ if (uc_priv->sleep.dev) { ++ ret = dm_gpio_set_value(&uc_priv->sleep, !active); ++ if (ret) ++ return ret; ++ } ++ ++ if (!active) ++ return 0; ++ ++ if (uc_priv->reset.dev) { + ret = dm_gpio_set_value(&uc_priv->reset, true); + if (ret) + return ret; +-- +2.11.0 + diff --git a/gnu/system/install.scm b/gnu/system/install.scm index a648ddf95e..45b3a0c839 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -53,6 +53,7 @@ nintendo-nes-classic-edition-installation-os novena-installation-os pine64-plus-installation-os + pinebook-installation-os rk3399-puma-installation-os wandboard-installation-os os-with-u-boot)) @@ -473,6 +474,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." "/dev/mmcblk0" ; SD card storage "ttyS0")) +(define pinebook-installation-os + (embedded-installation-os u-boot-pinebook-bootloader + "/dev/mmcblk0" ; SD card storage + "ttyS0")) + (define rk3399-puma-installation-os (embedded-installation-os u-boot-puma-rk3399-bootloader "/dev/mmcblk0" ; SD card storage -- cgit 1.4.1 From 1e92d311c3e43827a76f5bc9a43def7f7690f8c1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Nov 2018 20:36:44 +0100 Subject: gnu: randomjungle: Do not build static binaries. * gnu/packages/patches/randomjungle-disable-static-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/machine-learning.scm (randomjungle)[source](patches): Add it. [arguments]: Add "--disable-static" to #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 4 +++- .../patches/randomjungle-disable-static-build.patch | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/randomjungle-disable-static-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8b673fdd8a..5034727ac2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1115,6 +1115,7 @@ dist_patch_DATA = \ %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch \ %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ + %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoison-shell.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4b2447ece0..7b9b28a2eb 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -333,13 +333,15 @@ algorithm.") (uri (string-append "http://www.imbs-luebeck.de/imbs/sites/default/files/u59/" "randomjungle-" version ".tar_.gz")) + (patches (search-patches "randomjungle-disable-static-build.patch")) (sha256 (base32 "12c8rf30cla71swx2mf4ww9mfd8jbdw5lnxd7dxhyw1ygrvg6y4w")))) (build-system gnu-build-system) (arguments `(#:configure-flags - (list (string-append "--with-boost=" + (list "--disable-static" + (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) #:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/randomjungle-disable-static-build.patch b/gnu/packages/patches/randomjungle-disable-static-build.patch new file mode 100644 index 0000000000..3de6c269fd --- /dev/null +++ b/gnu/packages/patches/randomjungle-disable-static-build.patch @@ -0,0 +1,14 @@ +Drop build time dependency on the static executables. + +--- a/src/Makefile.in 2018-11-25 20:27:10.691508925 +0100 ++++ b/src/Makefile.in 2018-11-25 20:27:43.565631413 +0100 +@@ -34,8 +34,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-bin_PROGRAMS = rjungle$(EXEEXT) rjungle_static$(EXEEXT) \ +- rjunglesparse$(EXEEXT) rjunglesparse_static$(EXEEXT) ++bin_PROGRAMS = rjungle$(EXEEXT) rjunglesparse$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -- cgit 1.4.1 From 644af6c87092936e8a556da192ee195db58d65b3 Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Sun, 25 Nov 2018 20:33:13 +0100 Subject: gnu: aegisub: Fix build. * gnu/packages/patches/aegisub-boost68.patch: New file * gnu/local.mk: Add it. * gnu/packages/video.scm (aegisub)[source]: Use patch. --- gnu/local.mk | 1 + gnu/packages/patches/aegisub-boost68.patch | 35 ++++++++++++++++++++++++++++++ gnu/packages/video.scm | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/aegisub-boost68.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5034727ac2..23af3f67d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -574,6 +574,7 @@ dist_patch_DATA = \ %D%/packages/patches/aegis-test-fixup-1.patch \ %D%/packages/patches/aegis-test-fixup-2.patch \ %D%/packages/patches/aegisub-icu59-include-unistr.patch \ + %D%/packages/patches/aegisub-boost68.patch \ %D%/packages/patches/agg-am_c_prototype.patch \ %D%/packages/patches/amule-crypto-6.patch \ %D%/packages/patches/ansible-wrap-program-hack.patch \ diff --git a/gnu/packages/patches/aegisub-boost68.patch b/gnu/packages/patches/aegisub-boost68.patch new file mode 100644 index 0000000000..013721f3bd --- /dev/null +++ b/gnu/packages/patches/aegisub-boost68.patch @@ -0,0 +1,35 @@ +Source: https://git.archlinux.org/svntogit/community.git/plain/trunk/boost-1.68.patch?h=packages/aegisub +From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Mon, 9 Jul 2018 20:15:29 +0000 +Subject: [PATCH] Keep using std::distance after Boost 1.68 + +src/search_replace_engine.cpp:256:14: error: call to + 'distance' is ambiguous + count += distance( + ^~~~~~~~ +/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = + boost::u32regex_iterator >] +distance(_InputIter __first, _InputIter __last) +^ +/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = + boost::u32regex_iterator >] + distance(SinglePassIterator first, SinglePassIterator last) + ^ +--- + src/search_replace_engine.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/search_replace_engine.cpp b/src/search_replace_engine.cpp +index 594c21e5e..14c71680d 100644 +--- a/src/search_replace_engine.cpp ++++ b/src/search_replace_engine.cpp +@@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() { + if (MatchState ms = matches(&diag, 0)) { + auto& diag_field = diag.*get_dialogue_field(settings.field); + std::string const& text = diag_field.get(); +- count += distance( ++ count += std::distance( + boost::u32regex_iterator(begin(text), end(text), *ms.re), + boost::u32regex_iterator()); + diag_field = u32regex_replace(text, *ms.re, settings.replace_with); diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 8a5e730bd5..3b2a37112c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2757,7 +2757,8 @@ programmers to access a standard API to open and decompress media files.") (sha256 (base32 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5")) - (patches (search-patches "aegisub-icu59-include-unistr.patch")))) + (patches (search-patches "aegisub-icu59-include-unistr.patch" + "aegisub-boost68.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags -- cgit 1.4.1 From bc0d24292d776826b8ce9c9aa9d620e33160d1ed Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 27 Nov 2018 00:23:03 +0100 Subject: gnu: mono: Make build reproducible. * gnu/packages/patches/mono-mdoc-timestamping.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mono.scm (mono)[source]: Use patch. [arguments]<#:phases>[make-reproducible]: New phase. <#:phases>[set-env]: Set SOURCE_DATE_EPOCH. --- gnu/local.mk | 1 + gnu/packages/mono.scm | 11 ++++++++++- gnu/packages/patches/mono-mdoc-timestamping.patch | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mono-mdoc-timestamping.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 23af3f67d7..250c773992 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -972,6 +972,7 @@ dist_patch_DATA = \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ %D%/packages/patches/mongodb-support-unknown-linux-distributions.patch \ + %D%/packages/patches/mono-mdoc-timestamping.patch \ %D%/packages/patches/mozjs17-aarch64-support.patch \ %D%/packages/patches/mozjs24-aarch64-support.patch \ %D%/packages/patches/mozjs38-pkg-config-version.patch \ diff --git a/gnu/packages/mono.scm b/gnu/packages/mono.scm index 8ab449dd8e..17f90fe30a 100644 --- a/gnu/packages/mono.scm +++ b/gnu/packages/mono.scm @@ -41,7 +41,8 @@ ".tar.bz2")) (sha256 (base32 - "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn")))) + "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn")) + (patches (search-patches "mono-mdoc-timestamping.patch")))) (build-system gnu-build-system) (native-inputs `(("gettext" ,gettext-minimal) @@ -52,10 +53,18 @@ (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'make-reproducible + (lambda _ + (substitute* "mono/mini/Makefile.in" + (("build_date = [^;]*;") + "build_date = (void*) 0;")) + #t)) (add-after 'unpack 'set-env (lambda _ ;;* (#:key inputs #:allow-other-keys) ;; all tests under mcs/class fail trying to access $HOME (setenv "HOME" "/tmp") + ;; ZIP files have "DOS time" which starts in Jan 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") #t)) (add-after 'unpack 'fix-includes (lambda _ diff --git a/gnu/packages/patches/mono-mdoc-timestamping.patch b/gnu/packages/patches/mono-mdoc-timestamping.patch new file mode 100644 index 0000000000..d5191a93eb --- /dev/null +++ b/gnu/packages/patches/mono-mdoc-timestamping.patch @@ -0,0 +1,15 @@ +--- mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs.orig 2018-11-26 22:16:25.008879747 +0100 ++++ mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs 2018-11-26 22:21:53.969770985 +0100 +@@ -74,6 +74,12 @@ + id = GetNewCode (); + + ZipEntry entry = new ZipEntry (id); ++ var SOURCE_DATE_EPOCH_string = Environment.GetEnvironmentVariable("SOURCE_DATE_EPOCH"); ++ if (SOURCE_DATE_EPOCH_string != null) ++ { ++ var SOURCE_DATE_EPOCH = Convert.ToInt64(SOURCE_DATE_EPOCH_string); ++ entry.DateTime = new DateTime(SOURCE_DATE_EPOCH, DateTimeKind.Utc); ++ } + zipOutput.PutNextEntry (entry); + } + -- cgit 1.4.1 From 579a9cdec7673d9007ef924bb345f42527aa0a72 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 28 Jun 2017 22:05:24 -0500 Subject: gnu: Add libopenshot. * gnu/packages/video.scm (libopenshot): New variable. * gnu/packages/patches/libopenshot-tests-with-system-libs.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../libopenshot-tests-with-system-libs.patch | 95 ++++++++++++++++++++++ gnu/packages/video.scm | 65 ++++++++++++++- 3 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libopenshot-tests-with-system-libs.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3350e5abac..0cd9fad2e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -890,6 +890,7 @@ dist_patch_DATA = \ %D%/packages/patches/libffi-3.2.1-complex-alpha.patch \ %D%/packages/patches/libjxr-fix-function-signature.patch \ %D%/packages/patches/libjxr-fix-typos.patch \ + %D%/packages/patches/libopenshot-tests-with-system-libs.patch \ %D%/packages/patches/libotr-test-auth-fix.patch \ %D%/packages/patches/libmad-armv7-thumb-pt1.patch \ %D%/packages/patches/libmad-armv7-thumb-pt2.patch \ diff --git a/gnu/packages/patches/libopenshot-tests-with-system-libs.patch b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch new file mode 100644 index 0000000000..a18c4b8bba --- /dev/null +++ b/gnu/packages/patches/libopenshot-tests-with-system-libs.patch @@ -0,0 +1,95 @@ +Combination of two patches that fix libopenshot tests when built with +system-provided ffmpeg and jsoncpp. See + + https://github.com/OpenShot/libopenshot/pull/163 + +From 0d7691ab53433e1583f6a66ea96683b0f7af8a57 Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Mon, 17 Sep 2018 14:04:40 -0400 +Subject: [PATCH] tests/CMakeFiles: Use FFMpeg like src/ + +--- + tests/CMakeLists.txt | 32 +++++++++++++++++++++++++++++++- + 1 file changed, 31 insertions(+), 1 deletion(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 2c45550..4df8464 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -79,7 +79,37 @@ ENDIF (ImageMagick_FOUND) + FIND_PACKAGE(FFmpeg REQUIRED) + + # Include FFmpeg headers (needed for compile) +-include_directories(${FFMPEG_INCLUDE_DIR}) ++message('AVCODEC_FOUND: ${AVCODEC_FOUND}') ++message('AVCODEC_INCLUDE_DIRS: ${AVCODEC_INCLUDE_DIRS}') ++message('AVCODEC_LIBRARIES: ${AVCODEC_LIBRARIES}') ++ ++IF (AVCODEC_FOUND) ++ include_directories(${AVCODEC_INCLUDE_DIRS}) ++ENDIF (AVCODEC_FOUND) ++IF (AVDEVICE_FOUND) ++ include_directories(${AVDEVICE_INCLUDE_DIRS}) ++ENDIF (AVDEVICE_FOUND) ++IF (AVFORMAT_FOUND) ++ include_directories(${AVFORMAT_INCLUDE_DIRS}) ++ENDIF (AVFORMAT_FOUND) ++IF (AVFILTER_FOUND) ++ include_directories(${AVFILTER_INCLUDE_DIRS}) ++ENDIF (AVFILTER_FOUND) ++IF (AVUTIL_FOUND) ++ include_directories(${AVUTIL_INCLUDE_DIRS}) ++ENDIF (AVUTIL_FOUND) ++IF (POSTPROC_FOUND) ++ include_directories(${POSTPROC_INCLUDE_DIRS}) ++ENDIF (POSTPROC_FOUND) ++IF (SWSCALE_FOUND) ++ include_directories(${SWSCALE_INCLUDE_DIRS}) ++ENDIF (SWSCALE_FOUND) ++IF (SWRESAMPLE_FOUND) ++ include_directories(${SWRESAMPLE_INCLUDE_DIRS}) ++ENDIF (SWRESAMPLE_FOUND) ++IF (AVRESAMPLE_FOUND) ++ include_directories(${AVRESAMPLE_INCLUDE_DIRS}) ++ENDIF (AVRESAMPLE_FOUND) + + ################# LIBOPENSHOT-AUDIO ################### + # Find JUCE-based openshot Audio libraries + + +From e9e85cdfd036587adb86341f7f81619dc69f102c Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Mon, 17 Sep 2018 19:23:25 -0400 +Subject: [PATCH] Use system jsoncpp in tests, too + +The tests/ build needs to use the same jsoncpp as the src/ build, +or tests in Clip_Tests.cpp can fail. +--- + tests/CMakeLists.txt | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 4df8464..a1a0356 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -180,12 +180,18 @@ endif(OPENMP_FOUND) + # Find ZeroMQ library (used for socket communication & logging) + FIND_PACKAGE(ZMQ REQUIRED) + +-# Include FFmpeg headers (needed for compile) ++# Include ZeroMQ headers (needed for compile) + include_directories(${ZMQ_INCLUDE_DIRS}) + + ################### JSONCPP ##################### + # Include jsoncpp headers (needed for JSON parsing) +-include_directories("../thirdparty/jsoncpp/include") ++if (USE_SYSTEM_JSONCPP) ++ find_package(JsonCpp REQUIRED) ++ include_directories(${JSONCPP_INCLUDE_DIRS}) ++else() ++ message("Using embedded JsonCpp") ++ include_directories("../thirdparty/jsoncpp/include") ++endif(USE_SYSTEM_JSONCPP) + + IF (NOT DISABLE_TESTS) + ############### SET TEST SOURCE FILES ################# diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index e9a49df787..bc8e625d72 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2016 Dmitry Nikolaev ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016, 2017 Nils Gillmann -;;; Copyright © 2016 Eric Bavier +;;; Copyright © 2016, 2018 Eric Bavier ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2017 Feng Shu ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice @@ -112,6 +112,7 @@ #:use-module (gnu packages man) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages ocr) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -128,6 +129,7 @@ #:use-module (gnu packages serialization) #:use-module (gnu packages shells) #:use-module (gnu packages ssh) + #:use-module (gnu packages swig) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) @@ -3077,3 +3079,64 @@ as surfing, skiing, riding and walking while shooting videos are especially prone to erratic camera shakes. Vidstab targets these video contents to help create smoother and stable videos.") (license license:gpl2+))) + +(define-public libopenshot + (package + (name "libopenshot") + (version "0.2.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenShot/libopenshot") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd")) + (modules '((guix build utils))) + (snippet '(begin + ;; Allow overriding of the python installation dir + (substitute* "src/bindings/python/CMakeLists.txt" + (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set) + (string-append set " CACHE PATH " + "\"Python bindings directory\")"))) + #t)) + (patches (search-patches "libopenshot-tests-with-system-libs.patch")))) + (build-system cmake-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python) + ("swig" ,swig) + ("unittest++" ,unittest-cpp))) + (propagated-inputs ;all referenced in installed headers + `(("cppzmq" ,cppzmq) + ("ffmpeg" ,ffmpeg) + ("imagemagick" ,imagemagick) + ("jsoncpp" ,jsoncpp) + ("libopenshot-audio" ,libopenshot-audio) + ("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets + ("zeromq" ,zeromq))) + (arguments + `(#:configure-flags + (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python" + ,(version-major+minor (package-version python)) + "/site-packages") + "-DUSE_SYSTEM_JSONCPP:BOOL=ON") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'set-vars + (lambda* (#:key inputs #:allow-other-keys) + (setenv "LIBOPENSHOT_AUDIO_DIR" + (assoc-ref inputs "libopenshot-audio")) + (setenv "ZMQDIR" + (assoc-ref inputs "zeromq")) + (setenv "UNITTEST_DIR" + (string-append (assoc-ref inputs "unittest++") + "/include/UnitTest++")) + #t))))) + (home-page "https://openshot.org") + (synopsis "Video-editing, animation, and playback library") + (description "OpenShot Library (libopenshot) is a powerful C++ video +editing library with a multi-threaded and feature rich video editing +API. It includes bindings for Python, Ruby, and other languages.") + (license license:lgpl3+))) -- cgit 1.4.1 From 8e59c5febd2dad171fe90caf04d8b3eb31ca3b31 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 27 Nov 2018 19:16:24 +0200 Subject: gnu: x265: Fix building on armhf-linux. * gnu/packages/video.scm (x265)[patches]: Add patch. [arguments]: Add a configure-flag to disable assembly. Adjust a custom phase to recognize armv8 as 32-bit arm when masquerading as armhf-linux. --- gnu/local.mk | 1 + gnu/packages/patches/x265-arm-flags.patch | 36 +++++++++++++++++++++++++++++++ gnu/packages/video.scm | 10 ++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/x265-arm-flags.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0cd9fad2e5..29d07f5192 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1243,6 +1243,7 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-fix-zeroed-keys.patch \ %D%/packages/patches/wpa-supplicant-fix-nonce-reuse.patch \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ + %D%/packages/patches/x265-arm-flags.patch \ %D%/packages/patches/x265-detect512-all-arches.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ diff --git a/gnu/packages/patches/x265-arm-flags.patch b/gnu/packages/patches/x265-arm-flags.patch new file mode 100644 index 0000000000..f17e26f6f1 --- /dev/null +++ b/gnu/packages/patches/x265-arm-flags.patch @@ -0,0 +1,36 @@ +https://sources.debian.org/src/x265/2.9-3/debian/patches/0001-Fix-arm-flags.patch/ + +From: Sebastian Ramacher +Date: Wed, 26 Apr 2017 22:05:06 +0200 +Subject: Fix arm* flags + +--- + source/CMakeLists.txt | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 33b6523..25aecbb 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -72,7 +72,7 @@ elseif(ARMMATCH GREATER "-1") + endif() + message(STATUS "Detected ARM target processor") + set(ARM 1) +- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) ++ # add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) + else() + message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") + message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") +@@ -230,12 +230,8 @@ if(GCC) + if(ARM AND CROSS_COMPILE_ARM) + set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) + elseif(ARM) +- find_package(Neon) + if(CPU_HAS_NEON) +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) + add_definitions(-DHAVE_NEON) +- else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) + endif() + endif() + add_definitions(${ARM_ARGS}) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 1e1c988c25..fc3ee5c72b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -405,7 +405,8 @@ and creating Matroska files from other media files (@code{mkvmerge}).") (sha256 (base32 "090hp4216isis8q5gb7bwzia8rfyzni54z21jnwm97x3hiy6ibpb")) - (patches (search-patches "x265-detect512-all-arches.patch")) + (patches (search-patches "x265-arm-flags.patch" + "x265-detect512-all-arches.patch")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "source/compat/getopt") @@ -416,6 +417,10 @@ and creating Matroska files from other media files (@code{mkvmerge}).") #:configure-flags ;; Ensure position independent code for everyone. (list "-DENABLE_PIC=TRUE" + ,@(if (string-prefix? "armhf" (or (%current-system) + (%current-target-system))) + '("-DENABLE_ASSEMBLY=OFF") + '()) (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "out"))) #:phases @@ -424,6 +429,9 @@ and creating Matroska files from other media files (@code{mkvmerge}).") (lambda _ (delete-file-recursively "build") (chdir "source") + ;; recognize armv8 in 32-bit mode as ARM + (substitute* "CMakeLists.txt" + (("armv6l") "armv8l")) #t)) (add-before 'configure 'build-12-bit (lambda* (#:key (configure-flags '()) #:allow-other-keys) -- cgit 1.4.1 From 4236959de8200bba4eeb2c23519fc736b3c50a23 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 27 Nov 2018 23:22:20 +0100 Subject: gnu: scribus: Fix build with recent Poppler. Suggested by ngz on #guix. * gnu/packages/patches/scribus-poppler.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/scribus.scm (scribus)[source]: Add patch. --- gnu/local.mk | 1 + gnu/packages/patches/scribus-poppler.patch | 72 ++++++++++++++++++++++++++++++ gnu/packages/scribus.scm | 4 +- 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/scribus-poppler.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 29d07f5192..772002c9cf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,6 +1145,7 @@ dist_patch_DATA = \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-graph-diam-64.patch \ %D%/packages/patches/scotch-graph-induce-type-64.patch \ + %D%/packages/patches/scribus-poppler.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ diff --git a/gnu/packages/patches/scribus-poppler.patch b/gnu/packages/patches/scribus-poppler.patch new file mode 100644 index 0000000000..9b969e4cb6 --- /dev/null +++ b/gnu/packages/patches/scribus-poppler.patch @@ -0,0 +1,72 @@ +Fix build with recent Poppler. + +From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Mon, 30 Apr 2018 09:19:33 +0000 +Subject: [PATCH] =?UTF-8?q?#15289:=20FTBFS=201.5.4=20with=20error:=20inval?= + =?UTF-8?q?id=20conversion=20from=20=E2=80=98const=20GooString*=E2=80=99?= + =?UTF-8?q?=20to=20=E2=80=98GooString*=E2=80=99?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://scribus.net/trunk/Scribus@22498 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/importpdf.cpp | 2 +- + scribus/plugins/import/pdf/importpdf.h | 2 +- + scribus/plugins/import/pdf/slaoutput.cpp | 2 +- + scribus/plugins/import/pdf/slaoutput.h | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp +index c1802861aa..d4c5a9ba49 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -1081,7 +1081,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum) + return cRect; + } + +-QString PdfPlug::UnicodeParsedString(GooString *s1) ++QString PdfPlug::UnicodeParsedString(const GooString *s1) + { + if ( !s1 || s1->getLength() == 0 ) + return QString(); +diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h +index c8c5efcd0d..5249562692 100644 +--- a/scribus/plugins/import/pdf/importpdf.h ++++ b/scribus/plugins/import/pdf/importpdf.h +@@ -81,7 +81,7 @@ class PdfPlug : public QObject + private: + bool convert(const QString& fn); + QRectF getCBox(int box, int pgNum); +- QString UnicodeParsedString(GooString *s1); ++ QString UnicodeParsedString(const GooString *s1); + + QList Elements; + double baseX, baseY; +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index be1815dc29..17b6357246 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -4252,7 +4252,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, b + m_groupStack.push(gElements); + } + +-QString SlaOutputDev::UnicodeParsedString(GooString *s1) ++QString SlaOutputDev::UnicodeParsedString(const GooString *s1) + { + if ( !s1 || s1->getLength() == 0 ) + return QString(); +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index 20e8b2d311..6698c030e0 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -266,7 +266,7 @@ class SlaOutputDev : public OutputDev + int getBlendMode(GfxState *state); + void applyMask(PageItem *ite); + void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); +- QString UnicodeParsedString(GooString *s1); ++ QString UnicodeParsedString(const GooString *s1); + bool checkClip(); + bool pathIsClosed; + QString CurrColorFill; diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index dca1dc86e1..615d7e23a2 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Ricardo Wurmus +;;; Copyright © 2015, 2018 Ricardo Wurmus ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017, 2018 Nicolas Goaziou ;;; Copyright © 2018 Clément Lassieur @@ -56,7 +56,7 @@ (sha256 (base32 "00ys0p6h3iq77kh72dkl0qrf7qvznq18qdrgiq10gfxja1995034")) - (modules '((guix build utils))))) + (patches (search-patches "scribus-poppler.patch")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test target -- cgit 1.4.1 From f2c99fe52b73bfe81acad825214de952234f82bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Nov 2018 13:14:22 +0100 Subject: gnu: rust: Shorten patch file name. This file name was too long to fit in a tar archive. * gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch: Rename to... * gnu/packages/patches/rust-reproducible-builds.patch: ... this. * gnu/packages/rust.scm (rust-1.27, rust): Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 +- ...roducible-builds-by-forcing-window.search.patch | 25 ---------------------- .../patches/rust-reproducible-builds.patch | 25 ++++++++++++++++++++++ gnu/packages/rust.scm | 4 ++-- 4 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch create mode 100644 gnu/packages/patches/rust-reproducible-builds.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 250c773992..32b561472e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1141,7 +1141,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ - %D%/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch \ + %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ diff --git a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch deleted file mode 100644 index ef7bf53b5d..0000000000 --- a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 -From: Tim Ryan -Date: Mon, 14 May 2018 06:22:21 -0400 -Subject: [PATCH] Support reproducible builds by forcing window.search to use - stable key ordering. (#692) -See ---- - src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -index d49772f8b..1ee66a511 100644 ---- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { - searchoptions, - index, - }; -+ -+ // By converting to serde_json::Value as an intermediary, we use a -+ // BTreeMap internally and can force a stable ordering of map keys. -+ let json_contents = serde_json::to_value(&json_contents)?; - let json_contents = serde_json::to_string(&json_contents)?; - - Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch new file mode 100644 index 0000000000..ef7bf53b5d --- /dev/null +++ b/gnu/packages/patches/rust-reproducible-builds.patch @@ -0,0 +1,25 @@ +From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 +From: Tim Ryan +Date: Mon, 14 May 2018 06:22:21 -0400 +Subject: [PATCH] Support reproducible builds by forcing window.search to use + stable key ordering. (#692) +See +--- + src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +index d49772f8b..1ee66a511 100644 +--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { + searchoptions, + index, + }; ++ ++ // By converting to serde_json::Value as an intermediary, we use a ++ // BTreeMap internally and can force a stable ordering of map keys. ++ let json_contents = serde_json::to_value(&json_contents)?; + let json_contents = serde_json::to_string(&json_contents)?; + + Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 8618c37761..1d9e629a22 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -713,7 +713,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (arguments @@ -742,7 +742,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (inputs -- cgit 1.4.1 From c324ad52b6066b4626312a4120b645c43989dd0a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Nov 2018 14:11:35 +0100 Subject: gnu: lirc: Build reproducibly. * gnu/packages/patches/lirc-reproducible-build.patch: New file. * gnu/packages/lirc.scm (lirc)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lirc.scm | 3 +- gnu/packages/patches/lirc-reproducible-build.patch | 72 ++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lirc-reproducible-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 32b561472e..6de6306ec5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,6 +935,7 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/lirc-localstatedir.patch \ + %D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ %D%/packages/patches/llvm-for-extempore.patch \ %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm index 860822ce49..7ba2d44532 100644 --- a/gnu/packages/lirc.scm +++ b/gnu/packages/lirc.scm @@ -43,7 +43,8 @@ (sha256 (base32 "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb")) - (patches (search-patches "lirc-localstatedir.patch")))) + (patches (search-patches "lirc-localstatedir.patch" + "lirc-reproducible-build.patch")))) (build-system gnu-build-system) (arguments '(#:configure-flags diff --git a/gnu/packages/patches/lirc-reproducible-build.patch b/gnu/packages/patches/lirc-reproducible-build.patch new file mode 100644 index 0000000000..20f9344715 --- /dev/null +++ b/gnu/packages/patches/lirc-reproducible-build.patch @@ -0,0 +1,72 @@ +Build Lirc reproducibly. + +https://sourceforge.net/p/lirc/tickets/301/ +https://sourceforge.net/p/lirc/git/merge-requests/33/ +https://sourceforge.net/p/lirc/git/merge-requests/34/ +https://sourceforge.net/p/lirc/git/merge-requests/36/ + +Index: lirc-0.10.1/tools/lirc-lsplugins.cpp +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-lsplugins.cpp ++++ lirc-0.10.1/tools/lirc-lsplugins.cpp +@@ -415,10 +415,9 @@ static void print_header(void) + static void print_yaml_header(void) + { + static const char* const YAML_HEADER = +- "#\n# Generated by lirc-lsplugins --yaml (%s) at %s#\n "; +- const time_t now = time(NULL); ++ "#\n# Generated by lirc-lsplugins --yaml (%s)#\n "; + +- printf(YAML_HEADER, VERSION, ctime(&now)); ++ printf(YAML_HEADER, VERSION); + printf("\ndrivers:\n"); + } + +Index: lirc-0.10.1/python-pkg/lirc/database.py +=================================================================== +--- lirc-0.10.1.orig/python-pkg/lirc/database.py ++++ lirc-0.10.1/python-pkg/lirc/database.py +@@ -156,7 +156,7 @@ class Database(object): + d['device_hint'] = hint + + configs = {} +- for path in glob.glob(configdir + '/*.conf'): ++ for path in sorted(glob.glob(configdir + '/*.conf')): + with open(path) as f: + cf = yaml.load(f.read()) + configs[cf['config']['id']] = cf['config'] +Index: lirc-0.10.1/tools/irdb-get +=================================================================== +--- lirc-0.10.1.orig/tools/irdb-get ++++ lirc-0.10.1/tools/irdb-get +@@ -9,7 +9,6 @@ import fnmatch + import os + import os.path + import sys +-import time + import urllib.error # pylint: disable=no-name-in-module,F0401,E0611 + import urllib.request # pylint: disable=no-name-in-module,F0401,E0611 + +@@ -193,7 +192,7 @@ def do_yaml_config(): + lircmd_by_driver[driver].append("%s/%s" % (tokens[0], tokens[2])) + + print("#") +- print("# Created by 'irdb-get yaml-config' at " + time.ctime()) ++ print("# Created by 'irdb-get yaml-config'") + print("#") + print("\nlircd_by_driver:") + print_yaml_dict(lircd_by_driver) +Index: lirc-0.10.1/tools/lirc-make-devinput +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-make-devinput ++++ lirc-0.10.1/tools/lirc-make-devinput +@@ -61,8 +61,7 @@ if test -n "$lirc_map"; then + fi + + +-echo "# Generated by $(basename $0) on $(uname -r)" +-echo "# Date: $(date)" ++echo "# Generated by $(basename $0)" + cat < Date: Thu, 29 Nov 2018 22:17:40 -0600 Subject: patchutils: Update to 0.3.4. * gnu/packages/patchutils.scm (patchutils): Update to 0.3.4. [arguments]: Simplify 'patch-test-scripts' phase. * gnu/packages/patches/patchutils-xfail-gendiff-tests.patch: Rename to... * gnu/packages/patches/patchutils-test-perms.patch: ...this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 +- gnu/packages/patches/patchutils-test-perms.patch | 14 ++++++++++++ .../patches/patchutils-xfail-gendiff-tests.patch | 26 ---------------------- gnu/packages/patchutils.scm | 12 +++++----- 4 files changed, 20 insertions(+), 34 deletions(-) create mode 100644 gnu/packages/patches/patchutils-test-perms.patch delete mode 100644 gnu/packages/patches/patchutils-xfail-gendiff-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bb152cd108..70968dbb8e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1026,7 +1026,7 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/patchelf-page-size.patch \ %D%/packages/patches/patchelf-rework-for-arm.patch \ - %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ + %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perf-gcc-ice.patch \ %D%/packages/patches/perl-archive-tar-CVE-2018-12015.patch \ diff --git a/gnu/packages/patches/patchutils-test-perms.patch b/gnu/packages/patches/patchutils-test-perms.patch new file mode 100644 index 0000000000..c7652b9af2 --- /dev/null +++ b/gnu/packages/patches/patchutils-test-perms.patch @@ -0,0 +1,14 @@ +Need to mark one of the tests as PHONY to get permissions set correctly on +built scripts. + +--- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600 ++++ b/Makefile.in 2018-11-29 21:52:05.000000000 -0600 +@@ -1106,5 +1108,6 @@ + rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`" + rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`" + ++.PHONY: tests/newline1/run-test + tests/newline1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \ + src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) \ + scripts/splitdiff + diff --git a/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch b/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch deleted file mode 100644 index b2e77d22f2..0000000000 --- a/gnu/packages/patches/patchutils-xfail-gendiff-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -The gendiff1 and gendiff2 tests need the gendiff script that's distributed -with the rpm package management tool. Without that script, these tests are -expected to fail. - -Need to mark one of the tests as PHONY to get permissions set correctly on -built scripts. - ---- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600 -+++ b/Makefile.in 2014-03-06 17:27:55.610048953 -0600 -@@ -378,6 +378,8 @@ - # These ones don't work yet. - # Feel free to send me patches. :-) - XFAIL_TESTS = \ -+ tests/gendiff1/run-test \ -+ tests/gendiff2/run-test \ - tests/delhunk5/run-test \ - tests/delhunk6/run-test - -@@ -1106,6 +1108,7 @@ - rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`" - rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`" - -+.PHONY: tests/combine1/run-test - tests/combine1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \ - src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) - for script in $(bin_SCRIPTS); do \ diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 688e62cdc8..fa5ad62e44 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -43,7 +43,7 @@ (define-public patchutils (package (name "patchutils") - (version "0.3.3") + (version "0.3.4") (source (origin (method url-fetch) @@ -51,8 +51,8 @@ name "-" version ".tar.xz")) (sha256 (base32 - "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i")) - (patches (search-patches "patchutils-xfail-gendiff-tests.patch")))) + "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg")) + (patches (search-patches "patchutils-test-perms.patch")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) (arguments @@ -61,10 +61,8 @@ (modify-phases %standard-phases (add-before 'check 'patch-test-scripts (lambda _ - (let ((echo (which "echo"))) - (substitute* - (find-files "tests" "^run-test$") - (("/bin/echo") echo))) + (substitute* (find-files "tests" "^run-test$") + (("/bin/echo") (which "echo"))) #t)) (add-after 'install 'wrap-program ;; Point installed scripts to the utilities they need. -- cgit 1.4.1 From 5deb0c670de30689b7019f00f7b67af84f6056d3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 30 Nov 2018 09:48:16 +0200 Subject: gnu: blender: Use newer ffmpeg. * gnu/packages/graphics.scm (blender)[source]: Add patch for newer ffmpeg compatability. [inputs]: Replace ffmpeg-2.8 with ffmpeg. * gnu/packages/patches/blender-newer-ffmpeg.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 5 +- gnu/packages/patches/blender-newer-ffmpeg.patch | 80 +++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/blender-newer-ffmpeg.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b3235b63d1..5b84eef4ef 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -603,6 +603,7 @@ dist_patch_DATA = \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blast+-fix-makefile.patch \ + %D%/packages/patches/blender-newer-ffmpeg.patch \ %D%/packages/patches/boost-fix-icu-build.patch \ %D%/packages/patches/borg-respect-storage-quota.patch \ %D%/packages/patches/byobu-writable-status.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c3c1a4a580..6e184d3334 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -85,7 +85,8 @@ "blender-" version ".tar.gz")) (sha256 (base32 - "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")))) + "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")) + (patches (search-patches "blender-newer-ffmpeg.patch")))) (build-system cmake-build-system) (arguments (let ((python-version (version-major+minor (package-version python)))) @@ -141,7 +142,7 @@ ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff) - ("ffmpeg-2.8" ,ffmpeg-2.8) ; + ("ffmpeg" ,ffmpeg) ("fftw" ,fftw) ("jack" ,jack-1) ("libsndfile" ,libsndfile) diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch new file mode 100644 index 0000000000..363489bc70 --- /dev/null +++ b/gnu/packages/patches/blender-newer-ffmpeg.patch @@ -0,0 +1,80 @@ +https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch + +From: Bastien Montagne +Date: Tue, 8 May 2018 16:00:52 +0200 +Subject: fix_building_with_latest_versions_of_FFmpeg + +Some years-old deprecated stuff has now been removed. + +Correct solution is probably to use valid defines etc. in own code, but +this is more FFMEPG maintainer task (since it also may change how old +FFMPEG we do support...). +--- + intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ + source/blender/blenkernel/intern/writeffmpeg.c | 3 +- + 2 files changed, 41 insertions(+), 1 deletion(-) + +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index 9c06c8a..f7f437c 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) + + #endif + ++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, ++ * so for now this will do. */ ++ ++#ifndef FF_MIN_BUFFER_SIZE ++# ifdef AV_INPUT_BUFFER_MIN_SIZE ++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++# endif ++#endif ++ ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# ifdef AV_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_DCT ++# ifdef AV_CODEC_FLAG_INTERLACED_DCT ++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_ME ++# ifdef AV_CODEC_FLAG_INTERLACED_ME ++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME ++# endif ++#endif ++ + /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) + # define AV_CODEC_ID_NONE CODEC_ID_NONE +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index a19e414..04d508a 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; ++ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ ++ //c->me_method = ME_EPZS; + + codec = avcodec_find_encoder(c->codec_id); + if (!codec) -- cgit 1.4.1 From 37b82ccc390396a078351fd9f7b522cca275a8c9 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sat, 1 Dec 2018 09:36:43 -0600 Subject: handbrake: Update to 1.1.2. * gnu/packages/video.scm (handbrake): Update to 1.1.2. [source]: Use direct download url. Remove upstreamed patch. Patch make fragments in snippet. [inputs]: Use latest ffmpeg. Add jansson and opus. [arguments]: Remove 'disable-contrib phase, which is now in source snippet. Move 'fix-x265-linking phase fix to #:configure-flags. [license]: Use 'gpl2' as clarified in LICENSE. * gnu/packages/patches/handbrake-pkg-config-path.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../patches/handbrake-pkg-config-path.patch | 24 ---------- gnu/packages/video.scm | 52 +++++++++++----------- 3 files changed, 25 insertions(+), 52 deletions(-) delete mode 100644 gnu/packages/patches/handbrake-pkg-config-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 70968dbb8e..05c49bbbe9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -799,7 +799,6 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ - %D%/packages/patches/handbrake-pkg-config-path.patch \ %D%/packages/patches/haskell-mode-unused-variables.patch \ %D%/packages/patches/haskell-mode-make-check.patch \ %D%/packages/patches/hdf4-architectures.patch \ diff --git a/gnu/packages/patches/handbrake-pkg-config-path.patch b/gnu/packages/patches/handbrake-pkg-config-path.patch deleted file mode 100644 index 18f3953eaa..0000000000 --- a/gnu/packages/patches/handbrake-pkg-config-path.patch +++ /dev/null @@ -1,24 +0,0 @@ -Do not clobber PKG_CONFIG_PATH during configure. - ---- HandBrake-0.10.5/gtk/module.rules.orig 2016-02-11 14:14:05.000000000 -0600 -+++ HandBrake-0.10.5/gtk/module.rules 2016-10-29 22:27:50.550960848 -0500 -@@ -15,7 +15,7 @@ - set -e; cd $(GTK.src/); NOCONFIGURE=1 ./autogen.sh - set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \ - $(GTK.CONFIGURE.extra) \ -- PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig \ -+ PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig$(if $(PKG_CONFIG_PATH),:)$(PKG_CONFIG_PATH) \ - CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \ - LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \ - --prefix=$(PREFIX) \ ---- Handbrake-0.10.5-0.77d09e9-checkout/make/include/contrib.defs 1969-12-31 18:00:00.000000000 -0600 -+++ Handbrake-0.10.5-0.77d09e9-checkout/make/include/contrib.defs 2016-11-01 13:11:43.826144311 -0500 -@@ -119,7 +119,7 @@ - endif - $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" - $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="-L$$(call fn.ABSOLUTE,$(CONTRIB.build/))lib $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe *D)" -- $(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig" -+ $(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig$(if $(PKG_CONFIG_PATH),:)$(PKG_CONFIG_PATH)" - - $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LD !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH !CROSS - $(1).CONFIGURE.env = $$(call fn.ARGS,$(1).CONFIGURE.env,$$($(1).CONFIGURE.env.args)) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 0dece9f52f..c80e429ff1 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2426,22 +2426,27 @@ supported players in addition to this package.") (define-public handbrake (package (name "handbrake") - (version "0.10.5") + (version "1.1.2") (source (origin (method url-fetch) - (uri (string-append "https://handbrake.fr/rotation.php?file=" - "HandBrake-" version ".tar.bz2")) - (file-name (string-append "handbrake-" version ".tar.bz2")) + (uri (string-append "https://download.handbrake.fr/releases/" + version "/HandBrake-" version "-source.tar.bz2")) (sha256 (base32 - "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv")) - (patches (search-patches "handbrake-pkg-config-path.patch")) + "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms")) (modules '((guix build utils))) (snippet - ;; Remove bundled libraries and source not necessary for - ;; running under a GNU environment. + ;; Remove "contrib" and source not necessary for + ;; building/running under a GNU environment. '(begin - (for-each delete-file-recursively '("contrib" "macosx" "win")) + (for-each delete-file-recursively + '("contrib" "macosx" "win")) + (substitute* "make/include/main.defs" + ;; Disable unconditional inclusion of "contrib" libraries + ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray), + ;; which would lead to fetching and building of these + ;; libraries. Use our own instead. + (("MODULES \\+= contrib") "# MODULES += contrib")) #t)))) (build-system glib-or-gtk-build-system) (native-inputs @@ -2455,13 +2460,14 @@ supported players in addition to this package.") (inputs `(("bzip2" ,bzip2) ("dbus-glib" ,dbus-glib) - ("ffmpeg" ,ffmpeg-3.4) ;compilation errors with ffmpeg-4 + ("ffmpeg" ,ffmpeg) ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("glib" ,glib) ("gstreamer" ,gstreamer) ("gst-plugins-base" ,gst-plugins-base) ("gtk+" ,gtk+) + ("jansson" ,jansson) ("lame" ,lame) ("libass" ,libass) ("libbluray" ,libbluray) @@ -2471,6 +2477,7 @@ supported players in addition to this package.") ("libmpeg2" ,libmpeg2) ("libnotify" ,libnotify) ("libogg" ,libogg) + ("libopus" ,opus) ("libsamplerate" ,libsamplerate) ("libtheora" ,libtheora) ("libvorbis" ,libvorbis) @@ -2481,6 +2488,11 @@ supported players in addition to this package.") ("zlib" ,zlib))) (arguments `(#:tests? #f ;tests require Ruby and claim to be unsupported + #:configure-flags + (list (string-append "CPPFLAGS=-I" + (assoc-ref %build-inputs "libxml2") + "/include/libxml2") + "LDFLAGS=-lx265") #:phases (modify-phases %standard-phases (replace 'bootstrap @@ -2492,21 +2504,6 @@ supported players in addition to this package.") (substitute* "gtk/module.rules" ((".*autogen\\.sh.*") "")) (invoke "sh" "./gtk/autogen.sh"))) - (add-before 'configure 'disable-contrib - (lambda _ - (substitute* "make/include/main.defs" - ;; Disable unconditional inclusion of some "contrib" - ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav, - ;; and libbluray), which would lead to fetching and - ;; building of these libraries. Use our own instead. - (("MODULES \\+= contrib") "# MODULES += contrib")) - #t)) - (add-before 'configure 'fix-x265-linking - (lambda _ - (substitute* "test/module.defs" - ;; Fix missing library during linking error - (("TEST.GCC.l =") "TEST.GCC.l = x265")) - #t)) (replace 'configure (lambda* (#:key outputs configure-flags #:allow-other-keys) ;; 'configure' is not an autoconf-generated script, and @@ -2523,8 +2520,9 @@ supported players in addition to this package.") (description "HandBrake is a tool for converting video from any format to a selection of modern, widely supported codecs.") - ;; Most under GPL version 2 or later, and portions under BSD 3 Clause - (license (list license:gpl2+ license:bsd-3)))) + ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3. + ;; Combination under GPLv2. See LICENSE. + (license license:gpl2))) (define-public openh264 (package -- cgit 1.4.1 From c05c1910dbd630304e06020d27d4b72bb0502088 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 3 Dec 2018 17:29:58 -0500 Subject: gnu: Beets: Fix compatibility with Python 3.7. * gnu/packages/patches/beets-python-3.7-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/music.scm (beets)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/music.scm | 1 + gnu/packages/patches/beets-python-3.7-fix.patch | 57 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 gnu/packages/patches/beets-python-3.7-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 847c9286cc..53a3547559 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -600,6 +600,7 @@ dist_patch_DATA = \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ + %D%/packages/patches/beets-python-3.7-fix.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blast+-fix-makefile.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index faf5aab09a..cc6d228006 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -2692,6 +2692,7 @@ Songs can be searched by artist, name or even by a part of the song text.") (source (origin (method url-fetch) (uri (pypi-uri "beets" version)) + (patches (search-patches "beets-python-3.7-fix.patch")) (sha256 (base32 "0l2vfrknwcsm6bn83m7476qrz45qwgxcb5k0h7kn96kr70irn1v2")))) diff --git a/gnu/packages/patches/beets-python-3.7-fix.patch b/gnu/packages/patches/beets-python-3.7-fix.patch new file mode 100644 index 0000000000..43707cd9d0 --- /dev/null +++ b/gnu/packages/patches/beets-python-3.7-fix.patch @@ -0,0 +1,57 @@ +Fix compatibility issue with Python 3.7: + +https://github.com/beetbox/beets/issues/2978 + +Patch copied from upstream source repository: + +https://github.com/beetbox/beets/commit/15d44f02a391764da1ce1f239caef819f08beed8 + +From 15d44f02a391764da1ce1f239caef819f08beed8 Mon Sep 17 00:00:00 2001 +From: Adrian Sampson +Date: Sun, 22 Jul 2018 12:34:19 -0400 +Subject: [PATCH] Fix Python 3.7 compatibility (#2978) + +--- + beets/autotag/hooks.py | 8 +++++++- + docs/changelog.rst | 2 ++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py +index 3615a9333..1c62a54c5 100644 +--- a/beets/autotag/hooks.py ++++ b/beets/autotag/hooks.py +@@ -31,6 +31,12 @@ + + log = logging.getLogger('beets') + ++# The name of the type for patterns in re changed in Python 3.7. ++try: ++ Pattern = re._pattern_type ++except AttributeError: ++ Pattern = re.Pattern ++ + + # Classes used to represent candidate options. + +@@ -433,7 +439,7 @@ def _eq(self, value1, value2): + be a compiled regular expression, in which case it will be + matched against `value2`. + """ +- if isinstance(value1, re._pattern_type): ++ if isinstance(value1, Pattern): + return bool(value1.match(value2)) + return value1 == value2 + +#diff --git a/docs/changelog.rst b/docs/changelog.rst +#index be6de2904..d487f31f5 100644 +#--- a/docs/changelog.rst +#+++ b/docs/changelog.rst +#@@ -19,6 +19,8 @@ New features: +# +# Fixes: +# +#+* Fix compatibility Python 3.7 and its change to a name in the ``re`` module. +#+ :bug:`2978` +# * R128 normalization tags are now properly deleted from files when the values +# are missing. +# Thanks to :user:`autrimpo`. -- cgit 1.4.1 From c16c119d0a7894c42bbe816ec381a0f458f26e6a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 4 Dec 2018 22:55:46 +0100 Subject: gnu: quilt: Use shorter file names for patches. We were reaching the 99-character limit of POSIX tar. * gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch: Rename to... * gnu/packages/patches/quilt-getopt-nondigit-param.patch: ... this. * gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch: Rename to... * gnu/packages/patches/quilt-getopt-second-separator.patch: ... this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/patchutils.scm (quilt)[source](patches): Likewise. --- gnu/local.mk | 4 +- ...pat-getopt-fix-option-with-nondigit-param.patch | 45 ----------------- .../quilt-compat-getopt-fix-second-separator.patch | 58 ---------------------- .../patches/quilt-getopt-nondigit-param.patch | 45 +++++++++++++++++ .../patches/quilt-getopt-second-separator.patch | 58 ++++++++++++++++++++++ gnu/packages/patchutils.scm | 4 +- 6 files changed, 107 insertions(+), 107 deletions(-) delete mode 100644 gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch delete mode 100644 gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch create mode 100644 gnu/packages/patches/quilt-getopt-nondigit-param.patch create mode 100644 gnu/packages/patches/quilt-getopt-second-separator.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 53a3547559..d2407bb80e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1119,8 +1119,8 @@ dist_patch_DATA = \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/quilt-test-fix-regex.patch \ - %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch \ - %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch \ + %D%/packages/patches/quilt-getopt-nondigit-param.patch \ + %D%/packages/patches/quilt-getopt-second-separator.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch b/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch deleted file mode 100644 index 6bbec67e75..0000000000 --- a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Jean Delvare -Subject: compat/getopt: Allow non-digit parameter embedded in short option - -The compatibility getopt script allows only digit parameters to be -embedded in short options. Util-linux's getopt implementation does -not have such a restriction and allows any parameter to be embedded -in short options. As a consequence, using the compatibility getopt -script would choke for example on "-pab", which is a legal option -of the "quilt refresh" command. - -Remove the limitation on digits so that the compatibility getopt -script allows what util-linux allows. This fixes the second half -of bug #54772: -https://savannah.nongnu.org/bugs/index.php?54772 - -As a side note, this feature of the compatibility script was broken -anyway, as it would output the digits in reverse order. - -Signed-off-by: Jean Delvare ---- - compat/getopt.in | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - ---- quilt.orig/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 -+++ quilt/compat/getopt.in 2018-10-03 16:12:17.624841732 +0200 -@@ -108,15 +108,10 @@ foreach my $word (@words) { - if (scalar(@letters) == 0) { - $need_param = $letter; - } else { -- # short options can have numerical args -- # embedded in the short option list: -UO -- die "unexpected character after option $letter" -- if ($letters[$#letters] !~ /[0-9]/); -- my @digits; -- while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) { -- push @digits, pop @letters; -- } -- push @options, quote_word(join('', reverse @digits)); -+ # short options can have args -+ # embedded in the short option list -+ push @options, quote_word(join('', reverse @letters)); -+ @letters = (); - } - } - } diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch b/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch deleted file mode 100644 index cde2c8d41c..0000000000 --- a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Jean Delvare -Subject: compat/getopt: Handle a second separator - -getopt can be passed 2 '--' separators. The first one tells that -getopt options are over and target program options start. The second -one tells that the target program's options are over and following -arguments should be treated as non-options even if they look like -options. - -This second separator was not handled, causing the compatibility -getopt script to treat the following arguments as options, eventually -failing one way or another. - -Properly detect and handle the second separator. This fixes the first -half of bug #54772: -https://savannah.nongnu.org/bugs/index.php?54772 - -Signed-off-by: Jean Delvare ---- - compat/getopt.in | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - ---- quilt.orig/compat/getopt.in 2018-10-03 15:23:21.147620172 +0200 -+++ quilt/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 -@@ -8,12 +8,12 @@ - - use strict; - --my $opts; -+my $opts = ''; - my @words; - my $found_sep = 0; - - foreach my $arg (@ARGV) { -- if ($arg eq '--') { -+ if (!$found_sep && $arg eq '--') { - $found_sep = 1; - } - else { -@@ -62,10 +62,17 @@ sub quote_word - return "'$word'"; - } - -+# there can be a second separator, to inhibit processing following arguments -+# as options -+$found_sep = 0; - foreach my $word (@words) { -+ if ($word eq '--') { -+ $found_sep = 1; -+ next; -+ } - - # allow '-' to be an option value -- if (!$need_param && $word !~ /^-./) { -+ if ($found_sep || (!$need_param && $word !~ /^-./)) { - push @barewords, quote_word($word); - next; - } diff --git a/gnu/packages/patches/quilt-getopt-nondigit-param.patch b/gnu/packages/patches/quilt-getopt-nondigit-param.patch new file mode 100644 index 0000000000..6bbec67e75 --- /dev/null +++ b/gnu/packages/patches/quilt-getopt-nondigit-param.patch @@ -0,0 +1,45 @@ +From: Jean Delvare +Subject: compat/getopt: Allow non-digit parameter embedded in short option + +The compatibility getopt script allows only digit parameters to be +embedded in short options. Util-linux's getopt implementation does +not have such a restriction and allows any parameter to be embedded +in short options. As a consequence, using the compatibility getopt +script would choke for example on "-pab", which is a legal option +of the "quilt refresh" command. + +Remove the limitation on digits so that the compatibility getopt +script allows what util-linux allows. This fixes the second half +of bug #54772: +https://savannah.nongnu.org/bugs/index.php?54772 + +As a side note, this feature of the compatibility script was broken +anyway, as it would output the digits in reverse order. + +Signed-off-by: Jean Delvare +--- + compat/getopt.in | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +--- quilt.orig/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 ++++ quilt/compat/getopt.in 2018-10-03 16:12:17.624841732 +0200 +@@ -108,15 +108,10 @@ foreach my $word (@words) { + if (scalar(@letters) == 0) { + $need_param = $letter; + } else { +- # short options can have numerical args +- # embedded in the short option list: -UO +- die "unexpected character after option $letter" +- if ($letters[$#letters] !~ /[0-9]/); +- my @digits; +- while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) { +- push @digits, pop @letters; +- } +- push @options, quote_word(join('', reverse @digits)); ++ # short options can have args ++ # embedded in the short option list ++ push @options, quote_word(join('', reverse @letters)); ++ @letters = (); + } + } + } diff --git a/gnu/packages/patches/quilt-getopt-second-separator.patch b/gnu/packages/patches/quilt-getopt-second-separator.patch new file mode 100644 index 0000000000..cde2c8d41c --- /dev/null +++ b/gnu/packages/patches/quilt-getopt-second-separator.patch @@ -0,0 +1,58 @@ +From: Jean Delvare +Subject: compat/getopt: Handle a second separator + +getopt can be passed 2 '--' separators. The first one tells that +getopt options are over and target program options start. The second +one tells that the target program's options are over and following +arguments should be treated as non-options even if they look like +options. + +This second separator was not handled, causing the compatibility +getopt script to treat the following arguments as options, eventually +failing one way or another. + +Properly detect and handle the second separator. This fixes the first +half of bug #54772: +https://savannah.nongnu.org/bugs/index.php?54772 + +Signed-off-by: Jean Delvare +--- + compat/getopt.in | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- quilt.orig/compat/getopt.in 2018-10-03 15:23:21.147620172 +0200 ++++ quilt/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 +@@ -8,12 +8,12 @@ + + use strict; + +-my $opts; ++my $opts = ''; + my @words; + my $found_sep = 0; + + foreach my $arg (@ARGV) { +- if ($arg eq '--') { ++ if (!$found_sep && $arg eq '--') { + $found_sep = 1; + } + else { +@@ -62,10 +62,17 @@ sub quote_word + return "'$word'"; + } + ++# there can be a second separator, to inhibit processing following arguments ++# as options ++$found_sep = 0; + foreach my $word (@words) { ++ if ($word eq '--') { ++ $found_sep = 1; ++ next; ++ } + + # allow '-' to be an option value +- if (!$need_param && $word !~ /^-./) { ++ if ($found_sep || (!$need_param && $word !~ /^-./)) { + push @barewords, quote_word($word); + next; + } diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index fa5ad62e44..b655399345 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -102,8 +102,8 @@ listing the files modified by a patch.") (base32 "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn")) (patches (search-patches "quilt-test-fix-regex.patch" - "quilt-compat-getopt-fix-second-separator.patch" - "quilt-compat-getopt-fix-option-with-nondigit-param.patch")))) + "quilt-getopt-second-separator.patch" + "quilt-getopt-nondigit-param.patch")))) (build-system gnu-build-system) (native-inputs `(("gettext" ,gnu-gettext))) -- cgit 1.4.1 From 4163f2467bce1a6123f0da1c49e88751d93e634b Mon Sep 17 00:00:00 2001 From: Stefan Stefanović Date: Sat, 24 Nov 2018 06:40:39 +0100 Subject: gnu: elogind: Update to 239.2. * gnu/packages/freedesktop.scm (elogind): Update to 239.2. [source](patches): Remove elogind-glibc-2.27.patch. [source](snippet): Remove snippet. [arguments]: <#:tests?>: Enable tests. <#:configure-flags>: Adjust build paths. Disable some tests. <#:make-flags>: Remove argument. <#:phases>[patch-locale-header]: Remove phase. <#:phases>[clean-runpath]: Add phase. <#:phases>[bootstrap]: Remove phase. <#:phases>[fix-pkttyagent-path]: Add phase. <#:phases>[fix-service-file]: Remove phase. <#:phases>[add-libcap-to-search-path]: Remove phase. <#:phases>[remove-uaccess-tag]: Remove phase. <#:phases>[change-pid-file-path]: Add phase. [build-system]: Switch to meson-build-system. [native-inputs]: Sort native-inputs list. Remove gperf package version constraint. Remove: autoconf, automake, libtool, intltool. Add: docbook-xml-4.2. [inputs]: Remove: linux-libre-headers. * gnu/packages/patches/elogind-glibc-2.27.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch file. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 - gnu/packages/freedesktop.scm | 126 +++++++++----------------- gnu/packages/patches/elogind-glibc-2.27.patch | 22 ----- 3 files changed, 43 insertions(+), 106 deletions(-) delete mode 100644 gnu/packages/patches/elogind-glibc-2.27.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 53a3547559..a400e6223e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -666,7 +666,6 @@ dist_patch_DATA = \ %D%/packages/patches/dropbear-CVE-2018-15599.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/elfutils-tests-ptrace.patch \ - %D%/packages/patches/elogind-glibc-2.27.patch \ %D%/packages/patches/einstein-build.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index af8297a75f..ff74c79f90 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2017 Brendan Tildesley ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Pierre Neidhardt +;;; Copyright © 2018 Stefan Stefanović ;;; ;;; This file is part of GNU Guix. ;;; @@ -227,7 +228,7 @@ the freedesktop.org XDG Base Directory specification.") (define-public elogind (package (name "elogind") - (version "232.4") + (version "239.2") (source (origin (method git-fetch) (uri (git-reference @@ -236,101 +237,60 @@ the freedesktop.org XDG Base Directory specification.") (file-name (git-file-name name version)) (sha256 (base32 - "06qqs6yfcwg8aiinqqvy5374pys6sspmvsrqz93c724hqq38d93z")) - (patches (search-patches "elogind-glibc-2.27.patch")) - (modules '((guix build utils))) - (snippet - '(begin - (use-modules (guix build utils)) - (substitute* "Makefile.am" - ;; Avoid validation against DTD because the DTDs for - ;; both doctype 4.2 and 4.5 are needed. - (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid")) - #t)))) - (build-system gnu-build-system) + "17khwbzqmkfd3hcscs51kzdpvq9p2llm08vbpsdhy9yxgwfzlfa6")))) + (build-system meson-build-system) (arguments - `(#:tests? #f ;FIXME: "make check" in the "po" directory fails. - #:configure-flags - (list (string-append "--with-udevrulesdir=" - (assoc-ref %outputs "out") - "/lib/udev/rules.d") - - ;; Let elogind be its own cgroup controller, rather than relying - ;; on systemd or OpenRC. By default, 'configure' makes an - ;; incorrect guess. - "--with-cgroup-controller=elogind" - - (string-append "--with-rootprefix=" - (assoc-ref %outputs "out")) - (string-append "--with-rootlibexecdir=" - (assoc-ref %outputs "out") - "/libexec/elogind") - ;; These are needed to ensure that lto linking works. - "RANLIB=gcc-ranlib" - "AR=gcc-ar" - "NM=gcc-nm") - #:make-flags '("PKTTYAGENT=/run/current-system/profile/bin/pkttyagent") + `(#:configure-flags + (let* ((out (assoc-ref %outputs "out")) + (sysconf (string-append out "/etc")) + (libexec (string-append out "/libexec/elogind")) + (dbuspolicy (string-append out "/etc/dbus-1/system.d")) + (shepherd (assoc-ref %build-inputs "shepherd")) + (halt-path (string-append shepherd "/sbin/halt")) + (kexec-path "") ;not available in Guix yet + (poweroff-path (string-append shepherd "/sbin/shutdown")) + (reboot-path (string-append shepherd "/sbin/reboot"))) + (list + (string-append "-Drootprefix=" out) + (string-append "-Dsysconfdir=" sysconf) + (string-append "-Drootlibexecdir=" libexec) + (string-append "-Ddbuspolicydir=" dbuspolicy) + (string-append "-Dc_link_args=-Wl,-rpath=" libexec) + (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec) + (string-append "-Dhalt-path=" halt-path) + (string-append "-Dkexec-path=" kexec-path) + (string-append "-Dpoweroff-path=" poweroff-path) + (string-append "-Dreboot-path=" reboot-path) + "-Dcgroup-controller=elogind" + ;; Disable some tests. + "-Dtests=false" + "-Dslow-tests=false")) #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-locale-header + (add-after 'unpack 'fix-pkttyagent-path (lambda _ - ;; Fix compilation with glibc >= 2.26, which removed xlocale.h. - ;; This can be removed for elogind 234. - (substitute* "src/basic/parse-util.c" - (("xlocale\\.h") "locale.h")) + (substitute* "meson.build" + (("join_paths\\(bindir, 'pkttyagent'\\)") + "'\"/run/current-system/profile/bin/pkttyagent\"'")) #t)) - (replace 'bootstrap + (add-after 'unpack 'change-pid-file-path (lambda _ - (invoke "intltoolize" "--force" "--automake") - (invoke "autoreconf" "-vif"))) - (add-before 'build 'fix-service-file - (lambda* (#:key outputs #:allow-other-keys) - ;; Fix the file name of the 'elogind' binary in the D-Bus - ;; '.service' file. - (substitute* "src/login/org.freedesktop.login1.service" - (("^Exec=.*") - (string-append "Exec=" (assoc-ref %outputs "out") - "/libexec/elogind/elogind\n"))) - #t)) - (add-after 'install 'add-libcap-to-search-path - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Add a missing '-L' for libcap in libelogind.la. See - ;; . - (let ((libcap (assoc-ref inputs "libcap")) - (out (assoc-ref outputs "out"))) - (substitute* (string-append out "/lib/libelogind.la") - (("-lcap") - (string-append "-L" libcap "/lib -lcap"))) - #t))) - (add-after 'unpack 'remove-uaccess-tag - (lambda _ - ;; systemd supports a "uaccess" built-in tag, but eudev currently - ;; doesn't. This leads to eudev warnings that we'd rather not - ;; see, so remove the reference to "uaccess." - (substitute* "src/login/73-seat-late.rules.in" - (("^TAG==\"uaccess\".*" line) - (string-append "# " line "\n"))) + (substitute* "src/login/elogind.c" + (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\"")) #t))))) (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("intltool" ,intltool) - ("gettext" ,gettext-minimal) - ("python" ,python) + `(("docbook-xml" ,docbook-xml) + ("docbook-xml-4.2" ,docbook-xml-4.2) ("docbook-xsl" ,docbook-xsl) - ("docbook-xml" ,docbook-xml) - ("xsltproc" ,libxslt) - ("m4" ,m4) + ("gettext" ,gettext-minimal) + ("gperf" ,gperf) ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("m4" ,m4) ("pkg-config" ,pkg-config) - - ;; Use gperf 3.0 to work around - ;; . - ("gperf" ,gperf-3.0))) + ("python" ,python) + ("xsltproc" ,libxslt))) (inputs `(("linux-pam" ,linux-pam) - ("linux-libre-headers" ,linux-libre-headers) ("libcap" ,libcap) ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked ;when pressing the power button diff --git a/gnu/packages/patches/elogind-glibc-2.27.patch b/gnu/packages/patches/elogind-glibc-2.27.patch deleted file mode 100644 index 4ade587b5e..0000000000 --- a/gnu/packages/patches/elogind-glibc-2.27.patch +++ /dev/null @@ -1,22 +0,0 @@ -Look for memfd_create in sys/mman.h instead of linux/memfd.h. -Needed to build with glibc-2.27. - ---- a/configure.ac 1969-12-31 19:00:00.000000000 -0500 -+++ b/configure.ac 2018-03-27 23:54:15.414589005 -0400 -@@ -360,7 +360,7 @@ - # ------------------------------------------------------------------------------ - - AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) --AC_CHECK_HEADERS([linux/memfd.h], [], []) -+AC_CHECK_HEADERS([sys/mman.h], [], []) - - AC_CHECK_HEADERS([printf.h], [have_printf_h=yes], [have_printf_h=no]) - AS_IF([test x$have_printf_h = xyes], [ -@@ -395,6 +395,7 @@ - [], [], [[ - #include - #include -+#include - #include - #include - #include -- cgit 1.4.1 From e6c28113e6d74c713f8d77bd3d8a543e6871a413 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 6 Dec 2018 15:12:51 -0500 Subject: gnu: QEMU: Fix CVE-2018-16847 and CVE-2018-16867. * gnu/packages/patches/qemu-CVE-2018-16847.patch, gnu/packages/patches/qemu-CVE-2018-16867.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/virtualization.scm (qemu)[source]: Use them. --- gnu/local.mk | 2 + gnu/packages/patches/qemu-CVE-2018-16847.patch | 158 +++++++++++++++++++++++++ gnu/packages/patches/qemu-CVE-2018-16867.patch | 49 ++++++++ gnu/packages/virtualization.scm | 2 + 4 files changed, 211 insertions(+) create mode 100644 gnu/packages/patches/qemu-CVE-2018-16847.patch create mode 100644 gnu/packages/patches/qemu-CVE-2018-16867.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a400e6223e..a35e5ae7e3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1111,6 +1111,8 @@ dist_patch_DATA = \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ + %D%/packages/patches/qemu-CVE-2018-16847.patch \ + %D%/packages/patches/qemu-CVE-2018-16867.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2018-16847.patch b/gnu/packages/patches/qemu-CVE-2018-16847.patch new file mode 100644 index 0000000000..c76bdf764a --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2018-16847.patch @@ -0,0 +1,158 @@ +Fix CVE-2018-16847: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16847 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=87ad860c622cc8f8916b5232bd8728c08f938fce + +From 87ad860c622cc8f8916b5232bd8728c08f938fce Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 20 Nov 2018 19:41:48 +0100 +Subject: [PATCH] nvme: fix out-of-bounds access to the CMB +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Because the CMB BAR has a min_access_size of 2, if you read the last +byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one +error. This is CVE-2018-16847. + +Another way to fix this might be to register the CMB as a RAM memory +region, which would also be more efficient. However, that might be a +change for big-endian machines; I didn't think this through and I don't +know how real hardware works. Add a basic testcase for the CMB in case +somebody does this change later on. + +Cc: Keith Busch +Cc: qemu-block@nongnu.org +Reported-by: Li Qiang +Reviewed-by: Li Qiang +Tested-by: Li Qiang +Signed-off-by: Paolo Bonzini +Reviewed-by: Philippe Mathieu-Daudé +Tested-by: Philippe Mathieu-Daudé +Signed-off-by: Kevin Wolf +--- + hw/block/nvme.c | 2 +- + tests/Makefile.include | 2 +- + tests/nvme-test.c | 68 +++++++++++++++++++++++++++++++++++------- + 3 files changed, 60 insertions(+), 12 deletions(-) + +diff --git a/hw/block/nvme.c b/hw/block/nvme.c +index 28d284346dd..8c35cab2b43 100644 +--- a/hw/block/nvme.c ++++ b/hw/block/nvme.c +@@ -1201,7 +1201,7 @@ static const MemoryRegionOps nvme_cmb_ops = { + .write = nvme_cmb_write, + .endianness = DEVICE_LITTLE_ENDIAN, + .impl = { +- .min_access_size = 2, ++ .min_access_size = 1, + .max_access_size = 8, + }, + }; +diff --git a/tests/Makefile.include b/tests/Makefile.include +index 613242bc6ef..fb0b449c02a 100644 +--- a/tests/Makefile.include ++++ b/tests/Makefile.include +@@ -730,7 +730,7 @@ tests/test-hmp$(EXESUF): tests/test-hmp.o + tests/machine-none-test$(EXESUF): tests/machine-none-test.o + tests/drive_del-test$(EXESUF): tests/drive_del-test.o $(libqos-virtio-obj-y) + tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y) +-tests/nvme-test$(EXESUF): tests/nvme-test.o ++tests/nvme-test$(EXESUF): tests/nvme-test.o $(libqos-pc-obj-y) + tests/pvpanic-test$(EXESUF): tests/pvpanic-test.o + tests/i82801b11-test$(EXESUF): tests/i82801b11-test.o + tests/ac97-test$(EXESUF): tests/ac97-test.o +diff --git a/tests/nvme-test.c b/tests/nvme-test.c +index 7674a446e4f..2700ba838aa 100644 +--- a/tests/nvme-test.c ++++ b/tests/nvme-test.c +@@ -8,25 +8,73 @@ + */ + + #include "qemu/osdep.h" ++#include "qemu/units.h" + #include "libqtest.h" ++#include "libqos/libqos-pc.h" ++ ++static QOSState *qnvme_start(const char *extra_opts) ++{ ++ QOSState *qs; ++ const char *arch = qtest_get_arch(); ++ const char *cmd = "-drive id=drv0,if=none,file=null-co://,format=raw " ++ "-device nvme,addr=0x4.0,serial=foo,drive=drv0 %s"; ++ ++ if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { ++ qs = qtest_pc_boot(cmd, extra_opts ? : ""); ++ global_qtest = qs->qts; ++ return qs; ++ } ++ ++ g_printerr("nvme tests are only available on x86\n"); ++ exit(EXIT_FAILURE); ++} ++ ++static void qnvme_stop(QOSState *qs) ++{ ++ qtest_shutdown(qs); ++} + +-/* Tests only initialization so far. TODO: Replace with functional tests */ + static void nop(void) + { ++ QOSState *qs; ++ ++ qs = qnvme_start(NULL); ++ qnvme_stop(qs); + } + +-int main(int argc, char **argv) ++static void nvmetest_cmb_test(void) + { +- int ret; ++ const int cmb_bar_size = 2 * MiB; ++ QOSState *qs; ++ QPCIDevice *pdev; ++ QPCIBar bar; + +- g_test_init(&argc, &argv, NULL); +- qtest_add_func("/nvme/nop", nop); ++ qs = qnvme_start("-global nvme.cmb_size_mb=2"); ++ pdev = qpci_device_find(qs->pcibus, QPCI_DEVFN(4,0)); ++ g_assert(pdev != NULL); ++ ++ qpci_device_enable(pdev); ++ bar = qpci_iomap(pdev, 2, NULL); ++ ++ qpci_io_writel(pdev, bar, 0, 0xccbbaa99); ++ g_assert_cmpint(qpci_io_readb(pdev, bar, 0), ==, 0x99); ++ g_assert_cmpint(qpci_io_readw(pdev, bar, 0), ==, 0xaa99); ++ ++ /* Test partially out-of-bounds accesses. */ ++ qpci_io_writel(pdev, bar, cmb_bar_size - 1, 0x44332211); ++ g_assert_cmpint(qpci_io_readb(pdev, bar, cmb_bar_size - 1), ==, 0x11); ++ g_assert_cmpint(qpci_io_readw(pdev, bar, cmb_bar_size - 1), !=, 0x2211); ++ g_assert_cmpint(qpci_io_readl(pdev, bar, cmb_bar_size - 1), !=, 0x44332211); ++ g_free(pdev); + +- qtest_start("-drive id=drv0,if=none,file=null-co://,format=raw " +- "-device nvme,drive=drv0,serial=foo"); +- ret = g_test_run(); ++ qnvme_stop(qs); ++} + +- qtest_end(); ++int main(int argc, char **argv) ++{ ++ g_test_init(&argc, &argv, NULL); ++ qtest_add_func("/nvme/nop", nop); ++ qtest_add_func("/nvme/cmb_test", nvmetest_cmb_test); + +- return ret; ++ return g_test_run(); + } +-- +2.19.2 + diff --git a/gnu/packages/patches/qemu-CVE-2018-16867.patch b/gnu/packages/patches/qemu-CVE-2018-16867.patch new file mode 100644 index 0000000000..1403d8e0f8 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2018-16867.patch @@ -0,0 +1,49 @@ +Fix CVE-2018-16867: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16867 +https://seclists.org/oss-sec/2018/q4/202 + +Patch copied from upstream source repository: + +https://git.qemu.org/?p=qemu.git;a=commitdiff;h=c52d46e041b42bb1ee6f692e00a0abe37a9659f6 + +From c52d46e041b42bb1ee6f692e00a0abe37a9659f6 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Mon, 3 Dec 2018 11:10:45 +0100 +Subject: [PATCH] usb-mtp: outlaw slashes in filenames +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Slash is unix directory separator, so they are not allowed in filenames. +Note this also stops the classic escape via "../". + +Fixes: CVE-2018-16867 +Reported-by: Michael Hanselmann +Signed-off-by: Gerd Hoffmann +Reviewed-by: Philippe Mathieu-Daudé +Message-id: 20181203101045.27976-3-kraxel@redhat.com +--- + hw/usb/dev-mtp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c +index 0f6a9702ef1..100b7171f4e 100644 +--- a/hw/usb/dev-mtp.c ++++ b/hw/usb/dev-mtp.c +@@ -1719,6 +1719,12 @@ static void usb_mtp_write_metadata(MTPState *s) + + filename = utf16_to_str(dataset->length, dataset->filename); + ++ if (strchr(filename, '/')) { ++ usb_mtp_queue_result(s, RES_PARAMETER_NOT_SUPPORTED, d->trans, ++ 0, 0, 0, 0); ++ return; ++ } ++ + o = usb_mtp_object_lookup_name(p, filename, dataset->length); + if (o != NULL) { + next_handle = o->handle; +-- +2.19.2 + diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 2f8e541d40..0502bb38c4 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -100,6 +100,8 @@ (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) + (patches (search-patches "qemu-CVE-2018-16847.patch" + "qemu-CVE-2018-16867.patch")) (sha256 (base32 "04sp3f1gp4bdb913jf7fw761njaqp2l32wgipp1sapmxx17zcyld")))) -- cgit 1.4.1 From 8d65ae44ac9492b17266aa1bbe04d562e904946a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 8 Dec 2018 00:43:36 +0100 Subject: gnu: GCC@6: Update to 6.5.0. * gnu/packages/patches/gcc-libsanitizer-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/gcc.scm (gcc-6): Update to 6.5.0. [source](patches): Drop obsolete patches. [source](snippet): Remove. --- gnu/local.mk | 1 - gnu/packages/gcc.scm | 24 +---- gnu/packages/patches/gcc-libsanitizer-fix.patch | 113 ------------------------ 3 files changed, 4 insertions(+), 134 deletions(-) delete mode 100644 gnu/packages/patches/gcc-libsanitizer-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 52451b8c38..ae3aee7c21 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -715,7 +715,6 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ - %D%/packages/patches/gcc-libsanitizer-fix.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 8207104174..fb06b53474 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -461,34 +461,18 @@ Go. It also includes runtime support libraries for these languages.") (define-public gcc-6 (package (inherit gcc-5) - (version "6.4.0") + (version "6.5.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.xz")) (sha256 (base32 - "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5")) - (patches (search-patches "gcc-libsanitizer-fix.patch" - "gcc-libsanitizer-ustat.patch" - "gcc-strmov-store-file-names.patch" + "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby")) + (patches (search-patches "gcc-strmov-store-file-names.patch" "gcc-6-source-date-epoch-1.patch" "gcc-6-source-date-epoch-2.patch" - "gcc-5.0-libvtv-runpath.patch")) - (modules '((guix build utils))) - ;; This is required for building with glibc-2.26. - ;; This can be removed when gcc-6.5.0 is released. - ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712 - (snippet - '(begin - (for-each - (lambda (dir) - (substitute* (string-append "libgcc/config/" - dir "/linux-unwind.h") - (("struct ucontext") "ucontext_t"))) - '("aarch64" "alpha" "bfin" "i386" "m68k" "nios2" - "pa" "sh" "tilepro" "xtensa")) - #t)))) + "gcc-5.0-libvtv-runpath.patch")))) (inputs `(("isl" ,isl) ,@(package-inputs gcc-4.7))) diff --git a/gnu/packages/patches/gcc-libsanitizer-fix.patch b/gnu/packages/patches/gcc-libsanitizer-fix.patch deleted file mode 100644 index 67aa44bed4..0000000000 --- a/gnu/packages/patches/gcc-libsanitizer-fix.patch +++ /dev/null @@ -1,113 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=8937b94d1a643fd9760714642296d034a45254a8 -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 - -This patch can be removed when gcc-6.5.0 is released - -From 8937b94d1a643fd9760714642296d034a45254a8 Mon Sep 17 00:00:00 2001 -From: doko -Date: Thu, 7 Sep 2017 07:15:24 +0000 -Subject: [PATCH] 2017-09-07 Matthias Klose - - Backported from mainline - 2017-07-14 Jakub Jelinek - - PR sanitizer/81066 - * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969. - * sanitizer_common/sanitizer_linux.cc: Likewise. - * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise. - * tsan/tsan_platform_linux.cc: Likewise. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@251828 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - libsanitizer/ChangeLog | 11 +++++++++++ - libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +-- - libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +--- - .../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +- - libsanitizer/tsan/tsan_platform_linux.cc | 2 +- - 5 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog -index 252cd09..d988b28 100644 ---- a/libsanitizer/ChangeLog -+++ b/libsanitizer/ChangeLog -@@ -1,3 +1,14 @@ -+2017-09-07 Matthias Klose -+ -+ Backported from mainline -+ 2017-07-14 Jakub Jelinek -+ -+ PR sanitizer/81066 -+ * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969. -+ * sanitizer_common/sanitizer_linux.cc: Likewise. -+ * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise. -+ * tsan/tsan_platform_linux.cc: Likewise. -+ - 2017-07-04 Release Manager - - * GCC 6.4.0 released. -diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc -index 2cefa20..223d9c6 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_linux.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc -@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) { - } - #endif - --uptr internal_sigaltstack(const struct sigaltstack *ss, -- struct sigaltstack *oss) { -+uptr internal_sigaltstack(const void *ss, void *oss) { - return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); - } - -diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h -index 4497702..1594058 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_linux.h -+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h -@@ -19,7 +19,6 @@ - #include "sanitizer_platform_limits_posix.h" - - struct link_map; // Opaque type returned by dlopen(). --struct sigaltstack; - - namespace __sanitizer { - // Dirent structure for getdents(). Note that this structure is different from -@@ -28,8 +27,7 @@ struct linux_dirent; - - // Syscall wrappers. - uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); --uptr internal_sigaltstack(const struct sigaltstack* ss, -- struct sigaltstack* oss); -+uptr internal_sigaltstack(const void* ss, void* oss); - uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, - __sanitizer_sigset_t *oldset); - void internal_sigfillset(__sanitizer_sigset_t *set); -diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -index c919e4f..014162af 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc -@@ -267,7 +267,7 @@ static int TracerThread(void* argument) { - - // Alternate stack for signal handling. - InternalScopedBuffer handler_stack_memory(kHandlerStackSize); -- struct sigaltstack handler_stack; -+ stack_t handler_stack; - internal_memset(&handler_stack, 0, sizeof(handler_stack)); - handler_stack.ss_sp = handler_stack_memory.data(); - handler_stack.ss_size = kHandlerStackSize; -diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc -index 09cec5f..908f4fe 100644 ---- a/libsanitizer/tsan/tsan_platform_linux.cc -+++ b/libsanitizer/tsan/tsan_platform_linux.cc -@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) { - int ExtractResolvFDs(void *state, int *fds, int nfd) { - #if SANITIZER_LINUX - int cnt = 0; -- __res_state *statp = (__res_state*)state; -+ struct __res_state *statp = (struct __res_state*)state; - for (int i = 0; i < MAXNS && cnt < nfd; i++) { - if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) - fds[cnt++] = statp->_u._ext.nssocks[i]; --- -2.9.3 - -- cgit 1.4.1 From 5d3f673db4f866564b4226046a266de36dc21dbd Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 5 Dec 2018 18:35:36 -0500 Subject: gnu: polkit: Fix CVE-2018-19788. * gnu/packages/patches/polkit-CVE-2018-19788.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/polkit.scm (polkit)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/patches/polkit-CVE-2018-19788.patch | 197 +++++++++++++++++++++++ gnu/packages/polkit.scm | 1 + 3 files changed, 199 insertions(+) create mode 100644 gnu/packages/patches/polkit-CVE-2018-19788.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 42b13d1aec..1f368aba71 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1063,6 +1063,7 @@ dist_patch_DATA = \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ %D%/packages/patches/podofo-cmake-3.12.patch \ + %D%/packages/patches/polkit-CVE-2018-19788.patch \ %D%/packages/patches/poppler-CVE-2018-19149.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ diff --git a/gnu/packages/patches/polkit-CVE-2018-19788.patch b/gnu/packages/patches/polkit-CVE-2018-19788.patch new file mode 100644 index 0000000000..58cde6c5dc --- /dev/null +++ b/gnu/packages/patches/polkit-CVE-2018-19788.patch @@ -0,0 +1,197 @@ +Fix CVE-2018-19788: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19788 +https://gitlab.freedesktop.org/polkit/polkit/issues/74 + +Patch copied from upstream source repository: + +https://gitlab.freedesktop.org/polkit/polkit/commit/2cb40c4d5feeaa09325522bd7d97910f1b59e379 + +From 2cb40c4d5feeaa09325522bd7d97910f1b59e379 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 3 Dec 2018 10:28:58 +0100 +Subject: [PATCH] Allow negative uids/gids in PolkitUnixUser and Group objects + +(uid_t) -1 is still used as placeholder to mean "unset". This is OK, since +there should be no users with such number, see +https://systemd.io/UIDS-GIDS#special-linux-uids. + +(uid_t) -1 is used as the default value in class initialization. + +When a user or group above INT32_MAX is created, the numeric uid or +gid wraps around to negative when the value is assigned to gint, and +polkit gets confused. Let's accept such gids, except for -1. + +A nicer fix would be to change the underlying type to e.g. uint32 to +not have negative values. But this cannot be done without breaking the +API, so likely new functions will have to be added (a +polkit_unix_user_new variant that takes a unsigned, and the same for +_group_new, _set_uid, _get_uid, _set_gid, _get_gid, etc.). This will +require a bigger patch. + +Fixes https://gitlab.freedesktop.org/polkit/polkit/issues/74. +--- + src/polkit/polkitunixgroup.c | 15 +++++++++++---- + src/polkit/polkitunixprocess.c | 12 ++++++++---- + src/polkit/polkitunixuser.c | 13 ++++++++++--- + 3 files changed, 29 insertions(+), 11 deletions(-) + +diff --git a/src/polkit/polkitunixgroup.c b/src/polkit/polkitunixgroup.c +index c57a1aa..309f689 100644 +--- a/src/polkit/polkitunixgroup.c ++++ b/src/polkit/polkitunixgroup.c +@@ -71,6 +71,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixGroup, polkit_unix_group, G_TYPE_OBJECT, + static void + polkit_unix_group_init (PolkitUnixGroup *unix_group) + { ++ unix_group->gid = -1; /* (git_t) -1 is not a valid GID under Linux */ + } + + static void +@@ -100,11 +101,14 @@ polkit_unix_group_set_property (GObject *object, + GParamSpec *pspec) + { + PolkitUnixGroup *unix_group = POLKIT_UNIX_GROUP (object); ++ gint val; + + switch (prop_id) + { + case PROP_GID: +- unix_group->gid = g_value_get_int (value); ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ unix_group->gid = val; + break; + + default: +@@ -131,9 +135,9 @@ polkit_unix_group_class_init (PolkitUnixGroupClass *klass) + g_param_spec_int ("gid", + "Group ID", + "The UNIX group ID", +- 0, ++ G_MININT, + G_MAXINT, +- 0, ++ -1, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_NAME | +@@ -166,9 +170,10 @@ polkit_unix_group_get_gid (PolkitUnixGroup *group) + */ + void + polkit_unix_group_set_gid (PolkitUnixGroup *group, +- gint gid) ++ gint gid) + { + g_return_if_fail (POLKIT_IS_UNIX_GROUP (group)); ++ g_return_if_fail (gid != -1); + group->gid = gid; + } + +@@ -183,6 +188,8 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group, + PolkitIdentity * + polkit_unix_group_new (gint gid) + { ++ g_return_val_if_fail (gid != -1, NULL); ++ + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_GROUP, + "gid", gid, + NULL)); +diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c +index 972b777..b02b258 100644 +--- a/src/polkit/polkitunixprocess.c ++++ b/src/polkit/polkitunixprocess.c +@@ -159,9 +159,14 @@ polkit_unix_process_set_property (GObject *object, + polkit_unix_process_set_pid (unix_process, g_value_get_int (value)); + break; + +- case PROP_UID: +- polkit_unix_process_set_uid (unix_process, g_value_get_int (value)); ++ case PROP_UID: { ++ gint val; ++ ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ polkit_unix_process_set_uid (unix_process, val); + break; ++ } + + case PROP_START_TIME: + polkit_unix_process_set_start_time (unix_process, g_value_get_uint64 (value)); +@@ -239,7 +244,7 @@ polkit_unix_process_class_init (PolkitUnixProcessClass *klass) + g_param_spec_int ("uid", + "User ID", + "The UNIX user ID", +- -1, ++ G_MININT, + G_MAXINT, + -1, + G_PARAM_CONSTRUCT | +@@ -303,7 +308,6 @@ polkit_unix_process_set_uid (PolkitUnixProcess *process, + gint uid) + { + g_return_if_fail (POLKIT_IS_UNIX_PROCESS (process)); +- g_return_if_fail (uid >= -1); + process->uid = uid; + } + +diff --git a/src/polkit/polkitunixuser.c b/src/polkit/polkitunixuser.c +index 8bfd3a1..234a697 100644 +--- a/src/polkit/polkitunixuser.c ++++ b/src/polkit/polkitunixuser.c +@@ -72,6 +72,7 @@ G_DEFINE_TYPE_WITH_CODE (PolkitUnixUser, polkit_unix_user, G_TYPE_OBJECT, + static void + polkit_unix_user_init (PolkitUnixUser *unix_user) + { ++ unix_user->uid = -1; /* (uid_t) -1 is not a valid UID under Linux */ + unix_user->name = NULL; + } + +@@ -112,11 +113,14 @@ polkit_unix_user_set_property (GObject *object, + GParamSpec *pspec) + { + PolkitUnixUser *unix_user = POLKIT_UNIX_USER (object); ++ gint val; + + switch (prop_id) + { + case PROP_UID: +- unix_user->uid = g_value_get_int (value); ++ val = g_value_get_int (value); ++ g_return_if_fail (val != -1); ++ unix_user->uid = val; + break; + + default: +@@ -144,9 +148,9 @@ polkit_unix_user_class_init (PolkitUnixUserClass *klass) + g_param_spec_int ("uid", + "User ID", + "The UNIX user ID", +- 0, ++ G_MININT, + G_MAXINT, +- 0, ++ -1, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_NAME | +@@ -182,6 +186,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, + gint uid) + { + g_return_if_fail (POLKIT_IS_UNIX_USER (user)); ++ g_return_if_fail (uid != -1); + user->uid = uid; + } + +@@ -196,6 +201,8 @@ polkit_unix_user_set_uid (PolkitUnixUser *user, + PolkitIdentity * + polkit_unix_user_new (gint uid) + { ++ g_return_val_if_fail (uid != -1, NULL); ++ + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_USER, + "uid", uid, + NULL)); +-- +2.18.1 + diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm index 7cc5205faa..830006d439 100644 --- a/gnu/packages/polkit.scm +++ b/gnu/packages/polkit.scm @@ -49,6 +49,7 @@ (uri (string-append "https://www.freedesktop.org/software/polkit/releases/" name "-" version ".tar.gz")) + (patches (search-patches "polkit-CVE-2018-19788.patch")) (sha256 (base32 "0c91y61y4gy6p91cwbzg32dhavw4b7fflg370rimqhdxpzdfr1rg")) -- cgit 1.4.1 From accb5c310001339bb4956632db89b1654c6431f1 Mon Sep 17 00:00:00 2001 From: Gábor Boskovits Date: Sun, 9 Dec 2018 12:41:15 +0100 Subject: gnu: openjdk: Make idlj respect SOURCE_DATE_EPOCH. * gnu/packages/patches/openjdk-10-idlj-reproducibility.patch: New file. * gnu/packages/java.scm (openjdk10)[source]: Use it. * gnu/locale.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/java.scm | 2 ++ .../patches/openjdk-10-idlj-reproducibility.patch | 36 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/openjdk-10-idlj-reproducibility.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1f368aba71..50fc08445f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1019,6 +1019,7 @@ dist_patch_DATA = \ %D%/packages/patches/openbabel-fix-crash-on-nwchem-output.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ + %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openldap-CVE-2017-9287.patch \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/opensmtpd-fix-crash.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a09bcfabe5..951c1f4fd3 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1820,6 +1820,8 @@ new Date();")) (sha256 (base32 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) + (patches (search-patches + "openjdk-10-idlj-reproducibility.patch")) (modules '((guix build utils))) (snippet `(begin diff --git a/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch new file mode 100644 index 0000000000..b29a06f272 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-idlj-reproducibility.patch @@ -0,0 +1,36 @@ +From a0a0c6a43b88d946f2b5484892cf0209bd7c0e68 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= +Date: Sat, 8 Dec 2018 21:25:31 +0100 +Subject: [PATCH] Make idlj respect SOURCE_DATE_EPOCH. + +--- + .../sun/tools/corba/se/idl/toJavaPortable/Util.java | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +index 7397619f2..583d6b8e4 100644 +--- a/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java ++++ b/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +@@ -1146,7 +1146,18 @@ public class Util extends com.sun.tools.corba.se.idl.Util + else + formatter.setTimeZone (java.util.TimeZone.getDefault ()); + +- stream.println ("* " + formatter.format (new Date ())); ++ try { ++ String epoch = System.getenv("SOURCE_DATE_EPOCH"); ++ if(epoch != null) { ++ long unixTime = Long.parseLong(epoch); ++ stream.println ("* " + formatter.format (new Date (unixTime*1000L))); ++ } else { ++ stream.println ("* " + formatter.format (new Date ())); ++ } ++ } catch (Exception e) { ++ //in case of error fall back to default ++ stream.println ("* " + formatter.format (new Date ())); ++ } + + // + /////////////// +-- +2.19.2 + -- cgit 1.4.1 From fec2c8532d238f75b2d33e2281509d101bd45171 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 10 Dec 2018 10:07:44 -0500 Subject: gnu: Borg: Update to 1.1.8. * gnu/packages/backup.scm (borg): Update to 1.1.8. [source]: Remove obsolete patch. * gnu/packages/patches/borg-respect-storage-quota.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/backup.scm | 5 ++-- .../patches/borg-respect-storage-quota.patch | 32 ---------------------- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 gnu/packages/patches/borg-respect-storage-quota.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 50fc08445f..4f2437befa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -607,7 +607,6 @@ dist_patch_DATA = \ %D%/packages/patches/blast+-fix-makefile.patch \ %D%/packages/patches/blender-newer-ffmpeg.patch \ %D%/packages/patches/boost-fix-icu-build.patch \ - %D%/packages/patches/borg-respect-storage-quota.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/cairo-CVE-2016-9082.patch \ %D%/packages/patches/cairo-setjmp-wrapper.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index c927a14673..a9d8286702 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -491,15 +491,14 @@ detection, and lossless compression.") (define-public borg (package (name "borg") - (version "1.1.7") + (version "1.1.8") (source (origin (method url-fetch) (uri (pypi-uri "borgbackup" version)) - (patches (search-patches "borg-respect-storage-quota.patch")) (sha256 (base32 - "1p3zia62vyg9vadkdjzzkzbj4dmgijr7ix5lmhfbxpwy5q9imdgp")) + "0qqvcscn1l4y83x4sh3izdpmr8zq38j8chjkpfq4q4d01i470hqb")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/borg-respect-storage-quota.patch b/gnu/packages/patches/borg-respect-storage-quota.patch deleted file mode 100644 index d23d1ffc01..0000000000 --- a/gnu/packages/patches/borg-respect-storage-quota.patch +++ /dev/null @@ -1,32 +0,0 @@ -Make sure the client respects the storage quota set by the server: - -https://github.com/borgbackup/borg/issues/4093 - -Patch copied from upstream source repository: - -https://github.com/borgbackup/borg/commit/975cc33206e0e3644626fb7204c34d2157715b61 - -From 975cc33206e0e3644626fb7204c34d2157715b61 Mon Sep 17 00:00:00 2001 -From: Manu -Date: Wed, 3 Oct 2018 23:47:36 +0800 -Subject: [PATCH] Add storage_quota for forced_result if set by serve command. - ---- - src/borg/archiver.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/borg/archiver.py b/src/borg/archiver.py -index 916725e7..279194c1 100644 ---- a/src/borg/archiver.py -+++ b/src/borg/archiver.py -@@ -4276,6 +4276,7 @@ def get_args(self, argv, cmd): - result.restrict_to_paths = forced_result.restrict_to_paths - result.restrict_to_repositories = forced_result.restrict_to_repositories - result.append_only = forced_result.append_only -+ result.storage_quota = forced_result.storage_quota - return result - - def parse_args(self, args=None): --- -2.19.1 - -- cgit 1.4.1