From 5618fd5d6f40b3a95d923ec344f72f32b557ae72 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Wed, 17 Jan 2024 17:03:58 +0000 Subject: gnu: spdlog: Update to 1.13.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/logging.scm (spdlog): Update to 1.13.0. [source]: Remove upstreamed patch. * gnu/local.mk: Unregister it. * gnu/packages/patches/spdlog-fix-tests.patch: Delete file. Change-Id: I78b5021b9841d16f43a283eaee931b4f92746ab8 Signed-off-by: Ludovic Courtès --- gnu/packages/patches/spdlog-fix-tests.patch | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 gnu/packages/patches/spdlog-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/spdlog-fix-tests.patch b/gnu/packages/patches/spdlog-fix-tests.patch deleted file mode 100644 index 13dffb309e..0000000000 --- a/gnu/packages/patches/spdlog-fix-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -Remove after next release and package update: -https://github.com/gabime/spdlog/commit/2ee8bac78e6525a8ad9a9196e65d502ce390d83a - -From 2ee8bac78e6525a8ad9a9196e65d502ce390d83a Mon Sep 17 00:00:00 2001 -From: xvitaly -Date: Sun, 23 Jul 2023 10:15:25 +0200 -Subject: [PATCH] Added missing square bracket to fix the level_to_string_view - test. (#2827) - ---- - tests/test_misc.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_misc.cpp b/tests/test_misc.cpp -index 9f3cb1744..6199641ff 100644 ---- a/tests/test_misc.cpp -+++ b/tests/test_misc.cpp -@@ -43,7 +43,7 @@ TEST_CASE("log_levels", "[log_levels]") - REQUIRE(log_info("Hello", spdlog::level::trace) == "Hello"); - } - --TEST_CASE("level_to_string_view", "[convert_to_string_view") -+TEST_CASE("level_to_string_view", "[convert_to_string_view]") - { - REQUIRE(spdlog::level::to_string_view(spdlog::level::trace) == "trace"); - REQUIRE(spdlog::level::to_string_view(spdlog::level::debug) == "debug"); -- cgit v1.2.3 From a042bfcd7eecb3499d42f143eff733b669f2bbe0 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Sun, 4 Feb 2024 16:47:13 +0000 Subject: gnu: libgeotiff: Fix build with proj 9.3.1. * gnu/packages/geo.scm (libgeotiff): [source]: Add patches to fix build with proj 9.3.1. * gnu/local.mk: Add patch files. * gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch: New file. * gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch: New file. * gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch: New file. Change-Id: I5f09e793698b0b137888faa0f595ef06850c6160 Signed-off-by: Guillaume Le Vaillant --- gnu/local.mk | 3 ++ gnu/packages/geo.scm | 6 ++- .../patches/libgeotiff-fix-tests-on-i386.patch | 35 +++++++++++++++ .../libgeotiff-fix-tests-with-proj-9.3.0.patch | 51 ++++++++++++++++++++++ .../libgeotiff-fix-tests-with-proj-9.3.1.patch | 40 +++++++++++++++++ 5 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch create mode 100644 gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch create mode 100644 gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3ab036ee82..f7ef95e2f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1507,6 +1507,9 @@ dist_patch_DATA = \ %D%/packages/patches/julia-Use-MPFR-4.2.patch \ %D%/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \ + %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch \ + %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch \ + %D%/packages/patches/libgeotiff-fix-tests-on-i386.patch \ %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 5882271174..3171efa0dc 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -548,7 +548,11 @@ and driving.") (method url-fetch) (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-" version ".tar.gz")) - (patches (search-patches "libgeotiff-fix-tests-with-proj-9.1.1.patch")) + (patches + (search-patches "libgeotiff-fix-tests-with-proj-9.1.1.patch" + "libgeotiff-fix-tests-with-proj-9.3.0.patch" + "libgeotiff-fix-tests-with-proj-9.3.1.patch" + "libgeotiff-fix-tests-on-i386.patch")) (sha256 (base32 "1mjmgv48x51ppax5dnb6lq7z600czxll53bx6jbzqwd4m93i7aq5")) (modules '((guix build utils))) diff --git a/gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch b/gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch new file mode 100644 index 0000000000..e84f726a3d --- /dev/null +++ b/gnu/packages/patches/libgeotiff-fix-tests-on-i386.patch @@ -0,0 +1,35 @@ +From 9990160268fafb71751d4f3a9ad724df70cb9451 Mon Sep 17 00:00:00 2001 +From: Bas Couwenberg +Date: Fri, 1 Dec 2023 10:35:46 +0100 +Subject: [PATCH] Fix test failure on i386. + +--- +https://github.com/OSGeo/libgeotiff/pull/107 + + test/testlistgeo | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/test/testlistgeo b/test/testlistgeo +index 48e92eb..ceec2e6 100755 +--- a/test/testlistgeo ++++ b/test/testlistgeo +@@ -218,6 +218,9 @@ echo "" >>${OUT} + sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp + mv ${OUT}.tmp ${OUT} + ++sed "s/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.02\"E)/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.03\"E)/" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++ + sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized + + sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp +@@ -230,6 +233,9 @@ mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized + sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp + mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized + ++sed "s/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.02\"E)/ProjCenterLongGeoKey: 46.437229 ( 46d26'14.03\"E)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp ++mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized ++ + # do 'diff' with distribution results + # after cleaning for avoid spurios result due + # to different build dir diff --git a/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch new file mode 100644 index 0000000000..5d381d78e2 --- /dev/null +++ b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch @@ -0,0 +1,51 @@ +From 3806fdab4a17f44641a2113faec778e756e2be3d Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Tue, 29 Aug 2023 19:04:25 +0200 +Subject: [PATCH] Fix 'make check' to pass with PROJ 9.3 (fixes #89) + +--- +https://github.com/OSGeo/libgeotiff/pull/90 + + test/testlistgeo | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/test/testlistgeo b/test/testlistgeo +index 9a41e74..48e92eb 100755 +--- a/test/testlistgeo ++++ b/test/testlistgeo +@@ -218,14 +218,24 @@ echo "" >>${OUT} + sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp + mv ${OUT}.tmp ${OUT} + +-sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.tmp ++sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized ++ ++sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++ ++sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp ++mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized ++sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp ++mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized + + # do 'diff' with distribution results + # after cleaning for avoid spurios result due + # to different build dir + sed -e "s/Testing listgeo .*test/Testing listgeo ..\/test/" -i ${OUT} + echo "diff ${OUT} with testlistgeo_out.dist" +-diff -u ${OUT} testlistgeo_out.dist.tmp ++diff -u ${OUT} testlistgeo_out.dist.normalized + if [ $? -ne 0 ] ; then + echo "" + echo "PROBLEMS HAVE OCCURRED" +@@ -236,7 +246,7 @@ else + echo "TEST OK" + echo "test file ${OUT} removed" + echo +- rm testlistgeo_out.dist.tmp ++ rm testlistgeo_out.dist.normalized + /bin/rm -f ${OUT} + exit 0 + fi diff --git a/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch new file mode 100644 index 0000000000..e9a28d1fcd --- /dev/null +++ b/gnu/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch @@ -0,0 +1,40 @@ +From 4f90e57fa1cac7afdd57e5f649775cb24aa15612 Mon Sep 17 00:00:00 2001 +From: Bas Couwenberg +Date: Fri, 1 Dec 2023 08:23:20 +0100 +Subject: [PATCH] Fix test failure with PROJ 9.3.1. + +Closes: #104 +--- +https://github.com/OSGeo/libgeotiff/pull/105 + + test/testlistgeo | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/test/testlistgeo b/test/testlistgeo +index 48e92eb..4331cc3 100755 +--- a/test/testlistgeo ++++ b/test/testlistgeo +@@ -218,6 +218,11 @@ echo "" >>${OUT} + sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp + mv ${OUT}.tmp ${OUT} + ++sed "s/Projection = 15914 (BLM zone 14N (US survey .*))/Projection = 15914 (BLM zone 14N)/g" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++sed "s/Projection = 6753 (Oregon Columbia River West zone (.*))/Projection = 6753 (Oregon Columbia River West zone)/" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++ + sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.normalized + + sed "s/GCS: 4053\/Unspecified datum based upon the International 1924 Authalic Sphere/GCS: 10346\/NSIDC Authalic Sphere/g" < ${OUT} > ${OUT}.tmp +@@ -230,6 +235,11 @@ mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized + sed "s/Datum: 6053\/Not specified (based on International 1924 Authalic Sphere)/Datum: 1360\/NSIDC International 1924 Authalic Sphere/g" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp + mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized + ++sed "s/Projection = 15914 (BLM zone 14N (US survey .*))/Projection = 15914 (BLM zone 14N)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp ++mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized ++sed "s/Projection = 6753 (Oregon Columbia River West zone (.*))/Projection = 6753 (Oregon Columbia River West zone)/" < testlistgeo_out.dist.normalized > testlistgeo_out.dist.normalized.tmp ++mv testlistgeo_out.dist.normalized.tmp testlistgeo_out.dist.normalized ++ + # do 'diff' with distribution results + # after cleaning for avoid spurios result due + # to different build dir -- cgit v1.2.3 From 4b941ab3d5dea321e1fd96dd21faf346258e2d80 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Wed, 10 Jan 2024 08:43:10 +0100 Subject: gnu: coq: Update to 8.17.1. * gnu/packages/coq.scm (coq): Update to 8.17.1 and merge with coq-core and coq-stdlib. [arguments] Merge with coq-core and coq-stdlib. Add pre-build phases and add a custom install phase. Remove unnecessary test-target. [source](patches): Remove. [native-search-paths]: Remove COQLIBPATH and COQCORELIB. (coq-core): Remove variable. (coq-stdlib): Remove variable. (coq-ide)[propagated-inputs]: Add zlib. (coq-mathcomp-bigenough)[propagated-inputs]: Remove coq-core. (coq-mathcomp-finmap)[inputs]: Remove coq-stdlib. (coq-equations): Update to 1.3-8.17. * gnu/packages/patches/coq-fix-envvars.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Co-authored-by: Josselin Poiret Signed-off-by: Julien Lepiller Change-Id: I0a0d9f7a6e06dd19ce1b66051334476d85f4f195 --- gnu/local.mk | 1 - gnu/packages/coq.scm | 89 +++++++++++------------------- gnu/packages/patches/coq-fix-envvars.patch | 53 ------------------ 3 files changed, 32 insertions(+), 111 deletions(-) delete mode 100644 gnu/packages/patches/coq-fix-envvars.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f7ef95e2f8..168590f778 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1056,7 +1056,6 @@ dist_patch_DATA = \ %D%/packages/patches/converseen-hide-non-free-pointers.patch \ %D%/packages/patches/cool-retro-term-wctype.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ - %D%/packages/patches/coq-fix-envvars.patch \ %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ %D%/packages/patches/cpuinfo-system-libraries.patch \ %D%/packages/patches/cpulimit-with-glib-2.32.patch \ diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 57f8489a18..105b942ad3 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages compression) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) @@ -51,10 +52,10 @@ #:use-module (guix utils) #:use-module ((srfi srfi-1) #:hide (zip))) -(define-public coq-core +(define-public coq (package - (name "coq-core") - (version "8.16.1") + (name "coq") + (version "8.17.1") (source (origin (method git-fetch) @@ -64,28 +65,35 @@ (file-name (git-file-name name version)) (sha256 (base32 - "0ljpqhh5lfsim29fcfp2xfcvm3j84pf1mb0gnpdr8vcqqw7mqwpf")) - (patches (search-patches "coq-fix-envvars.patch")))) + "0gg6hizq0i08lk741b579cbswhy6qvkh6inc3d3i5a2af98psq63")))) (native-search-paths (list (search-path-specification (variable "COQPATH") - (files (list "lib/ocaml/site-lib/coq/user-contrib" - "lib/coq/user-contrib"))) - (search-path-specification - (variable "COQLIBPATH") - (files (list "lib/ocaml/site-lib/coq"))) - (search-path-specification - (variable "COQCORELIB") - (files (list "lib/ocaml/site-lib/coq-core")) - (separator #f)))) + (files (list "lib/coq/user-contrib"))))) (build-system dune-build-system) + (arguments + (list + #:package "coq-core,coq-stdlib,coq" + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (coqlib (string-append out "/lib/ocaml/site-lib/coq/"))) + (invoke "./configure" "-prefix" out + "-libdir" coqlib)))) + (add-before 'build 'make-dunestrap + (lambda _ (invoke "make" "dunestrap"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libdir (string-append out "/lib/ocaml/site-lib"))) + (invoke "dune" "install" "--prefix" out + "--libdir" libdir "coq" "coq-core" "coq-stdlib"))))))) (inputs (list gmp ocaml-zarith)) (native-inputs (list ocaml-ounit2 which)) - (arguments - `(#:package "coq-core" - #:test-target ".")) (properties '((upstream-name . "coq"))) ; also for inherited packages (home-page "https://coq.inria.fr") (synopsis "Proof assistant for higher-order logic") @@ -97,39 +105,6 @@ It is developed using Objective Caml and Camlp5.") ;; Some of the documentation is distributed under opl1.0+. (license (list license:lgpl2.1 license:opl1.0+)))) -(define-public coq-stdlib - (package - (inherit coq-core) - (name "coq-stdlib") - (arguments - `(#:package "coq-stdlib" - #:test-target "." - #:phases - (modify-phases %standard-phases - (add-before 'build 'fix-dune - (lambda _ - (substitute* "user-contrib/Ltac2/dune" - (("coq-core.plugins.ltac2") - (string-join - (map (lambda (plugin) (string-append "coq-core.plugins." plugin)) - '("ltac2" "number_string_notation" "tauto" "cc" - "firstorder")) - " ")))))))) - (inputs - (list coq-core gmp ocaml-zarith)) - (native-inputs '()))) - -(define-public coq - (package - (inherit coq-core) - (name "coq") - (arguments - `(#:package "coq" - #:test-target ".")) - (propagated-inputs - (list coq-core coq-stdlib)) - (native-inputs '()))) - (define-public coq-ide-server (package (inherit coq) @@ -148,7 +123,7 @@ It is developed using Objective Caml and Camlp5.") `(#:tests? #f #:package "coqide")) (propagated-inputs - (list coq coq-ide-server)) + (list coq coq-ide-server zlib)) (inputs (list lablgtk3 ocaml-lablgtk3-sourceview3)))) @@ -582,16 +557,16 @@ uses Ltac to synthesize the substitution operation.") (define-public coq-equations (package (name "coq-equations") - (version "1.3") + (version "1.3-8.17") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mattam82/Coq-Equations") - (commit (string-append "v" version "-8.16")))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "08f756vgdd1wklkarg0b93j4n5mhkqm5ixxrhyb23dcv2dwhc8yg")))) + "0g68h4c1ijpphixvl9wkd7sibds38v4236dpvvh194j5ii42vnn8")))) (build-system gnu-build-system) (native-inputs (list ocaml coq camlp5)) @@ -743,7 +718,7 @@ for goals involving set operations. "/lib/coq/user-contrib")) #:phases (modify-phases %standard-phases (delete 'configure)))) - (inputs (list coq coq-stdlib coq-mathcomp which)) + (inputs (list coq coq coq-mathcomp which)) (synopsis "Finite sets and finite types for coq-mathcomp") (description "This library is an extension of coq-mathcomp which supports finite sets @@ -774,7 +749,7 @@ subsume notations for finite sets.") ;; by the packaged project in the future. #:tests? #f #:make-flags ,#~(list (string-append "COQBIN=" - #$(this-package-input "coq-core") + #$(this-package-input "coq") "/bin/") (string-append "COQMF_COQLIB=" (assoc-ref %outputs "out") @@ -784,7 +759,7 @@ subsume notations for finite sets.") "/lib/coq/user-contrib")) #:phases (modify-phases %standard-phases (delete 'configure)))) - (propagated-inputs (list coq coq-core coq-mathcomp which)) + (propagated-inputs (list coq coq-mathcomp which)) (home-page "https://math-comp.github.io/") (synopsis "Small library to do epsilon - N reasoning") (description diff --git a/gnu/packages/patches/coq-fix-envvars.patch b/gnu/packages/patches/coq-fix-envvars.patch deleted file mode 100644 index 6c48224c64..0000000000 --- a/gnu/packages/patches/coq-fix-envvars.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0e76cda958a4d3e4bcbb96e171c26b6b3478c6c2 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller -Date: Thu, 10 Feb 2022 16:44:10 +0100 -Subject: [PATCH] Fix environment variable usage. - ---- - boot/env.ml | 26 +++++++++++++++++++------- - 1 file changed, 19 insertions(+), 7 deletions(-) - -diff --git a/boot/env.ml b/boot/env.ml -index e8521e7..d834a3a 100644 ---- a/boot/env.ml -+++ b/boot/env.ml -@@ -32,17 +32,29 @@ let fail_msg = - - let fail s = Format.eprintf "%s@\n%!" fail_msg; exit 1 - -+let path_to_list p = -+ let sep = if String.equal Sys.os_type "Win32" then ';' else ':' in -+ String.split_on_char sep p -+ - (* This code needs to be refactored, for now it is just what used to be in envvars *) - let guess_coqlib () = - Util.getenv_else "COQLIB" (fun () -> - let prelude = "theories/Init/Prelude.vo" in -- Util.check_file_else -- ~dir:Coq_config.coqlibsuffix -- ~file:prelude -- (fun () -> -- if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) -- then Coq_config.coqlib -- else fail ())) -+ let coqlibpath = Util.getenv_else "COQLIBPATH" (fun () -> Coq_config.coqlibsuffix) in -+ let paths = path_to_list coqlibpath in -+ let valid_paths = -+ List.filter -+ (fun dir -> (Util.check_file_else ~dir:dir ~file:prelude (fun () -> "")) <> "") -+ paths in -+ match valid_paths with -+ | [] -> -+ if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) -+ then Coq_config.coqlib -+ else -+ fail "cannot guess a path for Coq libraries; please use -coqlib option \ -+ or ensure you have installed the package containing Coq's stdlib (coq-stdlib in OPAM) \ -+ If you intend to use Coq without a standard library, the -boot -noinit options must be used." -+ | p::_ -> p) - - (* Build layout uses coqlib = coqcorelib *) - let guess_coqcorelib lib = --- -2.34.0 - -- cgit v1.2.3 From 01ee39cfee10583402e9fc252ca5c0e8232435db Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Wed, 10 Jan 2024 08:43:35 +0100 Subject: gnu: opam: Update to 2.1.5. * gnu/packages/ocaml.scm (opam): Update to 2.1.5. [native-inputs]: Add more test data. [arguments]: Disable failing test. (ocaml-graph): Update to 2.0.0. (ocaml-dose3): Update to 7.0.0. * gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch: Remove. * gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch: Remove. * gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch: Remove. * gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch: Remove. * gnu/local.mk (dist_path_DATA): Unregister removed patches. Change-Id: Ie715998a6d7740332187e1fe0742631964ba5a8a Signed-off-by: Julien Lepiller --- gnu/local.mk | 4 - gnu/packages/ocaml.scm | 132 +++++++++++--------- .../patches/ocaml-dose3-Fix-for-ocaml-4.06.patch | 52 -------- .../patches/ocaml-dose3-Install-mli-cmx-etc.patch | 133 --------------------- .../patches/ocaml-dose3-add-unix-dependency.patch | 25 ---- .../patches/ocaml-dose3-dont-make-printconf.patch | 9 -- 6 files changed, 74 insertions(+), 281 deletions(-) delete mode 100644 gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch delete mode 100644 gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch delete mode 100644 gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch delete mode 100644 gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 168590f778..7806771eea 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1729,10 +1729,6 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/obs-modules-location.patch \ - %D%/packages/patches/ocaml-dose3-add-unix-dependency.patch \ - %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \ - %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \ - %D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \ %D%/packages/patches/ocaml-multiple-definitions.patch \ %D%/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch \ %D%/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 480d1dc269..9c0fab1c38 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -714,7 +714,7 @@ underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.") (define-public ocaml-dose3 (package (name "ocaml-dose3") - (version "5.0.1") + (version "7.0.0") (source (origin (method git-fetch) (uri (git-reference @@ -723,29 +723,16 @@ underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.") (file-name (git-file-name name version)) (sha256 (base32 - "0dxkw37gj8z45kd0dnrlfgpj8yycq0dphs8kjm9kvq9xc8rikxp3")) - (patches - (search-patches - "ocaml-dose3-add-unix-dependency.patch" - "ocaml-dose3-Fix-for-ocaml-4.06.patch" - "ocaml-dose3-dont-make-printconf.patch" - "ocaml-dose3-Install-mli-cmx-etc.patch")))) - (build-system ocaml-build-system) - (arguments - `(#:tests? #f ;the test suite requires python 2 - #:configure-flags - ,#~(list (string-append "SHELL=" - #+(file-append (canonical-package bash-minimal) - "/bin/sh"))) - #:make-flags - ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib")))) - (propagated-inputs - (list ocaml-graph ocaml-cudf ocaml-extlib ocaml-re)) - (native-inputs - (list perl - ocaml-extlib - ocamlbuild - ocaml-cppo)) + "0hcjh68svicap7j9bghgkp49xa12qhxa1pygmrgc9qwm0m4dhirb")))) + (build-system dune-build-system) + (arguments `(#:package "dose3")) + (propagated-inputs (list ocaml-extlib + ocaml-base64-boot + ocaml-cudf + ocaml-graph + ocaml-re + ocaml-stdlib-shims)) + (native-inputs (list ocaml-ounit)) (home-page "https://www.mancoosi.org/software/") (synopsis "Package distribution management framework") (description "Dose3 is a framework made of several OCaml libraries for @@ -850,7 +837,7 @@ the opam file format.") (define ocaml-opam-core (package (name "ocaml-opam-core") - (version "2.1.3") + (version "2.1.5") (source (origin (method git-fetch) (uri (git-reference @@ -859,7 +846,7 @@ the opam file format.") (file-name (git-file-name name version)) (sha256 (base32 - "1mw535zsw7xlvpgwnk1dan76z3f7lh5imlg0s6kdyhfg0iqisjd7")))) + "0ckd87rcmcz11iyhhm5qnmy27jbdffx6n1fr06hvrqqrzi00jljh")))) (build-system dune-build-system) (arguments `(#:package "opam-core" ;; tests are run with the opam package @@ -1038,7 +1025,10 @@ name = Guix Builder") (("diff opamroot-versions.test opamroot-versions.out") "run true") ;; Disable a failing test, probably because the repository we ;; replaced is not as expected - (("diff opamrt-big-upgrade.test opamrt-big-upgrade.out") "run true")) + (("diff opamrt-big-upgrade.test opamrt-big-upgrade.out") "run true") + ;; Disable a failing test because of missing sandboxing + ;; functionality + (("diff init.test init.out") "run true")) (substitute* "tests/reftests/dune" ;; Because of our changes to the previous file, we cannot check ;; it can be regenerated @@ -1074,18 +1064,42 @@ name = Guix Builder") ("which" ,which) ;; Data for tests - ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2" - "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w")) - ("opam-repo-7090735c" ,(opam-repo "7090735c9d1dd2dc481c4128c5ef4d3667238f15" - "1bccsgjhlp64lmvfjfn6viywf3x73ji75myg9ssf1ij1fkmabn0z")) - ("opam-repo-a5d7cdc0" ,(opam-repo "a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd" - "0z7kawqisy07088p5xjxwpvmvzlbj1d9cgdipsj90yx7nc5qh369")) - ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4" - "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8")) - ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0" - "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii")) - ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701" - "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws"))))) + ("opam-repo-0070613707" + ,(opam-repo "00706137074d536d2019d2d222fbe1bea929deda" + "1gv1vvmfscj7wirfv6qncp8pf81wygnpzjwd0lyqcxm7g8r8lb4w")) + ("opam-repo-009e00fa" + ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2" + "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w")) + ("opam-repo-7090735c" + ,(opam-repo "7090735c9d1dd2dc481c4128c5ef4d3667238f15" + "1bccsgjhlp64lmvfjfn6viywf3x73ji75myg9ssf1ij1fkmabn0z")) + ("opam-repo-a5d7cdc0" + ,(opam-repo "a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd" + "0z7kawqisy07088p5xjxwpvmvzlbj1d9cgdipsj90yx7nc5qh369")) + ("opam-repo-ad4dd344" + ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4" + "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8")) + ("opam-repo-c1842d168d" + ,(opam-repo "c1842d168de956caf06d7ac8588e65020d7594d8" + "142y1ac7sprygyh91shcp0zcyfxjjkshi9g44qgg4rx60rbsbhai")) + ("opam-repo-c1d23f0e" + ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0" + "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii")) + ("opam-repo-f372039d" + ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701" + "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")) + ("opam-repo-11ea1cb" + ,(opam-repo "11ea1cb6f2418b1f8a6679e4422771a04c9c3655" + "1s4p0wfn3bx97yvm8xvj3yhzv2pz0jwml68g2ybv37hj9mpbrsq0")) + ("opam-repo-297366c" + ,(opam-repo "297366cd01c3aaf29b967bf0b34ccc7989d4d5b3" + "1ysg69gys37nc2cxivs2ikh6xp0gj85if4rcrr874mqb9z12dm0j")) + ("opam-repo-3235916" + ,(opam-repo "3235916a162a59d7c82dac3fe24214975d48f1aa" + "1yf73rv2n740a4s9g7a9k4j91b4k7al88nwnw9cdw0k2ncbmr486")) + ("opam-repo-de897adf36c4230dfea812f40c98223b31c4521a" + ,(opam-repo "de897adf36c4230dfea812f40c98223b31c4521a" + "1m18x9gcwnbar8yv9sbfz8a3qpw412fp9cf4d6fb7syn0p0h96jw"))))) (inputs (list ocaml-opam-client)) (properties ;; OPAM is used as a tool and not as a library, we can use the OCaml 4.14 @@ -4390,8 +4404,7 @@ multitude of other network protocols (FTP/SMTP/RTSP/etc).") (base32 "1jq349jp663hq51a941afr2y4yyh34r19zsxla73ks9bywj4mm2q")))) (build-system dune-build-system) - (native-inputs - (list ocaml-alcotest ocaml-bos ocaml-rresult)) + (native-inputs (list ocaml-alcotest ocaml-bos ocaml-rresult)) (home-page "https://github.com/mirage/ocaml-base64") (synopsis "Base64 encoding for OCaml") (description "Base64 is a group of similar binary-to-text encoding schemes @@ -4399,6 +4412,14 @@ 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))) +;; A variant without tests that is used to prevent a cyclic dependency when +;; compiling ocaml-dose3. +(define ocaml-base64-boot + (package + (inherit ocaml-base64) + (arguments `(#:tests? #f)) + (native-inputs '()))) + (define-public ocamlify (package (name "ocamlify") @@ -5120,27 +5141,22 @@ and 4 (random based) according to RFC 4122.") (define-public ocaml-graph (package (name "ocaml-graph") - (version "1.8.8") + (version "2.0.0") + (home-page "https://github.com/backtracking/ocamlgraph/") (source (origin - (method url-fetch) - (uri (string-append "http://ocamlgraph.lri.fr/download/" - "ocamlgraph-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr")))) - (build-system ocaml-build-system) - (arguments - `(#:install-target "install-findlib" - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-before 'configure 'set-shell - (lambda* (#:key inputs #:allow-other-keys) - (setenv "CONFIG_SHELL" - (search-input-file inputs "/bin/sh"))))))) - (inputs (list lablgtk)) + "1gjrsyyamvvn2rd9n9yjx6hsglhw0dbm4cgazq0dpx0bbr4inwc3")))) + (build-system dune-build-system) + (arguments `(#:package "ocamlgraph")) + (propagated-inputs (list ocaml-stdlib-shims)) + (native-inputs (list ocaml-graphics)) (properties `((upstream-name . "ocamlgraph"))) - (home-page "https://ocamlgraph.lri.fr/") (synopsis "Graph library for OCaml") (description "OCamlgraph is a generic graph library for OCaml.") (license license:lgpl2.1))) diff --git a/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch b/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch deleted file mode 100644 index 2c344af821..0000000000 --- a/gnu/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch +++ /dev/null @@ -1,52 +0,0 @@ -From aeca7656f499d7f4595319858f242276920e31bb Mon Sep 17 00:00:00 2001 -From: Louis Gesbert -Date: Sat, 2 Dec 2017 12:51:01 +0100 -Subject: [PATCH] Fix for ocaml 4.06 - ---- - common/criteria_lexer.mll | 8 ++++---- - common/util.ml | 2 +- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/common/criteria_lexer.mll b/common/criteria_lexer.mll -index 71f9178..fc4eae3 100644 ---- a/common/criteria_lexer.mll -+++ b/common/criteria_lexer.mll -@@ -18,7 +18,7 @@ - let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *) - (* find the terminating delimiter *) - let endpos = -- try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with -+ try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with - |Invalid_argument _ -> - raise (Format822.Syntax_error ( - Format822.error lexbuf "String too short")) -@@ -27,9 +27,9 @@ - Format822.error lexbuf (Printf.sprintf "cannot find: %c" c))) - in - let len = endpos - (lexbuf.lex_start_pos + 3) in -- let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in -- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4); -- s -+ let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in -+ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4); -+ Bytes.to_string s - - } - -diff --git a/common/util.ml b/common/util.ml -index 598f266..36ca3d1 100644 ---- a/common/util.ml -+++ b/common/util.ml -@@ -87,7 +87,7 @@ module MakeMessages(X : sig val label : string end) = struct - let clean label = - try - let s = Filename.chop_extension (Filename.basename label) in -- String.capitalize s -+ String.capitalize_ascii s - with Invalid_argument _ -> label - - let create ?(enabled=false) label = --- -2.11.0 - diff --git a/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch b/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch deleted file mode 100644 index 41494e7b3c..0000000000 --- a/gnu/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch +++ /dev/null @@ -1,133 +0,0 @@ -From b5314c20d8e3caf62fe0dc96ad937a2950158b23 Mon Sep 17 00:00:00 2001 -From: Louis Gesbert -Date: Thu, 2 Mar 2017 12:19:56 +0100 -Subject: [PATCH] Install mli, cmx, etc. - ---- - Makefile | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -diff --git a/Makefile b/Makefile -index 09464ff..5044d7f 100644 ---- a/Makefile -+++ b/Makefile -@@ -56,7 +56,7 @@ $(DOSELIBS)/cudf.%: - @for i in _build/cudf/cudf.*; do \ - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -67,7 +67,7 @@ $(DOSELIBS)/common.%: common/*.ml common/*.mli - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -78,7 +78,7 @@ $(DOSELIBS)/versioning.%: versioning/*.ml versioning/*.mli - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -88,7 +88,7 @@ $(DOSELIBS)/algo.%: algo/*.ml algo/*.mli $(DOSELIBS)/common.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -98,7 +98,7 @@ $(DOSELIBS)/debian.%: deb/*.ml deb/*.mli $(DOSELIBS)/pef.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -108,7 +108,7 @@ $(DOSELIBS)/opam.%: opam/*.ml opam/*.mli $(DOSELIBS)/pef.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -118,7 +118,7 @@ $(DOSELIBS)/npm.%: npm/*.ml npm/*.mli $(DOSELIBS)/versioning.% $(DOSELIBS)/pef.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -128,7 +128,7 @@ $(DOSELIBS)/rpm.%: rpm/*.ml $(DOSELIBS)/algo.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -138,7 +138,7 @@ $(DOSELIBS)/pef.%: pef/*.ml pef/*.mli - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -148,7 +148,7 @@ $(DOSELIBS)/csw.%: opencsw/*.ml $(DOSELIBS)/versioning.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \ -+ rm -f $(DOSELIBS)/*.mlpack ; \ - fi ; \ - done - -@@ -158,7 +158,7 @@ $(DOSELIBS)/doseparse.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ; \ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx $(DOSELIBS)/*.ml ; \ -+ rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.ml ; \ - fi ; \ - done - -@@ -168,7 +168,7 @@ $(DOSELIBS)/doseparseNoRpm.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.% - if [ -e $$i ]; then \ - cp $$i $(DOSELIBS) ;\ - rm $$i ;\ -- rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ;\ -+ rm -f $(DOSELIBS)/*.mlpack ;\ - fi ; \ - done - -@@ -223,7 +223,7 @@ INSTALL_STUFF_ = META - INSTALL_STUFF_ += $(wildcard _build/doselibs/*.cma _build/doselibs/*.cmi) - INSTALL_STUFF_ += $(wildcard _build/doselibs/*.cmxa _build/doselibs/*.cmxs) - INSTALL_STUFF_ += $(wildcard _build/doselibs/*.a) --#INSTALL_STUFF_ += $(wildcard _build/*/*.mli) -+INSTALL_STUFF_ += $(wildcard _build/doselibs/*.mli) $(wildcard _build/doselibs/*.cmti) $(wildcard _build/doselibs/*.cmx) - INSTALL_STUFF_ += $(wildcard _build/rpm/*.so) - - exclude_cudf = $(wildcard _build/doselibs/*cudf* _build/cudf/*) --- -2.11.0 - diff --git a/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch b/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch deleted file mode 100644 index d2cc44c784..0000000000 --- a/gnu/packages/patches/ocaml-dose3-add-unix-dependency.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b94cf24739818e5aff397e0a83b19ea32dc81f42 Mon Sep 17 00:00:00 2001 -From: Louis Gesbert -Date: Tue, 6 Feb 2018 10:15:45 +0100 -Subject: [PATCH 3/3] Add "unix" as dependency to dose3.common in META.in - ---- - META.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/META.in b/META.in -index aa2cd8d..0f9d337 100644 ---- a/META.in -+++ b/META.in -@@ -8,7 +8,7 @@ package "common" ( - version = "@PACKAGE_VERSION@" - archive(byte) = "common.cma" - archive(native) = "common.cmxa" --requires = "extlib, re.pcre, cudf, @ZIP@, @BZ2@" -+requires = "extlib, re.pcre, cudf, unix, @ZIP@, @BZ2@" - ) - - package "algo" ( --- -2.11.0 - diff --git a/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch b/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch deleted file mode 100644 index 84b6a3b81b..0000000000 --- a/gnu/packages/patches/ocaml-dose3-dont-make-printconf.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/configure -+++ b/configure -@@ -6552,6 +6552,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 - $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} - fi -- -- --make printconf -- cgit v1.2.3 From ac9044699afa46bbb2c4220a700b03816a107065 Mon Sep 17 00:00:00 2001 From: Dominic Martinez Date: Sun, 11 Feb 2024 19:28:23 +0100 Subject: gnu: Add go-github-com-skip2-go-qrcode. * gnu/packages/golang-xyz.scm (go-github-com-skip2-go-qrcode): New variable. Signed-off-by: Sharlatan Hellseher Change-Id: I3510982cdbc7b540281c0b0f074c1cb140ce249b --- gnu/packages/golang-xyz.scm | 21 ++++++++++++ .../go-github-com-skip2-go-qrcode-fix-tests.patch | 37 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index dd08f19b92..186c0e87a3 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -322,6 +322,27 @@ library which posts the metrics to the Prometheus client registry and just updates the registry.") (license license:asl2.0))) +(define-public go-github-com-skip2-go-qrcode + (package + (name "go-github-com-skip2-go-qrcode") + (version "0.0.0-20200617195104-da1b6568686e") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/skip2/go-qrcode") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0pghd6y2x8a5fqy4rjn4d8j5jcslb236naycdza5an7vyvinsgs9")) + (patches (search-patches "go-github-com-skip2-go-qrcode-fix-tests.patch")))) + (build-system go-build-system) + (arguments '(#:import-path "github.com/skip2/go-qrcode")) + (home-page "https://github.com/skip2/go-qrcode") + (synopsis "QR code encoder") + (description "This package provides a QR code encoder for the Goloang.") + (license license:expat))) + (define-public go-github-com-songgao-water (package (name "go-github-com-songgao-water") diff --git a/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch b/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch new file mode 100644 index 0000000000..631cb0cdab --- /dev/null +++ b/gnu/packages/patches/go-github-com-skip2-go-qrcode-fix-tests.patch @@ -0,0 +1,37 @@ +From dd203f29a36bf518deacbc03e8562b0195c8345f Mon Sep 17 00:00:00 2001 +From: Dominic Martinez +Date: Mon, 4 Apr 2022 12:06:03 -0400 +Subject: [PATCH] Fix failing qr decode test + +First convert integers into runes before performing a string conversion. +--- + qrcode_decode_test.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qrcode_decode_test.go b/qrcode_decode_test.go +index 1f4b1d3..2b0756b 100644 +--- a/qrcode_decode_test.go ++++ b/qrcode_decode_test.go +@@ -122,7 +122,7 @@ func TestDecodeAllCharacters(t *testing.T) { + + // zbarimg has trouble with null bytes, hence start from ASCII 1. + for i := 1; i < 256; i++ { +- content += string(i) ++ content += string(rune(i)) + } + + q, err := New(content, Low) +@@ -154,7 +154,7 @@ func TestDecodeFuzz(t *testing.T) { + for j := 0; j < len; j++ { + // zbarimg seems to have trouble with special characters, test printable + // characters only for now. +- content += string(32 + r.Intn(94)) ++ content += string(rune(32 + r.Intn(94))) + } + + for _, level := range []RecoveryLevel{Low, Medium, High, Highest} { + +base-commit: da1b6568686e89143e94f980a98bc2dbd5537f13 +-- +2.34.0 + -- cgit v1.2.3 From 5a8079e219e9052b036bc5d29be9692640d415dd Mon Sep 17 00:00:00 2001 From: David Elsing Date: Sun, 28 Jan 2024 23:01:54 +0000 Subject: gnu: tinydir: Update to 1.2.6. * gnu/packages/c.scm (tinydir): Update to 1.2.6. * gnu/packages/patches/tinydir-fix-cbehave-test.patch: Adjust patch. Signed-off-by: Christopher Baines --- gnu/packages/c.scm | 6 +++--- gnu/packages/patches/tinydir-fix-cbehave-test.patch | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1346605c71..b558145ea0 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -20,7 +20,7 @@ ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2023 zamfofex ;;; Copyright © 2023 Foundation Devices, Inc. -;;; Copyright © 2023 David Elsing +;;; Copyright © 2023, 2024 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -1349,7 +1349,7 @@ performance concurrent systems developed in C99+.") (define-public tinydir (package (name "tinydir") - (version "1.2.5") + (version "1.2.6") (source (origin (method git-fetch) (uri (git-reference @@ -1358,7 +1358,7 @@ performance concurrent systems developed in C99+.") (file-name (git-file-name name version)) (sha256 (base32 - "1nprgdfx4i8wzc1idw6chan4fjfa75b5ll8kghdc0q2278pny259")) + "143n6yabznxk032gv5g2k8glf0kzicarg9cx0714zsbfmzj8lr07")) (patches (search-patches "tinydir-fix-cbehave-test.patch")) (modules '((guix build utils))) (snippet '(delete-file-recursively "tests/cbehave")))) diff --git a/gnu/packages/patches/tinydir-fix-cbehave-test.patch b/gnu/packages/patches/tinydir-fix-cbehave-test.patch index 84ecee12c2..1cad42c7a0 100644 --- a/gnu/packages/patches/tinydir-fix-cbehave-test.patch +++ b/gnu/packages/patches/tinydir-fix-cbehave-test.patch @@ -2,10 +2,22 @@ Make test work with upstream cbehave (tinydir bundles a modified version) diff --git a/tests/file_open_test.c b/tests/file_open_test.c -index 3e659bc..9f6f88d 100644 +index 09b856e..92b13ca 100644 --- a/tests/file_open_test.c +++ b/tests/file_open_test.c -@@ -19,4 +19,7 @@ FEATURE(file_open, "File open") +@@ -4,6 +4,11 @@ + #include "cbehave.h" + #include "util.h" + ++#define ASSERT(cond, ret) \ ++if (!(cond)) {\ ++ cbehave_feature_return(__FILE__, __LINE__, ret, _state); \ ++ goto _feature_over; \ ++}\ + + FEATURE(file_open, "File open") + SCENARIO("Open file in current directory") +@@ -34,4 +39,7 @@ FEATURE(file_open, "File open") SCENARIO_END FEATURE_END -- cgit v1.2.3 From 52cca41c6fdb35d25c0543fef5fd90ebc855163c Mon Sep 17 00:00:00 2001 From: David Elsing Date: Sun, 28 Jan 2024 23:02:00 +0000 Subject: gnu: avalon-toolkit: Update to 2.0.5a. The bug freeing static memory and the makefile have been improved upstream, so we don't have to work around them anymore. Now, two static libraries are built instead. * gnu/packages/chemistry.scm (avalon-toolkit): Update to 2.0.5a. [source]: Switch to git reference from GitHub. Adjust snippet. Add patch from the RDKit fork. [arguments]: Remove 'dont-free-static-memory phase. Use provided makefile. Adjust 'install phase. * gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Christopher Baines --- gnu/local.mk | 2 + gnu/packages/chemistry.scm | 131 +++++++++------------ .../patches/avalon-toolkit-rdkit-fixes.patch | 110 +++++++++++++++++ 3 files changed, 166 insertions(+), 77 deletions(-) create mode 100644 gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 7806771eea..ab690795a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -63,6 +63,7 @@ # Copyright © 2023 gemmaro # Copyright © 2023 Herman Rimm # Copyright © 2023 Troy Figiel +# Copyright © 2024 David Elsing # # This file is part of GNU Guix. # @@ -957,6 +958,7 @@ dist_patch_DATA = \ %D%/packages/patches/audiofile-function-signature.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ %D%/packages/patches/avahi-localstatedir.patch \ + %D%/packages/patches/avalon-toolkit-rdkit-fixes.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/awesome-4.3-fno-common.patch \ diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 4a9dd97c5b..5e19bdf182 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -917,90 +917,67 @@ calculations and analyzing the results.") (define-public avalon-toolkit (package (name "avalon-toolkit") - (version "1.2.0") - (source - (origin - (method url-fetch) - (uri (string-append - "mirror://sourceforge/avalontoolkit/" - "AvalonToolkit_" (substring version 0 3) "/AvalonToolkit_" - version ".source.tar")) - (sha256 - (base32 - "0rnnyy6axs2da7aa4q6l30ldavbk49v6l22llj1adn74h1i67bpv")) - (modules '((guix build utils) (ice-9 ftw))) - (snippet - #~(begin - (delete-file-recursively "../SourceDistribution/java"))))) + (version "2.0.5a") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rohdebe1/ava-formake") + (commit (string-append "AvalonToolkit_" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1mfg40y5xc17sm59zdfc5sk22n9zm5zk0z1aw47chvl6hp465szk")) + (patches + (search-patches "avalon-toolkit-rdkit-fixes.patch")) + (modules '((guix build utils) (ice-9 ftw))) + (snippet + #~(begin + (delete-file-recursively "src/main/java") + (delete-file-recursively "src/test/target"))))) (build-system gnu-build-system) (arguments (list - ;; There are no intended tests + ;; There is only one test, which is missing a file #:tests? #f #:phases - #~(let ((programs '("canonizer" "matchtest" "sketch" "smi2mol" "struchk"))) - (modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ (chdir "common"))) - (delete 'configure) - (add-before 'build 'dont-free-static-memory - (lambda _ - (substitute* "reaccsio.c" - (("MyFree\\(.*tempdir\\)" m) - (string-append "/* freeing memory from getenv is bad */" - "// " m))))) - ;; The makefile has incorrect compiler flags and is missing some - ;; object files, so we build it ourselves. - (replace 'build - (lambda _ - (for-each - (lambda (part) - (format #t "Compiling ~a.c ~~> ~a.o~%" part part) - (invoke #$(cc-for-target) "-c" "-fPIC" "-O2" - (string-append part ".c") - "-o" (string-append part ".o"))) - (list "aacheck" "casutils" "denormal" "depictutil" - "didepict" "fixcharges" "forio" "geometry" - "graph" "hashcode" "layout" "local" "pattern" - "perceive" "reaccsio" "rtutils" "set" "shortcut" - "sketch" "ssmatch" "stereo" "symbol_lists" - "symboltable" "utilities")) - (display "Building libavalontoolkit.so\n") - (apply invoke "gcc" "-fPIC" "-shared" "-lm" - "-o" "libavalontoolkit.so" "canonizer.c" "smi2mol.c" - "struchk.c" "patclean.c" (find-files "." "\\.o$")) - ;; patclean is not built here as there is an undeclared - ;; variable in main(). - (for-each - (lambda (program) - (display (string-append "Building " program "\n")) - (invoke "gcc" "-L." "-lavalontoolkit" "-lm" "-O2" - (string-append "-Wl,-rpath=" #$output "/lib") - "-DMAIN" (string-append program ".c") "-o" program)) - programs))) - (replace 'install - (lambda _ - ;; Executables + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (mkdir "build") + (mkdir-p "target/executables") + (mkdir-p "target/libraries") + (invoke "make" "programs" "-j" + (if parallel-build? + (number->string (parallel-job-count)) + "1")))) + (replace 'install + (lambda _ + ;; Executables + (let ((programs '("canonizer" "matchtest" "smi2mol" "struchk"))) (for-each (lambda (program) - (install-file program (string-append #$output "/bin"))) - programs) - (for-each - (lambda (name) - (symlink (string-append #$output "/bin/smi2mol") - (string-append #$output "/bin/" name))) - '("mol2smi" "rdf2smi" "mol2tbl" "mol2sma" "smi2rdf")) - ;; Library - (install-file "libavalontoolkit.so" - (string-append #$output "/lib")) - (for-each - (lambda (file) - (install-file file (string-append #$output - "/include/avalontoolkit"))) - (find-files "." "\\.h$")) - (install-file "../license.txt" - (string-append #$output "/share/doc/" - #$name "-" #$version "/")))))))) + (install-file (string-append "target/executables/" program) + (string-append #$output "/bin"))) + programs)) + (for-each + (lambda (name) + (symlink (string-append #$output "/bin/smi2mol") + (string-append #$output "/bin/" name))) + '("mol2smi" "rdf2smi" "mol2tbl" "mol2sma" "smi2rdf")) + ;; Library + (install-file "target/libraries/libavalon_tools.a" + (string-append #$output "/lib")) + (install-file "target/libraries/libavalon4rdkit.a" + (string-append #$output "/lib")) + (for-each + (lambda (file) + (install-file file (string-append #$output + "/include/avalontoolkit"))) + (find-files "src/main/C/include" "\\.h$")) + (install-file "license.txt" + (string-append #$output "/share/doc/" + #$name "-" #$version "/"))))))) (home-page "https://sourceforge.net/projects/avalontoolkit/") (synopsis "Tools for SMILES and MOL files and for structure fingerprinting") (description "This package contains a library and programs for diff --git a/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch b/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch new file mode 100644 index 0000000000..c93a9869ed --- /dev/null +++ b/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch @@ -0,0 +1,110 @@ +Patches taken from the rdkit fork at this commit (there version +AvalonToolkit_2.0.6-pre.2): +https://github.com/rdkit/ava-formake/commit/d05bee0382b8f4696b2b4b05b0038fb7d559520a + +diff -ur a/src/main/C/common/reaccsio.c b/src/main/C/common/reaccsio.c +--- a/src/main/C/common/reaccsio.c ++++ b/src/main/C/common/reaccsio.c +@@ -322,34 +322,49 @@ + fprintf(fp,"\n"); + } + ++#define MAX_BONDLINE_FIELDS 7 ++#define BONDLINE_FIELD_LEN 3 ++ + int ReadREACCSBond(Fortran_FILE *fp, struct reaccs_bond_t *bp) + { +- int nitems, i; +- char buffer[MAX_BUFFER+1]; ++ int nitems, i, j, k; ++ int bond_line_len, n_chars, pos; ++ int *ptrarray[MAX_BONDLINE_FIELDS]; ++ char c; ++ char buffer[BONDLINE_FIELD_LEN+1]; + + if (fp->status != FORTRAN_NORMAL) return(fp->status); + +- strncpy(buffer,fp->buffer,MAX_BUFFER); +- /* zero pad only atom numbers! */ +- for (i=0; i<6; i++) if (buffer[i] == ' ') buffer[i] = '0'; +- + bp->stereo_symbol = 0; + bp->dummy = 0; + bp->topography = 0; + bp->reaction_mark = NONE; +- // make sure spaces are interpreted the Fortran-way +- for (i=9; iatoms[0]; ++ ptrarray[1] = &bp->atoms[1]; ++ ptrarray[2] = &bp->bond_type; ++ ptrarray[3] = &bp->stereo_symbol; ++ ptrarray[4] = &bp->dummy; ++ ptrarray[5] = &bp->topography; ++ ptrarray[6] = &bp->reaction_mark; ++ bond_line_len = strlen(fp->buffer); ++ nitems = bond_line_len ? (bond_line_len - 1) / BONDLINE_FIELD_LEN + 1 : 0; ++ if (nitems > MAX_BONDLINE_FIELDS) ++ nitems = MAX_BONDLINE_FIELDS; ++ for (i = 0; i < nitems; ++i) ++ { ++ pos = i * BONDLINE_FIELD_LEN; ++ memset(buffer, 0, BONDLINE_FIELD_LEN + 1); ++ n_chars = bond_line_len - pos; ++ if (n_chars > BONDLINE_FIELD_LEN) ++ n_chars = BONDLINE_FIELD_LEN; ++ for (j = 0, k = 0; j < n_chars; ++j) ++ { ++ c = fp->buffer[pos + j]; ++ if (c != ' ') ++ buffer[k++] = c; ++ } ++ sscanf(buffer, "%3d", ptrarray[i]); + } +- nitems = sscanf(buffer, +- "%3d%3d%3d%3d%3d%3d%3d", +- &bp->atoms[0], &bp->atoms[1], +- &bp->bond_type, &bp->stereo_symbol, +- &bp->dummy, +- &bp->topography, &bp->reaction_mark); +- + if (nitems >= 3) + { + GetBuffer(fp); +@@ -1582,6 +1597,8 @@ + + PrintREACCSMolecule(fp, mp,""); + ++ fputc('\0', fp); ++ fflush(fp); + rewind(fp); + + MolStr = _ReadFile(fp); +diff -ur a/src/main/C/programs/struchk.c b/src/main/C/programs/struchk.c +--- a/src/main/C/programs/struchk.c ++++ b/src/main/C/programs/struchk.c +@@ -1581,6 +1581,22 @@ + + if ((result & SIZE_CHECK_FAILED) == 0) + { ++ for (i = 0; i < mp->n_bonds; ++i) { ++ for (j = 0; j < 2; ++j) { ++ if (mp->bond_array[i].atoms[j] < 1 || mp->bond_array[i].atoms[j] > mp->n_atoms) ++ { ++ snprintf(msg_buffer, MAXMSG, ++ "%10s : illegal atom # (%d, max allowed is %d) in bond %d", ++ mp->name, mp->bond_array[i].atoms[j], mp->n_atoms, i + 1); ++ AddMsgToList(msg_buffer); ++ result |= SIZE_CHECK_FAILED; ++ } ++ } ++ } ++ } ++ ++ if ((result & SIZE_CHECK_FAILED) == 0) ++ { + if (convert_atom_texts) + { + tmp = ConvertAtomAliases(mp); -- cgit v1.2.3 From e5bfc462dd695a570fe88c4c6d6efee808fd1a56 Mon Sep 17 00:00:00 2001 From: David Elsing Date: Sun, 28 Jan 2024 23:02:02 +0000 Subject: gnu: rdkit: Update to 2023.09.4. * gnu/packages/chemistry.scm (rdkit): Update to 2023.09.4. [arguments]: Skip testConrec test in check phase. [native-inputs]: Replace catch2 with catch2-3. * gnu/packages/patches/rdkit-unbundle-external-dependencies.patch: Adjust patch. [supported-systems]: New field. Signed-off-by: Christopher Baines --- gnu/packages/chemistry.scm | 15 +- .../rdkit-unbundle-external-dependencies.patch | 208 ++++++++++++--------- 2 files changed, 126 insertions(+), 97 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 98141737ac..bd27bfad7a 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -1073,7 +1073,7 @@ other ring topology descriptions.") (define-public rdkit (package (name "rdkit") - (version "2022.03.5") + (version "2023.09.4") (source (origin (method git-fetch) (uri (git-reference @@ -1084,7 +1084,7 @@ other ring topology descriptions.") (file-name (git-file-name name version)) (sha256 (base32 - "19idgilabh04cbr1qj6zgrgsfjm248mmfz6fsr0smrd68d0xnml9")) + "1lgcgijlzzwpfxndsdlx13npdfk7hcii11zg25cvpmzhbpn6vyn8")) (patches (search-patches "rdkit-unbundle-external-dependencies.patch")) (modules '((guix build utils))) @@ -1183,7 +1183,10 @@ other ring topology descriptions.") "substructLibraryTest" "pyFeatures" "pythonTestDirML" "pythonTestDirChem" ;; Catching Python exception fails - "pyRanker") "|") + "pyRanker" + ;; Flaky test depending on floating point rounding + "testConrec" + ) "|") ")"))))))))) (inputs (list avalon-toolkit @@ -1200,7 +1203,7 @@ other ring topology descriptions.") (native-inputs (list bison boost - catch2 + catch2-3 eigen flex freesasa @@ -1214,4 +1217,8 @@ other ring topology descriptions.") (description "RDKit is a C++ and Python library for cheminformatics, which includes (among other things) the analysis and modification of molecules in 2D and 3D and descriptor generation for machine learning.") + ;; For 32 bit systems, there is a bug in Boost.Python: + ;; https://github.com/boostorg/python/issues/312. Additionally, several + ;; other test fail. + (supported-systems %64bit-supported-systems) (license license:bsd-3))) diff --git a/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch b/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch index 8ee0611d3b..e22ff57ee0 100644 --- a/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch +++ b/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch @@ -58,99 +58,82 @@ diff --git a/External/AvalonTools/CMakeLists.txt b/External/AvalonTools/CMakeLis index 3e31195fc..314ba35b5 100644 --- a/External/AvalonTools/CMakeLists.txt +++ b/External/AvalonTools/CMakeLists.txt -@@ -2,107 +2,14 @@ if(NOT RDK_BUILD_AVALON_SUPPORT) +@@ -2,90 +2,8 @@ if(NOT RDK_BUILD_AVALON_SUPPORT) return() endif(NOT RDK_BUILD_AVALON_SUPPORT) +-set(AVALON_VERSION "2.0.5-pre.3") -if(NOT DEFINED AVALONTOOLS_DIR) -- set(AVALONTOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/SourceDistribution") -- set(fileToPatch "${CMAKE_CURRENT_SOURCE_DIR}/SourceDistribution/common/reaccsio.c") +- set(AVALONTOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ava-formake-AvalonToolkit_${AVALON_VERSION}") +- set(fileToCheck "${AVALONTOOLS_DIR}/src/main/C/common/reaccsio.c") - set(needDownload "TRUE") -- if(EXISTS "${fileToPatch}") -- file(READ "${fileToPatch}" buffer) -- if("${buffer}" MATCHES "//MyFree\\(\\(char \\*\\)tempdir\\);") -- set(needDownload "FALSE") -- endif() +- if(EXISTS "${fileToCheck}") +- set(needDownload "FALSE") - endif() -else() - string(REGEX REPLACE "\\\\" "/" AVALONTOOLS_DIR ${AVALONTOOLS_DIR}) - set(needDownload "FALSE") -endif() - --set(AVALON_SRC_PATH ${AVALONTOOLS_DIR}/common) +-set(AVALON_SRC_PATH "${AVALONTOOLS_DIR}/src/main/C") +-set(AVALON_COMMON_PATH "${AVALON_SRC_PATH}/common") +-set(AVALON_INCLUDE_PATH "${AVALON_SRC_PATH}/include") +-set(AVALON_PROGRAMS_PATH "${AVALON_SRC_PATH}/programs") - -if(needDownload) - if(NOT DEFINED AVALONTOOLS_URL) -- set(AVALONTOOLS_URL "https://sourceforge.net/projects/avalontoolkit/files/AvalonToolkit_1.2/AvalonToolkit_1.2.0.source.tar") +- set(AVALONTOOLS_URL "https://github.com/rdkit/ava-formake/archive/refs/tags/AvalonToolkit_${AVALON_VERSION}.tar.gz") - endif() - if(NOT DEFINED AVALONTOOLS_MD5SUM) -- set(AVALONTOOLS_MD5SUM "092a94f421873f038aa67d4a6cc8cb54") +- set(AVALONTOOLS_MD5SUM "7a20c25a7e79f3344e0f9f49afa03351") - endif() - if(NOT DEFINED AVALONTOOLS_BASE) - string(REGEX REPLACE "^.*/" "" AVALONTOOLS_BASE "${AVALONTOOLS_URL}") - endif() - downloadAndCheckMD5(${AVALONTOOLS_URL} "${CMAKE_CURRENT_SOURCE_DIR}/${AVALONTOOLS_BASE}" ${AVALONTOOLS_MD5SUM}) -- execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf -- ${CMAKE_CURRENT_SOURCE_DIR}/AvalonToolkit_1.2.0.source.tar +- execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf +- ${CMAKE_CURRENT_SOURCE_DIR}/AvalonToolkit_${AVALON_VERSION}.tar.gz - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -- # apply patch to AvalonTools -- configure_file("${fileToPatch}" "${fileToPatch}.orig" COPYONLY) -- file(READ "${fileToPatch}" buffer) -- string(REGEX REPLACE "MyFree\\(\\(char \\*\\)tempdir\\);" -- "//MyFree((char *)tempdir);" buffer "${buffer}") -- file(WRITE "${fileToPatch}" "${buffer}") --endif() - - if (MSVC) - add_definitions("/D_CRT_SECURE_NO_WARNINGS") - add_compile_options(/wd4224 /wd4101 /wd4018 /wd4996 /wd4244 /wd4305 /wd4013 /wd4146 /wd4334 /wd4715 /wd4715 /nologo) - endif(MSVC) - --set(avalon_clib_srcs ${AVALON_SRC_PATH}/layout.c -- ${AVALON_SRC_PATH}/symboltable.c -- ${AVALON_SRC_PATH}/patclean.c -- ${AVALON_SRC_PATH}/utilities.c -- ${AVALON_SRC_PATH}/symbol_lists.c -- ${AVALON_SRC_PATH}/stereo.c -- ${AVALON_SRC_PATH}/set.c -- ${AVALON_SRC_PATH}/perceive.c -- ${AVALON_SRC_PATH}/local.c -- ${AVALON_SRC_PATH}/graph.c -- ${AVALON_SRC_PATH}/geometry.c -- ${AVALON_SRC_PATH}/forio.c -- ${AVALON_SRC_PATH}/depictutil.c -- ${AVALON_SRC_PATH}/denormal.c -- ${AVALON_SRC_PATH}/casutils.c -- ${AVALON_SRC_PATH}/ssmatch.c -- ${AVALON_SRC_PATH}/rtutils.c -- ${AVALON_SRC_PATH}/smi2mol.c -- ${AVALON_SRC_PATH}/didepict.c -- ${AVALON_SRC_PATH}/pattern.c -- ${AVALON_SRC_PATH}/canonizer.c -- ${AVALON_SRC_PATH}/aacheck.c -- ${AVALON_SRC_PATH}/fixcharges.c -- ${AVALON_SRC_PATH}/struchk.c -- ${AVALON_SRC_PATH}/reaccsio.c -- ${AVALON_SRC_PATH}/hashcode.c -- ) -- --# we need this to ensure that builds continue --# to work on linux systems with older versions --# of glibc when we're building with gcc-4.1. --# Without this flag, we'll endup requiring --# glibc 2.7. --if(CMAKE_SYSTEM_NAME STREQUAL "Linux") -- add_definitions(-D_GNU_SOURCE=1) -endif() - --if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-return-type -Wno-implicit-function-declaration -Wno-absolute-value -Wno-parentheses -Wno-logical-op-parentheses -Wno-dangling-else -Wno-format") +-if(CMAKE_C_COMPILER_ID STREQUAL "GNU") +- add_compile_options(-Wno-format-security -Wformat=0 -Wstringop-overflow=0 -Wformat-overflow=0 -Wno-unused-result ) -endif() --if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") -- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result -Wformat-overflow=0 -Wformat=0 -Wno-format-security -Wno-implicit-function-declaration") +-if(CMAKE_C_COMPILER_ID STREQUAL "Clang") +- add_compile_options(-Wno-absolute-value -Wno-return-type -Wno-tautological-overlap-compare) -endif() +-if (MSVC) +- add_definitions("/D_CRT_SECURE_NO_WARNINGS") +- add_compile_options(/wd4018 /wd4101 /wd4146 /wd4334 /wd4477 /wd4715 /wd4716 /wd4996 /nologo) +-endif(MSVC) - -- +-set(avalon_clib_srcs ${AVALON_COMMON_PATH}/layout.c +- ${AVALON_COMMON_PATH}/symboltable.c +- ${AVALON_COMMON_PATH}/patclean.c +- ${AVALON_COMMON_PATH}/utilities.c +- ${AVALON_COMMON_PATH}/symbol_lists.c +- ${AVALON_COMMON_PATH}/stereo.c +- ${AVALON_COMMON_PATH}/set.c +- ${AVALON_COMMON_PATH}/perceive.c +- ${AVALON_COMMON_PATH}/local.c +- ${AVALON_COMMON_PATH}/graph.c +- ${AVALON_COMMON_PATH}/geometry.c +- ${AVALON_COMMON_PATH}/forio.c +- ${AVALON_COMMON_PATH}/depictutil.c +- ${AVALON_COMMON_PATH}/denormal.c +- ${AVALON_COMMON_PATH}/casutils.c +- ${AVALON_COMMON_PATH}/ssmatch.c +- ${AVALON_COMMON_PATH}/rtutils.c +- ${AVALON_COMMON_PATH}/smi2mol.c +- ${AVALON_COMMON_PATH}/didepict.c +- ${AVALON_COMMON_PATH}/pattern.c +- ${AVALON_COMMON_PATH}/canonizer.c +- ${AVALON_COMMON_PATH}/aacheck.c +- ${AVALON_COMMON_PATH}/fixcharges.c +- ${AVALON_PROGRAMS_PATH}/struchk.c +- ${AVALON_COMMON_PATH}/reaccsio.c +- ${AVALON_COMMON_PATH}/hashcode.c +- ) - -rdkit_library(avalon_clib ${avalon_clib_srcs}) -target_compile_definitions(avalon_clib PRIVATE RDKIT_AVALONLIB_BUILD) @@ -159,11 +142,11 @@ index 3e31195fc..314ba35b5 100644 -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) --include_directories(${AVALON_SRC_PATH}) +-include_directories(${AVALON_INCLUDE_PATH}) - rdkit_library(AvalonLib AvalonTools.cpp SHARED - LINK_LIBRARIES avalon_clib SubstructMatch FileParsers SmilesParse GraphMol DataStructs ) -+ LINK_LIBRARIES -lavalontoolkit SubstructMatch FileParsers SmilesParse GraphMol DataStructs ) ++ LINK_LIBRARIES -lavalon4rdkit SubstructMatch FileParsers SmilesParse GraphMol DataStructs ) target_compile_definitions(AvalonLib PRIVATE RDKIT_AVALONLIB_BUILD) rdkit_headers(AvalonTools.h DEST GraphMol) rdkit_test(testAvalonLib1 test1.cpp @@ -278,7 +261,7 @@ diff --git a/External/RingFamilies/CMakeLists.txt b/External/RingFamilies/CMakeL index 08dd1fe04..66ecd5834 100644 --- a/External/RingFamilies/CMakeLists.txt +++ b/External/RingFamilies/CMakeLists.txt -@@ -1,47 +1,6 @@ +@@ -1,47 +1,7 @@ -add_custom_target(ringdecomposerlib_support ALL) - if(NOT RDK_USE_URF) @@ -324,10 +307,9 @@ index 08dd1fe04..66ecd5834 100644 -rdkit_headers(${URFLIB_DIR}/RingDecomposerLib.h DEST "") - - --set(RDK_URF_LIBS RingDecomposerLib -- CACHE STRING "the libraries for the URF calculation" FORCE) +rdkit_library(RingDecomposerLib dummy.cpp SHARED LINK_LIBRARIES -lRingDecomposerLib) -+set(RDK_URF_LIBS RingDecomposerLib CACHE STRING "" FORCE) + set(RDK_URF_LIBS RingDecomposerLib + CACHE STRING "the libraries for the URF calculation" FORCE) diff --git a/External/RingFamilies/dummy.cpp b/External/RingFamilies/dummy.cpp new file mode 100644 index 000000000..e69de29bb @@ -335,40 +317,60 @@ diff --git a/External/YAeHMOP/CMakeLists.txt b/External/YAeHMOP/CMakeLists.txt index f1027b3bd..8bee2f910 100644 --- a/External/YAeHMOP/CMakeLists.txt +++ b/External/YAeHMOP/CMakeLists.txt -@@ -18,32 +18,8 @@ endif() +@@ -4,52 +4,7 @@ endif(NOT RDK_BUILD_YAEHMOP_SUPPORT) - include_directories( ${RDKit_ExternalDir}/YAeHMOP ) + add_definitions(-DRDK_BUILD_YAEHMOP_SUPPORT) --ExternalProject_Add(yaehmop_project -- GIT_REPOSITORY https://github.com/greglandrum/yaehmop.git -- GIT_TAG master -- UPDATE_COMMAND "" -- PATCH_COMMAND "" -- PREFIX ${CMAKE_CURRENT_SOURCE_DIR} -- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop" -- SOURCE_SUBDIR "tightbind" -- CMAKE_ARGS -DUSE_BLAS_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -- TEST_COMMAND "") -- --include_directories(${PROJECT_BINARY_DIR}/include) --link_directories(${PROJECT_BINARY_DIR}/lib) --link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build) +-if(NOT DEFINED YAEHMOP_DIR) +- set(YAEHMOP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop") +-endif() +- +-if(NOT EXISTS "${YAEHMOP_DIR}/tightbind/bind.h") +- set(RELEASE_NO "2023.03.1") +- set(MD5 "e6450f13e02c54d024233b993c3c7ff6") +- downloadAndCheckMD5("https://github.com/greglandrum/yaehmop/archive/refs/tags/v${RELEASE_NO}.tar.gz" +- "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop-${RELEASE_NO}.tar.gz" ${MD5}) +- execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf +- ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop-${RELEASE_NO}.tar.gz +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +- +- file(RENAME "yaehmop-${RELEASE_NO}" "${YAEHMOP_DIR}") +-else() +- message("-- Found YAeHMOP source in ${YAEHMOP_DIR}") +-endif() +- +-set(yaehmop_INCLUDE_DIRS ${YAEHMOP_DIR}/.. +- CACHE STRING "yaehmop Include File" FORCE) +-include_directories(${yaehmop_INCLUDE_DIRS}) +- +-if(CMAKE_COMPILER_IS_GNUCXX AND NOT CYGWIN) +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +-endif() +-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +-endif() +- +-# bring in the eHT code, but skip the targets (we'll get yaehmop_eht anyway because it's a dependency) +-add_subdirectory(yaehmop/tightbind EXCLUDE_FROM_ALL True) +- +-# set install dir for the yaehmop library: +-INSTALL(TARGETS yaehmop_eht EXPORT rdkit-targets +- DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST} +- COMPONENT runtime ) +- +- +- - -set(EHT_PARAM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop/tightbind/eht_parms.dat ) -install(FILES ${EHT_PARAM_FILE} - DESTINATION ${RDKit_ShareDir}/Data - COMPONENT data) - --message("YAeHMOP include_dirs: ${PROJECT_BINARY_DIR}/include") --message("YAeHMOP link_dirs: ${PROJECT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build") -- -rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES yaehmop_eht GraphMol ) +rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES -lyaehmop_eht GraphMol ) target_compile_definitions(EHTLib PRIVATE RDKIT_EHTLIB_BUILD) --add_dependencies(EHTLib yaehmop_project) rdkit_headers(EHTTools.h DEST GraphMol) rdkit_catch_test(testEHTLib1 test1.cpp - LINK_LIBRARIES EHTLib FileParsers SmilesParse ) diff --git a/External/YAeHMOP/EHTTools.cpp b/External/YAeHMOP/EHTTools.cpp index 7a229f51f..71033dc5c 100644 --- a/External/YAeHMOP/EHTTools.cpp @@ -382,3 +384,23 @@ index 7a229f51f..71033dc5c 100644 } namespace RDKit { +@@ -160,4 +160,4 @@ bool runMol(const ROMol &mol, EHTResults &results, int confId, + } + + } // end of namespace EHTTools +-} // end of namespace RDKit +\ No newline at end of file ++} // end of namespace RDKit +diff --git a/External/YAeHMOP/Wrap/CMakeLists.txt b/External/YAeHMOP/Wrap/CMakeLists.txt +index 759a9f360..114d24532 100644 +--- a/External/YAeHMOP/Wrap/CMakeLists.txt ++++ b/External/YAeHMOP/Wrap/CMakeLists.txt +@@ -4,6 +4,8 @@ rdkit_python_extension(rdEHTTools + DEST Chem + LINK_LIBRARIES + EHTLib ) ++ ++target_include_directories(rdEHTTools PRIVATE ${RDKit_ExternalDir}/YAeHMOP) + + add_pytest(pyEHTTools + ${CMAKE_CURRENT_SOURCE_DIR}/testEHTTools.py) -- cgit v1.2.3