Bug 39342

Summary: Add automatic truetype support to Mozilla build
Product: Ports & Packages Reporter: Joe Kelsey <joe>
Component: Individual Port(s)Assignee: Maxim Sobolev <sobomax>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
truetype.sh none

Description Joe Kelsey 2002-06-15 20:10:01 UTC
	Add automatic setting of TrueType fonts to Mozilla build

Fix: Modify Makefile to call files/truetype.sh if WITH_TRUETYPE_FONTS
	is set during install step.



files/truetype.sh:

#!/bin/sh
# Allow passing truetype font list as parameter or in 
# variable WITH_TRUETYPE_FONTS
if [ -n "$1" ]
then
  WITH_TRUETYPE_FONTS=$1
fi
# If called from ports Makefile, PREFIX will be /usr/X11R6.
# MOZILLA_FIVE_HOME may or may not be set.
UNIXJS=${MOZILLA_FIVE_HOME:-${PREFIX:-/usr/X11R6}/lib/mozilla}/defaults/pref/unix.js
# We just append new pref settings to unix.js.
# Turn truetype fonts on
echo 'pref("font.FreeType2.enable", true);' >> $UNIXJS
# If WITH_TRUETYPE_FONTS contains a colon, do special loop
ifsSave="$IFS"
if [ $WITH_TRUETYPE_FONTS = *:* ]
then
  n=1
  IFS=:
  for i in $WITH_TRUETYPE_FONTS
  do IFS="$ifsSave"
     echo 'pref("font.directory.truetype.'$n'","'$i'");' >> $UNIXJS
     n=$(($n+1))
  done
  IFS="$ifsSave"
# Otherwise, single font directory.
else
  echo 'pref("font.directory.truetype.1","'$WITH_TRUETYPE_FONTS'");' >> $UNIXJS
fi--Wt0O6O9joNGZN7EkdEw3VSDv8Jl1afQz6Bd2O9Nvce77vGA8
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.old	Thu Jun  6 18:07:59 2002
+++ Makefile	Sat Jun 15 11:56:11 2002
@@ -120,5 +120,8 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/mozilla ${PREFIX}/bin
 	${LN} -sf ${LOCALBASE}/jdk1.3.1/jre/plugin/i386/ns600/libjavaplugin_oji.so \
 		${PREFIX}/lib/mozilla/plugins/libjavaplugin_oji.so
+.if defined(WITH_TRUETYPE_FONTS)
+	files/truetype.sh
+.endif
 
 .include <bsd.port.post.mk>
How-To-Repeat: 	Mozilla build does not automatically set TrueType prefs in
	unix.js if truetype fonts are present on the system.  Add a new
	Makefile parameter, WITH_TRUETYPE_FONTS=path to allow setting
	Truetype fonts during install step.  path can be a single
	directory or a list of directories separated by :.
Comment 1 Pete Fritchman freebsd_committer freebsd_triage 2002-06-15 20:12:57 UTC
Responsible Changed
From-To: freebsd-ports->sobomax

Over to maintainer.
Comment 2 Joe Kelsey 2002-09-12 19:41:21 UTC
Do you intend to implement this?

I have an improved script (attached).

/Joe
Comment 3 Joe Kelsey 2003-04-18 17:55:04 UTC
please close.

This is no longer a problem.
Comment 4 Maxim Sobolev freebsd_committer freebsd_triage 2003-05-23 00:18:32 UTC
State Changed
From-To: open->closed

Closed at originator's request.