* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
@ 2014-10-01 14:18 Daniel Sangue
2014-10-01 14:45 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Sangue @ 2014-10-01 14:18 UTC (permalink / raw)
To: buildroot
Signed-off-by: Daniel Sangue <daniel.sangue@sangue.ch>
---
package/Config.in | 1 +
package/libftdi1/Config.in | 24 ++++++++++++++++++++++++
package/libftdi1/libftdi1.mk | 22 ++++++++++++++++++++++
3 files changed, 47 insertions(+)
create mode 100644 package/libftdi1/Config.in
create mode 100644 package/libftdi1/libftdi1.mk
diff --git a/package/Config.in b/package/Config.in
index 2ad72bc..a6e78b2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -670,6 +670,7 @@ menu "Hardware handling"
source "package/libcec/Config.in"
source "package/libfreefare/Config.in"
source "package/libftdi/Config.in"
+ source "package/libftdi1/Config.in"
source "package/libhid/Config.in"
source "package/libinput/Config.in"
source "package/libiqrf/Config.in"
diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in
new file mode 100644
index 0000000..d896fc0
--- /dev/null
+++ b/package/libftdi1/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_LIBFTDI1
+ bool "libftdi1"
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+ select BR2_PACKAGE_LIBUSB
+ select BR2_PACKAGE_LIBUSB_COMPAT
+ select BR2_PACKAGE_LIBCONFUSE
+ help
+ Userspace access to FTDI USB interface chips (version 1.x)
+
+ http://www.intra2net.com/en/developer/libftdi/index.php
+
+if BR2_PACKAGE_LIBFTDI1
+
+config BR2_PACKAGE_LIBTFDI1_CPP
+ depends on BR2_INSTALL_LIBSTDCPP
+ bool "C++ bindings"
+ help
+ C++ bindings for libftdi
+
+endif # BR2_PACKAGE_LIBFTDI1
+
+comment "libftdi1 needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+
diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
new file mode 100644
index 0000000..abe0dc7
--- /dev/null
+++ b/package/libftdi1/libftdi1.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# libftdi1
+#
+################################################################################
+
+LIBFTDI1_VERSION = 1.1
+LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
+LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download/
+LIBFTDI1_INSTALL_STAGING = YES
+LIBFDTI1_CONF_OPT = --without-examples
+LIBFTDI1_DEPENDENCIES = libusb-compat libusb libconfuse
+
+# configure detect it automaticaly so we need to force it
+ifeq ($(BR2_PACKAGE_LIBTFDI1_CPP),y)
+LIBFDTI_CONF_OPT += --enable-libftdipp
+else
+LIBFDTI_CONF_OPT += --disable-libftdipp
+endif
+
+$(eval $(cmake-package))
+
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
2014-10-01 14:18 Daniel Sangue
@ 2014-10-01 14:45 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-01 14:45 UTC (permalink / raw)
To: buildroot
Dear Daniel Sangue,
Thanks for getting back with a proper patch for libftdi1. Definitely
looking much better!
One first nit: the way your commit log is formatted. See
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html.
Your commit log should look like:
"""
libftdi1: new package
This commit adds libftdi1 as a new package. This version should (and
can) co-exist besides the 0.x version already packaged as libftdi,
because they use different library names and a different API.
Signed-off-by: ...
"""
The most important thing is that the first line should be short, and be
an overall summary of what the patch is doing. Then one blank line, and
one or several paragraphs of additional details, then one blank line,
and the Signed-off-by line.
On Wed, 1 Oct 2014 16:18:21 +0200, Daniel Sangue wrote:
> diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in
> new file mode 100644
> index 0000000..d896fc0
> --- /dev/null
> +++ b/package/libftdi1/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_PACKAGE_LIBFTDI1
> + bool "libftdi1"
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
> + select BR2_PACKAGE_LIBUSB
> + select BR2_PACKAGE_LIBUSB_COMPAT
> + select BR2_PACKAGE_LIBCONFUSE
> + help
> + Userspace access to FTDI USB interface chips (version 1.x)
> +
> + http://www.intra2net.com/en/developer/libftdi/index.php
> +
> +if BR2_PACKAGE_LIBFTDI1
> +
> +config BR2_PACKAGE_LIBTFDI1_CPP
> + depends on BR2_INSTALL_LIBSTDCPP
> + bool "C++ bindings"
> + help
> + C++ bindings for libftdi
According to your libftdi1.mk file comments, it looks like C++ support
can be autodetected. So maybe it's not really worth the effort having
an option for that: we could just enable C++ support when available,
and that's it.
> +
> +endif # BR2_PACKAGE_LIBFTDI1
> +
> +comment "libftdi1 needs a toolchain w/ threads"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS
> +
> diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
> new file mode 100644
> index 0000000..abe0dc7
> --- /dev/null
> +++ b/package/libftdi1/libftdi1.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# libftdi1
> +#
> +################################################################################
> +
> +LIBFTDI1_VERSION = 1.1
> +LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
> +LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download/
Please add LIBFTDI1_LICENSE and LIBFTDI1_LICENSE_FILES.
> +LIBFTDI1_INSTALL_STAGING = YES
> +LIBFDTI1_CONF_OPT = --without-examples
> +LIBFTDI1_DEPENDENCIES = libusb-compat libusb libconfuse
> +
> +# configure detect it automaticaly so we need to force it
> +ifeq ($(BR2_PACKAGE_LIBTFDI1_CPP),y)
If you remove the option for C++ support, you could use:
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
here. It will make sure C++ bindings are automatically built when the
toolchain has C++ support.
> +LIBFDTI_CONF_OPT += --enable-libftdipp
> +else
> +LIBFDTI_CONF_OPT += --disable-libftdipp
> +endif
> +
> +$(eval $(cmake-package))
Are you sure --{enable,disable}-libftdipp options are working for
CMake? It doesn't look like the usual way of passing CMake
configuration options, but maybe I'm missing something here.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
@ 2014-10-02 7:52 daniel.sangue at sangue.ch
2014-10-02 12:45 ` Mike Zick
2014-10-03 13:02 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: daniel.sangue at sangue.ch @ 2014-10-02 7:52 UTC (permalink / raw)
To: buildroot
Hi Thomas
Well im new to buildroot and git and also to linux. I am at the buttom of the learning curve related to this topics. Thank you for your time and feedback.
---- OriginalMessage ----
>From: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
>To: "Daniel Sangue" <daniel.sangue@sangue.ch>
>CC: buildroot at buildroot.org
>Sent: Wed, Oct 01, 2014, 04:26 PM
>Subject: Re: [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
>
>Dear Daniel Sangue,
>
>Thanks for getting back with a proper patch for libftdi1. Definitely
>looking much better!
>
>One first nit: the way your commit log is formatted. See
>http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html.
>Your commit log should look like:
>
>"""
>libftdi1: new package
>
>This commit adds libftdi1 as a new package. This version should (and
>can) co-exist besides the 0.x version already packaged as libftdi,
>because they use different library names and a different API.
>
>Signed-off-by: ...
>"""
>
>The most important thing is that the first line should be short, and be
>an overall summary of what the patch is doing. Then one blank line, and
>one or several paragraphs of additional details, then one blank line,
>and the Signed-off-by line.
>
Ok, i hope i got it. Give it a try next time. Yes this 50/72 principle makes sense.
>On Wed, 1 Oct 2014 16:18:21 +0200, Daniel Sangue wrote:
>> diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in
>> new file mode 100644
>> index 0000000..d896fc0
>> --- /dev/null
>> +++ b/package/libftdi1/Config.in
>> @@ -0,0 +1,24 @@
>> +config BR2_PACKAGE_LIBFTDI1
>> + bool "libftdi1"
>> + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
>> + select BR2_PACKAGE_LIBUSB
>> + select BR2_PACKAGE_LIBUSB_COMPAT
>> + select BR2_PACKAGE_LIBCONFUSE
>> + help
>> + Userspace access to FTDI USB interface chips (version 1.x)
>> +
>> + http://www.intra2net.com/en/developer/libftdi/index.php
>> +
>> +if BR2_PACKAGE_LIBFTDI1
>> +
>> +config BR2_PACKAGE_LIBTFDI1_CPP
>> + depends on BR2_INSTALL_LIBSTDCPP
>> + bool "C++ bindings"
>> + help
>> + C++ bindings for libftdi
>
>According to your libftdi1.mk file comments, it looks like C++ support
>can be autodetected. So maybe it's not really worth the effort having
>an option for that: we could just enable C++ support when available,
>and that's it.
>
ok, i removed the additional c++ binding option. I admit that i just copy pasted it from the existing libftdi(0) package.
>> +
>> +endif # BR2_PACKAGE_LIBFTDI1
>> +
>> +comment "libftdi1 needs a toolchain w/ threads"
>> + depends on !BR2_TOOLCHAIN_HAS_THREADS
>> +
>> diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk
>> new file mode 100644
>> index 0000000..abe0dc7
>> --- /dev/null
>> +++ b/package/libftdi1/libftdi1.mk
>> @@ -0,0 +1,22 @@
>> +################################################################################
>> +#
>> +# libftdi1
>> +#
>> +################################################################################
>> +
>> +LIBFTDI1_VERSION = 1.1
>> +LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
>> +LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download/
>
>Please add LIBFTDI1_LICENSE and LIBFTDI1_LICENSE_FILES.
ok, i have added:
IBFTDI1_LICENSE = LGPL2.1 GPL2
LIBFTDI1_LICENSE_FILES = COPYING
>
>> +LIBFTDI1_INSTALL_STAGING = YES
>> +LIBFDTI1_CONF_OPT = --without-examples
>> +LIBFTDI1_DEPENDENCIES = libusb-compat libusb libconfuse
>> +
>> +# configure detect it automaticaly so we need to force it
>> +ifeq ($(BR2_PACKAGE_LIBTFDI1_CPP),y)
>
>If you remove the option for C++ support, you could use:
>
>ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
>
>here. It will make sure C++ bindings are automatically built when the
>toolchain has C++ support.
>
>> +LIBFDTI_CONF_OPT += --enable-libftdipp
>> +else
>> +LIBFDTI_CONF_OPT += --disable-libftdipp
>> +endif
>> +
>> +$(eval $(cmake-package))
>
>Are you sure --{enable,disable}-libftdipp options are working for
>CMake? It doesn't look like the usual way of passing CMake
>configuration options, but maybe I'm missing something here.
No, i am not sure. I just can refere to the buildroot cmake example in the manual where LIBFOO_CONF_OPT is used:
http://buildroot.uclibc.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
yes, ifeq ($(BR2_INSTALL_LIBSTDCPP),y) is good..
>
>Thanks,
>
>Thomas
>--
>Thomas Petazzoni, CTO, Free Electrons
>Embedded Linux, Kernel and Android engineering
>http://free-electrons.com
>
Give me some time because i havent a working smtp-server connection at work. And i can not do an incremental patch - because i have deleted the copy of the repo where the patch was based on. I only can create a new patch and take your proposed git message for it. Is this ok for you or what should i do now?
Greets Dani
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
2014-10-02 7:52 [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so) daniel.sangue at sangue.ch
@ 2014-10-02 12:45 ` Mike Zick
2014-10-02 12:56 ` Mike Zick
2014-10-03 13:02 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Mike Zick @ 2014-10-02 12:45 UTC (permalink / raw)
To: buildroot
On Thu, 02 Oct 2014 09:52:10 +0200
daniel.sangue at sangue.ch wrote:
> Give me some time because i havent a working smtp-server connection
> at work. And i can not do an incremental patch - because i have
> deleted the copy of the repo where the patch was based on. I only can
> create a new patch and take your proposed git message for it. Is this
> ok for you or what should i do now?
>
As a long time M.L. reader, (not a reviewer) I feel safe in answering
this one. ;)
The comments made where scattered throughout your submission, so I
don't think that your having to re-generate a new one will make
very much difference.
That is not what you would want to do to fix a single line "Oops"
of course, but in this case, it should be ok.
Just be sure to include the [PATCH V2 ... etc in the new title
and a comment about V1 -> V2 changes made.
Mike
>
> Greets Dani
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
2014-10-02 12:45 ` Mike Zick
@ 2014-10-02 12:56 ` Mike Zick
0 siblings, 0 replies; 6+ messages in thread
From: Mike Zick @ 2014-10-02 12:56 UTC (permalink / raw)
To: buildroot
On Thu, 2 Oct 2014 07:45:33 -0500
Mike Zick <minimod@morethan.org> wrote:
> The comments made where scattered throughout your submission, so I
> don't think that your having to re-generate a new one will make
> very much difference.
>
**will not** make ...
Not a good morning here.
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so).
2014-10-02 7:52 [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so) daniel.sangue at sangue.ch
2014-10-02 12:45 ` Mike Zick
@ 2014-10-03 13:02 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-03 13:02 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 02 Oct 2014 09:52:10 +0200, daniel.sangue at sangue.ch wrote:
> Well im new to buildroot and git and also to linux. I am at the
> buttom of the learning curve related to this topics. Thank you for
> your time and feedback.
No problem, you're welcome!
> >According to your libftdi1.mk file comments, it looks like C++
> >support can be autodetected. So maybe it's not really worth the
> >effort having an option for that: we could just enable C++ support
> >when available, and that's it.
>
> ok, i removed the additional c++ binding option. I admit that i just
> copy pasted it from the existing libftdi(0) package.
Ah, ok.
> >> +LIBFTDI1_VERSION = 1.1
> >> +LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
> >> +LIBFTDI1_SITE =
> >> http://www.intra2net.com/en/developer/libftdi/download/
> >
> >Please add LIBFTDI1_LICENSE and LIBFTDI1_LICENSE_FILES.
>
> ok, i have added:
> IBFTDI1_LICENSE = LGPL2.1 GPL2
> LIBFTDI1_LICENSE_FILES = COPYING
That isn't good, the licensing is a bit more complicated. I think it
should be:
LIBFTDI1_LICENSE = LGPLv2.1 (libfti1), GPLv2 with exceptions (ftdipp1)
LIBFTDI1_LICENSE_FILES = LICENSE COPYING.GPL COPYING.LIB
> >Are you sure --{enable,disable}-libftdipp options are working for
> >CMake? It doesn't look like the usual way of passing CMake
> >configuration options, but maybe I'm missing something here.
>
> No, i am not sure. I just can refere to the buildroot cmake example
> in the manual where LIBFOO_CONF_OPT is used:
> http://buildroot.uclibc.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
Yes, but it seems like the code you wrote using --enable-libftdipp and
--disable-libftdipp was copied from the other libftdi.mk package. Which
is autotools based, so --enable/--disable options make sense. But for a
CMake package, they clearly do not make sense.
I think, it should instead be:
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
LIBFTDI1_CONF_OPT = -DFTDIPP=ON
else
LIBFTDI1_CONF_OPT = -DFTDIPP=OFF
endif
You should test this with a non-C++ capable toolchain. For example
http://autobuild.buildroot.org/toolchains/configs/br-arm-basic.config
is a configuration with a minimal toolchain, having just thread support.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-03 13:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 7:52 [Buildroot] [PATCH 1/1] libFTDI major version update 1. This version can coexists beside the 0.x version (libftdi.so, libftdi1.so) daniel.sangue at sangue.ch
2014-10-02 12:45 ` Mike Zick
2014-10-02 12:56 ` Mike Zick
2014-10-03 13:02 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2014-10-01 14:18 Daniel Sangue
2014-10-01 14:45 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox