* libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix?
@ 2016-06-17 17:56 Danny Milosavljevic
2016-06-18 7:47 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Danny Milosavljevic @ 2016-06-17 17:56 UTC (permalink / raw)
To: guix-devel
Hi,
I'm trying to package libgit2-glib and gnome-builder.
- libgit2 has openssl as input.
- libgit2-glib installs a pkg-config file.
- gnome-builder uses libgit2-glib .
Something always complains about missing openssl parts.
For example I can get
Package 'openssl', required by 'libgit2', not found
when building libgit2-glib.
Almost whatever else I do instead, the error wanders around in the DAG.
In order to make it work I added openssl as a propagated input in libgit2-glib. This does work.
But is it the right fix?
Preliminary patch see below (don't commit it!):
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 74c4be6..fd3e75b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -115,6 +115,7 @@
#:use-module (gnu packages samba)
#:use-module (gnu packages readline)
#:use-module (gnu packages fonts)
+ #:use-module (gnu packages version-control)
#:use-module (srfi srfi-1))
(define-public brasero
@@ -1960,6 +1961,41 @@ various wrappers for the complex data types employed by JSON, such as arrays
and objects.")
(license license:lgpl2.1+)))
+(define-public libgit2-glib
+ (package
+ (name "libgit2-glib")
+ (version "0.24.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0ia81xlyf6qmyl89ql663piliyjmhnzrshd6q66zya0wh9lc45nn"))
+ (modules '((guix build utils)))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal
+ ("gobject-introspection" ,gobject-introspection)
+ ("pkg-config" ,pkg-config)))
+ (propagated-inputs
+ `(("glib" ,glib)
+ ("libgit2" ,libgit2)
+ ("openssl" ,openssl) ; actually, this is already needed by libgit2 itself.
+))
+ (inputs
+ `(
+ ("zlib" ,zlib)
+ ("libssh2" ,libssh2)
+ ; Note: make dist would need gtk-doc
+))
+ (home-page "https://wiki.gnome.org/Projects/Libgit2-glib")
+ (synopsis "Git-GLib wrapper")
+ (description
+ "GIT-GLib is a C library based on GLib providing Git support.")
+ (license license:lgpl2.1+)))
+
(define-public libxklavier
(package
(name "libxklavier")
@@ -5386,3 +5422,35 @@ compiled.")
GLib/GObject code.")
(home-page "https://wiki.gnome.org/Projects/GFBGraph")
(license license:lgpl2.1+)))
+
+(define-public gnome-builder
+ (package
+ (name "gnome-builder")
+ (version "3.18.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0z20wlv1i6w1srrmkabqxqx2rzkp4d4n7s28ax5a936g1li9a72h"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("glib:bin" ,glib "bin") ; glib-compile-schemas, etc.
+ ("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection)))
+ (inputs
+ `(("glib" ,glib)
+ ("gtk+" ,gtk+)
+ ("gtksourceview" ,gtksourceview)
+ ("libgit2-glib" ,libgit2-glib)
+ ("libpeas" ,libpeas)))
+ (synopsis "General-Purpose Integrated Development Environment")
+ (description "GNOME Builder ...")
+ (home-page "https://wiki.gnome.org/Apps/Builder")
+ (license license:gpl3)
+))
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix?
2016-06-17 17:56 libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix? Danny Milosavljevic
@ 2016-06-18 7:47 ` Ricardo Wurmus
2016-06-18 9:10 ` Danny Milosavljevic
2016-06-18 9:16 ` Danny Milosavljevic
0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-18 7:47 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Danny Milosavljevic <dannym@scratchpost.org> writes:
> I'm trying to package libgit2-glib and gnome-builder.
>
> - libgit2 has openssl as input.
> - libgit2-glib installs a pkg-config file.
> - gnome-builder uses libgit2-glib .
>
> Something always complains about missing openssl parts.
>
> For example I can get
> Package 'openssl', required by 'libgit2', not found
> when building libgit2-glib.
>
> Almost whatever else I do instead, the error wanders around in the DAG.
>
> In order to make it work I added openssl as a propagated input in libgit2-glib. This does work.
>
> But is it the right fix?
This depends on the pkg-config file that the library installs. If this
file contains a section that lists other libraries as private, then
propagation is probably the correct approach.
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix?
2016-06-18 7:47 ` Ricardo Wurmus
@ 2016-06-18 9:10 ` Danny Milosavljevic
2016-06-19 13:53 ` Ludovic Courtès
2016-06-18 9:16 ` Danny Milosavljevic
1 sibling, 1 reply; 5+ messages in thread
From: Danny Milosavljevic @ 2016-06-18 9:10 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
On Sat, 18 Jun 2016 09:47:19 +0200
Ricardo Wurmus <rekado@elephly.net> wrote:
> This depends on the pkg-config file that the library installs. If this
> file contains a section that lists other libraries as private, then
> propagation is probably the correct approach.
See <https://github.com/libgit2/libgit2/blob/master/libgit2.pc.in>
Name: libgit2
Description: The git library, take 2
Version: @LIBGIT2_VERSION_STRING@
Libs: -L"${libdir}" -lgit2
Libs.private: @LIBGIT2_PC_LIBS@
Requires.private: @LIBGIT2_PC_REQUIRES@
Cflags: -I${includedir}
And in the CMakeLists.txt :
IF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
LIST(APPEND LIBGIT2_PC_LIBS "-lssl")
ELSE()
SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} openssl")
ENDIF ()
So I take it that it should have been a propagated-input in libgit2 itself already, right?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix?
2016-06-18 7:47 ` Ricardo Wurmus
2016-06-18 9:10 ` Danny Milosavljevic
@ 2016-06-18 9:16 ` Danny Milosavljevic
1 sibling, 0 replies; 5+ messages in thread
From: Danny Milosavljevic @ 2016-06-18 9:16 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Also, it seems the only thing libgit2 uses openssl for is for the SHA1 hash. But there's also a builtin SHA1 hash in libgit2 under src/hash/hash_generic.c which we could use instead - should we?
It seems that Apple already deprecated OpenSSL so the support for libgit2 without OpenSSL should be fine.
There's a check in CMakeFiles.txt for SHA1_TYPE=builtin . I'm not well-versed in cmake, however, so no idea how to set that.
Also, USE_OPENSSL defaults to ON. That's an externally-visible option. I would know how to set that to OFF.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix?
2016-06-18 9:10 ` Danny Milosavljevic
@ 2016-06-19 13:53 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2016-06-19 13:53 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Danny Milosavljevic <dannym@scratchpost.org> skribis:
> On Sat, 18 Jun 2016 09:47:19 +0200
> Ricardo Wurmus <rekado@elephly.net> wrote:
>
>> This depends on the pkg-config file that the library installs. If this
>> file contains a section that lists other libraries as private, then
>> propagation is probably the correct approach.
>
> See <https://github.com/libgit2/libgit2/blob/master/libgit2.pc.in>
>
> Name: libgit2
> Description: The git library, take 2
> Version: @LIBGIT2_VERSION_STRING@
>
> Libs: -L"${libdir}" -lgit2
> Libs.private: @LIBGIT2_PC_LIBS@
> Requires.private: @LIBGIT2_PC_REQUIRES@
>
> Cflags: -I${includedir}
>
> And in the CMakeLists.txt :
>
> IF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
> LIST(APPEND LIBGIT2_PC_LIBS "-lssl")
> ELSE()
> SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} openssl")
> ENDIF ()
>
> So I take it that it should have been a propagated-input in libgit2 itself already, right?
Yes. OTOH, “Requires.private” is used only when static linking; are we
using static linking here? If not, we could leave it as is.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-19 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 17:56 libgit2, libgit2-glib: pkg-config file: dependencies on other libraries: how to represent them in Guix? Danny Milosavljevic
2016-06-18 7:47 ` Ricardo Wurmus
2016-06-18 9:10 ` Danny Milosavljevic
2016-06-19 13:53 ` Ludovic Courtès
2016-06-18 9:16 ` Danny Milosavljevic
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).