Package: guix-patches;
Reported by: gemmaro <gemmaro.dev <at> gmail.com>
Date: Mon, 31 Jul 2023 23:45:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64983 in the body.
You can then email your comments to 64983 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 31 Jul 2023 23:45:02 GMT) Full text and rfc822 format available.gemmaro <gemmaro.dev <at> gmail.com>
:guix-patches <at> gnu.org
.
(Mon, 31 Jul 2023 23:45:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: guix-patches <at> gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH 0/3] gnu: highlight: Update to 4.7 and add GUI package. Date: Tue, 1 Aug 2023 08:43:25 +0900
Hello, This patchset updates highlight to 4.7 and add highlight's graphical user interface package (as highlight-gui). Thank you, gemmaro. gemmaro (3): gnu: highlight: Update to 4.7. gnu: highlight: Use new package style. gnu: Add highlight-gui. gnu/packages/pretty-print.scm | 137 +++++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 45 deletions(-) base-commit: 55e89da207b95230e5f2a8176acd9cc9b43971ff -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 31 Jul 2023 23:47:02 GMT) Full text and rfc822 format available.Message #8 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH 1/3] gnu: highlight: Update to 4.7. Date: Tue, 1 Aug 2023 08:45:45 +0900
* gnu/packages/pretty-print.scm (highlight): Update to 4.7. --- gnu/packages/pretty-print.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 89e5de6278..9896824f01 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com> ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -350,14 +351,14 @@ (define-public source-highlight (define-public highlight (package (name "highlight") - (version "3.62") + (version "4.7") (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 - (base32 "088di7qxd6b2r22qljllhnly0r9a0lfnwnfqswjn23s09awjbl6p")))) + (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 31 Jul 2023 23:47:02 GMT) Full text and rfc822 format available.Message #11 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH 2/3] gnu: highlight: Use new package style. Date: Tue, 1 Aug 2023 08:45:46 +0900
* gnu/packages/pretty-print.scm (highlight) Use new package style. [arguments]: Use G-expression. Drop trailing #t from phases. [source, inputs, native-inputs, description]: Reformat with guix style. --- gnu/packages/pretty-print.scm | 89 ++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 9896824f01..1b2cf4becf 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -352,54 +352,55 @@ (define-public highlight (package (name "highlight") (version "4.7") - (source - (origin - (method url-fetch) - (uri (string-append "http://www.andre-simon.de/zip/highlight-" - version ".tar.bz2")) - (sha256 - (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) + (source (origin + (method url-fetch) + (uri (string-append "http://www.andre-simon.de/zip/highlight-" + version ".tar.bz2")) + (sha256 + (base32 + "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests - #:make-flags - (let ((confdir (string-append %output "/share/highlight/config/"))) - (list (string-append "PREFIX=" %output) - (string-append "HL_CONFIG_DIR=" confdir) - (string-append "conf_dir=" confdir))) - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-after 'unpack 'fix-search-for-lua - (lambda _ - (substitute* "src/makefile" - (("(LUA_PKG_NAME=).*" _ assignment) - (string-append assignment "lua-" ,(version-major+minor - (package-version lua)) - "\n"))) - (substitute* "extras/swig/makefile" - (("lua") (string-append "lua-" ,(version-major+minor - (package-version lua))))) - #t)) - (add-after 'install 'install-perl-bindings - (lambda* (#:key outputs #:allow-other-keys) - (let* ((perldir (string-append (assoc-ref outputs "out") - "/lib/perl5/site_perl/" - ,(package-version perl))) - (autodir (string-append perldir "/auto/highlight"))) - (with-directory-excursion "extras/swig" - (invoke "make" "perl") - (invoke "perl" "-I" "." "testmod.pl") - (install-file "highlight.pm" perldir) - (install-file "highlight.so" autodir)) - #t)))))) - (inputs - (list lua boost perl)) - (native-inputs - (list pkg-config swig)) + (list #:tests? #f ;no tests + #:make-flags #~(let ((confdir (string-append %output + "/share/highlight/config/"))) + (list (string-append "PREFIX=" %output) + (string-append "HL_CONFIG_DIR=" confdir) + (string-append "conf_dir=" confdir))) + #:phases #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'fix-search-for-lua + (lambda _ + (substitute* "src/makefile" + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" + #$(version-major+minor (package-version + lua)) + "\n"))) + (substitute* "extras/swig/makefile" + (("lua") + (string-append "lua-" + #$(version-major+minor (package-version + lua))))))) + (add-after 'install 'install-perl-bindings + (lambda* (#:key outputs #:allow-other-keys) + (let* ((perldir (string-append (assoc-ref outputs + "out") + "/lib/perl5/site_perl/" + #$(package-version perl))) + (autodir (string-append perldir + "/auto/highlight"))) + (with-directory-excursion "extras/swig" + (invoke "make" "perl") + (invoke "perl" "-I" "." "testmod.pl") + (install-file "highlight.pm" perldir) + (install-file "highlight.so" autodir)))))))) + (inputs (list lua boost perl)) + (native-inputs (list pkg-config swig)) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") - (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX, + (description + "Highlight converts source code to HTML, XHTML, RTF, LaTeX, TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+))) -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 31 Jul 2023 23:47:03 GMT) Full text and rfc822 format available.Message #14 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH 3/3] gnu: Add highlight-gui. Date: Tue, 1 Aug 2023 08:45:47 +0900
* gnu/packages/pretty-print.scm (highlight-gui): New variable. --- gnu/packages/pretty-print.scm | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 1b2cf4becf..1ec4df50a9 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -52,6 +52,7 @@ (define-module (gnu packages pretty-print) #:use-module (gnu packages lua) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages qt) #:use-module (gnu packages swig)) (define-public a2ps @@ -404,3 +405,47 @@ (define-public highlight TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+))) + +(define-public highlight-gui + (package + (inherit highlight) + (name "highlight-gui") + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments highlight) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (let* ((highlight:out (assoc-ref inputs "highlight")) + (data (string-append highlight:out "/share/highlight/")) + (conf (string-append highlight:out "/etc/highlight/")) + (doc (string-append highlight:out + "/share/doc/highlight/"))) + (substitute* "makefile" + (("HL_DATA_DIR=.* HL_CONFIG_DIR=.* HL_DOC_DIR=.* gui-qt") + (string-append "HL_DATA_DIR=\"" + data + "\" HL_CONFIG_DIR=\"" + conf + "\" HL_DOC_DIR=\"" + doc + "\" gui-qt")))))) + (add-after 'fix-search-for-lua 'fix-search-for-lua/GUI + (lambda _ + (substitute* "src/gui-qt/highlight.pro" + (("PKGCONFIG \\+= lua") + (string-append "PKGCONFIG += lua-" + #$(version-major+minor (package-version lua))))))) + (replace 'build + (lambda _ + (invoke "make" "gui"))) + (delete 'install-perl-bindings) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/bin")) + (invoke "make" "install-gui")))))))) + (native-inputs (list pkg-config)) + (inputs (list highlight lua boost qtbase-5)) + (synopsis "Graphical user interface for highlight"))) -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Fri, 04 Aug 2023 00:44:01 GMT) Full text and rfc822 format available.Message #17 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Subject: [bug#64983] [PATCH 3/3] gnu: Add highlight-gui. Date: Fri, 04 Aug 2023 09:42:58 +0900
I noticed that my third patch doesn't configure the GUI path settings well, so I'll send updated patches. I also want to rethink whether it should be a separate package or output.
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 07 Aug 2023 14:16:01 GMT) Full text and rfc822 format available.Message #20 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH v2 0/4] gnu: highlight: Add gui output. Date: Mon, 7 Aug 2023 23:05:38 +0900
I updated from revision 1 so that the highlight package has "gui" output instead of another package, fixed some GUI path settings, and also fixed path settings for Perl bindings. In particular, the second change makes it possible to see the internationalized GUI interface. gemmaro (4): gnu: highlight: Update to 4.7. gnu: highlight: Use new package style. gnu: highlight: Add gui output. gnu: highlight: Fix paths for Perl bindings. .../patches/highlight-gui-data-dir.patch | 51 +++++++ gnu/packages/pretty-print.scm | 135 ++++++++++++------ 2 files changed, 140 insertions(+), 46 deletions(-) create mode 100644 gnu/packages/patches/highlight-gui-data-dir.patch base-commit: 56667ee55cd7f3368cbff169352fe440f4f93da5 -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 07 Aug 2023 14:16:02 GMT) Full text and rfc822 format available.Message #23 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH v2 1/4] gnu: highlight: Update to 4.7. Date: Mon, 7 Aug 2023 23:05:39 +0900
* gnu/packages/pretty-print.scm (highlight): Update to 4.7. --- gnu/packages/pretty-print.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 89e5de6278..9896824f01 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com> ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> +;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -350,14 +351,14 @@ (define-public source-highlight (define-public highlight (package (name "highlight") - (version "3.62") + (version "4.7") (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 - (base32 "088di7qxd6b2r22qljllhnly0r9a0lfnwnfqswjn23s09awjbl6p")))) + (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 07 Aug 2023 14:16:02 GMT) Full text and rfc822 format available.Message #26 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH v2 2/4] gnu: highlight: Use new package style. Date: Mon, 7 Aug 2023 23:05:40 +0900
* gnu/packages/pretty-print.scm (highlight) Use new package style. [arguments]: Use G-expression. Drop trailing #t from phases. [source, inputs, native-inputs, description]: Reformat with guix style. --- gnu/packages/pretty-print.scm | 89 ++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 9896824f01..1b2cf4becf 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -352,54 +352,55 @@ (define-public highlight (package (name "highlight") (version "4.7") - (source - (origin - (method url-fetch) - (uri (string-append "http://www.andre-simon.de/zip/highlight-" - version ".tar.bz2")) - (sha256 - (base32 "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) + (source (origin + (method url-fetch) + (uri (string-append "http://www.andre-simon.de/zip/highlight-" + version ".tar.bz2")) + (sha256 + (base32 + "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests - #:make-flags - (let ((confdir (string-append %output "/share/highlight/config/"))) - (list (string-append "PREFIX=" %output) - (string-append "HL_CONFIG_DIR=" confdir) - (string-append "conf_dir=" confdir))) - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-after 'unpack 'fix-search-for-lua - (lambda _ - (substitute* "src/makefile" - (("(LUA_PKG_NAME=).*" _ assignment) - (string-append assignment "lua-" ,(version-major+minor - (package-version lua)) - "\n"))) - (substitute* "extras/swig/makefile" - (("lua") (string-append "lua-" ,(version-major+minor - (package-version lua))))) - #t)) - (add-after 'install 'install-perl-bindings - (lambda* (#:key outputs #:allow-other-keys) - (let* ((perldir (string-append (assoc-ref outputs "out") - "/lib/perl5/site_perl/" - ,(package-version perl))) - (autodir (string-append perldir "/auto/highlight"))) - (with-directory-excursion "extras/swig" - (invoke "make" "perl") - (invoke "perl" "-I" "." "testmod.pl") - (install-file "highlight.pm" perldir) - (install-file "highlight.so" autodir)) - #t)))))) - (inputs - (list lua boost perl)) - (native-inputs - (list pkg-config swig)) + (list #:tests? #f ;no tests + #:make-flags #~(let ((confdir (string-append %output + "/share/highlight/config/"))) + (list (string-append "PREFIX=" %output) + (string-append "HL_CONFIG_DIR=" confdir) + (string-append "conf_dir=" confdir))) + #:phases #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'fix-search-for-lua + (lambda _ + (substitute* "src/makefile" + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" + #$(version-major+minor (package-version + lua)) + "\n"))) + (substitute* "extras/swig/makefile" + (("lua") + (string-append "lua-" + #$(version-major+minor (package-version + lua))))))) + (add-after 'install 'install-perl-bindings + (lambda* (#:key outputs #:allow-other-keys) + (let* ((perldir (string-append (assoc-ref outputs + "out") + "/lib/perl5/site_perl/" + #$(package-version perl))) + (autodir (string-append perldir + "/auto/highlight"))) + (with-directory-excursion "extras/swig" + (invoke "make" "perl") + (invoke "perl" "-I" "." "testmod.pl") + (install-file "highlight.pm" perldir) + (install-file "highlight.so" autodir)))))))) + (inputs (list lua boost perl)) + (native-inputs (list pkg-config swig)) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") - (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX, + (description + "Highlight converts source code to HTML, XHTML, RTF, LaTeX, TeX, SVG, BBCode and terminal escape sequences with colored syntax highlighting. Language definitions and color themes are customizable.") (license gpl3+))) -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 07 Aug 2023 14:16:02 GMT) Full text and rfc822 format available.Message #29 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH v2 3/4] gnu: highlight: Add gui output. Date: Mon, 7 Aug 2023 23:05:41 +0900
* gnu/packages/pretty-print.scm (highlight): Add gui output. [source]: Add patch for GUI data directory. [outputs]: Add gui. [arguments]<phases>{fix-search-for-lua}: Fix Lua package name for GUI. {build-gui}: Add phase to build GUI. {install}: Set PREFIX variable. {install-gui}: Add phase to install GUI. [inputs]: Add qtbase-5. * gnu/packages/patches/highlight-gui-data-dir.patch: Add patch for GUI data directory. --- .../patches/highlight-gui-data-dir.patch | 51 ++++++++++++++ gnu/packages/pretty-print.scm | 66 ++++++++++++++----- 2 files changed, 102 insertions(+), 15 deletions(-) create mode 100644 gnu/packages/patches/highlight-gui-data-dir.patch diff --git a/gnu/packages/patches/highlight-gui-data-dir.patch b/gnu/packages/patches/highlight-gui-data-dir.patch new file mode 100644 index 0000000000..33f40d309c --- /dev/null +++ b/gnu/packages/patches/highlight-gui-data-dir.patch @@ -0,0 +1,51 @@ +This patch distinguishes between the data directory path for GUI and the one +for non-GUI by allowing to set the former path. + +highlight package has two outputs: out and gui. Both outputs have files which +will be in the same directory /share/highlight/ without this patch (see also +install and install-gui tasks in makefile). In the gui's data directory, +there are GUI specific files in /share/highlight/gui-files/{l10n,ext}/. + +diff --git a/src/gui-qt/main.cpp b/src/gui-qt/main.cpp +index 4700dc1..3567745 100644 +--- a/src/gui-qt/main.cpp ++++ b/src/gui-qt/main.cpp +@@ -47,8 +47,8 @@ int main(int argc, char *argv[]) + { + QApplication app(argc, argv); + QTranslator translator; +-#ifdef DATA_DIR +- translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(DATA_DIR).arg(QLocale::system().name())); ++#ifdef GUI_DATA_DIR ++ translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(GUI_DATA_DIR).arg(QLocale::system().name())); + #else + translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(QDir::currentPath()).arg(QLocale::system().name())); + #endif +diff --git a/src/gui-qt/mainwindow.cpp b/src/gui-qt/mainwindow.cpp +index 3a21ad2..f060431 100644 +--- a/src/gui-qt/mainwindow.cpp ++++ b/src/gui-qt/mainwindow.cpp +@@ -2131,8 +2131,8 @@ QString MainWindow::getDistFileFilterPath(){ + #ifdef Q_OS_OSX + return QCoreApplication::applicationDirPath()+"/../Resources/gui_files/ext/fileopenfilter.conf"; + #else +- #ifdef DATA_DIR +- return QString(DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; ++ #ifdef GUI_DATA_DIR ++ return QString(GUI_DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; + #else + return QDir::currentPath()+"/gui_files/ext/fileopenfilter.conf"; + #endif +diff --git a/src/makefile b/src/makefile +index b1d7988..2963105 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -118,7 +118,7 @@ gui-qt: highlight-gui + + highlight-gui: libhighlight.a ${GUI_OBJECTS} + cd gui-qt && \ +- ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" ' && \ ++ ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" GUI_DATA_DIR=\\\"${GUI_DATA_DIR}\\\" ' && \ + $(MAKE) + + $(OBJECTFILES) : makefile diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 1b2cf4becf..f8763b7b74 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -52,7 +52,8 @@ (define-module (gnu packages pretty-print) #:use-module (gnu packages lua) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages swig)) + #:use-module (gnu packages swig) + #:use-module (gnu packages qt)) (define-public a2ps (package @@ -352,13 +353,15 @@ (define-public highlight (package (name "highlight") (version "4.7") + (outputs (list "out" "gui")) (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 (base32 - "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")))) + "1cl21qpgy92w1x53vrn1bgq84mkh6fgayc9k38mz4xmz2yw01nv1")) + (patches (search-patches "highlight-gui-data-dir.patch")))) (build-system gnu-build-system) (arguments (list #:tests? #f ;no tests @@ -371,17 +374,44 @@ (define-public highlight (delete 'configure) ;no configure script (add-after 'unpack 'fix-search-for-lua (lambda _ - (substitute* "src/makefile" - (("(LUA_PKG_NAME=).*" _ assignment) - (string-append assignment "lua-" - #$(version-major+minor (package-version - lua)) - "\n"))) - (substitute* "extras/swig/makefile" - (("lua") - (string-append "lua-" - #$(version-major+minor (package-version - lua))))))) + (let ((ver #$(version-major+minor (package-version + lua)))) + (substitute* "src/makefile" + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" ver "\n"))) + (substitute* "src/gui-qt/highlight.pro" + (("(PKGCONFIG \\+= lua)" _ assignment) + (string-append assignment "-" ver))) + (substitute* "extras/swig/makefile" + (("lua") + (string-append "lua-" ver)))))) + (add-after 'build 'build-gui + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (data (string-append out + "/share/highlight/")) + (conf (string-append out "/etc/highlight/")) + (doc (string-append out + "/share/doc/highlight/")) + (gui (assoc-ref outputs "gui")) + (gui-data (string-append gui + "/share/highlight/"))) + ;; modified version of gui task in makefile + (invoke "make" + "-C" + "./src" + "-f" + "./makefile" + (string-append "HL_DATA_DIR=" data) + (string-append "HL_CONFIG_DIR=" conf) + (string-append "HL_DOC_DIR=" doc) + (string-append "GUI_DATA_DIR=" gui-data) + "gui-qt")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "install" + (string-append "PREFIX=" out))))) (add-after 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) (let* ((perldir (string-append (assoc-ref outputs @@ -394,8 +424,14 @@ (define-public highlight (invoke "make" "perl") (invoke "perl" "-I" "." "testmod.pl") (install-file "highlight.pm" perldir) - (install-file "highlight.so" autodir)))))))) - (inputs (list lua boost perl)) + (install-file "highlight.so" autodir))))) + (add-after 'install 'install-gui + (lambda* (#:key outputs #:allow-other-keys) + (let ((gui (assoc-ref outputs "gui"))) + (mkdir-p (string-append gui "/bin")) + (invoke "make" "install-gui" + (string-append "PREFIX=" gui)))))))) + (inputs (list lua boost perl qtbase-5)) (native-inputs (list pkg-config swig)) (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php") (synopsis "Convert code to documents with syntax highlighting") -- 2.41.0
guix-patches <at> gnu.org
:bug#64983
; Package guix-patches
.
(Mon, 07 Aug 2023 14:16:03 GMT) Full text and rfc822 format available.Message #32 received at 64983 <at> debbugs.gnu.org (full text, mbox):
From: gemmaro <gemmaro.dev <at> gmail.com> To: 64983 <at> debbugs.gnu.org Cc: gemmaro <gemmaro.dev <at> gmail.com> Subject: [PATCH v2 4/4] gnu: highlight: Fix paths for Perl bindings. Date: Mon, 7 Aug 2023 23:05:42 +0900
* gnu/packages/pretty-print.scm (highlight): Fix paths for Perl bindings. [arguments]<phases>: Set hl_data_dir and hl_conf_dir in install-perl-bindings phase. --- gnu/packages/pretty-print.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index f8763b7b74..5d15b160f3 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -414,14 +414,19 @@ (define-public highlight (string-append "PREFIX=" out))))) (add-after 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) - (let* ((perldir (string-append (assoc-ref outputs - "out") + (let* ((out (assoc-ref outputs "out")) + (data (string-append out + "/share/highlight/")) + (conf (string-append out "/etc/highlight/")) + (perldir (string-append out "/lib/perl5/site_perl/" #$(package-version perl))) (autodir (string-append perldir "/auto/highlight"))) (with-directory-excursion "extras/swig" - (invoke "make" "perl") + (invoke "make" "perl" + (string-append "hl_data_dir=" data) + (string-append "hl_conf_dir=" conf)) (invoke "perl" "-I" "." "testmod.pl") (install-file "highlight.pm" perldir) (install-file "highlight.so" autodir))))) -- 2.41.0
Ludovic Courtès <ludo <at> gnu.org>
:gemmaro <gemmaro.dev <at> gmail.com>
:Message #37 received at 64983-done <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: gemmaro <gemmaro.dev <at> gmail.com> Cc: 64983-done <at> debbugs.gnu.org Subject: Re: bug#64983: [PATCH 0/3] gnu: highlight: Update to 4.7 and add GUI package. Date: Tue, 15 Aug 2023 00:26:21 +0200
Hi, gemmaro <gemmaro.dev <at> gmail.com> skribis: > gnu: highlight: Update to 4.7. > gnu: highlight: Use new package style. > gnu: highlight: Add gui output. > gnu: highlight: Fix paths for Perl bindings. I applied the whole series, adding the patch to ‘gnu/local.mk’. Thanks, Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Tue, 12 Sep 2023 11:24:10 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.