Bug 87847 - [patch] add Tahoma TTF fonts to x11-fonts/webfonts port
Summary: [patch] add Tahoma TTF fonts to x11-fonts/webfonts port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jeremy Messenger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-22 18:00 UTC by Rostislav Krasny
Modified: 2005-11-12 20:03 UTC (History)
0 users

See Also:


Attachments
file.diff (6.23 KB, patch)
2005-10-22 18:00 UTC, Rostislav Krasny
no flags Details | Diff
webfonts.patch (7.13 KB, patch)
2005-10-27 20:34 UTC, Rostislav Krasny
no flags Details | Diff
tahoma.dir (5.35 KB, text/plain)
2005-10-27 20:34 UTC, Rostislav Krasny
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rostislav Krasny 2005-10-22 18:00:36 UTC
The webfonts port does not install Tahoma TTF fonts because they wasn't included in the Microsoft's "TrueType core fonts for the Web" package. On the other hand a corefonts package (Linux and Sourceforge equivalent of the webfonts) does install Tahoma from Microsoft's site. You can check it on their msttcorefonts-1.3-4.spec by following URL:

http://switch.dl.sourceforge.net/sourceforge/corefonts/msttcorefonts-1.3-4.spec

I've added Tahoma TTF fonts to the x11-fonts/webfonts port by the same way, i.e. for those who have the license.

Fix: There is also a new files/fonts.dir.with_tahoma file that could be made from files/fonts.dir by copying it and then applying following patch:



Many thanks to Andrey Chernov who helped me make that patch.--1dMatZnWgCgEmYKkdri3jMPCZj3qNdgvC5tFVWjhiHyRja4U
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -ru /usr/ports/x11-fonts/webfonts.orig/Makefile /usr/ports/x11-fonts/webfonts/Makefile
--- /usr/ports/x11-fonts/webfonts.orig/Makefile	Fri Oct 21 12:50:31 2005
+++ /usr/ports/x11-fonts/webfonts/Makefile	Sat Oct 22 17:40:30 2005
@@ -6,22 +6,30 @@
 #
 
 PORTNAME=	webfonts
-PORTVERSION=	0.21
-PORTREVISION=	3
+PORTVERSION=	0.22
 CATEGORIES=	x11-fonts
-MASTER_SITES=	${MASTER_SITE_NETBSD:S/%SUBDIR%/ms-ttf/} \
-	${MASTER_SITE_SOURCEFORGE:S/%SUBDIR%/corefonts/} \
-	ftp://ftp.uni-koeln.de/pc/win32/msoft/ \
-	ftp://ftp.extra.ouh.nl/studie/alg/hulp/win/fonts/ \
-	ftp://ftp.vn.ua/pub/win/freefont/ \
-	ftp://ftp.vsu.ru/pub/tex/font-packs/mscore/ \
-	ftp://ftp.directnet.ru/pub/fonts-win/ \
-	ftp://ftp.sinn.ru/pub/win95/fonts/ \
-	ftp://ftp.lexa.ru/pub/mirrors/ftp.vsu.ru/pub/tex/font-packs/mscore/ \
-	ftp://ftp.botik.ru/rented/znamensk/distributions/ftp.vsu.ru/pub/tex/font-packs/mscore/
-DISTFILES=	andale32.exe trebuc32.exe georgi32.exe verdan32.exe \
-		comic32.exe arialb32.exe impact32.exe arial32.exe \
-		times32.exe courie32.exe webdin32.exe
+MASTER_SITES=	${MASTER_SITE_NETBSD:S/%SUBDIR%/ms-ttf/}:group1 \
+	${MASTER_SITE_SOURCEFORGE:S/%SUBDIR%/corefonts/}:group1 \
+	ftp://ftp.uni-koeln.de/pc/win32/msoft/:group1 \
+	ftp://ftp.extra.ouh.nl/studie/alg/hulp/win/fonts/:group1 \
+	ftp://ftp.vn.ua/pub/win/freefont/:group1 \
+	ftp://ftp.vsu.ru/pub/tex/font-packs/mscore/:group1 \
+	ftp://ftp.directnet.ru/pub/fonts-win/:group1 \
+	ftp://ftp.sinn.ru/pub/win95/fonts/:group1 \
+	ftp://ftp.lexa.ru/pub/mirrors/ftp.vsu.ru/pub/tex/font-packs/mscore/:group1 \
+	ftp://ftp.botik.ru/rented/znamensk/distributions/ftp.vsu.ru/pub/tex/font-packs/mscore/:group1 \
+	http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/:group2 \
+	http://www.zeuscat.com/andrew/software/corefonts/:group2 \
+	ftp://ftp.isu.edu.tw/pub/MsDownload/ie6sp1/en/:group2
+DISTFILES=	andale32.exe:group1  arial32.exe:group1 arialb32.exe:group1 \
+		 comic32.exe:group1 courie32.exe:group1 georgi32.exe:group1 \
+		impact32.exe:group1  times32.exe:group1 trebuc32.exe:group1 \
+		verdan32.exe:group1 webdin32.exe:group1
+
+.if defined(HAVE_MSWINDOWS_LICENSE)
+DISTFILES+=	ielpkth.cab:group2
+.endif
+
 DIST_SUBDIR=	${PORTNAME}
 
 MAINTAINER=	kkonstan@duth.gr
