From 7a7a29445ced24af0dcdabfe8011538711fe05d9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 10 Jun 2020 18:02:01 +0300 Subject: gnu: lyx: Wrap binary. Fixes . * gnu/packages/tex.scm (lyx)[arguments]: Import qt-utils. Add phase to wrap the lyx2.3 binary. --- gnu/packages/tex.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 6f6ea73ffc..16c80324fd 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Roel Janssen -;;; Copyright © 2016, 2018, 2019 Efraim Flashner +;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2016 Federico Beffa ;;; Copyright © 2016 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus @@ -6140,6 +6140,11 @@ (define-public lyx (assoc-ref %outputs "out") ;; Exact name and level is necessary. "/lyx" ,(version-major+minor version))) + #:modules ((guix build cmake-build-system) + (guix build qt-utils) + (guix build utils)) + #:imported-modules (,@%cmake-build-system-modules + (guix build qt-utils)) #:phases (modify-phases %standard-phases ;; See ;; https://www.lyx.org/trac/changeset/3a123b90af838b08680471d87170c38e56787df9/lyxgit @@ -6177,6 +6182,14 @@ (define-public lyx ,(version-major+minor version) #\-)) "x") (string-append (getcwd) "/../lyx-" ,version "/lib")) #t)) + (add-after 'install 'wrap-qt + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") + (string-append "../lyx" + ,(version-major+minor version) + "/bin/lyx" + ,(version-major+minor version))) + #t)) (add-after 'install 'install-symlinks (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- cgit v1.2.3 From 03a7b67b314286a9185535f5ecbb7cde97ae2c97 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 10 Jun 2020 21:42:14 +0300 Subject: gnu: lyx: Update to 2.3.5.1. * gnu/packages/tex.scm (lyx): Update to 2.3.5.1. [arguments]: Remove 'fix-compilation-with-boost-1.69 phase. In 'patch-python phase patch more files, substitute with python3. Split 'setenv-check and create empty file after 'unpack. --- gnu/packages/tex.scm | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 16c80324fd..cd8270634c 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -6116,15 +6116,15 @@ (define-public teximpatient (define-public lyx (package (name "lyx") - (version "2.3.3") + (version "2.3.5.1") (source (origin (method url-fetch) (uri (string-append "https://ftp.lyx.org/pub/lyx/stable/" (version-major+minor version) ".x/" - "lyx-" version ".tar.gz")) + "lyx-" version ".tar.xz")) (sha256 (base32 - "0j3xincwmsscfgv13g3z6h4kx1qfzgg8x71fs393akcdxsh2g07c")) + "0mv32s26igm0pd8vs7d2mk1240dpr83y0a2wyh3xz6b67ph0w157")) (modules '((guix build utils))) (snippet '(begin @@ -6147,19 +6147,17 @@ (define-public lyx (guix build qt-utils)) #:phases (modify-phases %standard-phases - ;; See ;; https://www.lyx.org/trac/changeset/3a123b90af838b08680471d87170c38e56787df9/lyxgit - (add-after 'unpack 'fix-compilation-with-boost-1.69 - (lambda _ - (substitute* "src/support/FileName.cpp" - (("^template struct boost::detail::crc_table_t.*") "")) - #t)) (add-after 'unpack 'patch-python (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("src/support/os.cpp") + (substitute* '("lib/configure.py" + "src/support/ForkedCalls.cpp" + "src/support/Systemcall.cpp" + "src/support/os.cpp" + "src/support/filetools.cpp") (("\"python ") (string-append "\"" (assoc-ref inputs "python") - "/bin/python "))) + "/bin/python3 "))) #t)) (add-after 'patch-python 'patch-desktop-file (lambda* (#:key outputs #:allow-other-keys) @@ -6169,13 +6167,14 @@ (define-public lyx (assoc-ref outputs "out") "/"))) #t)) - (add-before 'check 'setenv-check + (add-after 'unpack 'add-missing-test-file (lambda _ ;; Create missing file that would cause tests to fail. - (with-output-to-file (string-append "../lyx-" - ,version - "/src/tests/check_layout.cmake") + (with-output-to-file "src/tests/check_layout.cmake" (const #t)) + #t)) + (add-before 'check 'setenv-check + (lambda _ (setenv (string-append "LYX_DIR_" (string-join (string-split -- cgit v1.2.3 From dadf97952d574e6e44d10a2eb0e2afef86a96818 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 11 Jun 2020 09:26:38 +0300 Subject: gnu: lyx: Don't install to custom directory. * gnu/packages/tex.scm (lyx)[arguments]: Adjust configure-flags to not add the version to the binary's suffix. Remove custom 'patch-desktop-file, 'setenv-check and 'install-symlink phases. --- gnu/packages/tex.scm | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index cd8270634c..f7d5fd1506 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -6136,10 +6136,9 @@ (define-public lyx "-DLYX_EXTERNAL_BOOST=1" "-DLYX_INSTALL=1" "-DLYX_RELEASE=1" + "-DLYX_PROGRAM_SUFFIX=OFF" ,(string-append "-DLYX_INSTALL_PREFIX=" - (assoc-ref %outputs "out") - ;; Exact name and level is necessary. - "/lyx" ,(version-major+minor version))) + (assoc-ref %outputs "out"))) #:modules ((guix build cmake-build-system) (guix build qt-utils) (guix build utils)) @@ -6159,44 +6158,16 @@ (define-public lyx (assoc-ref inputs "python") "/bin/python3 "))) #t)) - (add-after 'patch-python 'patch-desktop-file - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "lib/lyx.desktop.in" - (("Exec=") - (string-append "Exec=" - (assoc-ref outputs "out") - "/"))) - #t)) (add-after 'unpack 'add-missing-test-file (lambda _ ;; Create missing file that would cause tests to fail. (with-output-to-file "src/tests/check_layout.cmake" (const #t)) #t)) - (add-before 'check 'setenv-check - (lambda _ - (setenv (string-append "LYX_DIR_" - (string-join - (string-split - ,(version-major+minor version) #\-)) "x") - (string-append (getcwd) "/../lyx-" ,version "/lib")) - #t)) (add-after 'install 'wrap-qt (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") - (string-append "../lyx" - ,(version-major+minor version) - "/bin/lyx" - ,(version-major+minor version))) - #t)) - (add-after 'install 'install-symlinks - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (mkdir-p (string-append out "/bin")) - (symlink (string-append "../lyx" ,(version-major+minor version) - "/bin/lyx" ,(version-major+minor version)) - (string-append out "/bin/lyx" ,(version-major+minor version))) - #t)))))) + (wrap-qt-program (assoc-ref outputs "out") "lyx") + #t))))) (inputs `(("boost" ,boost) ("hunspell" ,hunspell) ; Note: Could also use aspell instead. -- cgit v1.2.3 From e192b9e02d7cf6f063b6fe0895a0d3f7b34cc9b7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 11 Jun 2020 09:49:45 +0300 Subject: gnu: lyx: Use qt-build-system. * gnu/packages/tex.scm (lyx)[build-system]: Switch to qt-build-system. [arguments]: Remove imported modules. Remove custom 'wrap-qt phase. --- gnu/packages/tex.scm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index f7d5fd1506..47645a3e34 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -33,9 +33,9 @@ (define-module (gnu packages tex) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system qt) #:use-module (guix build-system trivial) #:use-module (guix build-system texlive) #:use-module (guix utils) @@ -6130,7 +6130,7 @@ (define-public lyx '(begin (delete-file-recursively "3rdparty") #t)))) - (build-system cmake-build-system) + (build-system qt-build-system) (arguments `(#:configure-flags `("-DLYX_USE_QT=QT5" "-DLYX_EXTERNAL_BOOST=1" @@ -6139,11 +6139,6 @@ (define-public lyx "-DLYX_PROGRAM_SUFFIX=OFF" ,(string-append "-DLYX_INSTALL_PREFIX=" (assoc-ref %outputs "out"))) - #:modules ((guix build cmake-build-system) - (guix build qt-utils) - (guix build utils)) - #:imported-modules (,@%cmake-build-system-modules - (guix build qt-utils)) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-python @@ -6163,10 +6158,6 @@ (define-public lyx ;; Create missing file that would cause tests to fail. (with-output-to-file "src/tests/check_layout.cmake" (const #t)) - #t)) - (add-after 'install 'wrap-qt - (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") "lyx") #t))))) (inputs `(("boost" ,boost) -- cgit v1.2.3