unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#59725] [PATCH] gnu: paulxstretch: Fix paths
@ 2022-11-30 15:04 Sughosha via Guix-patches via
  2023-01-05 21:48 ` Ludovic Courtès
  2023-01-06 13:27 ` [bug#59725] [PATCH v2] " Sughosha via Guix-patches via
  0 siblings, 2 replies; 6+ messages in thread
From: Sughosha via Guix-patches via @ 2022-11-30 15:04 UTC (permalink / raw)
  To: 59725

* gnu/packages/music.scm (paulxstretch): Fix paths.
[arguments]: Add phase fix-paths.
[inputs]: Add dconf and glib:bin.
---
 gnu/packages/music.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b69ad2e517..eb15a9f825 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2481,6 +2481,20 @@ (define-public paulxstretch
      (list #:tests? #f                            ;no test suite
            #:phases
            #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-paths
+                          (lambda _
+                            (substitute* "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
+                              (("/usr/include/freetype2")
+                               (string-append #$freetype "/include/freetype")))
+                            (substitute* "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
+                              (("/etc/fonts")
+                               (string-append #$fontconfig "/etc/fonts")))
+                            (substitute* "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
+                              (("/usr/bin/dconf")
+                               (string-append #$dconf "/bin/dconf"))
+                              (("/usr/bin/gsettings")
+                               (string-append (ungexp glib "bin")
+                                              "/bin/gsettings")))))
                (replace 'install
                  (lambda _
                    (let* ((bin (string-append #$output "/bin"))
@@ -2507,6 +2521,8 @@ (define-public paulxstretch
     (native-inputs (list pkg-config))
     (inputs (list alsa-lib
                   curl
+                  dconf
+                  `(,glib "bin")
                   fftwf
                   freetype
                   jack-1
-- 
2.38.1





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

* [bug#59725] [PATCH] gnu: paulxstretch: Fix paths
  2022-11-30 15:04 [bug#59725] [PATCH] gnu: paulxstretch: Fix paths Sughosha via Guix-patches via
@ 2023-01-05 21:48 ` Ludovic Courtès
  2023-01-06 13:27 ` [bug#59725] [PATCH v2] " Sughosha via Guix-patches via
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2023-01-05 21:48 UTC (permalink / raw)
  To: Sughosha; +Cc: 59725

Hi Sughosha,

Apologies for the delay!

Sughosha <Sughosha@proton.me> skribis:

> * gnu/packages/music.scm (paulxstretch): Fix paths.
> [arguments]: Add phase fix-paths.
> [inputs]: Add dconf and glib:bin.

That’s a welcome fix.

>             #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-paths
> +                          (lambda _
> +                            (substitute* "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
> +                              (("/usr/include/freetype2")
> +                               (string-append #$freetype "/include/freetype")))
> +                            (substitute* "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
> +                              (("/etc/fonts")
> +                               (string-append #$fontconfig "/etc/fonts")))
> +                            (substitute* "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
> +                              (("/usr/bin/dconf")
> +                               (string-append #$dconf "/bin/dconf"))
> +                              (("/usr/bin/gsettings")
> +                               (string-append (ungexp glib "bin")
> +                                              "/bin/gsettings")))))

Could you avoid direct references to packages like #$freetype and
instead use ‘search-input-file’ and ‘search-input-directory’?

  (search-input-directory inputs "/etc/fonts")
  (search-input-file inputs "/bin/gsettings")
  …

There are examples in the repo on how to use them.

Could you send a v2 of the patch to 59725@debbugs.gnu.org?

Thanks in advance,
Ludo’.




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

* [bug#59725] [PATCH v2] gnu: paulxstretch: Fix paths.
  2022-11-30 15:04 [bug#59725] [PATCH] gnu: paulxstretch: Fix paths Sughosha via Guix-patches via
  2023-01-05 21:48 ` Ludovic Courtès
@ 2023-01-06 13:27 ` Sughosha via Guix-patches via
  2023-01-31  5:51   ` [bug#59725] [PATCH] " 宋文武 via Guix-patches via
  2023-03-21 13:40   ` bug#59725: " Maxim Cournoyer
  1 sibling, 2 replies; 6+ messages in thread
From: Sughosha via Guix-patches via @ 2023-01-06 13:27 UTC (permalink / raw)
  To: 59725@debbugs.gnu.org

This method seems more precise, since if the file or directory does not exist, build fails.

* gnu/packages/music.scm (paulxstretch): Fix paths.
  [arguments]: Add fix-paths phase.
  [inputs]: Add dconf and glib:bin.
---
 gnu/packages/music.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5be767a138..bdd856396d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2481,6 +2481,23 @@ (define-public paulxstretch
      (list #:tests? #f                            ;no test suite
            #:phases
            #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute*
+                    "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
+                     (("/usr/include/freetype2")
+                      (search-input-directory inputs "/include/freetype2")))
+                   (substitute*
+                    "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
+                     (("/etc/fonts")
+                      (search-input-directory inputs "/etc/fonts")))
+                   (substitute*
+                    "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
+                     (("/usr/bin/dconf")
+                      (search-input-file inputs "/bin/dconf"))
+                     (("/usr/bin/gsettings")
+                      (search-input-file inputs "/bin/gsettings")))))
+                    
                (replace 'install
                  (lambda _
                    (let* ((bin (string-append #$output "/bin"))
@@ -2507,8 +2524,11 @@ (define-public paulxstretch
     (native-inputs (list pkg-config))
     (inputs (list alsa-lib
                   curl
+                  dconf
                   fftwf
+                  fontconfig
                   freetype
+                  `(,glib "bin")
                   jack-1
                   libx11
                   libxcursor
-- 
2.38.1





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

* [bug#59725] [PATCH] gnu: paulxstretch: Fix paths
  2023-01-06 13:27 ` [bug#59725] [PATCH v2] " Sughosha via Guix-patches via
@ 2023-01-31  5:51   ` 宋文武 via Guix-patches via
  2023-02-06 22:49     ` Sughosha via Guix-patches via
  2023-03-21 13:40   ` bug#59725: " Maxim Cournoyer
  1 sibling, 1 reply; 6+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-01-31  5:51 UTC (permalink / raw)
  To: Sughosha; +Cc: 59725@debbugs.gnu.org

Sughosha <Sughosha@proton.me> writes:

> This method seems more precise, since if the file or directory does not exist, build fails.
>
> * gnu/packages/music.scm (paulxstretch): Fix paths.
>   [arguments]: Add fix-paths phase.
>   [inputs]: Add dconf and glib:bin.

Hello, paulxstretch will "Segmentation fault" with or without this
patch.  I think that's due to "DynamicLibrary" usages in juce, also it's
better to package juce standalone to get rid of the bundled one from
paulxstretch.




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

* [bug#59725] [PATCH] gnu: paulxstretch: Fix paths
  2023-01-31  5:51   ` [bug#59725] [PATCH] " 宋文武 via Guix-patches via
@ 2023-02-06 22:49     ` Sughosha via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: Sughosha via Guix-patches via @ 2023-02-06 22:49 UTC (permalink / raw)
  To: 59725@debbugs.gnu.org; +Cc: 宋文武

宋文武 <iyzsong@envs.net> wrote:

> Hello, paulxstretch will "Segmentation fault" with or without this
> patch. I think that's due to "DynamicLibrary" usages in juce, also it's
> better to package juce standalone to get rid of the bundled one from
> paulxstretch.

I don't know why paulxstretch gives "Segmentation fault" error. If I build
it locally (not as a guix package) inside a guix development shell, I don't
get this error. But anyways, even though the executable binary fails to
start, at least the vst plugin works well.




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

* bug#59725: [PATCH] gnu: paulxstretch: Fix paths
  2023-01-06 13:27 ` [bug#59725] [PATCH v2] " Sughosha via Guix-patches via
  2023-01-31  5:51   ` [bug#59725] [PATCH] " 宋文武 via Guix-patches via
@ 2023-03-21 13:40   ` Maxim Cournoyer
  1 sibling, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2023-03-21 13:40 UTC (permalink / raw)
  To: Sughosha; +Cc: 59725@debbugs.gnu.org

Hi,

Sughosha <Sughosha@proton.me> writes:

> This method seems more precise, since if the file or directory does not exist, build fails.

It also allows Guix users to rewrite package inputs, contrary to the
previous approach which would have hard-coded the references to the
package variables in a definitive way.

> * gnu/packages/music.scm (paulxstretch): Fix paths.
>   [arguments]: Add fix-paths phase.
>   [inputs]: Add dconf and glib:bin.

I've modified the commit message like so:

--8<---------------cut here---------------start------------->8---
gnu: paulxstretch: Patch paths.

* gnu/packages/music.scm (paulxstretch) [arguments]: Add patch-paths phase.
[inputs]: Add dconf, fontconfig and glib:bin.
--8<---------------cut here---------------end--------------->8---

Capitalizing the sentence following the ':', removing the hanging indent
in the GNU Changelog commit message, and adding the missing fontconfig.

> ---
>  gnu/packages/music.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 5be767a138..bdd856396d 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -2481,6 +2481,23 @@ (define-public paulxstretch
>       (list #:tests? #f                            ;no test suite
>             #:phases
>             #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-paths
> +                 (lambda* (#:key inputs #:allow-other-keys)
> +                   (substitute*
> +                    "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
> +                     (("/usr/include/freetype2")
> +                      (search-input-directory inputs "/include/freetype2")))
> +                   (substitute*
> +                    "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
> +                     (("/etc/fonts")
> +                      (search-input-directory inputs "/etc/fonts")))
> +                   (substitute*
> +                    "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
> +                     (("/usr/bin/dconf")
> +                      (search-input-file inputs "/bin/dconf"))
> +                     (("/usr/bin/gsettings")
> +                      (search-input-file inputs "/bin/gsettings")))))
> +                    
>                 (replace 'install
>                   (lambda _
>                     (let* ((bin (string-append #$output "/bin"))
> @@ -2507,8 +2524,11 @@ (define-public paulxstretch
>      (native-inputs (list pkg-config))
>      (inputs (list alsa-lib
>                    curl
> +                  dconf
>                    fftwf
> +                  fontconfig
>                    freetype
> +                  `(,glib "bin")
>                    jack-1
>                    libx11
>                    libxcursor

Applied, after breaking some long lines to fit under 80 chars.

As others reported, there is still the segfault when running the binary,
but at least this probably brings us closer to something that fully works.

Let's open other issues for the remaining problems found.

-- 
Thanks,
Maxim




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

end of thread, other threads:[~2023-03-21 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 15:04 [bug#59725] [PATCH] gnu: paulxstretch: Fix paths Sughosha via Guix-patches via
2023-01-05 21:48 ` Ludovic Courtès
2023-01-06 13:27 ` [bug#59725] [PATCH v2] " Sughosha via Guix-patches via
2023-01-31  5:51   ` [bug#59725] [PATCH] " 宋文武 via Guix-patches via
2023-02-06 22:49     ` Sughosha via Guix-patches via
2023-03-21 13:40   ` bug#59725: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).