From 21b0ed1f9d6fec4cd49e2fa9cf94a07552ff7cf9 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 2 Aug 2019 11:35:37 +0200 Subject: gnu: doxygen: Fix cross-compilation. * gnu/packages/documentation.scm (doxygen)[arguments]: Force cmake to use iconv.h from cross-libc. --- gnu/packages/documentation.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/packages/documentation.scm') diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index 19c42b00eb..eda8ca3368 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,7 @@ #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages python) #:use-module (gnu packages bison) @@ -145,7 +147,15 @@ markup) can be customized and extended by the user.") (inputs `(("bash" ,bash-minimal))) (arguments - `(#:test-target "tests" + ;; Force cmake to use iconv header from cross-libc instead of the one + ;; from native libc. + `(,@(if (%current-target-system) + '(#:configure-flags + (list (string-append "-DICONV_INCLUDE_DIR=" + (assoc-ref %build-inputs "cross-libc") + "/include"))) + '()) + #:test-target "tests" #:phases (modify-phases %standard-phases (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) -- cgit v1.2.3 From 33c1c4c95fc8311606f1d513a06bc365607d4f6c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:19:20 +0100 Subject: gnu: doxygen: Update to 1.8.16. * gnu/packages/documentation.scm (doxygen): Update to 1.8.16. [arguments]: Add phase 'remove-git-requirement'. * gnu/packages/patches/doxygen-test.patch: Adjust for upstream changes. --- gnu/packages/documentation.scm | 11 ++++++++-- gnu/packages/patches/doxygen-test.patch | 38 ++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 10 deletions(-) (limited to 'gnu/packages/documentation.scm') diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index eda8ca3368..c512a9803b 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -125,7 +125,7 @@ markup) can be customized and extended by the user.") (define-public doxygen (package (name "doxygen") - (version "1.8.15") + (version "1.8.16") (home-page "http://www.doxygen.nl/") (source (origin (method url-fetch) @@ -136,7 +136,7 @@ markup) can be customized and extended by the user.") ".src.tar.gz"))) (sha256 (base32 - "0p94b4yb6bk2dxzs5kyl82xxgq2qakgbx5yy3ssbbadncb20x75x")) + "10iwv8bcz5b5cd85gg8pgn0bmyg04n9hs36xn7ggjjnvynv1z67z")) (patches (search-patches "doxygen-test.patch")))) (build-system cmake-build-system) (native-inputs @@ -157,6 +157,13 @@ markup) can be customized and extended by the user.") '()) #:test-target "tests" #:phases (modify-phases %standard-phases + (add-after 'unpack 'remove-git-requirement + (lambda _ + ;; TODO: Remove this for > 1.8.16. + (substitute* "cmake/git_watcher.cmake" + (("Git QUIET REQUIRED") + "Git QUIET")) + #t)) (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/portable.cpp" diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch index 8ccb9ec3c4..a2da54a3fa 100644 --- a/gnu/packages/patches/doxygen-test.patch +++ b/gnu/packages/patches/doxygen-test.patch @@ -5,19 +5,40 @@ test. diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml --- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200 -@@ -6,17 +6,6 @@ +@@ -6,38 +6,6 @@ - - - -- [1] +- [1] +- +- +- P.Belotti. Disjunctive cuts for non-convex MINLP. In Lee and Leyffer [4], pages 117144. +- +- +- +- [2] +- +- +- T.Berthold, S.Heinz, and S.Vigerske. Extending a CIP framework to solve MIQCPs. In Lee and Leyffer [4], pages 427444. +- +- +- +- [3] - - - DonaldE. Knuth. Tex and Metafont, New Directions in Typesetting. American Mathematical Society and Digital Press, Stanford, 1979. - - +- +- [4] +- +- +- Jon Lee and Sven Leyffer, editors. Mixed Integer Nonlinear Programming, volume 154 of The IMA Volumes in Mathematics and its Applications. Springer, 2012. +- +- - - @@ -26,13 +47,14 @@ diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012 diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml --- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200 -@@ -4,7 +4,7 @@ - index - My Project +@@ -6,8 +6,8 @@ + + -- See [1] for more info. -+ See knuth79 for more info. +- See [3] for more info. +- Oter references with crosreference see [1] and [2] for more info. ++ See knuth79 for more info. ++ Oter references with crosreference see Be09 and BertholdHeinzVigerske2009 for more info. - -- cgit v1.2.3 From b34c1258515e75bcc73be7911fd7d237db1dd14b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 17:10:47 +0100 Subject: gnu: doxygen: Update to 1.8.17. * gnu/packages/documentation.scm (doxygen): Update to 1.8.17. [source](patches): Add doxygen-1.8.17-runtests.patch. [arguments]: Remove obsolete phase. * gnu/packages/patches/doxygen-test.patch: Adjust for upstream changes. * gnu/packages/patches/doxygen-1.8.17-runtests.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 + gnu/packages/documentation.scm | 14 ++--- gnu/packages/patches/doxygen-1.8.17-runtests.patch | 73 ++++++++++++++++++++++ gnu/packages/patches/doxygen-test.patch | 4 +- 4 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/doxygen-1.8.17-runtests.patch (limited to 'gnu/packages/documentation.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 60b3b652f1..e2b605e0b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -814,6 +814,7 @@ dist_patch_DATA = \ %D%/packages/patches/docker-use-fewer-modprobes.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/doxygen-test.patch \ + %D%/packages/patches/doxygen-1.8.17-runtests.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index c512a9803b..c4a8c0242d 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -125,7 +125,7 @@ markup) can be customized and extended by the user.") (define-public doxygen (package (name "doxygen") - (version "1.8.16") + (version "1.8.17") (home-page "http://www.doxygen.nl/") (source (origin (method url-fetch) @@ -136,8 +136,9 @@ markup) can be customized and extended by the user.") ".src.tar.gz"))) (sha256 (base32 - "10iwv8bcz5b5cd85gg8pgn0bmyg04n9hs36xn7ggjjnvynv1z67z")) - (patches (search-patches "doxygen-test.patch")))) + "16dmv0gm1x8rvbm82fmjvi213q8fxqxinm75pcf595flya59ific")) + (patches (search-patches "doxygen-test.patch" + "doxygen-1.8.17-runtests.patch")))) (build-system cmake-build-system) (native-inputs `(("bison" ,bison) @@ -157,13 +158,6 @@ markup) can be customized and extended by the user.") '()) #:test-target "tests" #:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-git-requirement - (lambda _ - ;; TODO: Remove this for > 1.8.16. - (substitute* "cmake/git_watcher.cmake" - (("Git QUIET REQUIRED") - "Git QUIET")) - #t)) (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/portable.cpp" diff --git a/gnu/packages/patches/doxygen-1.8.17-runtests.patch b/gnu/packages/patches/doxygen-1.8.17-runtests.patch new file mode 100644 index 0000000000..0340c72448 --- /dev/null +++ b/gnu/packages/patches/doxygen-1.8.17-runtests.patch @@ -0,0 +1,73 @@ +1.8.17 was released with a broken test runner. + +https://github.com/doxygen/doxygen/issues/7464 + +Taken from upstream: +https://github.com/doxygen/doxygen/commit/cd9dee013dc749a10bbe019c350e0e62b6635795 + +diff --git a/testing/runtests.py b/testing/runtests.py +index a4118b865..10fe50214 100755 +--- a/testing/runtests.py ++++ b/testing/runtests.py +@@ -3,6 +3,7 @@ + from __future__ import print_function + import argparse, glob, itertools, re, shutil, os, sys + import subprocess ++import shlex + + config_reg = re.compile('.*\/\/\s*(?P\S+):\s*(?P.*)$') + +@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False): + return os.popen(cmd).read() # Python 2 without encoding + else: + if (getStderr): +- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding +- return proc.stderr ++ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding ++ return proc.stderr.read() + else: +- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding ++ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding + return proc.stdout.read() + + class Tester: +@@ -137,7 +138,7 @@ def prepare_test(self): + print('GENERATE_DOCBOOK=NO', file=f) + if (self.args.xhtml): + print('GENERATE_HTML=YES', file=f) +- # HTML_OUTPUT can also be set locally ++ # HTML_OUTPUT can also have been set locally + print('HTML_OUTPUT=%s/html' % self.test_out, file=f) + print('HTML_FILE_EXTENSION=.xhtml', file=f) + if (self.args.pdf): +@@ -184,7 +185,7 @@ def update_test(self,testmgr): + print('Non-existing file %s after \'check:\' statement' % check_file) + return + # convert output to canonical form +- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read() ++ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)) + if data: + # strip version + data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n') +@@ -326,7 +327,7 @@ def perform_test(self,testmgr): + tests.append(glob.glob('%s/*.xml' % (docbook_output))) + tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output))) + tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/') +- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests) ++ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests) + exe_string1 = exe_string + exe_string += ' %s' % (redirx) + exe_string += ' %s more "%s/temp"' % (separ,docbook_output) +@@ -346,7 +347,11 @@ def perform_test(self,testmgr): + redirx=' 2> %s/temp >nul:'%html_output + else: + redirx='2>%s/temp >/dev/null'%html_output +- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output) ++ check_file = [] ++ check_file.append(glob.glob('%s/*.xhtml' % (html_output))) ++ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output))) ++ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/') ++ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file) + exe_string1 = exe_string + exe_string += ' %s' % (redirx) + exe_string += ' %s more "%s/temp"' % (separ,html_output) diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch index a2da54a3fa..1c0d4eb946 100644 --- a/gnu/packages/patches/doxygen-test.patch +++ b/gnu/packages/patches/doxygen-test.patch @@ -52,9 +52,9 @@ diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/01 - See [3] for more info. -- Oter references with crosreference see [1] and [2] for more info. +- Other references with cross references see [1] and [2] for more info. + See knuth79 for more info. -+ Oter references with crosreference see Be09 and BertholdHeinzVigerske2009 for more info. ++ Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. -- cgit v1.2.3