fondu stable port information

Package: fondu
Version: 060102
Revision: 1
Epoch: 1
BuildDepends: fink (>= 0.24.12-1)
PatchFile: %n.patch
PatchFile-MD5: bd9ba7a118e940ad6092bff38504ab60
Source: http://%N.sourceforge.net/%N_src-%v.tgz
Source-MD5: e20861beacddc1ab392bef7813641bf8
SourceDirectory: %n-%v
InstallScript: <<
make install prefix=%i
mkdir -p %i/share/man/man1
cp *.1 %i/share/man/man1
<<
DocFiles: README VERSION LICENSE
Description: Convert between Mac and UNIX font formats
DescDetail: <<
Fondu is a set of programs to interconvert between mac font
formats and pfb, ttf, otf and bdf files on unix.
<<
License: BSD
Maintainer: Matthias Neeracher
Homepage: http://fondu.sourceforge.net/

fondu stable port .patch

diff -ru fondu-orig/fondu.c fondu/fondu.c
--- fondu-orig/fondu.c 2006-09-18 21:36:12.000000000 -0700
+++ fondu/fondu.c 2006-09-19 00:03:49.000000000 -0700
@@ -940,12 +940,12 @@
#ifndef OldMacintosh
/* OS/X and linux with appropriate drivers */
static int HasResourceFork(char *filename,PSFONT *psfont) {
- char *respath = malloc(strlen(filename)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(filename)+strlen("/..namedfork/rsrc")+1);
FILE *temp;
int ret=false;

strcpy(respath,filename);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r");
free(respath);
if ( temp!=NULL ) {
diff -ru fondu-orig/frommacbinary.c fondu/frommacbinary.c
--- fondu-orig/frommacbinary.c 2006-09-18 21:36:12.000000000 -0700
+++ fondu/frommacbinary.c 2006-09-19 00:03:49.000000000 -0700
@@ -158,7 +158,7 @@

if ( rlen>0 ) {
fseek(binfile,128 + ((dlen+127)&~127),SEEK_SET);
- strcpy(name+header[1],"/rsrc");
+ strcpy(name+header[1],"/..namedfork/rsrc");
resfile = fopen(name,"w");
if ( resfile==NULL )
fprintf( stderr, "Cannot open output file: %s\n", name );
diff -ru fondu-orig/lumper.c fondu/lumper.c
--- fondu-orig/lumper.c 2006-09-18 21:36:13.000000000 -0700
+++ fondu/lumper.c 2006-09-19 00:03:49.000000000 -0700
@@ -501,12 +501,12 @@
/* If we're on a mac, we can try to see if we've got a real resource fork */
/* linux has an HFS+ driver (or whatever) too, so we might as well always */
/* do this check */
- char *respath = malloc(strlen(filename)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(filename)+strlen("/..namedfork/rsrc")+1);
FILE *temp;
int ret = false;

strcpy(respath,filename);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r");
free(respath);
if ( temp!=NULL )
diff -ru fondu-orig/res2data.c fondu/res2data.c
--- fondu-orig/res2data.c 2006-09-18 21:36:13.000000000 -0700
+++ fondu/res2data.c 2006-09-19 00:03:49.000000000 -0700
@@ -42,9 +42,9 @@
FILE *res, *temp;
int cnt;

- respath = malloc(strlen(filename)+strlen("/rsrc")+1);
+ respath = malloc(strlen(filename)+strlen("/..namedfork/rsrc")+1);
strcpy(respath,filename);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
res = fopen(respath,"r");
free(respath);

diff -ru fondu-orig/setfondname.c fondu/setfondname.c
--- fondu-orig/setfondname.c 2006-09-18 21:36:13.000000000 -0700
+++ fondu/setfondname.c 2006-09-19 00:03:49.000000000 -0700
@@ -167,12 +167,12 @@
/* If we're on a mac, we can try to see if we've got a real resource fork */
/* linux has an HFS+ driver (or whatever) too, so we might as well always */
/* do this check */
- char *respath = malloc(strlen(filename)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(filename)+strlen("/..namedfork/rsrc")+1);
FILE *temp;
int ret = false;

strcpy(respath,filename);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r+");
free(respath);
if ( temp!=NULL ) {
diff -ru fondu-orig/showfond.c fondu/showfond.c
--- fondu-orig/showfond.c 2006-09-18 21:36:13.000000000 -0700
+++ fondu/showfond.c 2006-09-19 00:03:49.000000000 -0700
@@ -619,12 +619,12 @@
/* If we're on a mac, we can try to see if we've got a real resource fork */
/* linux has an HFS+ driver (or whatever) too, so we might as well always */
/* do this check */
- char *respath = malloc(strlen(filename)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(filename)+strlen("/..namedfork/rsrc")+1);
FILE *temp;
int ret = false;

strcpy(respath,filename);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r");
free(respath);
if ( temp!=NULL ) {
diff -ru fondu-orig/tomacbinary.c fondu/tomacbinary.c
--- fondu-orig/tomacbinary.c 2006-09-18 21:36:13.000000000 -0700
+++ fondu/tomacbinary.c 2006-09-19 00:03:49.000000000 -0700
@@ -50,7 +50,7 @@
/* MacBinary files use the same CRC that binhex does (in the MacBinary header) */
extern unsigned long binhex_crc(unsigned char *buffer,int size);

-/* the resource fork may be opened (on Mac OS/X) by /rsrc */
+/* the resource fork may be opened (on Mac OS/X) by /..namedfork/rsrc */


/* tobin [-res rfilename] filename {[-res filename] rfilename} */
@@ -81,11 +81,11 @@
static FILE *ResForkOfDataFile(char *dataname) {
#ifndef OldMacintosh
/* OS/X and linux with appropriate drivers */
- char *respath = malloc(strlen(dataname)+strlen("/rsrc")+1);
+ char *respath = malloc(strlen(dataname)+strlen("/..namedfork/rsrc")+1);
FILE *temp;

strcpy(respath,dataname);
- strcat(respath,"/rsrc");
+ strcat(respath,"/..namedfork/rsrc");
temp = fopen(respath,"r");
free(respath);
return( temp );

fondu _unstable_ port .patch