Message ID | 20180214111351.4801-2-nicolas.cavallari@green-communications.fr |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] libgit2: New package. | expand |
Hello, On Wed, 14 Feb 2018 12:13:51 +0100, Nicolas Cavallari wrote: > Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> > --- > DEVELOPERS | 3 +++ > package/Config.in | 1 + > package/libgit2/Config.in | 9 +++++++++ > package/libgit2/libgit2.hash | 3 +++ > package/libgit2/libgit2.mk | 25 +++++++++++++++++++++++++ > 5 files changed, 41 insertions(+) > create mode 100644 package/libgit2/Config.in > create mode 100644 package/libgit2/libgit2.hash > create mode 100644 package/libgit2/libgit2.mk So, I've applied to next, but I had to change quite a few things that were not really correct: [Thomas: - Do not select BR2_PACKAGE_ZLIB, because zlib is an optional dependency. - Handle optional dependencies in a more usual way in libgit2.mk: group the addition in _DEPENDENCIES and in _CONF_OPTS for a given library together. - libgit2 can optionally use libssh2, not libssh. - Add the optional dependency on zlib. - Always pass USE_ICONV=ON, the detection works perfectly fine, with both a C library providing iconv support built-in, and with libiconv. If neither provides iconv, it gets disabled automatically as expected. - Add libiconv as an optional dependency.] Thanks! Thomas
Hello, and thanks. On 20/05/2018 22:27, Thomas Petazzoni wrote: > Hello, > > On Wed, 14 Feb 2018 12:13:51 +0100, Nicolas Cavallari wrote: >> Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> >> --- >> DEVELOPERS | 3 +++ >> package/Config.in | 1 + >> package/libgit2/Config.in | 9 +++++++++ >> package/libgit2/libgit2.hash | 3 +++ >> package/libgit2/libgit2.mk | 25 +++++++++++++++++++++++++ >> 5 files changed, 41 insertions(+) >> create mode 100644 package/libgit2/Config.in >> create mode 100644 package/libgit2/libgit2.hash >> create mode 100644 package/libgit2/libgit2.mk > So, I've applied to next, but I had to change quite a few things that > were not really correct: > > [Thomas: > - Do not select BR2_PACKAGE_ZLIB, because zlib is an optional > dependency. IIRC zlib is not really an optional dependency. If zlib is not detected, then a bundled version of zlib is compiled in deps/zlib... I don't think this is desirable, that's why i forced a dependency on zlib.
Hello, On Tue, 22 May 2018 19:19:52 +0200, Nicolas Cavallari wrote: > > So, I've applied to next, but I had to change quite a few things that > > were not really correct: > > > > [Thomas: > > - Do not select BR2_PACKAGE_ZLIB, because zlib is an optional > > dependency. > IIRC zlib is not really an optional dependency. If zlib is not > detected, then a bundled version of zlib is compiled in deps/zlib... > > I don't think this is desirable, that's why i forced a dependency on zlib. OK, then indeed we want zlib to be a dependency. The thing is that you had a select BR2_PACKAGE_ZLIB, but zlib was not in <pkg>_DEPENDENCIES. Don't hesitate to send a follow-up patch re-introducing zlib as a mandatory dependency. Thomas
diff --git a/DEVELOPERS b/DEVELOPERS index 293bd73797..c291156476 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1300,6 +1300,9 @@ N: Naumann Andreas <ANaumann@ultratronik.de> F: package/evemu/ F: package/libevdev/ +N: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> +F: package/libgit2/ + N: Nicolas Serafini <nicolas.serafini@sensefly.com> F: package/exiv2/ F: package/nvidia-tegra23/nvidia-tegra23-binaries/ diff --git a/package/Config.in b/package/Config.in index 19dda8aad9..94b3654210 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1071,6 +1071,7 @@ menu "Database" (i have no idea where to put it) source "package/hiredis/Config.in" source "package/kompexsqlite/Config.in" source "package/leveldb/Config.in" + source "package/libgit2/Config.in" source "package/libpqxx/Config.in" source "package/mongodb/Config.in" source "package/mysql/Config.in" diff --git a/package/libgit2/Config.in b/package/libgit2/Config.in new file mode 100644 index 0000000000..53ba4d4245 --- /dev/null +++ b/package/libgit2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBGIT2 + bool "libgit2" + select BR2_PACKAGE_ZLIB + help + libgit2 is a portable, pure C implementation of the Git core + methods provided as a linkable library with a solid API, + allowing to build Git functionality into your application. + + https://github.com/libgit2/libgit2 diff --git a/package/libgit2/libgit2.hash b/package/libgit2/libgit2.hash new file mode 100644 index 0000000000..f642bdb230 --- /dev/null +++ b/package/libgit2/libgit2.hash @@ -0,0 +1,3 @@ +# Manually generated +sha256 6a62393e0ceb37d02fe0d5707713f504e7acac9006ef33da1e88960bd78b6eac libgit2-v0.26.0.tar.gz +sha256 d9a8038088df84fde493fa33a0f1e537252eeb9642122aa4b862690197152813 COPYING diff --git a/package/libgit2/libgit2.mk b/package/libgit2/libgit2.mk new file mode 100644 index 0000000000..5dec01b337 --- /dev/null +++ b/package/libgit2/libgit2.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libgit2 +# +################################################################################ + +LIBGIT2_VERSION = v0.26.0 +LIBGIT2_SITE = $(call github,libgit2,libgit2,$(LIBGIT2_VERSION)) +LIBGIT2_LICENSE = GPL-2.0 with linking exception +LIBGIT2_LICENSE_FILES = COPYING +LIBGIT2_INSTALL_STAGING = YES + +LIBGIT2_DEPENDENCIES = zlib \ + $(if $(BR2_PACKAGE_LIBSSH),libssh) \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_LIBCURL),libcurl) + +# USE_ICONV looks for a Iconv.pc. libiconv does not have it. +LIBGIT2_CONF_OPTS = -DUSE_GSSAPI=OFF -DBUILD_CLAR=OFF -DUSE_ICONV=OFF \ + -DTHREADSAFE=$(if $(BR2_TOOLCHAIN_HAS_THREADS),ON,OFF) \ + -DUSE_SSH=$(if $(BR2_PACKAGE_LIBSSH),ON,OFF) \ + -DCURL=$(if $(BR2_PACKAGE_LIBCURL),ON,OFF) \ + -DUSE_OPENSSL=$(if $(BR2_PACKAGE_OPENSSL),ON,OFF) + +$(eval $(cmake-package))
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> --- DEVELOPERS | 3 +++ package/Config.in | 1 + package/libgit2/Config.in | 9 +++++++++ package/libgit2/libgit2.hash | 3 +++ package/libgit2/libgit2.mk | 25 +++++++++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 package/libgit2/Config.in create mode 100644 package/libgit2/libgit2.hash create mode 100644 package/libgit2/libgit2.mk