mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libftdi1: new package
@ 2013-03-26 19:47 Andreas Helmcke
  2013-03-28  9:36 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Helmcke @ 2013-03-26 19:47 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Andreas Helmcke <ahe@helmcke.name>
---
 rules/libftdi1.in   |   40 ++++++++++++++++++++++++++
 rules/libftdi1.make |   77 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)
 create mode 100644 rules/libftdi1.in
 create mode 100644 rules/libftdi1.make

diff --git a/rules/libftdi1.in b/rules/libftdi1.in
new file mode 100644
index 0000000..b9ad06a
--- /dev/null
+++ b/rules/libftdi1.in
@@ -0,0 +1,40 @@
+## SECTION=system_libraries
+
+menuconfig LIBFTDI1
+	tristate
+	prompt "libftdi1                      "
+	select HOST_CMAKE
+	select LIBUSB
+	select BOOST if LIBFTDI1_CPP_WRAPPER
+	select LIBCONFUSE if LIBFTDI1_FTDI_EEPROM
+	help
+	   libFTDI is an open source library to talk to FTDI chips:
+	   FT232BM, FT245BM, FT2232C, FT2232D, FT245R and FT232H
+	   including the popular bitbang mode.
+
+	   libftdi1 is the successor of libftdi based on libusb1
+
+if LIBFTDI1
+
+config LIBFTDI1_EXAMPLES
+	bool
+	prompt "build and install examples"
+	help
+	  Build and install example programes
+
+config LIBFTDI1_FTDI_EEPROM
+	bool
+	prompt "build and install ftdi_eeprom"
+	help
+		Advanced tool to read and write ftdi eeprom.
+		Simpler tools are available when installing examples.
+
+		Needs library confuse
+
+config LIBFTDI1_CPP_WRAPPER
+	bool
+	prompt "enable C++ wrapper"
+	help
+		Needs library boost
+
+endif
diff --git a/rules/libftdi1.make b/rules/libftdi1.make
new file mode 100644
index 0000000..b885302
--- /dev/null
+++ b/rules/libftdi1.make
@@ -0,0 +1,77 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2013 by Andreas Helmcke <ahelmcke@ela-soft.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBFTDI1) += libftdi1
+
+#
+# Paths and names
+#
+LIBFTDI1_VERSION	:= 1.0
+LIBFTDI1_MD5		:= e02dd77ee10b82b5edfbb8c199185bbf
+LIBFTDI1		:= libftdi1-$(LIBFTDI1_VERSION)
+LIBFTDI1_SUFFIX	:= tar.bz2
+LIBFTDI1_URL		:= http://www.intra2net.com/en/developer/libftdi/download/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
+LIBFTDI1_SOURCE	:= $(SRCDIR)/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
+LIBFTDI1_DIR		:= $(BUILDDIR)/$(LIBFTDI1)
+LIBFTDI1_LICENSE	:= LGPLv2.1
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBFTDI1_PATH	:= PATH=$(CROSS_PATH)
+LIBFTDI1_CONF_ENV	:= $(CROSS_ENV)
+
+#
+# cmake
+#
+LIBFTDI1_CONF_TOOL	:= cmake
+LIBFTDI1_CONF_OPT	:= $(CROSS_CMAKE_USR) -DDOCUMENTATION=OFF -DPYTHON_BINDINGS=OFF
+LIBFTDI1_CONF_OPT += -DEXAMPLES=$(call ptx/ifdef,PTXCONF_LIBFTDI1_EXAMPLES,ON,OFF)
+LIBFTDI1_CONF_OPT += -DFTDIPP=$(call ptx/ifdef,PTXCONF_LIBFTDI1_CPP_WRAPPER,ON,OFF)
+LIBFTDI1_CONF_OPT += -DFTDI_EEPROM=$(call ptx/ifdef,PTXCONF_LIBFTDI1_FTDI_EEPROM,ON,OFF)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libftdi1.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libftdi1)
+	@$(call install_fixup, libftdi1, PRIORITY, optional)
+	@$(call install_fixup, libftdi1, SECTION, base)
+	@$(call install_fixup, libftdi1, AUTHOR, "Andreas Helmcke <ahelmcke@ela-soft.com>")
+	@$(call install_fixup, libftdi1, DESCRIPTION, missing)
+
+ifdef PTXCONF_LIBFTDI1_EXAMPLES
+	@for i in $(shell find $(LIBFTDI1_DIR)-build/examples -maxdepth 1 -type f -executable -printf "%f\n"); do \
+		$(call install_copy, libftdi1, 0, 0, 0755, $(LIBFTDI1_DIR)-build/examples/$$i, /usr/local/bin/$$i); \
+	done
+endif
+
+ifdef PTXCONF_LIBFTDI1_FTDI_EEPROM
+	@$(call install_copy, libftdi1, 0, 0, 0755, -, /usr/bin/ftdi_eeprom)
+endif
+
+	@$(call install_lib, libftdi1, 0, 0, 0644, libftdi1)
+
+ifdef PTXCONF_LIBFTDI1_CPP_WRAPPER
+	@$(call install_lib, libftdi1, 0, 0, 0644, libftdipp1)
+endif
+
+	@$(call install_finish, libftdi1)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] libftdi1: new package
  2013-03-26 19:47 [ptxdist] [PATCH] libftdi1: new package Andreas Helmcke
@ 2013-03-28  9:36 ` Michael Olbrich
  2013-03-28 10:41   ` Andreas Helmcke
  2013-03-28 10:44   ` [ptxdist] [PATCH-v2] " Andreas Helmcke
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2013-03-28  9:36 UTC (permalink / raw)
  To: ptxdist

On Tue, Mar 26, 2013 at 08:47:07PM +0100, Andreas Helmcke wrote:
> Signed-off-by: Andreas Helmcke <ahe@helmcke.name>
> ---
>  rules/libftdi1.in   |   40 ++++++++++++++++++++++++++
>  rules/libftdi1.make |   77 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 117 insertions(+)
>  create mode 100644 rules/libftdi1.in
>  create mode 100644 rules/libftdi1.make
> 
> diff --git a/rules/libftdi1.in b/rules/libftdi1.in
> new file mode 100644
> index 0000000..b9ad06a
> --- /dev/null
> +++ b/rules/libftdi1.in
> @@ -0,0 +1,40 @@
> +## SECTION=system_libraries
> +
> +menuconfig LIBFTDI1
> +	tristate
> +	prompt "libftdi1                      "
> +	select HOST_CMAKE
> +	select LIBUSB
> +	select BOOST if LIBFTDI1_CPP_WRAPPER
> +	select LIBCONFUSE if LIBFTDI1_FTDI_EEPROM

align the 'if' with tabs.

> +	help
> +	   libFTDI is an open source library to talk to FTDI chips:
> +	   FT232BM, FT245BM, FT2232C, FT2232D, FT245R and FT232H
> +	   including the popular bitbang mode.
> +
> +	   libftdi1 is the successor of libftdi based on libusb1
> +
> +if LIBFTDI1
> +
> +config LIBFTDI1_EXAMPLES
> +	bool
> +	prompt "build and install examples"
> +	help
> +	  Build and install example programes
> +
> +config LIBFTDI1_FTDI_EEPROM
> +	bool
> +	prompt "build and install ftdi_eeprom"
> +	help
> +		Advanced tool to read and write ftdi eeprom.
> +		Simpler tools are available when installing examples.
> +
> +		Needs library confuse

indent with <tab><space><space>

> +
> +config LIBFTDI1_CPP_WRAPPER
> +	bool
> +	prompt "enable C++ wrapper"
> +	help
> +		Needs library boost

here too.

> +
> +endif
> diff --git a/rules/libftdi1.make b/rules/libftdi1.make
> new file mode 100644
> index 0000000..b885302
> --- /dev/null
> +++ b/rules/libftdi1.make
> @@ -0,0 +1,77 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2013 by Andreas Helmcke <ahelmcke@ela-soft.com>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBFTDI1) += libftdi1
> +
> +#
> +# Paths and names
> +#
> +LIBFTDI1_VERSION	:= 1.0
> +LIBFTDI1_MD5		:= e02dd77ee10b82b5edfbb8c199185bbf
> +LIBFTDI1		:= libftdi1-$(LIBFTDI1_VERSION)
> +LIBFTDI1_SUFFIX	:= tar.bz2
> +LIBFTDI1_URL		:= http://www.intra2net.com/en/developer/libftdi/download/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
> +LIBFTDI1_SOURCE	:= $(SRCDIR)/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
> +LIBFTDI1_DIR		:= $(BUILDDIR)/$(LIBFTDI1)
> +LIBFTDI1_LICENSE	:= LGPLv2.1
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LIBFTDI1_PATH	:= PATH=$(CROSS_PATH)
> +LIBFTDI1_CONF_ENV	:= $(CROSS_ENV)

remove these 2 lines.

> +
> +#
> +# cmake
> +#
> +LIBFTDI1_CONF_TOOL	:= cmake
> +LIBFTDI1_CONF_OPT	:= $(CROSS_CMAKE_USR) -DDOCUMENTATION=OFF -DPYTHON_BINDINGS=OFF
> +LIBFTDI1_CONF_OPT += -DEXAMPLES=$(call ptx/ifdef,PTXCONF_LIBFTDI1_EXAMPLES,ON,OFF)
> +LIBFTDI1_CONF_OPT += -DFTDIPP=$(call ptx/ifdef,PTXCONF_LIBFTDI1_CPP_WRAPPER,ON,OFF)
> +LIBFTDI1_CONF_OPT += -DFTDI_EEPROM=$(call ptx/ifdef,PTXCONF_LIBFTDI1_FTDI_EEPROM,ON,OFF)

LIBFTDI1_CONF_OPT	:= \
	$(CROSS_CMAKE_USR) \
	-DDOCUMENTATION=OFF \
	-DPYTHON_BINDINGS=OFF \
	-DEXAMPLES=$(call ptx/ifdef,PTXCONF_LIBFTDI1_EXAMPLES,ON,OFF) \
	...

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libftdi1.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libftdi1)
> +	@$(call install_fixup, libftdi1, PRIORITY, optional)
> +	@$(call install_fixup, libftdi1, SECTION, base)
> +	@$(call install_fixup, libftdi1, AUTHOR, "Andreas Helmcke <ahelmcke@ela-soft.com>")
> +	@$(call install_fixup, libftdi1, DESCRIPTION, missing)
> +
> +ifdef PTXCONF_LIBFTDI1_EXAMPLES
> +	@for i in $(shell find $(LIBFTDI1_DIR)-build/examples -maxdepth 1 -type f -executable -printf "%f\n"); do \
> +		$(call install_copy, libftdi1, 0, 0, 0755, $(LIBFTDI1_DIR)-build/examples/$$i, /usr/local/bin/$$i); \
> +	done

	@cd $(LIBFTDI1_DIR)-build/examples && \
	for i in `find maxdepth 1 -type f -executable -printf "%f\n"`; do \
		$(call install_copy, libftdi1, 0, 0, 0755, \
			$(LIBFTDI1_DIR)-build/examples/$$i, \
			/usr/bin/$$i); \
	done

Note:
 - use "cd ... &&" so it fails if the dir does not exist
 - don't use 'shell', it is executed when make starts, not when the target
   commands are executed
 - don't install to /usr/local/. If the names are too generic use
   /usr/bin/ftdi-$$i or /usr/bin/libftdi/$$i or something like that.

Michael

> +endif
> +
> +ifdef PTXCONF_LIBFTDI1_FTDI_EEPROM
> +	@$(call install_copy, libftdi1, 0, 0, 0755, -, /usr/bin/ftdi_eeprom)
> +endif
> +
> +	@$(call install_lib, libftdi1, 0, 0, 0644, libftdi1)
> +
> +ifdef PTXCONF_LIBFTDI1_CPP_WRAPPER
> +	@$(call install_lib, libftdi1, 0, 0, 0644, libftdipp1)
> +endif
> +
> +	@$(call install_finish, libftdi1)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 1.7.10.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] libftdi1: new package
  2013-03-28  9:36 ` Michael Olbrich
@ 2013-03-28 10:41   ` Andreas Helmcke
  2013-03-28 12:05     ` Michael Olbrich
  2013-03-28 10:44   ` [ptxdist] [PATCH-v2] " Andreas Helmcke
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Helmcke @ 2013-03-28 10:41 UTC (permalink / raw)
  To: ptxdist

Am 28.03.2013 10:36, schrieb Michael Olbrich:
> On Tue, Mar 26, 2013 at 08:47:07PM +0100, Andreas Helmcke wrote:
>> +ifdef PTXCONF_LIBFTDI1_EXAMPLES
>> +	@for i in $(shell find $(LIBFTDI1_DIR)-build/examples -maxdepth 1 -type f -executable -printf "%f\n"); do \
>> +		$(call install_copy, libftdi1, 0, 0, 0755, $(LIBFTDI1_DIR)-build/examples/$$i, /usr/local/bin/$$i); \
>> +	done
> 
> 	@cd $(LIBFTDI1_DIR)-build/examples && \
> 	for i in `find maxdepth 1 -type f -executable -printf "%f\n"`; do \
> 		$(call install_copy, libftdi1, 0, 0, 0755, \
> 			$(LIBFTDI1_DIR)-build/examples/$$i, \
> 			/usr/bin/$$i); \
> 	done
> 
> Note:
>  [...]
>  - don't use 'shell', it is executed when make starts, not when the target
>    commands are executed

I just modified the example code which gets generated by "ptxdist newpackage src-cmake-prog".
So someone should change this too.

btw: Why is ptxdist building its own host version of cmake rather than using the one, which is installed on the build host?

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH-v2] libftdi1: new package
  2013-03-28  9:36 ` Michael Olbrich
  2013-03-28 10:41   ` Andreas Helmcke
@ 2013-03-28 10:44   ` Andreas Helmcke
  2013-03-31  8:17     ` Michael Olbrich
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Helmcke @ 2013-03-28 10:44 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Andreas Helmcke <ahe@helmcke.name>
---
 rules/libftdi1.in   |   42 ++++++++++++++++++++++++++
 rules/libftdi1.make |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 rules/libftdi1.in
 create mode 100644 rules/libftdi1.make

diff --git a/rules/libftdi1.in b/rules/libftdi1.in
new file mode 100644
index 0000000..735ef96
--- /dev/null
+++ b/rules/libftdi1.in
@@ -0,0 +1,42 @@
+## SECTION=system_libraries
+
+menuconfig LIBFTDI1
+	tristate
+	prompt "libftdi1                      "
+	select HOST_CMAKE
+	select LIBUSB
+	select BOOST 		if LIBFTDI1_CPP_WRAPPER
+	select LIBCONFUSE 	if LIBFTDI1_FTDI_EEPROM
+	help
+	   libFTDI is an open source library to talk to FTDI chips:
+	   FT232BM, FT245BM, FT2232C, FT2232D, FT245R and FT232H
+	   including the popular bitbang mode.
+
+	   libftdi1 is the successor of libftdi based on libusb1
+
+if LIBFTDI1
+
+config LIBFTDI1_EXAMPLES
+	bool
+	prompt "build and install examples"
+	help
+	  Build and install example programes.
+	  Will be installed to /usr/bin/libftdi1/
+
+config LIBFTDI1_FTDI_EEPROM
+	bool
+	prompt "build and install ftdi_eeprom"
+	help
+	  Advanced tool to read and write ftdi eeprom.
+	  Simpler tools are available when installing examples.
+	  Will be installed to /usr/bin/
+
+	  Needs library confuse
+
+config LIBFTDI1_CPP_WRAPPER
+	bool
+	prompt "enable C++ wrapper"
+	help
+	  Needs library boost
+
+endif
diff --git a/rules/libftdi1.make b/rules/libftdi1.make
new file mode 100644
index 0000000..7534b69
--- /dev/null
+++ b/rules/libftdi1.make
@@ -0,0 +1,81 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2013 by Andreas Helmcke <ahe@helmcke.name>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBFTDI1) += libftdi1
+
+#
+# Paths and names
+#
+LIBFTDI1_VERSION	:= 1.0
+LIBFTDI1_MD5		:= e02dd77ee10b82b5edfbb8c199185bbf
+LIBFTDI1		:= libftdi1-$(LIBFTDI1_VERSION)
+LIBFTDI1_SUFFIX	:= tar.bz2
+LIBFTDI1_URL		:= http://www.intra2net.com/en/developer/libftdi/download/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
+LIBFTDI1_SOURCE	:= $(SRCDIR)/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
+LIBFTDI1_DIR		:= $(BUILDDIR)/$(LIBFTDI1)
+LIBFTDI1_LICENSE	:= LGPLv2.1
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+LIBFTDI1_CONF_TOOL	:= cmake
+LIBFTDI1_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DDOCUMENTATION=OFF \
+	-DPYTHON_BINDINGS=OFF \
+	-DEXAMPLES=$(call ptx/ifdef,PTXCONF_LIBFTDI1_EXAMPLES,ON,OFF) \
+	-DFTDIPP=$(call ptx/ifdef,PTXCONF_LIBFTDI1_CPP_WRAPPER,ON,OFF) \
+	-DFTDI_EEPROM=$(call ptx/ifdef,PTXCONF_LIBFTDI1_FTDI_EEPROM,ON,OFF)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libftdi1.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libftdi1)
+	@$(call install_fixup, libftdi1, PRIORITY, optional)
+	@$(call install_fixup, libftdi1, SECTION, base)
+	@$(call install_fixup, libftdi1, AUTHOR, "Andreas Helmcke <ahe@helmcke.name>")
+	@$(call install_fixup, libftdi1, DESCRIPTION, missing)
+
+ifdef PTXCONF_LIBFTDI1_EXAMPLES
+	@cd $(LIBFTDI1_DIR)-build/examples && \
+	for i in `find . -maxdepth 1 -type f -executable -printf "%f\n"`; do \
+		$(call install_copy, libftdi1, 0, 0, 0755, \
+			$(LIBFTDI1_DIR)-build/examples/$$i, \
+			/usr/bin/libftdi1/$$i); \
+	done
+
+endif
+
+ifdef PTXCONF_LIBFTDI1_FTDI_EEPROM
+	@$(call install_copy, libftdi1, 0, 0, 0755, -, /usr/bin/ftdi_eeprom)
+endif
+
+	@$(call install_lib, libftdi1, 0, 0, 0644, libftdi1)
+
+ifdef PTXCONF_LIBFTDI1_CPP_WRAPPER
+	@$(call install_lib, libftdi1, 0, 0, 0644, libftdipp1)
+endif
+
+	@$(call install_finish, libftdi1)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
1.7.10.4



-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] libftdi1: new package
  2013-03-28 10:41   ` Andreas Helmcke
@ 2013-03-28 12:05     ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2013-03-28 12:05 UTC (permalink / raw)
  To: ptxdist

On Thu, Mar 28, 2013 at 11:41:11AM +0100, Andreas Helmcke wrote:
> Am 28.03.2013 10:36, schrieb Michael Olbrich:
> > On Tue, Mar 26, 2013 at 08:47:07PM +0100, Andreas Helmcke wrote:
> >> +ifdef PTXCONF_LIBFTDI1_EXAMPLES
> >> +	@for i in $(shell find $(LIBFTDI1_DIR)-build/examples -maxdepth 1 -type f -executable -printf "%f\n"); do \
> >> +		$(call install_copy, libftdi1, 0, 0, 0755, $(LIBFTDI1_DIR)-build/examples/$$i, /usr/local/bin/$$i); \
> >> +	done
> > 
> > 	@cd $(LIBFTDI1_DIR)-build/examples && \
> > 	for i in `find maxdepth 1 -type f -executable -printf "%f\n"`; do \
> > 		$(call install_copy, libftdi1, 0, 0, 0755, \
> > 			$(LIBFTDI1_DIR)-build/examples/$$i, \
> > 			/usr/bin/$$i); \
> > 	done
> > 
> > Note:
> >  [...]
> >  - don't use 'shell', it is executed when make starts, not when the target
> >    commands are executed
> 
> I just modified the example code which gets generated by "ptxdist newpackage src-cmake-prog".
> So someone should change this too.

