unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Inkscape 1.0 upgrade
@ 2020-05-06 18:20 Ekaitz Zarraga
  2020-05-06 21:54 ` Nicolò Balzarotti
  0 siblings, 1 reply; 4+ messages in thread
From: Ekaitz Zarraga @ 2020-05-06 18:20 UTC (permalink / raw)
  To: guix-devel@gnu.org

Hi all,

With the release of the 1.0 version of Inkscape I wanted to update our package and I'm encountering some problems I'm unable to solve myself.

First, it depends on GDL (Gnome Devtool Libraries) which is not included in Guix so I'm packaging that too. I found an issue I don't know how to solve on it:

GDL makes its bootstrap with this ./autogen.sh:
  https://gitlab.gnome.org/GNOME/gdl/-/blob/master/autogen.sh

That autogen is calling gnome-common's (gnome-common is already on guix) autogen for everything else but, even if I'm able to patch the autogen from GDL to find the correct `sh`, gnome-common's one is still failing because it's looking for `/bin/sh`. I don't find any way to solve this.

Ideas?

Thanks!

This is the GDL package I have at the moment:

(define-public gdl
  (package
    (name "gdl")
    (version "GDL_3_34_0")
    (source (origin
                (method git-fetch)
                (uri (git-reference
                       (url "https://gitlab.gnome.org/GNOME/gdl.git")
                       (commit version)))
                (sha256
                  (base32 "154qcr0x6f68f4q526y87imv0rscmp34n47nk1pp82rsq52h2zna"))))

    (build-system gnu-build-system)
    (inputs `())
    (native-inputs `(("gnome-common" ,gnome-common)
                    ("autoconf" ,autoconf)
                    ("automake" ,automake)
                    ("libtool" ,libtool)
                    ("intltool" ,intltool)
                    ("pkg-config" ,pkg-config)
                    ("gtk-doc" ,gtk-doc)
                    ("which" ,which)))
    (arguments
       `(#:phases
        (modify-phases %standard-phases
         (add-after 'unpack 'autogen
           (lambda _
             (with-directory-excursion "."
                 (for-each make-file-writable (find-files "." ".*"))
                 ;; Use autogen so that 'configure' works.
                 (substitute* "autogen.sh" (("/bin/sh") (which "sh")))
                 (setenv "CONFIG_SHELL" (which "sh"))
                 (invoke "./autogen.sh"))
             #t)))))
    (home-page "...")
    (synopsis "...")
    (description "...")
    (license license:lgpl3+)))


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

* Re: Inkscape 1.0 upgrade
  2020-05-06 18:20 Inkscape 1.0 upgrade Ekaitz Zarraga
@ 2020-05-06 21:54 ` Nicolò Balzarotti
  2020-05-07  4:39   ` Maxim Cournoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolò Balzarotti @ 2020-05-06 21:54 UTC (permalink / raw)
  To: Ekaitz Zarraga, guix-devel@gnu.org

Hi, I wanted the same. My package is working but I cannot replace the
current inkscape as there's a dependency loop, so I called it
inkscape-1.0.  But in today's blogpost Ludo installed inkscape 1.0, so
maybe he already solved it.  Here's my working definition btw, if you
want to submit it please go ahead :)

Nicolò
[1] https://guix.gnu.org/blog/2020/grafts-continued/

(define-public libgdl
  (package
    (name "libgdl")
    (version "3.34.0")
    (source (origin
	      (method url-fetch)
	      (uri (string-append "mirror://gnome/sources/gdl/"
                           (version-major+minor version)  "/gdl-"
			   version ".tar.xz"))
	      (sha256
	       (base32
		"00ldva6wg6s4wlxmisiqzyz8ihsprra7sninx2rlqk6frpq312w5"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("automake" ,automake)
       ("autoconf" ,autoconf)
       ("intltool" ,intltool)
       ("libtool" ,libtool) 
       ("pkg-config" ,pkg-config)
       ("gtk-doc" ,gtk-doc)
       ("gtk+" ,gtk+)
       ("which" ,which)))
    (inputs
     `(
       ("libxml2" ,libxml2)
       ;; ("boost" ,boost)
       ))
    ;; (native-inputs
    ;;  `(("intltool" ,intltool)
    ;;    ("glib" ,glib "bin")
    ;;    ("perl" ,perl)
    ;;    ("pkg-config" ,pkg-config)))
    ;; (arguments
    ;;  `(#:phases
    ;;    (modify-phases %standard-phases
    ;; 	 (add-before 'bootstrap 'disable-maintainer-mode
    ;; 	   (lambda _
    ;; 	     (substitute* "autogen.sh"
    ;; 	       (("/bin/sh") (which "sh")))
    ;; 	     #t))
    ;; 	 (replace 'bootstrap
    ;; 	   (lambda _
    ;; 	     (system* "./autogen.sh")
    ;; 	     (substitute* "./configure"
    ;; 	       (("/bin/sh") (which "sh")))
    ;; 	     (invoke "./autogen.sh")
    ;; 	     #t)))))
    (home-page "https://inkscape.org/")
    (synopsis "Vector graphics editor")
    (description "Inkscape is a vector graphics editor.  What sets Inkscape
apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
as the native format.")
    (license license:gpl2+)))

(define-public inkscape-1.0
  (package
    (name "inkscape")
    (version "1.0")
    (source (origin
	      (method git-fetch)
	      (uri (git-reference
		    (url "https://gitlab.com/inkscape/inkscape.git")
		    (commit "INKSCAPE_1_0")
		    (recursive? #t)))
	      ;; (patches (search-patches "inkscape-poppler-0.76.patch"))
	      (sha256
	       (base32
		"119j1yhjgjh49dhlxzy9xmprkgw2d8q8ypvr23wac0ppv2kklp57"))))
    (build-system cmake-build-system)
    (inputs
     `(("aspell" ,aspell)
       ("double-conversion" ,double-conversion)
       ("gtkmm" ,gtkmm)
       ("gtk" ,gtk+)
       ("gsl" ,gsl)
       ("poppler" ,poppler)
       ("libpng" ,libpng)
       ("libxml2" ,libxml2)
       ("libxslt" ,libxslt)
       ("libgc" ,libgc)
       ("libgdl" ,libgdl)
       ("libjpeg" ,libjpeg)
       ("libsoup" ,libsoup)
       ("libvisio" ,libvisio)
       ("libwpg" ,libwpg)
       ("libwpd" ,libwpd)
       ("libcdr" ,libcdr)
       ("freetype" ,freetype)
       ("gtkspell3" ,gtkspell3)
       ("imagemagick" ,imagemagick)
       ("popt" ,popt)
       ("potrace" ,potrace)
       ("python" ,python-3)
       ("lcms" ,lcms)
       ("boost" ,boost)))
    (native-inputs
     `(("intltool" ,intltool)
       ("glib" ,glib "bin")
       ("googletest" ,googletest)
       ("perl" ,perl)
       ("pkg-config" ,pkg-config)))
    (arguments
     ;; RE-enable 
     `(#:tests? #f
       ;; Defaults to RelWithDebInfo
       #:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
       #:phases
       (modify-phases %standard-phases
	 ;; (add-after 'unpack 'patch-icon-cache-generator
	 ;;   (lambda _
	 ;;     (substitute* "share/icons/application/CMakeLists.txt"
	 ;;       (("gtk-update-icon-cache") "true"))
	 ;;     #t))
	 (add-before 'configure 'dont-use-system-includes
	   (lambda _
	     ;; Don't add redundant -isystem includes which confuses GCC7.
	     (substitute* "CMakeScripts/DefineDependsandFlags.cmake"
	       (("include_directories\\(SYSTEM")
	 	"include_directories("))
	     #t))
	 (add-before 'configure 'dont-use-werror-format
	   (lambda _
	     ;; Don't add redundant -isystem includes which confuses GCC7.
	     (substitute* "CMakeScripts/DefineDependsandFlags.cmake"
	       (("-Werror=format\"") "\"")
	       (("-Werror=format-security\"") "\""))
	     #t)))))
    (home-page "https://inkscape.org/")
    (synopsis "Vector graphics editor")
    (description "Inkscape is a vector graphics editor.  What sets Inkscape
apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
as the native format.")
    (license license:gpl2+)))

Ekaitz Zarraga <ekaitz@elenq.tech> writes:

> Hi all,
>
> With the release of the 1.0 version of Inkscape I wanted to update our package and I'm encountering some problems I'm unable to solve myself.
>
> First, it depends on GDL (Gnome Devtool Libraries) which is not included in Guix so I'm packaging that too. I found an issue I don't know how to solve on it:
>
> GDL makes its bootstrap with this ./autogen.sh:
>   https://gitlab.gnome.org/GNOME/gdl/-/blob/master/autogen.sh
>
> That autogen is calling gnome-common's (gnome-common is already on guix) autogen for everything else but, even if I'm able to patch the autogen from GDL to find the correct `sh`, gnome-common's one is still failing because it's looking for `/bin/sh`. I don't find any way to solve this.
>
> Ideas?
>
> Thanks!
>
> This is the GDL package I have at the moment:
>
> (define-public gdl
>   (package
>     (name "gdl")
>     (version "GDL_3_34_0")
>     (source (origin
>                 (method git-fetch)
>                 (uri (git-reference
>                        (url "https://gitlab.gnome.org/GNOME/gdl.git")
>                        (commit version)))
>                 (sha256
>                   (base32 "154qcr0x6f68f4q526y87imv0rscmp34n47nk1pp82rsq52h2zna"))))
>
>     (build-system gnu-build-system)
>     (inputs `())
>     (native-inputs `(("gnome-common" ,gnome-common)
>                     ("autoconf" ,autoconf)
>                     ("automake" ,automake)
>                     ("libtool" ,libtool)
>                     ("intltool" ,intltool)
>                     ("pkg-config" ,pkg-config)
>                     ("gtk-doc" ,gtk-doc)
>                     ("which" ,which)))
>     (arguments
>        `(#:phases
>         (modify-phases %standard-phases
>          (add-after 'unpack 'autogen
>            (lambda _
>              (with-directory-excursion "."
>                  (for-each make-file-writable (find-files "." ".*"))
>                  ;; Use autogen so that 'configure' works.
>                  (substitute* "autogen.sh" (("/bin/sh") (which "sh")))
>                  (setenv "CONFIG_SHELL" (which "sh"))
>                  (invoke "./autogen.sh"))
>              #t)))))
>     (home-page "...")
>     (synopsis "...")
>     (description "...")
>     (license license:lgpl3+)))


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

* Re: Inkscape 1.0 upgrade
  2020-05-06 21:54 ` Nicolò Balzarotti
@ 2020-05-07  4:39   ` Maxim Cournoyer
  2020-05-07  9:21     ` Ekaitz Zarraga
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Cournoyer @ 2020-05-07  4:39 UTC (permalink / raw)
  To: Nicolò Balzarotti; +Cc: guix-devel@gnu.org

Hello!

It seems we're now at least 3 people to have worked toward Inkscape 1.0
:-).  I've posted a patch series adding a Inkscape 1.0 and various other
dependencies at http://bugs.gnu.org/41118, if you'd like to compare.

Nicolò Balzarotti <anothersms@gmail.com> writes:

> Hi, I wanted the same. My package is working but I cannot replace the
> current inkscape as there's a dependency loop, so I called it
> inkscape-1.0.

The loop was caused by the gtk-doc package part of gdl.  I've worked
around this by creating a gdl-minimal package, which doesn't include
such input.

> But in today's blogpost Ludo installed inkscape 1.0, so
> maybe he already solved it.  Here's my working definition btw, if you
> want to submit it please go ahead :)

He's confirmed that this was aspirational.  The version seen in the
derivation output is what is in master :-).

> Nicolò
> [1] https://guix.gnu.org/blog/2020/grafts-continued/
>
> (define-public libgdl
>   (package
>     (name "libgdl")
>     (version "3.34.0")
>     (source (origin
> 	      (method url-fetch)
> 	      (uri (string-append "mirror://gnome/sources/gdl/"
>                            (version-major+minor version)  "/gdl-"
> 			   version ".tar.xz"))
> 	      (sha256
> 	       (base32
> 		"00ldva6wg6s4wlxmisiqzyz8ihsprra7sninx2rlqk6frpq312w5"))))
>     (build-system gnu-build-system)
>     (native-inputs
>      `(("automake" ,automake)
>        ("autoconf" ,autoconf)
>        ("intltool" ,intltool)
>        ("libtool" ,libtool)
>        ("pkg-config" ,pkg-config)
>        ("gtk-doc" ,gtk-doc)
>        ("gtk+" ,gtk+)

gtk+ should be propagated in this case, because it is marked as
"Required" in the pkg-config gdl-3.0.pc file.

>        ("which" ,which)))
>     (inputs
>      `(
>        ("libxml2" ,libxml2)
>        ;; ("boost" ,boost)
>        ))
>     ;; (native-inputs
>     ;;  `(("intltool" ,intltool)
>     ;;    ("glib" ,glib "bin")
>     ;;    ("perl" ,perl)
>     ;;    ("pkg-config" ,pkg-config)))
>     ;; (arguments
>     ;;  `(#:phases
>     ;;    (modify-phases %standard-phases
>     ;; 	 (add-before 'bootstrap 'disable-maintainer-mode
>     ;; 	   (lambda _
>     ;; 	     (substitute* "autogen.sh"
>     ;; 	       (("/bin/sh") (which "sh")))
>     ;; 	     #t))
>     ;; 	 (replace 'bootstrap
>     ;; 	   (lambda _
>     ;; 	     (system* "./autogen.sh")
>     ;; 	     (substitute* "./configure"
>     ;; 	       (("/bin/sh") (which "sh")))
>     ;; 	     (invoke "./autogen.sh")

I remember struggling with this as well, and found some neat example
somewhere else in our package collection that causes the gnome-common
autogen.sh to *not* run configure itself.  This is done by setting
NOCONFIGURE before invoking autogen.sh.

>     ;; 	     #t)))))
>     (home-page "https://inkscape.org/")
>     (synopsis "Vector graphics editor")
>     (description "Inkscape is a vector graphics editor.  What sets Inkscape
> apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
> as the native format.")
>     (license license:gpl2+)))

It seems this part was not finished :-)

>
> (define-public inkscape-1.0
>   (package
>     (name "inkscape")
>     (version "1.0")
>     (source (origin
> 	      (method git-fetch)
> 	      (uri (git-reference
> 		    (url "https://gitlab.com/inkscape/inkscape.git")
> 		    (commit "INKSCAPE_1_0")
> 		    (recursive? #t)))

When using recursive, this usually means there are bundled libraries,
which calls for a justification or FIXME comment.

> 	      ;; (patches (search-patches "inkscape-poppler-0.76.patch"))

This patch is no longer needed

> 	      (sha256
> 	       (base32
> 		"119j1yhjgjh49dhlxzy9xmprkgw2d8q8ypvr23wac0ppv2kklp57"))))
>     (build-system cmake-build-system)
>     (inputs
>      `(("aspell" ,aspell)
>        ("double-conversion" ,double-conversion)
>        ("gtkmm" ,gtkmm)
>        ("gtk" ,gtk+)
>        ("gsl" ,gsl)
>        ("poppler" ,poppler)
>        ("libpng" ,libpng)
>        ("libxml2" ,libxml2)
>        ("libxslt" ,libxslt)
>        ("libgc" ,libgc)
>        ("libgdl" ,libgdl)
>        ("libjpeg" ,libjpeg)

I think libjpeg is deprecated in favor of libjpeg-turbo, at least in
core-updates.

>        ("libsoup" ,libsoup)

I've used libsoup-minimal here, I don't remember if there was a cycle
problem otherwise.

>        ("libvisio" ,libvisio)
>        ("libwpg" ,libwpg)
>        ("libwpd" ,libwpd)
>        ("libcdr" ,libcdr)
>        ("freetype" ,freetype)
>        ("gtkspell3" ,gtkspell3)

I've missed the gtkspell3, libcdr, libwpd, libwpg and libvisio optional
dependencies.  I'll add them, as we usually try to support as much
features as we can in the Guix packages.  Nice!

>        ("imagemagick" ,imagemagick)
>        ("popt" ,popt)
>        ("potrace" ,potrace)
>        ("python" ,python-3)
>        ("lcms" ,lcms)
>        ("boost" ,boost)))
>     (native-inputs
>      `(("intltool" ,intltool)
>        ("glib" ,glib "bin")
>        ("googletest" ,googletest)
>        ("perl" ,perl)
>        ("pkg-config" ,pkg-config)))
>     (arguments
>      ;; RE-enable
>      `(#:tests? #f

Next time, please eave a comment saying why the test suite is disabled.  I've managed to
have the test run in my series; it was a bit of a pain :-).

>        ;; Defaults to RelWithDebInfo
>        #:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
>        #:phases
>        (modify-phases %standard-phases
> 	 ;; (add-after 'unpack 'patch-icon-cache-generator
> 	 ;;   (lambda _
> 	 ;;     (substitute* "share/icons/application/CMakeLists.txt"
> 	 ;;       (("gtk-update-icon-cache") "true"))
> 	 ;;     #t))
> 	 (add-before 'configure 'dont-use-system-includes
> 	   (lambda _
> 	     ;; Don't add redundant -isystem includes which confuses GCC7.
> 	     (substitute* "CMakeScripts/DefineDependsandFlags.cmake"
> 	       (("include_directories\\(SYSTEM")
> 	 	"include_directories("))
> 	     #t))
> 	 (add-before 'configure 'dont-use-werror-format
> 	   (lambda _
> 	     ;; Don't add redundant -isystem includes which confuses GCC7.
> 	     (substitute* "CMakeScripts/DefineDependsandFlags.cmake"
> 	       (("-Werror=format\"") "\"")
> 	       (("-Werror=format-security\"") "\""))
> 	     #t)))))

These two new phases are not needed when working on core-updates (which
will soon be merged into master), as the CPATH problem is resolved there
(we're now back to using C_INCLUDE_PATH and CPLUS_INCLUDE_PATH).

>     (home-page "https://inkscape.org/")
>     (synopsis "Vector graphics editor")
>     (description "Inkscape is a vector graphics editor.  What sets Inkscape
> apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
> as the native format.")
>     (license license:gpl2+)))
>
> Ekaitz Zarraga <ekaitz@elenq.tech> writes:

Thanks for sharing this patch!

Maxim


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

* Re: Inkscape 1.0 upgrade
  2020-05-07  4:39   ` Maxim Cournoyer
@ 2020-05-07  9:21     ` Ekaitz Zarraga
  0 siblings, 0 replies; 4+ messages in thread
From: Ekaitz Zarraga @ 2020-05-07  9:21 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel\@gnu.org, Nicolò Balzarotti

Hi,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, May 7, 2020 6:39 AM, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Hello!
>
> It seems we're now at least 3 people to have worked toward Inkscape 1.0
> :-). I've posted a patch series adding a Inkscape 1.0 and various other
> ...

Thanks for the explanations given! I learned a lot from them.

Seeing yours is already working I'll leave mine :)

Thank you!



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

end of thread, other threads:[~2020-05-07  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-06 18:20 Inkscape 1.0 upgrade Ekaitz Zarraga
2020-05-06 21:54 ` Nicolò Balzarotti
2020-05-07  4:39   ` Maxim Cournoyer
2020-05-07  9:21     ` Ekaitz Zarraga

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).