[Fink-devel] fontconfig-path incompatible with xquartz

2008-09-25 Thread Martin Costabel
The xquartz X11 update packages have switched from
/usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
/usr/X11/lib/X11/fontconfig/fonts.conf

Don't ask me why, probably because of a general "backward comaptibility 
is so boring" attitude. See the thread from

to

on the xquartz-dev mailing list.

The change happened already several months ago, I think in 
xquartz-2.2.0. And since Fink is now recommending to install the xquartz 
updates as a cure to the incompatibilities between Apple's stock X11 and 
Apple's stock xcode tools, the fontconfig-path package needs to adapt to 
this situation. Note that stock 10.5.5 X11 still uses the old directory 
for fonts.conf.

I don't know the fontconfig xml based lingo, so I don't know if the 
 directive in /sw/share/fontconfig-path/fontconfig-path.conf 
can be conditionalized on the existence of one fonts.conf file or 
another. It is probably easier to do this in a PostInst script.

In any case, the current situation is broken. If you run any executable 
that uses X11 fonts and fontconfig on an xquartz-updated X11 
installation, you get

Fontconfig error: Cannot load config file 
"/usr/X11/lib/X11/fonts/fonts.conf"

and the fonts are not loaded.

-- 
Martin



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-11-13 Thread Alexander Hansen

On Sep 25, 2008, at 4:47 AM, Martin Costabel wrote:

> The xquartz X11 update packages have switched from
> /usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
> /usr/X11/lib/X11/fontconfig/fonts.conf
>
> Don't ask me why, probably because of a general "backward  
> comaptibility
> is so boring" attitude. See the thread from
>  >
> to
>  >
> on the xquartz-dev mailing list.
>
> The change happened already several months ago, I think in
> xquartz-2.2.0. And since Fink is now recommending to install the  
> xquartz
> updates as a cure to the incompatibilities between Apple's stock X11  
> and
> Apple's stock xcode tools, the fontconfig-path package needs to  
> adapt to
> this situation. Note that stock 10.5.5 X11 still uses the old  
> directory
> for fonts.conf.
>
> I don't know the fontconfig xml based lingo, so I don't know if the
>  directive in /sw/share/fontconfig-path/fontconfig-path.conf
> can be conditionalized on the existence of one fonts.conf file or
> another. It is probably easier to do this in a PostInst script.
>

Since the package uses the profile.d mechanism, perhaps it might be  
easier to have two versions of the conf file and to do the  
conditionals in /sw/etc/profile.d/fontconfig-path.(c)sh to set  
FONTCONFIG_FILE to the appropriate place for the user's X11.

> In any case, the current situation is broken. If you run any  
> executable
> that uses X11 fonts and fontconfig on an xquartz-updated X11
> installation, you get
>
> Fontconfig error: Cannot load config file
> "/usr/X11/lib/X11/fonts/fonts.conf"
>
> and the fonts are not loaded.
>
> -- 
> Martin
>
>

Also of note:  this error gave me a segfault while building lilypond.   
Hacking fontconfig-path.conf to point to the right place fixed that.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-11-13 Thread Alexander Hansen
>
> Also of note:  this error gave me a segfault while building  
> lilypond.  Hacking fontconfig-path.conf to point to the right place  
> fixed that.

Actually, that wasn't the case.  It was apparently the presence of  
fink's flex that did that.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-12-30 Thread Alexander Hansen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin Costabel wrote:
> The xquartz X11 update packages have switched from
> /usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
> /usr/X11/lib/X11/fontconfig/fonts.conf
>
> Don't ask me why, probably because of a general "backward comaptibility
> is so boring" attitude. See the thread from
> 
> to
> 
> on the xquartz-dev mailing list.
>
> The change happened already several months ago, I think in
> xquartz-2.2.0. And since Fink is now recommending to install the xquartz
> updates as a cure to the incompatibilities between Apple's stock X11 and
> Apple's stock xcode tools, the fontconfig-path package needs to adapt to
> this situation. Note that stock 10.5.5 X11 still uses the old directory
> for fonts.conf.
>
> I don't know the fontconfig xml based lingo, so I don't know if the
>  directive in /sw/share/fontconfig-path/fontconfig-path.conf
> can be conditionalized on the existence of one fonts.conf file or
> another. It is probably easier to do this in a PostInst script.
>
> In any case, the current situation is broken. If you run any executable
> that uses X11 fonts and fontconfig on an xquartz-updated X11
> installation, you get
>
> Fontconfig error: Cannot load config file
> "/usr/X11/lib/X11/fonts/fonts.conf"
>
> and the fonts are not loaded.
>
I've attached a modification to the .info and .patch file.
Essentially this works just as Martin suggests:  there are now
fontconfig-path.conf.oldx and fontconfig-path.conf.newx, and a
symbolic link to the appropriate version is generated at install time.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklajzMACgkQB8UpO3rKjQ8mugCeLy77gDKS8mXf7PCfs7Q/AGyZ
K/wAnjc6UXeWLsL2WfNDDNotGn4YIdTU
=K87e
-END PGP SIGNATURE-

Package: fontconfig-path
Version: 20071103
Revision: 3
Distribution: 10.5
Type: nosource
NoSourceDirectory: true
BuildDepends: fink (>= 0.24.12)
PatchFile: %n-10.5.patch
PatchFile-MD5: 840e5c8ff200084a64a6bb90cb8f9334
PatchScript: sed 's|@PREFIX@|%p|' %{PatchFile} | patch -p1
CompileScript: echo "No compile needed"
InstallScript: <<
mkdir -p %i/share/%n
cp %n.conf* %i/share/%n
mkdir -p %i/etc/profile.d
chmod a+x %n.*sh
cp %n.*sh %i/etc/profile.d
<<
PostInstScript: <<
#!/bin/sh -ev
  cd %p/share/%n
  OLD_FONTCONFIG_FILE=/usr/X11/lib/X11/fonts/fonts.conf
  NEW_FONTCONFIG_FILE=/usr/X11/lib/X11/fontconfig/fonts.conf
  if [ -e $OLD_FONTCONFIG_FILE ] ; then 
ln %n.conf.oldx %n.conf
  else ln %n.conf.newx %n.conf
  fi
<<
PostRmScript: <<
#!/bin/sh -ev
  OLD_FONTCONFIG_FILE=/usr/X11/lib/X11/fonts/fonts.conf
  NEW_FONTCONFIG_FILE=/usr/X11/lib/X11/fontconfig/fonts.conf
  if [[ "$1" == "remove" || "$1" == "purge" ]]; then
rm -rf %p/share/fontconfig-path
if [ -e $OLD_FONTCONFIG_FILE ] ; then 
FONTCONFIG_FILE=$OLD_FONTCONFIG_FILE fc-cache || echo Ignoring errors...
else FONTCONFIG_FILE=$NEW_FONTCONFIG_FILE fc-cache || echo Ignoring 
errors...
fi
  fi
<<
DocFiles: README
Description: Add custom directories to fontconfig search
DescUsage: <<
 If fontconfig is having trouble finding fonts, update fontconf-path to the
 latest version and then try "fink reinstall fontconfig-path", followed by
 "fink reinstall fc-ghostscript-fonts" (if fc-ghostscript fonts was installed.
<<
License: Public Domain
Maintainer: Matthias Neeracher 


diff -ruN fontconfig-path-orig/README fontconfig-path/README
--- fontconfig-path-orig/README Wed Dec 31 16:00:00 1969
+++ fontconfig-path/README  Sat Jan 29 00:15:27 2005
@@ -0,0 +1,16 @@
+fontconfig-path is a simple package to add additional font directories, e.g. 
the ghostscript fonts,
+to the fontconfig search path. 
+
+To use fontconfig-path, add the following lines to your package
+
+Depend: fontconfig-path
+Install: <<
+  mkdir -p %i/share/fontconfig-path
+  ln -s your-font-directory %i/share/fontconfig-path/your-package-name
+<<
+PostInstScript: fc-cache
+PostRmScript: fc-cache
+
+fontconfig-path is in the public domain.
+
+Matthias Neeracher
diff -ruN fontconfig-path-orig/fontconfig-path.conf.oldx 
fontconfig-path/fontconfig-path.conf.oldx
--- fontconfig-path-orig/fontconfig-path.conf.oldx  Wed Dec 31 16:00:00 1969
+++ fontconfig-path/fontconfig-path.conf.oldx   Fri Jan 28 23:52:42 2005
@@ -0,0 +1,12 @@
+
+
+
+
+   @PREFIX@/share/fontconfig-path
+
+
+   /usr/X11/lib/X11/fonts/fonts.conf
+
+
diff -ruN fontconfig-path-orig/fontconfig-path.csh 
fontconfig-path/fontconfig-path.csh
--- fontconfig-path-orig/fontconfig-path.cshWed Dec 31 16:00:00 1969
+++ fontconfig-path/fontconfig-path.csh Fri Jan 28 23:55:05 2005
@@ -0,0 +1 @@
+setenv FONTCONFIG_FILE @PREFIX@/share/fontconfig-path/fontconfig-path.conf
diff -ruN fontconfig-path-orig/fontconfig-path.sh 
fontconfig-pat

Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-12-30 Thread Matthias Neeracher
Hmm, I must have been asleep at the wheel on this matter. Sorry about  
that...

On Dec 30, 2008, at 22:14 , Alexander Hansen wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Martin Costabel wrote:
>> The xquartz X11 update packages have switched from
>> /usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
>> /usr/X11/lib/X11/fontconfig/fonts.conf
>> [...]
>> I don't know the fontconfig xml based lingo, so I don't know if the
>>  directive in /sw/share/fontconfig-path/fontconfig-path.conf
>> can be conditionalized on the existence of one fonts.conf file or
>> another. It is probably easier to do this in a PostInst script.
>>
> I've attached a modification to the .info and .patch file.
> Essentially this works just as Martin suggests:  there are now
> fontconfig-path.conf.oldx and fontconfig-path.conf.newx, and a
> symbolic link to the appropriate version is generated at install time.

Thanks for looking into this!

While this would certainly be preferable over the current situation, I  
find it somewhat unsatisfactory that this needs a reinstall if the  
xquartz update gets applied behind the package's back. I'm leaning  
toward including both the old and the new path.

Matthias


--
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-12-30 Thread Alexander Hansen
Matthias Neeracher wrote:
> Hmm, I must have been asleep at the wheel on this matter. Sorry about
> that...
>
> On Dec 30, 2008, at 22:14 , Alexander Hansen wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Martin Costabel wrote:
>>> The xquartz X11 update packages have switched from
>>> /usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
>>> /usr/X11/lib/X11/fontconfig/fonts.conf
>>> [...]
>>> I don't know the fontconfig xml based lingo, so I don't know if the
>>>  directive in /sw/share/fontconfig-path/fontconfig-path.conf
>>> can be conditionalized on the existence of one fonts.conf file or
>>> another. It is probably easier to do this in a PostInst script.
>>>
>> I've attached a modification to the .info and .patch file.
>> Essentially this works just as Martin suggests:  there are now
>> fontconfig-path.conf.oldx and fontconfig-path.conf.newx, and a
>> symbolic link to the appropriate version is generated at install time.
>
> Thanks for looking into this!
>
> While this would certainly be preferable over the current situation, I
> find it somewhat unsatisfactory that this needs a reinstall if the
> xquartz update gets applied behind the package's back. I'm leaning
> toward including both the old and the new path.
>
> Matthias
>
I'm always in favor of a more optimal solution. :-)

--
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel


Re: [Fink-devel] fontconfig-path incompatible with xquartz

2008-12-30 Thread Martin Costabel
Matthias Neeracher wrote:
> 
> Hmm, I must have been asleep at the wheel on this matter. Sorry about 
> that...
> 
> On Dec 30, 2008, at 22:14 , Alexander Hansen wrote:
> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Martin Costabel wrote:
>>> The xquartz X11 update packages have switched from
>>> /usr/X11/lib/X11/fonts/fonts.conf for the fontconfig conf file to
>>> /usr/X11/lib/X11/fontconfig/fonts.conf
>>> [...]
>>> I don't know the fontconfig xml based lingo, so I don't know if the
>>>  directive in /sw/share/fontconfig-path/fontconfig-path.conf
>>> can be conditionalized on the existence of one fonts.conf file or
>>> another. It is probably easier to do this in a PostInst script.
>>>
>> I've attached a modification to the .info and .patch file.
>> Essentially this works just as Martin suggests:  there are now
>> fontconfig-path.conf.oldx and fontconfig-path.conf.newx, and a
>> symbolic link to the appropriate version is generated at install time.
> 
> Thanks for looking into this!
> 
> While this would certainly be preferable over the current situation, I 
> find it somewhat unsatisfactory that this needs a reinstall if the 
> xquartz update gets applied behind the package's back. I'm leaning 
> toward including both the old and the new path.

BTW, in the meantime stock Leopard X11 switched to the new directory 
/usr/X11/lib/X11/fontconfig/ too. I think this happened with the 10.5.5 
update.

-- 
Martin





--
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel