All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin JOLY <kevin.joly@sensefly.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4] libgphoto2: new package
Date: Tue, 11 Apr 2017 09:00:08 +0200	[thread overview]
Message-ID: <1491894008-29767-1-git-send-email-kevin.joly@sensefly.com> (raw)

Add support for libgphoto2 core library designed to allow access to
digital camera.

Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
Cc: Romain Naour <romain.naour@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Changes v3 -> v4 (suggested by Arnout Vandecappelle and Romain Naour)
  - Fix style issues
  - Replace the libjpeg optional dependency by jpeg
  - Improve configure options

Changes v2 -> v3 (suggested by Arnout Vandecappelle)
  - Change the commit description
  - Turn libusb-compat as an optional dependency
  - Add the BR2_TOOLCHAIN_HAS_THREADS dependency
  - Update package website location
  - Update version to 2.5.13
  - Add comments
  - Improve configure options
  - Update license informations

Changes v1 -> v2 (suggested by Romain Naour)
  - Handle optionnal dependencies on libexif, libjpeg, libgd and lockdev
  - Add license informations
  - Use tar.bz2 package
  - Change hash
  - Added myself as package maintainer in the DEVELOPPERS file

Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
---
 DEVELOPERS                         |  3 +++
 package/Config.in                  |  1 +
 package/libgphoto2/Config.in       | 14 ++++++++++
 package/libgphoto2/libgphoto2.hash |  6 +++++
 package/libgphoto2/libgphoto2.mk   | 54 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 78 insertions(+)
 create mode 100644 package/libgphoto2/Config.in
 create mode 100644 package/libgphoto2/libgphoto2.hash
 create mode 100644 package/libgphoto2/libgphoto2.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a298669..1f45012 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -957,6 +957,9 @@ F:	package/cpuload/
 F:	package/bwm-ng/
 F:	package/ramsmp/
 
+N:	Kevin Joly <kevin.joly@sensefly.com>
+F:	package/libgphoto2/
+
 N:	Laurent Cans <laurent.cans@gmail.com>
 F:	package/aircrack-ng/
 
diff --git a/package/Config.in b/package/Config.in
index c12e5b5..f98a2b5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1086,6 +1086,7 @@ menu "Hardware handling"
 	source "package/libfreefare/Config.in"
 	source "package/libftdi/Config.in"
 	source "package/libftdi1/Config.in"
+	source "package/libgphoto2/Config.in"
 	source "package/libgpiod/Config.in"
 	source "package/libgudev/Config.in"
 	source "package/libhid/Config.in"
diff --git a/package/libgphoto2/Config.in b/package/libgphoto2/Config.in
new file mode 100644
index 0000000..fc60dd6
--- /dev/null
+++ b/package/libgphoto2/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LIBGPHOTO2
+	bool "libgphoto2"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBXML2
+	help
+	  libgphoto2 is the core library designed to allow access to
+	  digital camera by external programs.
+
+	  http://gphoto.org/proj/libgphoto2/
+
+comment "libgphoto needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libgphoto2/libgphoto2.hash b/package/libgphoto2/libgphoto2.hash
new file mode 100644
index 0000000..1afe275
--- /dev/null
+++ b/package/libgphoto2/libgphoto2.hash
@@ -0,0 +1,6 @@
+# https://sourceforge.net/projects/gphoto/files/libgphoto/2.5.13/
+md5 73bf5b3d94c8c6f5fad9ea6b5e561843 libgphoto2-2.5.13.tar.bz2
+sha1 cef2d2f1930f8ada16a63aca15683188231a626a libgphoto2-2.5.13.tar.bz2
+
+# Locally calculated hash
+sha256 ceaacbdf187d1cd1aed5336991f46b0100f6960b6c8383f9aeab98f1f64780ef libgphoto2-2.5.13.tar.bz2
diff --git a/package/libgphoto2/libgphoto2.mk b/package/libgphoto2/libgphoto2.mk
new file mode 100644
index 0000000..4846f45
--- /dev/null
+++ b/package/libgphoto2/libgphoto2.mk
@@ -0,0 +1,54 @@
+################################################################################
+#
+# libgphoto2
+#
+################################################################################
+
+LIBGPHOTO2_VERSION = 2.5.13
+LIBGPHOTO2_SOURCE = libgphoto2-$(LIBGPHOTO2_VERSION).tar.bz2
+# Project is maintained on github but github tarball doesn't have configure
+LIBGPHOTO2_SITE = https://sourceforge.net/projects/gphoto/files/libgphoto/$(LIBGPHOTO2_VERSION)
+LIBGPHOTO2_INSTALL_STAGING = YES
+
+LIBGPHOTO2_LICENSE = LGPL-2.1+, GPL-2.0 (adc65), GPL-2.0+ (some camlibs), \
+	LGPL-2.0 (sipix), LGPL-3.0+ (pentax), BSD-3-Clause (ax203/tinyjpeg).
+LIBGPHOTO2_LICENSE_FILES = COPYING
+# No license files for other licenses
+
+LIBGPHOTO2_DEPENDENCIES = libxml2 libusb libtool host-pkgconf
+
+LIBGPHOTO2_CONF_ENV = udevscriptdir=/lib/udev
+LIBGPHOTO2_CONF_OPTS += --without-rpmbuild --disable-gp2ddb --disable-internal-docs
+
+ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
+# libusb-compat is not actually used, but it is detected, so add it here to
+# guarantee reproducible builds
+LIBGPHOTO2_DEPENDENCIES += libusb-compat
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEXIF),y)
+LIBGPHOTO2_DEPENDENCIES += libexif
+LIBGPHOTO2_CONF_OPTS += --with-libexif=auto
+else
+LIBGPHOTO2_CONF_OPTS += --with-libexif=no
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+LIBGPHOTO2_DEPENDENCIES += jpeg
+LIBGPHOTO2_CONF_OPTS += --with-jpeg
+else
+LIBGPHOTO2_CONF_OPTS += --without-jpeg
+endif
+
+ifeq ($(BR2_PACKAGE_GD),y)
+LIBGPHOTO2_DEPENDENCIES += gd
+LIBGPHOTO2_CONF_OPTS += --with-gdlib=auto
+else
+LIBGPHOTO2_CONF_OPTS += --with-gdlib=no
+endif
+
+ifeq ($(BR2_PACKAGE_LOCKDEV),y)
+LIBGPHOTO2_DEPENDENCIES += lockdev
+endif
+
+$(eval $(autotools-package))
-- 
2.7.4

             reply	other threads:[~2017-04-11  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11  7:00 Kevin JOLY [this message]
2017-04-11  7:23 ` [Buildroot] [PATCH v4] libgphoto2: new package Arnout Vandecappelle
2017-04-11  7:35   ` Romain Naour
2017-04-11  7:38     ` Kevin JOLY
2017-04-11  7:43       ` Romain Naour
2017-04-11  7:36   ` Kevin JOLY
2017-04-13 20:36 ` Thomas Petazzoni
2017-04-18  4:18   ` Kevin JOLY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491894008-29767-1-git-send-email-kevin.joly@sensefly.com \
    --to=kevin.joly@sensefly.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.