Bug 551

Summary: PS DDX won't build on platforms with BuildFreeType NO
Product: xprint Reporter: Alan Coopersmith <alan.coopersmith>
Component: Build configAssignee: Roland Mainz <roland.mainz>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: eich
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch for 2004-05-05-trunk based on Alan's version none

Description Alan Coopersmith 2004-04-25 11:00:47 UTC
The Xorg tree tries to use the platform FreeType libraries on platforms that
are likely to have FreeType already installed.  On those machines, BuildFreeType
is set to NO in the imake configs, which causes the
xc/programs/Xserver/Xprint/ps/Imakefile to assume it should not be using FreeType
and it does not pass -DXP_USE_FREETYPE to the compilers.

Unfortunately, that breaks the build of PsFonts.c where it uses the FT fields
in the PsFontTypeInfoRec when they are not defined:

"PsFonts.c", line 613: undefined struct/union member: ft_download_encoding
"PsFonts.c", line 613: warning: improper pointer/integer combination: op "="
"PsFonts.c", line 614: undefined struct/union member: ft_download_font_type

The simple fix to allow this to build is:
--- /export/alanc/X.org/head/cvs-ro/xc/programs/Xserver/Xprint/ps/PsFonts.c    
Fri Apr 23 11:57:56 2004
+++ PsFonts.c   Sat Apr 24 17:49:50 2004
@@ -610,8 +610,10 @@
   }
 
   rec->adobe_ps_name         = PsGetPSFontName(pFont);
+#ifdef XP_USE_FREETYPE
   rec->ft_download_encoding  = PsGetEncodingName(pFont);
   rec->ft_download_font_type = PsGetFTDownloadFontType();
+#endif
   rec->download_ps_name      = NULL;
 
 #define SET_FONT_DOWNLOAD_STATUS(rec, downloaded) { int i; for (i = 0 ; i < 256
; i++) { (rec)->alreadyDownloaded[i]=(downloaded); } }

However, given the increasing number of platforms which have FreeType and
BuildFreeType==NO, it would be good to investigate which of the settings in
the Imakefile should be checking BuildFreeType and which should really be
checking UseFreeType2 or HasFreeType2.
Comment 1 Roland Mainz 2004-05-06 11:45:35 UTC
Alan Coopersmith wrote:
[snip]
> However, given the increasing number of platforms which have FreeType and
> BuildFreeType==NO, it would be good to investigate which of the settings in
> the Imakefile should be checking BuildFreeType and which should really be
> checking UseFreeType2 or HasFreeType2.

The Freetype code in the PostScript DDX depends on the xc/lib/font/FreeType/
code so it should be build with the same rules used in xc/lib/font/Imakefile ...
which are currently |#if BuildFreeType || BuildFreetype2Library| ...

Egbert: Are there any plans to change the |#if BuildFreeType ||
BuildFreetype2Library| rule to decide when the Freetype font module is build ?
Comment 2 Roland Mainz 2004-05-06 11:52:14 UTC
Created attachment 268 [details] [review]
Patch for 2004-05-05-trunk based on Alan's version
Comment 3 Roland Mainz 2004-05-06 11:55:41 UTC
Patch checked-in...

Checking in xc/ChangeLog;
/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.19; previous revision: 1.18
done
Checking in xc/programs/Xserver/Xprint/ps/Imakefile;
/cvs/xorg/xc/programs/Xserver/Xprint/ps/Imakefile,v  <--  Imakefile
new revision: 1.4; previous revision: 1.3
done
Checking in xc/programs/Xserver/Xprint/ps/PsFonts.c;
/cvs/xorg/xc/programs/Xserver/Xprint/ps/PsFonts.c,v  <--  PsFonts.c
new revision: 1.3; previous revision: 1.2
done
Mailing the commit message to xorg-commit@pdx.freedesktop.org...

... marking bug as FIXED (for now... please reopen if there are still any issues
to fix (like that xc/lib/font/Imakefile should use |UseFreetype| to build the
FreeType font module etc.)).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.