diff mbox

[1/1] libgphoto2: Add libgphoto2 package

Message ID 1491467592-21504-1-git-send-email-kevin.joly@sensefly.com
State Superseded
Headers show

Commit Message

Kevin JOLY April 6, 2017, 8:33 a.m. UTC
Add support for libgphoto2 core library designed to allow access to digital camera.

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

Comments

Thomas Petazzoni April 6, 2017, 8:36 p.m. UTC | #1
Hello,

On Thu, 6 Apr 2017 10:33:12 +0200, Kevin JOLY wrote:
> Add support for libgphoto2 core library designed to allow access to digital camera.
> 
> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
> ---
>  DEVELOPERS                         |  3 +++
>  package/Config.in                  |  1 +
>  package/libgphoto2/Config.in       | 11 +++++++++++
>  package/libgphoto2/libgphoto2.hash |  6 ++++++
>  package/libgphoto2/libgphoto2.mk   | 29 +++++++++++++++++++++++++++++
>  5 files changed, 50 insertions(+)
>  create mode 100644 package/libgphoto2/Config.in
>  create mode 100644 package/libgphoto2/libgphoto2.hash
>  create mode 100644 package/libgphoto2/libgphoto2.mk

Thanks for this patch. However:

 - You already posted a patch for the same package on March, 13th, but
   you don't explain how this version is different. This patch is not
   even identified as a new iteration. What changed?

 - Romain Naour submitted on March 5 a patch adding libgphoto2, so your
   proposal seems a bit redundant with Romain's patch. Have you taken
   over Romain's patch? I'm adding Romain in Cc here.

Thanks!

Thomas
Kevin JOLY April 7, 2017, 5:14 a.m. UTC | #2
Hello Thomas,

I was talking with Romain on this mailing list and he had concern about 
license and dependencies of libgphoto2. I contacted the developpers of 
libgphoto2 to ensure that the license type was correct. I also turned 
the libexif, jpeg and gd dependencies as optional.

Anyway, if the patch is in the pipe, everything is fine. I re-submitted 
it because I didn't saw it was already on patchwork but I didn't wanted 
to be redundant with it.

Thank you

Kevin JOLY

Le 06. 04. 17 à 22:36, Thomas Petazzoni a écrit :
> Hello,
>
> On Thu, 6 Apr 2017 10:33:12 +0200, Kevin JOLY wrote:
>> Add support for libgphoto2 core library designed to allow access to digital camera.
>>
>> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
>> ---
>>   DEVELOPERS                         |  3 +++
>>   package/Config.in                  |  1 +
>>   package/libgphoto2/Config.in       | 11 +++++++++++
>>   package/libgphoto2/libgphoto2.hash |  6 ++++++
>>   package/libgphoto2/libgphoto2.mk   | 29 +++++++++++++++++++++++++++++
>>   5 files changed, 50 insertions(+)
>>   create mode 100644 package/libgphoto2/Config.in
>>   create mode 100644 package/libgphoto2/libgphoto2.hash
>>   create mode 100644 package/libgphoto2/libgphoto2.mk
> Thanks for this patch. However:
>
>   - You already posted a patch for the same package on March, 13th, but
>     you don't explain how this version is different. This patch is not
>     even identified as a new iteration. What changed?
>
>   - Romain Naour submitted on March 5 a patch adding libgphoto2, so your
>     proposal seems a bit redundant with Romain's patch. Have you taken
>     over Romain's patch? I'm adding Romain in Cc here.
>
> Thanks!
>
> Thomas
Romain Naour April 7, 2017, 8:52 p.m. UTC | #3
Hi Kevin, Thomas,

Le 07/04/2017 à 07:14, Kevin JOLY a écrit :
> Hello Thomas,
> 
> I was talking with Romain on this mailing list and he had concern about license
> and dependencies of libgphoto2. I contacted the developpers of libgphoto2 to
> ensure that the license type was correct. I also turned the libexif, jpeg and gd
> dependencies as optional.
> 
> Anyway, if the patch is in the pipe, everything is fine. I re-submitted it
> because I didn't saw it was already on patchwork but I didn't wanted to be
> redundant with it.

