Bug 50009

Summary: (no subject)
Product: Ports & Packages Reporter: Seva Gluschenko <gvs>
Component: Individual Port(s)Assignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Seva Gluschenko 2003-03-14 17:50:05 UTC
	While updating XFree86-4* ports for XFree86 4.3.0 several important things
	were missed, e.g. expat, and freetype related site definitions. It results
	to older and outdated libexpat and libfreetype to be built and installed into
	/usr/X11R6 tree causing a bit of inconvenience and mesh.

Fix: Apply patch below, rebuild and reinstall libraries.

How-To-Repeat: 	cvs/cvsup your ports/x11, cd ports/x11/XFree86-4-libraries and type make.
	After build is done, try

	find work/xc -name libexpat* -ls

	and the same for freetype. As far as you can see, They ARE built and will be
	installed into /usr/X11R6/lib tree. Moreover, the related X apps and libs
	can be (and some already) linked against those oldies.
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2003-03-14 17:53:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anholt

Over to Maintainer
Comment 2 Seva Gluschenko 2003-03-17 16:37:05 UTC
Well, actually I was incomplete in my research regarding XFree86,
because a problem is a bit bigger than it might seem. XFree86 4.3.0
has bundled expat, Xft, fontconfig, freetype, they all are outdated,
they all are in dependencies chains. So, the correct patch should be

--- scripts/configure.orig	Fri Mar 14 20:40:36 2003
+++ scripts/configure	Mon Mar 17 19:31:28 2003
@@ -55,6 +55,15 @@
 echo "#define FreeBSDBuildXlib YES"		>> $LOCALDEF
 echo "#define FreeBSDBuildXbin NO"		>> $LOCALDEF
 echo "#define UseInstalledPrograms YES"		>> $LOCALDEF
+echo '#define HasExpat YES
+#define HasFreetype2    YES
+#define Freetype2Dir    /usr/local
+#define BuildXft1Library	NO
+#define HasXft		YES
+#define HasFontconfig	YES
+#define FontconfigDir	/usr/X11R6
+#define PreloadXFTSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo libXft.so.? libXrender.so.? libfontconfig.so.?)`'					    >> $LOCALDEF
+

 # Copy ORIGDEF to DESTDEF
 rm -f $DESTDEF

The xc/config/cf/X11.tmpl should be extra patched, too. I hope, the
patch below instead of attached file won't cause too much trouble:

--- config/cf/X11.tmpl.orig	Tue Mar  4 18:21:10 2003
+++ config/cf/X11.tmpl	Mon Mar 17 15:16:49 2003
@@ -569,19 +569,19 @@
 #define BuildRenderLibrary	!BuildServersOnly
 #endif
 #ifndef BuildXftLibrary
-#define BuildXftLibrary		BuildRenderLibrary
+#define BuildXftLibrary		BuildRenderLibrary && !HasXft
 #endif
 #ifndef BuildXft1Library
 #define BuildXft1Library	BuildRenderLibrary
 #endif
 #ifndef UseFontconfig
-#define UseFontconfig		BuildXftLibrary
+#define UseFontconfig		(BuildXftLibrary || BuildXft1Library || HasXft)
 #endif
 #ifndef BuildFontconfigLibrary
 #define BuildFontconfigLibrary	(UseFontconfig && !HasFontconfig)
 #endif
 #ifndef UseFreetype2
-#define UseFreetype2		(BuildXftLibrary || BuildXft1Library)
+#define UseFreetype2		(BuildXftLibrary || BuildXft1Library || HasXft)
 #endif
 #ifndef HasExpat
 #define HasExpat		NO
@@ -3189,7 +3199,7 @@
 #define XftClientLibs $(XFTLIB) FontconfigClientLibs $(XRENDERLIB)
 #endif

-XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES)
+XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) -I$(INCROOT)

 #if UseFontconfig


There's also a diff for programs/x11perf/Imakefile which depends on
Xft, I include it here not to open the separate PR on the related
issue:

--- programs/x11perf/Imakefile.orig	Mon Mar 17 15:12:52 2003
+++ programs/x11perf/Imakefile	Mon Mar 17 15:13:41 2003
@@ -18,7 +18,7 @@
     XRENDERLIBS = $(XRENDERLIB)
     XRENDERINCS = $(XRENDERINCLUDES)
 #endif
-#if BuildXftLibrary
+#if BuildXftLibrary || HasXft
         XFTDEFS = -DXFT
         XFTDEPS = XftClientDepLibs $(DEPXRENDERLIB)
         XFTLIBS = XftClientLibs $(XRENDERLIB)

Well. Actually, that's all. And all that stuff doesn't help with Qt
and "fonts all look the same" problem %(

SY, Seva Gluschenko | GVS-RIPE | GVS3-RIPN
Comment 3 Eric Anholt freebsd_committer freebsd_triage 2003-04-06 10:02:22 UTC
State Changed
From-To: open->closed

It seems the submitter had imake-4 from the pre-4.3 ports installed and just  
needed to update.