Bug#442549: libfreetype6-dev: Wrong include in /usr/include/ft2build.h

2007-09-23 Thread Steve Langasek
On Sun, Sep 16, 2007 at 10:35:39PM +0200, Giacomo Catenazzi wrote:
 Steve Langasek wrote:
  On Sun, Sep 16, 2007 at 04:57:21PM +0200, Giacomo A. Catenazzi wrote:
  Package: libfreetype6-dev
  Version: 2.3.5-1+b1
  Severity: normal

  In /usr/include/ft2build.h there is a line: 

  #include  freetype/config/ftheader.h

  but this file file is not in the usual C include path,
  so change it to:
  #include  freetype2/freetype/config/ftheader.h

  No, packages that build with libfreetype6-dev are expected to use the
  include path settings provided by pkg-config --cflags freetype2.

 No ;-)
 It is supposed that including a #include header.h will
 not break C code.

You suppose wrong.  There are lots of ways that this can break, including
setting an incorrect -I option that results in pulling a header from a
subdir under the wrong name.

 If the pkg-config --cflags freetype2 is required, you should
 move the ft2build.h from /usr/include/ to /usr/include/freetype2/
 so that the file will be found only if the right pkg-config is found.

Well, I don't see any reason that ft2build.h needs to be in /usr/include
directly, but I also don't find any reason that it needs to be moved into
the subdirectory.  So I'm not going to make any particular effort to move
this header, unless you see that the placement is somehow a Debian-specific
bug that I can fix by /removing/ code.  Otherwise, please discuss the
placement of this header with upstream if you think it needs to change.

BTW, the header states at the top:

  /* This is a Unix-specific version of ft2build.h that should be used   */
  /* exclusively *after* installation of the library.  */
  /*   */
  /* It assumes that `/usr/local/include/freetype2' (or whatever is*/
  /* returned by the `freetype-config --cflags' or `pkg-config --cflags'   */
  /* command) is in your compilation include path. */

So at least the current placement doesn't appear to be accidental.

 BTW, personally I find pkg-config only hacks for local installations,
 but a distribution IMHO should already install and put together things
 in a better way, but maybe this will be a future step.

No, it won't be.  There are many libraries where pkg-config is the standard
upstream convention used to specify include/library paths, and applications
which want to use these libraries portably will always need to use
pkg-config.  And pkg-config is far better than all preceding solutions
anyway.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#442549: libfreetype6-dev: Wrong include in /usr/include/ft2build.h

2007-09-16 Thread Giacomo A. Catenazzi
Package: libfreetype6-dev
Version: 2.3.5-1+b1
Severity: normal

In /usr/include/ft2build.h there is a line: 

#include  freetype/config/ftheader.h

but this file file is not in the usual C include path,
so change it to:
#include  freetype2/freetype/config/ftheader.h


ciao
cate


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23-rc6-g53a3f308 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages libfreetype6-dev depends on:
ii  libc6-dev [libc-dev]2.6.1-4  GNU C Library: Development Librari
ii  libfreetype62.3.5-1+b1   FreeType 2 font engine, shared lib
ii  zlib1g-dev [libz-dev]   1:1.2.3.3.dfsg-5 compression library - development

libfreetype6-dev recommends no packages.

-- debconf-show failed



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#442549: libfreetype6-dev: Wrong include in /usr/include/ft2build.h

2007-09-16 Thread Giacomo Catenazzi
Steve Langasek wrote:
 On Sun, Sep 16, 2007 at 04:57:21PM +0200, Giacomo A. Catenazzi wrote:
 Package: libfreetype6-dev
 Version: 2.3.5-1+b1
 Severity: normal
 
 In /usr/include/ft2build.h there is a line: 
 
 #include  freetype/config/ftheader.h
 
 but this file file is not in the usual C include path,
 so change it to:
 #include  freetype2/freetype/config/ftheader.h
 
 No, packages that build with libfreetype6-dev are expected to use the
 include path settings provided by pkg-config --cflags freetype2.

No ;-)
It is supposed that including a #include header.h will
not break C code.
If the pkg-config --cflags freetype2 is required, you should
move the ft2build.h from /usr/include/ to /usr/include/freetype2/
so that the file will be found only if the right pkg-config is found.

ciao
cate


BTW, personally I find pkg-config only hacks for local installations,
but a distribution IMHO should already install and put together things
in a better way, but maybe this will be a future step.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]