Indeed, I've posted a patch adding libgphoto2 in Buildroot some day before your
initial submission [1], but it's ok since you're working on it.

It would be great if you add a small changlog between each iteration, see [2]
(21.5.4. Patch revision changelog). That's why Thomas asked what changed in your
last submission.

Also, can you check this new package with the new test-pkg script ? [3]
(17.20.2. How to test your package).

I'll review it later this week-end.
I'll mark my initial patch superseded in the patchwork.

Best regards,
Romain

[1] http://patchwork.ozlabs.org/patch/735448/
[2] http://nightly.buildroot.org/manual.html#submitting-patches
[3] http://nightly.buildroot.org/manual.html#_tips_and_tricks
> 
> Thank you
> 
> Kevin JOLY
> 
> Le 06. 04. 17 à 22:36, Thomas Petazzoni a écrit :
>> Hello,
>>
>> On Thu, 6 Apr 2017 10:33:12 +0200, Kevin JOLY wrote:
>>> Add support for libgphoto2 core library designed to allow access to digital camera.
>>>
>>> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
>>> ---
>>>  DEVELOPERS                         |  3 +++
>>>  package/Config.in                  |  1 +
>>>  package/libgphoto2/Config.in       | 11 +++++++++++
>>>  package/libgphoto2/libgphoto2.hash |  6 ++++++
>>>  package/libgphoto2/libgphoto2.mk   | 29 +++++++++++++++++++++++++++++
>>>  5 files changed, 50 insertions(+)
>>>  create mode 100644 package/libgphoto2/Config.in
>>>  create mode 100644 package/libgphoto2/libgphoto2.hash
>>>  create mode 100644 package/libgphoto2/libgphoto2.mk
>> Thanks for this patch. However:
>>
>>  - You already posted a patch for the same package on March, 13th, but
>>    you don't explain how this version is different. This patch is not
>>    even identified as a new iteration. What changed?
>>
>>  - Romain Naour submitted on March 5 a patch adding libgphoto2, so your
>>    proposal seems a bit redundant with Romain's patch. Have you taken
>>    over Romain's patch? I'm adding Romain in Cc here.
>>
>> Thanks!
>>
>> Thomas
> 
> -- 
> 
> *Kevin JOLY*
> Embedded systems engineer
> 
> SenseFly <http://www.sensefly.com/>
> 38, rte de Genève
> 1033 Cheseaux-Lausanne, Switzerland
> 
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Kevin JOLY April 10, 2017, 9:24 a.m. UTC | #4
Hi Romain, Thomas,


