libftdi Archives

Subject: Re: Parallel installation of libftdi 1.x and 0.x

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Rogier Wolff <R.E.Wolff@xxxxxxxxxxxx>
Date: Thu, 21 Jun 2012 11:42:50 +0200
Hi Rogier,

On Monday, 18. June 2012 17:13:03 Rogier Wolff wrote:
> So my preference would be to be able to have the code compile against
> libftdi-1.0 and libftdi-2.0 without chaning any source code.
> 
> My proposal: Put an ftdi.h in /usr/include/libftdi-1.0/

Alright, Xiaofan requested the same. Let's put it there.
Hopefully people get their compile flags right...

> Users who want to use the 1.0 version will link
> /usr/include/libftdi-1.0/ftdi.h to /usr/include/ftdi.h

Either that or it's already "occupied" by libftdi 0.x. :o)

> If there is more than one header file, we should consider recommending
> to include "ftdi/ftdi.h", so that we have just one symlink to the
> directory to change when you swap versions.

Who is supposed to create the symlink? Distribution packages?
Then it would depend on the installation order and that's not practical.
I struggle with that when it happens with the "/usr/include/db.h" header:
Sometimes it points to /usr/include/db3/db.h" or "/usr/include/db4/db.h".
Took me quite some time to diagnose crashing applications.

-> Let's not recommend the symlink by default, it's for "advanced" users ;)


So this is my "final" layout:
- libftdi-config -> libftdi1-config
- ftdi.h -> /usr/include/libftdi1/ftdi.h
- libftdi.pc -> libftdi1.pc (pkgconfig file). Also "libftdipp1.pc"
- Rename "libftdi.spec" to "libftdi1.spec"

- [NEW]: The python wrapper will also be called "ftdi1",
  otherwise it would clash with libftdi 0.x.
  The "setup.py" will be adapted accordingly and I'll
  ask Michou for feedback once I'm done tinkering with it.

Best regards,
Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread