* [PATCH] Add libreoffice symlink to libreoffice
@ 2016-12-05 12:25 ng0
2016-12-05 12:25 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-05 12:25 UTC (permalink / raw)
To: guix-devel
The historic(?) remains of soffice (I guess it's from back when it was StarOffice) for libreoffice is on most systems symlinked to libreoffice.
When people install libreoffice, they expect that there'll be an exectuable which is very similar to the name of the application libreoffice.
This patch adds an additional symlink 'out/bin/libreoffice' to the package.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-05 12:25 [PATCH] Add libreoffice symlink to libreoffice ng0
@ 2016-12-05 12:25 ` ng0
2016-12-05 12:40 ` Hartmut Goebel
0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-05 12:25 UTC (permalink / raw)
To: guix-devel
* gnu/packages/libreoffice.scm (libreoffice)[arguments] Create symlink to
libreoffice in new phase.
---
gnu/packages/libreoffice.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4cd..245e932d4 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -828,6 +829,15 @@ and to return information on pronunciations, meanings and synonyms.")
(symlink
(string-append out "/lib/libreoffice/program/soffice")
(string-append bin "/soffice")))
+ #t))
+ (add-after 'bin-install 'symlink-soffice
+ ;; Create a symlink bin/libreoffice to the executable script.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (symlink
+ (string-append out "/lib/libreoffice/program/soffice")
+ (string-append bin "/libreoffice")))
#t)))
#:configure-flags
(list
--
2.11.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-05 12:25 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
@ 2016-12-05 12:40 ` Hartmut Goebel
2016-12-05 14:16 ` ng0
0 siblings, 1 reply; 14+ messages in thread
From: Hartmut Goebel @ 2016-12-05 12:40 UTC (permalink / raw)
To: guix-devel
Am 05.12.2016 um 13:25 schrieb ng0:
> + (symlink
> + (string-append out "/lib/libreoffice/program/soffice")
> + (string-append bin "/libreoffice")))
That's a good idea. But why not a relative sym-link?
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-05 12:40 ` Hartmut Goebel
@ 2016-12-05 14:16 ` ng0
2016-12-06 10:42 ` Hartmut Goebel
0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-05 14:16 UTC (permalink / raw)
To: guix-devel
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
> Am 05.12.2016 um 13:25 schrieb ng0:
>> + (symlink
>> + (string-append out "/lib/libreoffice/program/soffice")
>> + (string-append bin "/libreoffice")))
>
> That's a good idea. But why not a relative sym-link?
>
> --
> Regards
> Hartmut Goebel
>
> | Hartmut Goebel | h.goebel@crazy-compilers.com |
> | www.crazy-compilers.com | compilers which you thought are impossible |
>
>
>
Okay, I have no preference for the symlink type or how it's
done.
Feel free to co-author your bits, there's no way I'm building
libreoffice for the 8th time in 3 days for this minor change.
--
♥Ⓐ ng0 | ng0.chaosnet.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-05 14:16 ` ng0
@ 2016-12-06 10:42 ` Hartmut Goebel
2016-12-06 18:54 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: Hartmut Goebel @ 2016-12-06 10:42 UTC (permalink / raw)
To: guix-devel@gnu.org >> guix-devel
Am 05.12.2016 um 15:16 schrieb ng0:
> Okay, I have no preference for the symlink type or how it's
> done.
> Feel free to co-author your bits, there's no way I'm building
> libreoffice for the 8th time in 3 days for this minor change.
Fair point :-) If I'm the only one asking for relative sym-links, please
ignore my comment.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 10:42 ` Hartmut Goebel
@ 2016-12-06 18:54 ` Alex Kost
2016-12-06 19:52 ` [PATCH] libreoffice symlink, v2 ng0
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-12-06 18:54 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: guix-devel
Hartmut Goebel (2016-12-06 11:42 +0100) wrote:
> Am 05.12.2016 um 15:16 schrieb ng0:
>> Okay, I have no preference for the symlink type or how it's
>> done.
>> Feel free to co-author your bits, there's no way I'm building
>> libreoffice for the 8th time in 3 days for this minor change.
>
> Fair point :-) If I'm the only one asking for relative sym-links, please
> ignore my comment.
I would also prefer a relative symlink (but I'm not going to build
libreoffice :-))
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] libreoffice symlink, v2
2016-12-06 18:54 ` Alex Kost
@ 2016-12-06 19:52 ` ng0
2016-12-06 19:52 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
2016-12-06 20:04 ` [PATCH] libreoffice symlink, v3 ng0
0 siblings, 2 replies; 14+ messages in thread
From: ng0 @ 2016-12-06 19:52 UTC (permalink / raw)
To: guix-devel
Maybe the threaded patch can be shorter when with-directory-excursion is used?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 19:52 ` [PATCH] libreoffice symlink, v2 ng0
@ 2016-12-06 19:52 ` ng0
2016-12-06 20:04 ` [PATCH] libreoffice symlink, v3 ng0
1 sibling, 0 replies; 14+ messages in thread
From: ng0 @ 2016-12-06 19:52 UTC (permalink / raw)
To: guix-devel
* gnu/packages/libreoffice.scm (libreoffice)[arguments]: Create symlink to
libreoffice in new phase.
---
gnu/packages/libreoffice.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4cd..8e08450a1 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -828,6 +829,14 @@ and to return information on pronunciations, meanings and synonyms.")
(symlink
(string-append out "/lib/libreoffice/program/soffice")
(string-append bin "/soffice")))
+ #t))
+ (add-after 'bin-install 'symlink-soffice
+ ;; Create a symlink bin/libreoffice to the executable script.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (soffice (string-append bin "/soffice")))
+ (symlink soffice (string-append bin "/libreoffice"))
#t)))
#:configure-flags
(list
--
2.11.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] libreoffice symlink, v3
2016-12-06 19:52 ` [PATCH] libreoffice symlink, v2 ng0
2016-12-06 19:52 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
@ 2016-12-06 20:04 ` ng0
2016-12-06 20:04 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
1 sibling, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-06 20:04 UTC (permalink / raw)
To: guix-devel
v3: uses with-directory-excursion
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 20:04 ` [PATCH] libreoffice symlink, v3 ng0
@ 2016-12-06 20:04 ` ng0
2016-12-06 20:35 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-06 20:04 UTC (permalink / raw)
To: guix-devel
* gnu/packages/libreoffice.scm (libreoffice)[arguments]: Create symlink to
libreoffice in new phase.
---
gnu/packages/libreoffice.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4cd..5f1435745 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -828,7 +829,15 @@ and to return information on pronunciations, meanings and synonyms.")
(symlink
(string-append out "/lib/libreoffice/program/soffice")
(string-append bin "/soffice")))
- #t)))
+ #t))
+ (add-after 'bin-install 'symlink-libreoffice
+ ;; Create a symlink bin/libreoffice to the executable script.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (with-directory-excursion
+ (string-append (assoc-ref outputs "out") "/bin")
+ (symlink "soffice" "libreoffice"))
+ #t)))
#:configure-flags
(list
"--enable-release-build"
--
2.11.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 20:04 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
@ 2016-12-06 20:35 ` Alex Kost
2016-12-06 20:42 ` ng0
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-12-06 20:35 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]
ng0 (2016-12-06 20:04 +0000) wrote:
> * gnu/packages/libreoffice.scm (libreoffice)[arguments]: Create symlink to
> libreoffice in new phase.
> ---
> gnu/packages/libreoffice.scm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
> index e02e4f4cd..5f1435745 100644
> --- a/gnu/packages/libreoffice.scm
> +++ b/gnu/packages/libreoffice.scm
> @@ -2,6 +2,7 @@
> ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2016 ng0 <ng0@libertad.pw>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -828,7 +829,15 @@ and to return information on pronunciations, meanings and synonyms.")
> (symlink
> (string-append out "/lib/libreoffice/program/soffice")
> (string-append bin "/soffice")))
> - #t)))
> + #t))
> + (add-after 'bin-install 'symlink-libreoffice
> + ;; Create a symlink bin/libreoffice to the executable script.
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out")))
This 'let*' is not needed (since you don't use 'out' variable), however
I've just noticed that there is 'bin-install' phase right before it, so
I think an additional phase is not needed at all, the required
symlinking can be done in that 'bin-install' phase.
> + (with-directory-excursion
> + (string-append (assoc-ref outputs "out") "/bin")
> + (symlink "soffice" "libreoffice"))
> + #t)))
> #:configure-flags
> (list
> "--enable-release-build"
Previously I thought that libreoffice provides "bin/soffice" binary, so
I "voted" for a symlink (as it would simply be "libreoffice ->
soffice"). But now I see that "soffice" is a symlink created by
'bin-install' phase. So now I would just modify that phase like this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libreoffice-link.diff --]
[-- Type: text/x-diff, Size: 1072 bytes --]
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4..6391482 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -823,11 +823,12 @@ and to return information on pronunciations, meanings and synonyms.")
;; Create a symlink bin/soffice to the executable script.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
+ (bin (string-append out "/bin"))
+ (soffice (string-append
+ out "/lib/libreoffice/program/soffice")))
(mkdir bin)
- (symlink
- (string-append out "/lib/libreoffice/program/soffice")
- (string-append bin "/soffice")))
+ (symlink soffice (string-append bin "/soffice"))
+ (symlink soffice (string-append bin "/libreoffice")))
#t)))
#:configure-flags
(list
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
--
Alex
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 20:35 ` Alex Kost
@ 2016-12-06 20:42 ` ng0
2016-12-08 9:37 ` Alex Kost
0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-06 20:42 UTC (permalink / raw)
To: guix-devel
Alex Kost <alezost@gmail.com> writes:
> ng0 (2016-12-06 20:04 +0000) wrote:
>
>> * gnu/packages/libreoffice.scm (libreoffice)[arguments]: Create symlink to
>> libreoffice in new phase.
>> ---
>> gnu/packages/libreoffice.scm | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
>> index e02e4f4cd..5f1435745 100644
>> --- a/gnu/packages/libreoffice.scm
>> +++ b/gnu/packages/libreoffice.scm
>> @@ -2,6 +2,7 @@
>> ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
>> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
>> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>> +;;; Copyright © 2016 ng0 <ng0@libertad.pw>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -828,7 +829,15 @@ and to return information on pronunciations, meanings and synonyms.")
>> (symlink
>> (string-append out "/lib/libreoffice/program/soffice")
>> (string-append bin "/soffice")))
>> - #t)))
>> + #t))
>> + (add-after 'bin-install 'symlink-libreoffice
>> + ;; Create a symlink bin/libreoffice to the executable script.
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out")))
>
> This 'let*' is not needed (since you don't use 'out' variable), however
Oh, thanks for catching it.
> I've just noticed that there is 'bin-install' phase right before it, so
> I think an additional phase is not needed at all, the required
> symlinking can be done in that 'bin-install' phase.
Okay, I did not want to touch that because I did think for some
reason it should be separated, but what you provided as diff
further below looks better than my approach. I'd be okay with
this. My change is so small, you could probably create your own
patch and send it to this thread.
>
>> + (with-directory-excursion
>> + (string-append (assoc-ref outputs "out") "/bin")
>> + (symlink "soffice" "libreoffice"))
>> + #t)))
>> #:configure-flags
>> (list
>> "--enable-release-build"
>
> Previously I thought that libreoffice provides "bin/soffice" binary, so
> I "voted" for a symlink (as it would simply be "libreoffice ->
> soffice"). But now I see that "soffice" is a symlink created by
> 'bin-install' phase. So now I would just modify that phase like this:
>
> diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
> index e02e4f4..6391482 100644
> --- a/gnu/packages/libreoffice.scm
> +++ b/gnu/packages/libreoffice.scm
> @@ -823,11 +823,12 @@ and to return information on pronunciations, meanings and synonyms.")
> ;; Create a symlink bin/soffice to the executable script.
> (lambda* (#:key outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> - (bin (string-append out "/bin")))
> + (bin (string-append out "/bin"))
> + (soffice (string-append
> + out "/lib/libreoffice/program/soffice")))
> (mkdir bin)
> - (symlink
> - (string-append out "/lib/libreoffice/program/soffice")
> - (string-append bin "/soffice")))
> + (symlink soffice (string-append bin "/soffice"))
> + (symlink soffice (string-append bin "/libreoffice")))
> #t)))
> #:configure-flags
> (list
>
> --
> Alex
--
♥Ⓐ ng0 | ng0.chaosnet.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-06 20:42 ` ng0
@ 2016-12-08 9:37 ` Alex Kost
2016-12-08 22:48 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Alex Kost @ 2016-12-08 9:37 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
ng0 (2016-12-06 20:42 +0000) wrote:
> Alex Kost <alezost@gmail.com> writes:
[...]
>> I've just noticed that there is 'bin-install' phase right before it, so
>> I think an additional phase is not needed at all, the required
>> symlinking can be done in that 'bin-install' phase.
>
> Okay, I did not want to touch that because I did think for some
> reason it should be separated, but what you provided as diff
> further below looks better than my approach. I'd be okay with
> this. My change is so small, you could probably create your own
> patch and send it to this thread.
Since it's trivial, I committed it¹... but then I realized that
originally it was more like a question about adding 'libreoffice' link
along with the 'soffice' one. So I hope other people will not object
that there is 'bin/libreoffice' now :-)
¹ http://git.savannah.gnu.org/cgit/guix.git/commit/?id=cb72d34348998501c0dfa9f6ac4eb64bddd99fbf
--
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
2016-12-08 9:37 ` Alex Kost
@ 2016-12-08 22:48 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2016-12-08 22:48 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> ng0 (2016-12-06 20:42 +0000) wrote:
>
>> Alex Kost <alezost@gmail.com> writes:
> [...]
>>> I've just noticed that there is 'bin-install' phase right before it, so
>>> I think an additional phase is not needed at all, the required
>>> symlinking can be done in that 'bin-install' phase.
>>
>> Okay, I did not want to touch that because I did think for some
>> reason it should be separated, but what you provided as diff
>> further below looks better than my approach. I'd be okay with
>> this. My change is so small, you could probably create your own
>> patch and send it to this thread.
>
> Since it's trivial, I committed it¹... but then I realized that
> originally it was more like a question about adding 'libreoffice' link
> along with the 'soffice' one. So I hope other people will not object
> that there is 'bin/libreoffice' now :-)
Sounds good to me, thanks! :-)
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-12-08 22:48 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 12:25 [PATCH] Add libreoffice symlink to libreoffice ng0
2016-12-05 12:25 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
2016-12-05 12:40 ` Hartmut Goebel
2016-12-05 14:16 ` ng0
2016-12-06 10:42 ` Hartmut Goebel
2016-12-06 18:54 ` Alex Kost
2016-12-06 19:52 ` [PATCH] libreoffice symlink, v2 ng0
2016-12-06 19:52 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
2016-12-06 20:04 ` [PATCH] libreoffice symlink, v3 ng0
2016-12-06 20:04 ` [PATCH] gnu: libreoffice: Add 'libreoffice' symlink ng0
2016-12-06 20:35 ` Alex Kost
2016-12-06 20:42 ` ng0
2016-12-08 9:37 ` Alex Kost
2016-12-08 22:48 ` 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.