Le 07. 04. 17 à 22:52, Romain Naour a écrit :
> Hi Kevin, Thomas,
>
> Le 07/04/2017 à 07:14, Kevin JOLY a écrit :
>> Hello Thomas,
>>
>> I was talking with Romain on this mailing list and he had concern about license
>> and dependencies of libgphoto2. I contacted the developpers of libgphoto2 to
>> ensure that the license type was correct. I also turned the libexif, jpeg and gd
>> dependencies as optional.
>>
>> Anyway, if the patch is in the pipe, everything is fine. I re-submitted it
>> because I didn't saw it was already on patchwork but I didn't wanted to be
>> redundant with it.
> Indeed, I've posted a patch adding libgphoto2 in Buildroot some day before your
> initial submission [1], but it's ok since you're working on it.
>
> It would be great if you add a small changlog between each iteration, see [2]
> (21.5.4. Patch revision changelog). That's why Thomas asked what changed in your
> last submission.
Ok, I submitted the v2 right before this email. Sorry about that, I'm 
still a newbie in patch revision!
>
> Also, can you check this new package with the new test-pkg script ? [3]
> (17.20.2. How to test your package).
I ran the test. Everything was OK except br-arm-cortex-m4-full and 
br-arm-full-nothread.
>
> I'll review it later this week-end.
> I'll mark my initial patch superseded in the patchwork.
>
> Best regards,
> Romain
>
> [1] http://patchwork.ozlabs.org/patch/735448/
> [2] http://nightly.buildroot.org/manual.html#submitting-patches
> [3] http://nightly.buildroot.org/manual.html#_tips_and_tricks
>> Thank you
>>
>> Kevin JOLY
>>
>> Le 06. 04. 17 à 22:36, Thomas Petazzoni a écrit :
>>> Hello,
>>>
>>> On Thu, 6 Apr 2017 10:33:12 +0200, Kevin JOLY wrote:
>>>> Add support for libgphoto2 core library designed to allow access to digital camera.
>>>>
>>>> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
>>>> ---
>>>>   DEVELOPERS                         |  3 +++
>>>>   package/Config.in                  |  1 +
>>>>   package/libgphoto2/Config.in       | 11 +++++++++++
>>>>   package/libgphoto2/libgphoto2.hash |  6 ++++++
>>>>   package/libgphoto2/libgphoto2.mk   | 29 +++++++++++++++++++++++++++++
>>>>   5 files changed, 50 insertions(+)
>>>>   create mode 100644 package/libgphoto2/Config.in
>>>>   create mode 100644 package/libgphoto2/libgphoto2.hash
>>>>   create mode 100644 package/libgphoto2/libgphoto2.mk
>>> Thanks for this patch. However:
>>>
>>>   - You already posted a patch for the same package on March, 13th, but
>>>     you don't explain how this version is different. This patch is not
>>>     even identified as a new iteration. What changed?
>>>
>>>   - Romain Naour submitted on March 5 a patch adding libgphoto2, so your
>>>     proposal seems a bit redundant with Romain's patch. Have you taken
>>>     over Romain's patch? I'm adding Romain in Cc here.
>>>
>>> Thanks!
>>>
>>> Thomas
>> -- 
>>
>> *Kevin JOLY*
>> Embedded systems engineer
>>
>> SenseFly <http://www.sensefly.com/>
>> 38, rte de Genève
>> 1033 Cheseaux-Lausanne, Switzerland
>>
>>
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>

Best regards,
Arnout Vandecappelle April 10, 2017, 10:20 a.m. UTC | #5
Hi Kevin,

 Some more feedback on your patch...

 A better summary line would be

libgphoto2: new package

On 06-04-17 10:33, Kevin JOLY wrote:
> Add support for libgphoto2 core library designed to allow access to digital camera.

 The commit message text should be wrapped at 72 columns.


> 
> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>

 Since Romain also worked on this package, it's nice to add

Cc: Romain Naour <romain.naour@gmail.com>

This makes sure that:
- Romain will be in Cc when you use git send-email;
- In the git history, it will be visible that Romain was involved.

[snip]
> diff --git a/package/libgphoto2/Config.in b/package/libgphoto2/Config.in
> new file mode 100644
> index 0000000..1626667
> --- /dev/null
> +++ b/package/libgphoto2/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBGPHOTO2
> +	select BR2_PACKAGE_LIBTOOL
> +	select BR2_PACKAGE_LIBUSB
> +	select BR2_PACKAGE_LIBUSB_COMPAT

 Is libusb-compat really needed? It seems to be only used if libusb1 isn't
found. Also, as far as I can see in the configure script, this is optional (you
just loose most of the ports).

> +	select BR2_PACKAGE_LIBXML2

 In your reply to v1, you mentioned that br-arm-full-nothread failed. That seems