@@ -36,8 +44,8 @@
 NO_PACKAGE=	"Restrictive license - cannot distribute in modified form"
 
 EXTRACT_CMD=		${LOCALBASE}/bin/cabextract
-EXTRACT_BEFORE_ARGS=	--lowercase --quiet
-EXTRACT_AFTER_ARGS=	-d ${WRKSRC}
+EXTRACT_BEFORE_ARGS=	-qLF '*.ttf' -d ${WRKSRC}
+EXTRACT_AFTER_ARGS=
 
 #
 # Local variables
@@ -53,6 +61,13 @@
 MSG_FILE=	${PKGDIR}/pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
+.if defined(HAVE_MSWINDOWS_LICENSE)
+FONTS_LIST=	${FILESDIR}/fonts.dir.with_tahoma
+.else
+FONTS_LIST=	${FILESDIR}/fonts.dir
+.endif
+FONTS_FILE=	${WRKDIR}/fonts.dir
+
 .include <bsd.port.pre.mk>
 
 .if ${X_WINDOW_SYSTEM:L} == xfree86-3
@@ -72,13 +87,16 @@
 # Post-extract
 #
 post-extract:
-	${RM} -f ${WRKSRC}/*.dll ${WRKSRC}/*.exe ${WRKSRC}/*.inf
+	${EXTRACT_CMD} -qLF '*.txt' -d ${WRKSRC} ${_DISTDIR}/webdin32.exe
 
 #
 # Post-patch
 #
 post-patch:
-	${SED} 's|%%FONTSDIR%%|${FONTSDIR}|g' ${MSG_FILE} > ${PKGMESSAGE}
+	${SED}	-e 's|%%FONTSDIR%%|${FONTSDIR}|g' \
+		-e 's|%%DOCSDIR%%|${DOCSDIR}|g' \
+		${MSG_FILE} > ${PKGMESSAGE}
+	${CP} ${FONTS_LIST} ${FONTS_FILE}
 
 #
 # Install
@@ -86,8 +104,8 @@
 do-install:
 	${MKDIR} ${FONTSDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/*.ttf ${FONTSDIR}
-	${INSTALL_DATA} ${FILESDIR}/fonts.dir ${FONTSDIR}
-	${INSTALL_DATA} ${FILESDIR}/fonts.dir ${FONTSDIR}/fonts.scale
+	${INSTALL_DATA} ${FONTS_FILE} ${FONTSDIR}
+	${INSTALL_DATA} ${FONTS_FILE} ${FONTSDIR}/fonts.scale
 	${INSTALL_DATA} ${WRKSRC}/licen.txt ${DOCSDIR}/LICENSE
 .if ${X_WINDOW_SYSTEM:L} == xfree86-3
 	${LN} -fs ${FONTSDIR} ${TTFONTSDIR}/${FONTNAME}
diff -ru /usr/ports/x11-fonts/webfonts.orig/distinfo /usr/ports/x11-fonts/webfonts/distinfo
--- /usr/ports/x11-fonts/webfonts.orig/distinfo	Wed Mar 31 05:12:51 2004
+++ /usr/ports/x11-fonts/webfonts/distinfo	Fri Oct 21 14:43:10 2005
@@ -20,3 +20,5 @@
 SIZE (webfonts/courie32.exe) = 646368
 MD5 (webfonts/webdin32.exe) = 230a1d13a365b22815f502eb24d9149b
 SIZE (webfonts/webdin32.exe) = 185072
+MD5 (webfonts/ielpkth.cab) = 358584cddb75ac90472c25f01b308ebe
+SIZE (webfonts/ielpkth.cab) = 411248
Only in /usr/ports/x11-fonts/webfonts/files: fonts.dir.with_tahoma
diff -ru /usr/ports/x11-fonts/webfonts.orig/pkg-message /usr/ports/x11-fonts/webfonts/pkg-message
--- /usr/ports/x11-fonts/webfonts.orig/pkg-message	Sun Aug 25 04:00:45 2002
+++ /usr/ports/x11-fonts/webfonts/pkg-message	Sat Oct 22 16:24:33 2005
@@ -1,7 +1,7 @@
 IMPORTANT - READ CAREFULLY: You may not use these fonts if you do not agree to
 the terms of the Microsoft End-User License Agreement ("EULA").  You will find
-the EULA at %%FONTSDIR%%/LICENSE.  If you read and agree
-to the EULA, you can start using the fonts by following these insructions:
+the EULA at %%DOCSDIR%%/LICENSE.  If you read and agree
+to the EULA, you can start using the fonts by following these instructions:
 
 --- XFree86 4.x.x (using the freetype module)
 
diff -ru /usr/ports/x11-fonts/webfonts.orig/pkg-plist /usr/ports/x11-fonts/webfonts/pkg-plist
--- /usr/ports/x11-fonts/webfonts.orig/pkg-plist	Mon Sep 19 14:43:09 2005
+++ /usr/ports/x11-fonts/webfonts/pkg-plist	Fri Oct 21 19:37:48 2005
@@ -11,7 +11,7 @@
 %%FONTSDIR%%/courbd.ttf
 %%FONTSDIR%%/courbi.ttf
 %%FONTSDIR%%/couri.ttf
-%%FCACHE%%@unexec /bin/rm %D/%%FONTSDIR%%/fonts.cache-1 2>/dev/null || /usr/bin/true
+%%FCACHE%%@unexec /bin/rm -f %D/%%FONTSDIR%%/fonts.cache-1 || /usr/bin/true
 %%FONTSDIR%%/fonts.dir
 %%FONTSDIR%%/fonts.scale
 %%FONTSDIR%%/georgia.ttf
@@ -19,6 +19,8 @@
 %%FONTSDIR%%/georgiai.ttf
 %%FONTSDIR%%/georgiaz.ttf
 %%FONTSDIR%%/impact.ttf
+@unexec /bin/rm -f %D/%%FONTSDIR%%/tahoma.ttf || /usr/bin/true
+@unexec /bin/rm -f %D/%%FONTSDIR%%/tahomabd.ttf || /usr/bin/true
 %%FONTSDIR%%/times.ttf
 %%FONTSDIR%%/timesbd.ttf
 %%FONTSDIR%%/timesbi.ttf
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-10-22 18:03:24 UTC
Maintainer of x11-fonts/webfonts,

Please note that PR ports/87847 just has been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/87847

-- 
Edwin Groothuis
edwin@FreeBSD.org
Comment 2 Rostislav Krasny 2005-10-22 20:01:54 UTC
A pkg-descr file should also be changed to mention Tahoma and fix the
glyphs number. I didn't touch it in the patch because I'm not the
maintainer, who had signed the file.
Comment 3 konstand 2005-10-22 23:29:26 UTC
I'm OK with the patch...

As for the pkg-descr update, here's my suggestion:

--- pkg-descr   Mon Aug 26 13:12:21 2002
+++ /tmp/pkg-descr      Sun Oct 23 01:28:02 2005
@@ -10,4 +10,6 @@
       ISO 8859-1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 15
       KOI8-R and -RU

+Tahoma can also be installed as an option, but a Windows License is requir=
ed.
+
 -- Konstantinos Konstantinidis

--kkonstan
Comment 4 Rostislav Krasny 2005-10-27 20:34:18 UTC
This is a new and better version of the patch. Changes to the previous
patch are:

1. tahoma.ttf and tahomabd.ttf, if they installed, are listing by
   'pkg_info -L webfonts-0.22'.
2. instead of having two versions of fonts.dir I build one from
   files/fonts.dir and optionally from files/tahoma.dir. It saves
   a disk space and future port editing time.
3. pkg-descr is changed according to the maintainer suggestion.

Konstantinos, please review this version of the patch for your
approval. The patch and tahoma.dir files are attached to this email.

P.S. Thanks to Andrey Chernov and Jeremy Messenger who helped me make
     this patch better and better.
Comment 5 konstand 2005-10-31 09:05:32 UTC
Sorry for the delay, I was out of reach for a few days...

I'm ok with the patch, but I think since it's quite a bit of a change
(with a new font etc) it'd be a good idea to bump the portnumber up to
0.3. Feel free to submit the patch with this little change.

--kkonstan

On 27/10/05, Rostislav Krasny <rosti.bsd@gmail.com> wrote:
> This is a new and better version of the patch. Changes to the previous
> patch are:
>
> 1. tahoma.ttf and tahomabd.ttf, if they installed, are listing by
>    'pkg_info -L webfonts-0.22'.
> 2. instead of having two versions of fonts.dir I build one from
>    files/fonts.dir and optionally from files/tahoma.dir. It saves
>    a disk space and future port editing time.
> 3. pkg-descr is changed according to the maintainer suggestion.
>
> Konstantinos, please review this version of the patch for your
> approval. The patch and tahoma.dir files are attached to this email.
>
> P.S. Thanks to Andrey Chernov and Jeremy Messenger who helped me make
>      this patch better and better.
>
>
>
Comment 6 Rostislav Krasny 2005-10-31 14:33:17 UTC
On 10/31/05, Konstantinos Konstantinidis <konstand@gmail.com> wrote:
> I'm ok with the patch, but I think since it's quite a bit of a change
> (with a new font etc) it'd be a good idea to bump the portnumber up to
> 0.3. Feel free to submit the patch with this little change.

Do you mean to bump the PORTVERSION in the Makefile from 0.21 to 0.3
instead of 0.22? But 3 < 21, maybe you meant 0.30? Anyway, I think
this tiny change could be done manually by a commiter, according to
your suggestion here. I just wouldn't like to "spam" this PR by a yet
another new patch, but if this is necessary I can do it.
Comment 7 Jeremy Messenger freebsd_committer freebsd_triage 2005-11-12 19:57:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mezz

I'll take it.
Comment 8 Jeremy Messenger freebsd_committer freebsd_triage 2005-11-12 20:03:25 UTC
State Changed
From-To: open->closed

Committed, thanks!