all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#30774] [PATCH] gnu: Add lyx.
@ 2018-03-12  0:31 Danny Milosavljevic
  2018-03-12 14:46 ` Ludovic Courtès
  2018-03-13  2:20 ` [bug#30774] [PATCH v2] " Danny Milosavljevic
  0 siblings, 2 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2018-03-12  0:31 UTC (permalink / raw)
  To: 30774

* gnu/packages/patches/lyx-2.2.3-fix-test.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/tex.scm (lyx): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/patches/lyx-2.2.3-fix-test.patch | 13 ++++++
 gnu/packages/tex.scm                          | 63 +++++++++++++++++++++++++++
 3 files changed, 77 insertions(+)
 create mode 100644 gnu/packages/patches/lyx-2.2.3-fix-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5c95cdae2..8bd3616a8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -895,6 +895,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/luminance-hdr-qt-printer.patch		\
   %D%/packages/patches/lvm2-static-link.patch			\
   %D%/packages/patches/lxsession-use-gapplication.patch         \
+  %D%/packages/patches/lyx-2.2.3-fix-test.patch			\
   %D%/packages/patches/mailutils-uninitialized-memory.patch	\
   %D%/packages/patches/make-impure-dirs.patch			\
   %D%/packages/patches/mars-install.patch			\
diff --git a/gnu/packages/patches/lyx-2.2.3-fix-test.patch b/gnu/packages/patches/lyx-2.2.3-fix-test.patch
new file mode 100644
index 000000000..10b7d2a3a
--- /dev/null
+++ b/gnu/packages/patches/lyx-2.2.3-fix-test.patch
@@ -0,0 +1,13 @@
+See https://www.lyx.org/trac/ticket/10800#comment:17
+diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx
+index feff755cd2..2c7f2ace5c 100644
+--- a/src/tex2lyx/test/test-structure.lyx.lyx
++++ b/src/tex2lyx/test/test-structure.lyx.lyx
+@@ -212,7 +212,7 @@ This causes the
+ \begin_inset Flex Flex:Strong
+ status collapsed
+ 
+-\begin_layout Standard
++\begin_layout Plain Layout
+ logikalmkup
+ \end_layout
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 764f4fff1..fd4a98acf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -30,6 +30,7 @@
   #: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 trivial)
@@ -38,8 +39,10 @@
   #:use-module (guix git-download)
   #:use-module (guix svn-download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
@@ -47,6 +50,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pdf)
@@ -4189,3 +4193,62 @@ develop documents with LaTeX, in a single application.")
 plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
 and Karl Berry.")
     (license license:fdl1.3+)))
+
+(define-public lyx
+  (package
+    (name "lyx")
+    (version "2.2.3")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://ftp.lyx.org/pub/lyx/stable/2.2.x/"
+                                 name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "0xvaz0i371nn2ndinc0d3ywj76ivb62649a4sdgwbivisiahd2fj"))
+             (patches (search-patches "lyx-2.2.3-fix-test.patch"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                (delete-file-recursively "3rdparty")
+                #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DLYX_USE_QT=QT5"
+                           "-DLYX_EXTERNAL_BOOST=1")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-python
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("src/support/ForkedCalls.cpp"
+                            "src/support/Systemcall.cpp"
+                            "src/support/filetools.cpp"
+                            "src/support/os.cpp")
+              (("\\bpython -tt")
+               (string-append (assoc-ref inputs "python-2") " -tt")))
+             #t))
+         (add-before 'check 'setenv-check
+           (lambda _
+             (setenv "LYX_DIR_22x" (string-append (getcwd) "/../lyx-"
+                                                  ,version "/lib"))
+             #t)))))
+    (inputs
+     `(("boost" ,boost)
+       ("hunspell" ,hunspell) ; Note: could also use aspell instead.
+       ("libx11" ,libx11)
+       ("python-2" ,python-2)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("zlib" ,zlib)
+       ("texlive", texlive))) ; article.cls is in texmf-dist.
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)
+       ("bc" ,bc)))
+    (home-page "http://www.lyx.org/")
+    (synopsis "Document preparation system with GUI")
+    (description "LyX is a document preparation system.  It excels at letting
+you create complex technical and scientific articles with mathematics,
+cross-references, bibliographies, indexes, etc.  It is very good for working
+with documents of any length in which the usual processing abilities are
+required: automatic sectioning and pagination, spell checking and so forth.")
+    (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#30774] [PATCH] gnu: Add lyx.
  2018-03-12  0:31 [bug#30774] [PATCH] gnu: Add lyx Danny Milosavljevic
@ 2018-03-12 14:46 ` Ludovic Courtès
  2018-03-13  2:20 ` [bug#30774] [PATCH v2] " Danny Milosavljevic
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-03-12 14:46 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 30774

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> * gnu/packages/patches/lyx-2.2.3-fix-test.patch: New file.
> * gnu/local.mk: Add it.
> * gnu/packages/tex.scm (lyx): New variable.

[...]

> --- a/gnu/packages/tex.scm
> +++ b/gnu/packages/tex.scm

Please add a copyright line for you.

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#30774] [PATCH v2] gnu: Add lyx.
  2018-03-12  0:31 [bug#30774] [PATCH] gnu: Add lyx Danny Milosavljevic
  2018-03-12 14:46 ` Ludovic Courtès
@ 2018-03-13  2:20 ` Danny Milosavljevic
  2018-03-22 10:47   ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Danny Milosavljevic @ 2018-03-13  2:20 UTC (permalink / raw)
  To: 30774

* gnu/packages/patches/lyx-2.2.3-fix-test.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/tex.scm (lyx): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/patches/lyx-2.2.3-fix-test.patch | 13 ++++
 gnu/packages/tex.scm                          | 90 +++++++++++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 gnu/packages/patches/lyx-2.2.3-fix-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5c95cdae2..8bd3616a8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -895,6 +895,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/luminance-hdr-qt-printer.patch		\
   %D%/packages/patches/lvm2-static-link.patch			\
   %D%/packages/patches/lxsession-use-gapplication.patch         \
+  %D%/packages/patches/lyx-2.2.3-fix-test.patch			\
   %D%/packages/patches/mailutils-uninitialized-memory.patch	\
   %D%/packages/patches/make-impure-dirs.patch			\
   %D%/packages/patches/mars-install.patch			\
diff --git a/gnu/packages/patches/lyx-2.2.3-fix-test.patch b/gnu/packages/patches/lyx-2.2.3-fix-test.patch
new file mode 100644
index 000000000..10b7d2a3a
--- /dev/null
+++ b/gnu/packages/patches/lyx-2.2.3-fix-test.patch
@@ -0,0 +1,13 @@
+See https://www.lyx.org/trac/ticket/10800#comment:17
+diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx
+index feff755cd2..2c7f2ace5c 100644
+--- a/src/tex2lyx/test/test-structure.lyx.lyx
++++ b/src/tex2lyx/test/test-structure.lyx.lyx
+@@ -212,7 +212,7 @@ This causes the
+ \begin_inset Flex Flex:Strong
+ status collapsed
+ 
+-\begin_layout Standard
++\begin_layout Plain Layout
+ logikalmkup
+ \end_layout
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 764f4fff1..a76faf9bf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -30,6 +30,7 @@
   #: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 trivial)
@@ -38,8 +39,10 @@
   #:use-module (guix git-download)
   #:use-module (guix svn-download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
@@ -47,6 +50,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pdf)
@@ -4189,3 +4193,89 @@ develop documents with LaTeX, in a single application.")
 plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
 and Karl Berry.")
     (license license:fdl1.3+)))
+
+(define-public lyx
+  (package
+    (name "lyx")
+    (version "2.2.3")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://ftp.lyx.org/pub/lyx/stable/2.2.x/"
+                                 name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "0xvaz0i371nn2ndinc0d3ywj76ivb62649a4sdgwbivisiahd2fj"))
+             (patches (search-patches "lyx-2.2.3-fix-test.patch"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                (delete-file-recursively "3rdparty")
+                #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags `("-DLYX_USE_QT=QT5"
+                           "-DLYX_EXTERNAL_BOOST=1"
+                           "-DLYX_INSTALL=1"
+                           "-DLYX_RELEASE=1"
+                           ,(string-append "-DLYX_INSTALL_PREFIX="
+                                           (assoc-ref %outputs "out")
+                                           ;; Exact name and level necessary.
+                                           "/lyx2.2"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-python
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("src/support/os.cpp")
+              (("\"python ")
+               (string-append "\""
+                              (assoc-ref inputs "python-2")
+                              "/bin/python ")))
+             #t))
+         (add-after 'patch-python 'patch-installer
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+              (("/usr/local/man/man1")
+               (string-append (assoc-ref outputs "out")
+                              "/share/man/man1")))
+             #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-before 'check 'setenv-check
+           (lambda _
+             (setenv "LYX_DIR_22x" (string-append (getcwd) "/../lyx-"
+                                                  ,version "/lib"))
+             #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 "../lyx2.2/bin/lyx2.2"
+                (string-append out "/bin/lyx2.2"))
+               #t))))))
+    (inputs
+     `(("boost" ,boost)
+       ("hunspell" ,hunspell) ; Note: Could also use aspell instead.
+       ("libx11" ,libx11)
+       ("python-2" ,python-2)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("zlib" ,zlib)
+       ("texlive", texlive))) ; article.cls is in texmf-dist.
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)
+       ("bc" ,bc)))
+    (home-page "http://www.lyx.org/")
+    (synopsis "Document preparation system with GUI")
+    (description "LyX is a document preparation system.  It excels at letting
+you create complex technical and scientific articles with mathematics,
+cross-references, bibliographies, indexes, etc.  It is very good for working
+with documents of any length in which the usual processing abilities are
+required: automatic sectioning and pagination, spell checking and so forth.")
+    (license license:gpl2+)))

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#30774] [PATCH v2] gnu: Add lyx.
  2018-03-13  2:20 ` [bug#30774] [PATCH v2] " Danny Milosavljevic
@ 2018-03-22 10:47   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-03-22 10:47 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 30774

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> * gnu/packages/patches/lyx-2.2.3-fix-test.patch: New file.
> * gnu/local.mk: Add it.
> * gnu/packages/tex.scm (lyx): New variable.

Please add a copyright line for you in tex.scm, but otherwise it still
LGTM.  :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-22 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12  0:31 [bug#30774] [PATCH] gnu: Add lyx Danny Milosavljevic
2018-03-12 14:46 ` Ludovic Courtès
2018-03-13  2:20 ` [bug#30774] [PATCH v2] " Danny Milosavljevic
2018-03-22 10:47   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.