to indicate that it should depend on BR2_TOOLCHAIN_HAS_THREADS (with the
appropriate comment in case of !BR2_TOOLCHAIN_HAS_THREADS). But anyway, this
dependency is already needed for libusb. So if the package itself doesn't
require threads (just grep for "pthread", and check whether or not it's escaped
by some #ifdef), you should say:

	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb


> +	bool "libgphoto2"
> +	help
> +	  libgphoto2 is the core library designed to allow access to
> +	  digital camera by external programs.
> +
> +	  http://gphoto.org/

 For libgphoto2 itself:

http://gphoto.org/proj/libgphoto2/

> diff --git a/package/libgphoto2/libgphoto2.hash b/package/libgphoto2/libgphoto2.hash
> new file mode 100644
> index 0000000..2e659ab
> --- /dev/null
> +++ b/package/libgphoto2/libgphoto2.hash
> @@ -0,0 +1,6 @@
> +# https://sourceforge.net/projects/gphoto/files/libgphoto/2.5.12/
> +md5 a5999acc204c31515a6ec8e517d2cd91 libgphoto2-2.5.12.tar.bz2
> +sha1 4ded403b87d46ad49ba88b22b9410789ed3cef10 libgphoto2-2.5.12.tar.bz2
> +
> +# Locally calculated hash
> +sha256 b9bb28990fde45ac385e4851a07dbad2e1250404b535b0a3a3b898bb431e4e2e	libgphoto2-2.5.12.tar.bz2
> diff --git a/package/libgphoto2/libgphoto2.mk b/package/libgphoto2/libgphoto2.mk
> new file mode 100644
> index 0000000..354c29a
> --- /dev/null
> +++ b/package/libgphoto2/libgphoto2.mk
> @@ -0,0 +1,29 @@
> +################################################################################
> +#
> +# libgphoto2
> +#
> +################################################################################
> +
> +LIBGPHOTO2_VERSION = 2.5.12

 There's a 2.5.13 out now.

> +LIBGPHOTO2_SOURCE = libgphoto2-$(LIBGPHOTO2_VERSION).tar.bz2
> +LIBGPHOTO2_SITE = https://sourceforge.net/projects/gphoto/files/libgphoto/$(LIBGPHOTO2_VERSION)

 The website itself points to github, and the repository is maintained on github
(no commits in sourceforge since 2015), so I'd tend to say that you should use
the github download. However, the github download is just the autogenerated one
which doesn't contain a configure script, so indeed it's better to use
sourceforge. Still, it's better to add a comment about that:

# Project is maintained on github but github tarball doesn't have configure


> +LIBGPHOTO2_INSTALL_STAGING = YES
> +
> +LIBGPHOTO2_DEPENDENCIES = libxml2 libusb libusb-compat libtool host-pkgconf

 It looks like there are some configure options you may want to pass explicitly,
like --disable-rpm. The package also installs a lot of stuff in non-standard
locations, it would be good to check if the defaults are appropriate. Also take
a look at README.packaging.

> +
> +ifeq ($(BR2_PACKAGE_LIBEXIF),y)
> +LIBGPHOTO2_DEPENDENCIES += libexif

> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBJPEG),y)
> +LIBGPHOTO2_DEPENDENCIES += libjpeg

 Please add an explicit
LIBGPHOTO2_CONF_OPTS += --with-jpeg
else
LIBGPHOTO2_CONF_OPTS += --without-jpeg

 Ideally also for exif and gd, but it seems there are no options for those.

> +endif
> +
> +ifeq ($(BR2_PACKAGE_GD),y)
> +LIBGPHOTO2_DEPENDENCIES += gd
> +endif
> +
> +LIBGPHOTO2_LICENSE = LGPLv2.1+

 We switched completely to SPDX license strings, so LGPL-2.1+

> +LIBGPHOTO2_LICENSE_FILES = COPYING

 We typically put the license info near the top, just above or below the initial
DEPENDENCIES.

 It looks like some of the camlibs are actually GPL-2.0+ or LGPL-3+, and some
are LGPL-2.0 only. So the complete string should be:

LIBGPHOTO2_LICENSE = LGPLv2.1+, GPL-2.0 (adc65), GPL-2.0+ (some camlibs), \
	LGPL-2.0 (sipix), LGPL-3.0+ (pentax), BSD-3-Clause (ax203/tinyjpeg).

I couldn't find any license files for all the other licenses, so add a comment

# No license files for other licenses

 It would be good to double-check all of the above...

 Regards,
 Arnout

> +
> +$(eval $(autotools-package))
>
Thomas Petazzoni April 10, 2017, 11:45 a.m. UTC | #6
Hello,

Thanks for your new iteration of the libgphoto2 patch!

On Mon, 10 Apr 2017 11:24:32 +0200, Kevin JOLY wrote:

> > Also, can you check this new package with the new test-pkg script ? [3]
> > (17.20.2. How to test your package).  
> I ran the test. Everything was OK except br-arm-cortex-m4-full and 
> br-arm-full-nothread.

What errors did you had with those toolchains? Did you fix those issue
in your v2?

Thanks!

Thomas
Arnout Vandecappelle April 10, 2017, 12:01 p.m. UTC | #7
On 10-04-17 13:45, Thomas Petazzoni wrote:
> Hello,
> 
> Thanks for your new iteration of the libgphoto2 patch!
> 
> On Mon, 10 Apr 2017 11:24:32 +0200, Kevin JOLY wrote:
> 
>>> Also, can you check this new package with the new test-pkg script ? [3]
>>> (17.20.2. How to test your package).  
>> I ran the test. Everything was OK except br-arm-cortex-m4-full and 
>> br-arm-full-nothread.
> 
> What errors did you had with those toolchains? Did you fix those issue
> in your v2?

 I expect br-arm-cortex-m4-full runs into the elf2flt segfault, and
br-arm-full-nothread fails because it depends on threads (as mentioned in my
review).

 Regards,
 Arnout

> 
> Thanks!
> 
> Thomas
>
Kevin JOLY April 10, 2017, 12:23 p.m. UTC | #8
Hi Arnout,


Le 10. 04. 17 à 12:20, Arnout Vandecappelle a écrit :
>   Hi Kevin,
>
>   Some more feedback on your patch...
>
>   A better summary line would be
>
> libgphoto2: new package
>
> On 06-04-17 10:33, Kevin JOLY wrote:
>> Add support for libgphoto2 core library designed to allow access to digital camera.
>   The commit message text should be wrapped at 72 columns.
>
>
>> Signed-off-by: Kevin JOLY <kevin.joly@sensefly.com>
>   Since Romain also worked on this package, it's nice to add
>
> Cc: Romain Naour <romain.naour@gmail.com>
>
> This makes sure that:
> - Romain will be in Cc when you use git send-email;
> - In the git history, it will be visible that Romain was involved.
>
> [snip]
>> diff --git a/package/libgphoto2/Config.in b/package/libgphoto2/Config.in
>> new file mode 100644
>> index 0000000..1626667
>> --- /dev/null
>> +++ b/package/libgphoto2/Config.in
>> @@ -0,0 +1,11 @@
>> +config BR2_PACKAGE_LIBGPHOTO2
>> +	select BR2_PACKAGE_LIBTOOL
>> +	select BR2_PACKAGE_LIBUSB
>> +	select BR2_PACKAGE_LIBUSB_COMPAT
>   Is libusb-compat really needed? It seems to be only used if libusb1 isn't
> found. Also, as far as I can see in the configure script, this is optional (you
> just loose most of the ports).
You're right, this one is also optional.
>> +	select BR2_PACKAGE_LIBXML2
>   In your reply to v1, you mentioned that br-arm-full-nothread failed. That seems
> to indicate that it should depend on BR2_TOOLCHAIN_HAS_THREADS (with the
> appropriate comment in case of !BR2_TOOLCHAIN_HAS_THREADS). But anyway, this
> dependency is already needed for libusb. So if the package itself doesn't
> require threads (just grep for "pthread", and check whether or not it's escaped
> by some #ifdef), you should say:
>
> 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
pthread was not found in the source code of libgphoto2 itself so I guess 
it is only for libusb. I added the depends on and the comment.
>
>> +	bool "libgphoto2"
>> +	help
>> +	  libgphoto2 is the core library designed to allow access to
>> +	  digital camera by external programs.
>> +
>> +	  http://gphoto.org/
>   For libgphoto2 itself:
>
> http://gphoto.org/proj/libgphoto2/
>
>> diff --git a/package/libgphoto2/libgphoto2.hash b/package/libgphoto2/libgphoto2.hash
>> new file mode 100644
>> index 0000000..2e659ab
>> --- /dev/null
>> +++ b/package/libgphoto2/libgphoto2.hash
>> @@ -0,0 +1,6 @@
>> +# https://sourceforge.net/projects/gphoto/files/libgphoto/2.5.12/
>> +md5 a5999acc204c31515a6ec8e517d2cd91 libgphoto2-2.5.12.tar.bz2
>> +sha1 4ded403b87d46ad49ba88b22b9410789ed3cef10 libgphoto2-2.5.12.tar.bz2
>> +
>> +# Locally calculated hash
>> +sha256 b9bb28990fde45ac385e4851a07dbad2e1250404b535b0a3a3b898bb431e4e2e	libgphoto2-2.5.12.tar.bz2
>> diff --git a/package/libgphoto2/libgphoto2.mk b/package/libgphoto2/libgphoto2.mk
>> new file mode 100644
>> index 0000000..354c29a
>> --- /dev/null
>> +++ b/package/libgphoto2/libgphoto2.mk
>> @@ -0,0 +1,29 @@
>> +################################################################################
>> +#
>> +# libgphoto2
>> +#
>> +################################################################################
>> +
>> +LIBGPHOTO2_VERSION = 2.5.12
>   There's a 2.5.13 out now.
>
>> +LIBGPHOTO2_SOURCE = libgphoto2-$(LIBGPHOTO2_VERSION).tar.bz2
>> +LIBGPHOTO2_SITE = https://sourceforge.net/projects/gphoto/files/libgphoto/$(LIBGPHOTO2_VERSION)
>   The website itself points to github, and the repository is maintained on github
> (no commits in sourceforge since 2015), so I'd tend to say that you should use
> the github download. However, the github download is just the autogenerated one
> which doesn't contain a configure script, so indeed it's better to use
> sourceforge. Still, it's better to add a comment about that:
>
> # Project is maintained on github but github tarball doesn't have configure
>
>
>> +LIBGPHOTO2_INSTALL_STAGING = YES
>> +
>> +LIBGPHOTO2_DEPENDENCIES = libxml2 libusb libusb-compat libtool host-pkgconf
>   It looks like there are some configure options you may want to pass explicitly,
> like --disable-rpm. The package also installs a lot of stuff in non-standard
> locations, it would be good to check if the defaults are appropriate. Also take
> a look at README.packaging.
Where did you find the --disable-rpm ? By non-standard location, do you 
mean the udevscriptdir and the utilsdir?
>
>> +
>> +ifeq ($(BR2_PACKAGE_LIBEXIF),y)
>> +LIBGPHOTO2_DEPENDENCIES += libexif
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_LIBJPEG),y)
>> +LIBGPHOTO2_DEPENDENCIES += libjpeg
>   Please add an explicit
> LIBGPHOTO2_CONF_OPTS += --with-jpeg
> else
> LIBGPHOTO2_CONF_OPTS += --without-jpeg
>
>   Ideally also for exif and gd, but it seems there are no options for those.
I found --with-gdlib=[auto|no] and --with-libexif=[auto|no]
>
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_GD),y)
>> +LIBGPHOTO2_DEPENDENCIES += gd
>> +endif
>> +
>> +LIBGPHOTO2_LICENSE = LGPLv2.1+
>   We switched completely to SPDX license strings, so LGPL-2.1+
>
>> +LIBGPHOTO2_LICENSE_FILES = COPYING
>   We typically put the license info near the top, just above or below the initial
> DEPENDENCIES.
>
>   It looks like some of the camlibs are actually GPL-2.0+ or LGPL-3+, and some
> are LGPL-2.0 only. So the complete string should be:
>
> LIBGPHOTO2_LICENSE = LGPLv2.1+, GPL-2.0 (adc65), GPL-2.0+ (some camlibs), \
> 	LGPL-2.0 (sipix), LGPL-3.0+ (pentax), BSD-3-Clause (ax203/tinyjpeg).
>
> I couldn't find any license files for all the other licenses, so add a comment
>
> # No license files for other licenses
>
>   It would be good to double-check all of the above...
>
>   Regards,
>   Arnout
>
>> +
>> +$(eval $(autotools-package))
>>

Best regards,
Arnout Vandecappelle April 10, 2017, 1:28 p.m. UTC | #9
On 10-04-17 14:23, Kevin JOLY wrote:
> Hi Arnout,
> 
> 
> Le 10. 04. 17 à 12:20, Arnout Vandecappelle a écrit :

[snip]
>>  It looks like there are some configure options you may want to pass explicitly,
>> like --disable-rpm. The package also installs a lot of stuff in non-standard
>> locations, it would be good to check if the defaults are appropriate. Also take
>> a look at README.packaging.
> Where did you find the --disable-rpm ? 

 I misread the configure.ac (gphoto-m4/gp-packaging.m4 actually). It's in fact
--without-rpmbuild.

> By non-standard location, do you mean the
> udevscriptdir and the utilsdir?

 Yes, udevscriptdir. utilsdir is OK.


 Regards,
 Arnout

[snip]
diff mbox

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index e1713cf..09d7085 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -956,6 +956,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 fe4c0ae..e17ee6f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1085,6 +1085,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..1626667
--- /dev/null
+++ b/package/libgphoto2/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_LIBGPHOTO2
+	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
+	select BR2_PACKAGE_LIBXML2
+	bool "libgphoto2"
+	help
+	  libgphoto2 is the core library designed to allow access to
+	  digital camera by external programs.
+
+	  http://gphoto.org/
diff --git a/package/libgphoto2/libgphoto2.hash b/package/libgphoto2/libgphoto2.hash
new file mode 100644
index 0000000..2e659ab
--- /dev/null
+++ b/package/libgphoto2/libgphoto2.hash
@@ -0,0 +1,6 @@ 
+# https://sourceforge.net/projects/gphoto/files/libgphoto/2.5.12/
+md5 a5999acc204c31515a6ec8e517d2cd91 libgphoto2-2.5.12.tar.bz2
+sha1 4ded403b87d46ad49ba88b22b9410789ed3cef10 libgphoto2-2.5.12.tar.bz2
+
+# Locally calculated hash
+sha256 b9bb28990fde45ac385e4851a07dbad2e1250404b535b0a3a3b898bb431e4e2e	libgphoto2-2.5.12.tar.bz2
diff --git a/package/libgphoto2/libgphoto2.mk b/package/libgphoto2/libgphoto2.mk
new file mode 100644
index 0000000..354c29a
--- /dev/null
+++ b/package/libgphoto2/libgphoto2.mk
@@ -0,0 +1,29 @@ 
+################################################################################
+#
+# libgphoto2
+#
+################################################################################
+
+LIBGPHOTO2_VERSION = 2.5.12
+LIBGPHOTO2_SOURCE = libgphoto2-$(LIBGPHOTO2_VERSION).tar.bz2
+LIBGPHOTO2_SITE = https://sourceforge.net/projects/gphoto/files/libgphoto/$(LIBGPHOTO2_VERSION)
+LIBGPHOTO2_INSTALL_STAGING = YES
+
+LIBGPHOTO2_DEPENDENCIES = libxml2 libusb libusb-compat libtool host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LIBEXIF),y)
+LIBGPHOTO2_DEPENDENCIES += libexif
+endif
+
+ifeq ($(BR2_PACKAGE_LIBJPEG),y)
+LIBGPHOTO2_DEPENDENCIES += libjpeg
+endif
+
+ifeq ($(BR2_PACKAGE_GD),y)
+LIBGPHOTO2_DEPENDENCIES += gd
+endif
+
+LIBGPHOTO2_LICENSE = LGPLv2.1+
+LIBGPHOTO2_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))