Yes, I think that's broken too.

> btw: Why is ptxdist building its own host version of cmake rather than using
> the one, which is installed on the build host?

Cross compiling is tricky. I think I had to fix the Python detection three
times when we switched to a newer cmake version...

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH-v2] libftdi1: new package
  2013-03-28 10:44   ` [ptxdist] [PATCH-v2] " Andreas Helmcke
@ 2013-03-31  8:17     ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2013-03-31  8:17 UTC (permalink / raw)
  To: ptxdist

On Thu, Mar 28, 2013 at 11:44:20AM +0100, Andreas Helmcke wrote:
> Signed-off-by: Andreas Helmcke <ahe@helmcke.name>

Thanks, applied.

Michael

> ---
>  rules/libftdi1.in   |   42 ++++++++++++++++++++++++++
>  rules/libftdi1.make |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 123 insertions(+)
>  create mode 100644 rules/libftdi1.in
>  create mode 100644 rules/libftdi1.make
> 
> diff --git a/rules/libftdi1.in b/rules/libftdi1.in
> new file mode 100644
> index 0000000..735ef96
> --- /dev/null
> +++ b/rules/libftdi1.in
> @@ -0,0 +1,42 @@
> +## SECTION=system_libraries
> +
> +menuconfig LIBFTDI1
> +	tristate
> +	prompt "libftdi1                      "
> +	select HOST_CMAKE
> +	select LIBUSB
> +	select BOOST 		if LIBFTDI1_CPP_WRAPPER
> +	select LIBCONFUSE 	if LIBFTDI1_FTDI_EEPROM
> +	help
> +	   libFTDI is an open source library to talk to FTDI chips:
> +	   FT232BM, FT245BM, FT2232C, FT2232D, FT245R and FT232H
> +	   including the popular bitbang mode.
> +
> +	   libftdi1 is the successor of libftdi based on libusb1
> +
> +if LIBFTDI1
> +
> +config LIBFTDI1_EXAMPLES
> +	bool
> +	prompt "build and install examples"
> +	help
> +	  Build and install example programes.
> +	  Will be installed to /usr/bin/libftdi1/
> +
> +config LIBFTDI1_FTDI_EEPROM
> +	bool
> +	prompt "build and install ftdi_eeprom"
> +	help
> +	  Advanced tool to read and write ftdi eeprom.
> +	  Simpler tools are available when installing examples.
> +	  Will be installed to /usr/bin/
> +
> +	  Needs library confuse
> +
> +config LIBFTDI1_CPP_WRAPPER
> +	bool
> +	prompt "enable C++ wrapper"
> +	help
> +	  Needs library boost
> +
> +endif
> diff --git a/rules/libftdi1.make b/rules/libftdi1.make
> new file mode 100644
> index 0000000..7534b69
> --- /dev/null
> +++ b/rules/libftdi1.make
> @@ -0,0 +1,81 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2013 by Andreas Helmcke <ahe@helmcke.name>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBFTDI1) += libftdi1
> +
> +#
> +# Paths and names
> +#
> +LIBFTDI1_VERSION	:= 1.0
> +LIBFTDI1_MD5		:= e02dd77ee10b82b5edfbb8c199185bbf
> +LIBFTDI1		:= libftdi1-$(LIBFTDI1_VERSION)
> +LIBFTDI1_SUFFIX	:= tar.bz2
> +LIBFTDI1_URL		:= http://www.intra2net.com/en/developer/libftdi/download/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
> +LIBFTDI1_SOURCE	:= $(SRCDIR)/$(LIBFTDI1).$(LIBFTDI1_SUFFIX)
> +LIBFTDI1_DIR		:= $(BUILDDIR)/$(LIBFTDI1)
> +LIBFTDI1_LICENSE	:= LGPLv2.1
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# cmake
> +#
> +LIBFTDI1_CONF_TOOL	:= cmake
> +LIBFTDI1_CONF_OPT	:= \
> +	$(CROSS_CMAKE_USR) \
> +	-DDOCUMENTATION=OFF \
> +	-DPYTHON_BINDINGS=OFF \
> +	-DEXAMPLES=$(call ptx/ifdef,PTXCONF_LIBFTDI1_EXAMPLES,ON,OFF) \
> +	-DFTDIPP=$(call ptx/ifdef,PTXCONF_LIBFTDI1_CPP_WRAPPER,ON,OFF) \
> +	-DFTDI_EEPROM=$(call ptx/ifdef,PTXCONF_LIBFTDI1_FTDI_EEPROM,ON,OFF)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libftdi1.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, libftdi1)
> +	@$(call install_fixup, libftdi1, PRIORITY, optional)
> +	@$(call install_fixup, libftdi1, SECTION, base)
> +	@$(call install_fixup, libftdi1, AUTHOR, "Andreas Helmcke <ahe@helmcke.name>")
> +	@$(call install_fixup, libftdi1, DESCRIPTION, missing)
> +
> +ifdef PTXCONF_LIBFTDI1_EXAMPLES
> +	@cd $(LIBFTDI1_DIR)-build/examples && \
> +	for i in `find . -maxdepth 1 -type f -executable -printf "%f\n"`; do \
> +		$(call install_copy, libftdi1, 0, 0, 0755, \
> +			$(LIBFTDI1_DIR)-build/examples/$$i, \
> +			/usr/bin/libftdi1/$$i); \
> +	done
> +
> +endif
> +
> +ifdef PTXCONF_LIBFTDI1_FTDI_EEPROM
> +	@$(call install_copy, libftdi1, 0, 0, 0755, -, /usr/bin/ftdi_eeprom)
> +endif
> +
> +	@$(call install_lib, libftdi1, 0, 0, 0644, libftdi1)
> +
> +ifdef PTXCONF_LIBFTDI1_CPP_WRAPPER
> +	@$(call install_lib, libftdi1, 0, 0, 0644, libftdipp1)
> +endif
> +
> +	@$(call install_finish, libftdi1)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 1.7.10.4
> 
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-31  8:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 19:47 [ptxdist] [PATCH] libftdi1: new package Andreas Helmcke
2013-03-28  9:36 ` Michael Olbrich
2013-03-28 10:41   ` Andreas Helmcke
2013-03-28 12:05     ` Michael Olbrich
2013-03-28 10:44   ` [ptxdist] [PATCH-v2] " Andreas Helmcke
2013-03-31  8:17     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox