[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-fonts-devel] Proposed patch



Quoting Christian PERRIER (bubulle@debian.org):
> tags 649827 patch
> thanks
> 
> Here's a proposoed patch for this bug report. It also drops Recommends
> on obsolete x-ttcidfont-conf and fontconfig.

New patch, which doesn't forget dropping the call to dh_installdefoma
in debian/rules as well as links in /etc/fonts/conf.avail (I don't see
the need for these).

diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/control ttf-arphic-ukai-0.2.20080216.1/debian/control
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/control	2011-11-28 07:28:05.402603892 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/control	2011-11-28 07:28:49.387486834 +0100
@@ -2,7 +2,7 @@
 Section: x11
 Priority: optional
 Maintainer: Arne Goetje <arne@ubuntu.com>
-Build-Depends: debhelper (>= 5), cdbs, defoma  (>=0.7.0)
+Build-Depends: debhelper (>= 5), cdbs
 Standards-Version: 3.7.3
 Homepage: http://www.freedesktop.org/wiki/Software/CJKUnifonts
 
@@ -10,9 +10,8 @@
 Architecture: all
 Replaces: ttf-arphic-ukai-mbe
 Pre-Depends: dpkg (>= 1.10.24)
-Depends: defoma, debconf | debconf-2.0
-Recommends: x-ttcidfont-conf (>= 10), fontconfig (>= 2.3.1-1)
-Conflicts: x-ttcidfont-conf (<< 10), ttf-arphic-ukai-mbe
+Depends: debconf | debconf-2.0
+Conflicts: ttf-arphic-ukai-mbe
 Description: "AR PL UKai" Chinese Unicode TrueType font collection Kaiti style
  "AR PL UKai" is a high-quality Chinese Unicode TrueType font collection
  (ukai.ttc) derieved from the original "AR PL KaitiM Big5" and
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/postinst ttf-arphic-ukai-0.2.20080216.1/debian/postinst
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/postinst	1970-01-01 01:00:00.000000000 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/postinst	2011-11-28 07:41:02.371203954 +0100
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+set -e
+
+if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
+  dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-arphic-ukai.hints 0.2.20080216.1-2 -- "$@"
+fi
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/postrm ttf-arphic-ukai-0.2.20080216.1/debian/postrm
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/postrm	2011-11-28 07:28:05.406603980 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/postrm	2011-11-28 07:41:12.419405663 +0100
@@ -7,4 +7,8 @@
 
 db_purge
 
+if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
+  dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-arphic-ukai.hints 0.2.20080216.1-2 -- "$@"
+fi
+
 #DEBHELPER#
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/preinst ttf-arphic-ukai-0.2.20080216.1/debian/preinst
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/preinst	2011-11-28 07:28:05.402603892 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/preinst	2011-11-28 07:40:50.270961054 +0100
@@ -7,9 +7,6 @@
 OLDTTF=ukai.ttf
 OLDMBETTF=ukaimbe.ttf
 
-if [ -e /etc/defoma/hints/${PACKAGE}.hints ]; then
-  defoma-font -t purge-all /etc/defoma/hints/${PACKAGE}.hints
-fi
 if [ -e /etc/defoma/hints/${PACKAGE}-mbe.hints ]; then
   defoma-font -t purge-all /etc/defoma/hints/${PACKAGE}-mbe.hints
   rm -f /etc/defoma/hints/${PACKAGE}-mbe.hints
@@ -31,4 +28,11 @@
   rm -rf /usr/share/${PACKAGE};
 fi
 
+if dpkg --compare-versions "$2" lt 0.2.20080216.1-2; then
+	if [ -x "which defoma-font 2>/dev/null" ]; then
+		defoma-font purge /etc/defoma/hints/ttf-arphic-ukai.hints
+	fi
+fi
+
+
 #DEBHELPER#
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/prerm ttf-arphic-ukai-0.2.20080216.1/debian/prerm
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/prerm	2011-11-28 07:28:05.402603892 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/prerm	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -e
-
-#DEBHELPER#
-
-PACKAGE=ttf-arphic-ukai
-
-defoma-font -t purge-all /etc/defoma/hints/${PACKAGE}.hints
-
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/rules ttf-arphic-ukai-0.2.20080216.1/debian/rules
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/rules	2011-11-28 07:28:05.402603892 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/rules	2011-11-28 19:05:45.019404816 +0100
@@ -5,16 +5,3 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/simple-patchsys.mk
 
-install/ttf-arphic-ukai::
-	dh_link etc/fonts/conf.avail/25-ttf-arphic-ukai-render.conf \
-		etc/fonts/conf.d/25-ttf-arphic-ukai-render.conf
-	dh_link etc/fonts/conf.avail/35-ttf-arphic-ukai-aliases.conf \
-		etc/fonts/conf.d/35-ttf-arphic-ukai-aliases.conf
-	dh_link etc/fonts/conf.avail/41-ttf-arphic-ukai.conf \
-		etc/fonts/conf.d/41-ttf-arphic-ukai.conf
-	dh_link etc/fonts/conf.avail/75-ttf-arphic-ukai-select.conf \
-		etc/fonts/conf.d/75-ttf-arphic-ukai-select.conf
-	dh_link etc/fonts/conf.avail/90-ttf-arphic-ukai-embolden.conf \
-		etc/fonts/conf.d/90-ttf-arphic-ukai-embolden.conf
-	dh_installdefoma
-
diff -Nru ttf-arphic-ukai-0.2.20080216.1.old/debian/ttf-arphic-ukai.defoma-hints ttf-arphic-ukai-0.2.20080216.1/debian/ttf-arphic-ukai.defoma-hints
--- ttf-arphic-ukai-0.2.20080216.1.old/debian/ttf-arphic-ukai.defoma-hints	2011-11-28 07:28:05.402603892 +0100
+++ ttf-arphic-ukai-0.2.20080216.1/debian/ttf-arphic-ukai.defoma-hints	1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-category truetype
-begin /usr/share/fonts/truetype/arphic/ukai.ttc
-  FaceNum = 4
-  Family = UKaiCN
-  FontName = UKaiCN
-  Encoding = Unicode
-  Location = Chinese-China English
-  Charset = ISO10646-1 GB2312 GBK GB18030
-  UniCharset = GB2312 GBK GB18030
-  GeneralFamily = Kai
-  Weight = Book
-  Width = Variable
-  Shape = Upright
-  Foundry = Arphic
-  Priority = 20
-  X-Family = AR_PL_UKai_CN
-  X-Weight = book
-  X-Slant = r
-  X-Spacing = c m p
-  Transform = Slant Boldize
-  TTCap = halfwidth-bw=0.5 italic-angle=0.167
-  Family1 = UKaiHK
-  FontName1 = UKaiHK
-  Encoding1 = Unicode
-  Location1 = Chinese-Taiwan English
-  Charset1 = ISO10646-1 BIG5 BIG5-HKSCS
-  UniCharset1 = BIG5 BIG5-HKSCS
-  GeneralFamily1 = Kai
-  Weight1 = Book
-  Width1 = Variable
-  Shape1 = Upright
-  Foundry1 = Arphic
-  Alias1 = AR_PL_ZenKai_Uni
-  Priority1 = 20
-  X-Family1 = AR_PL_UKai_HK
-  X-Weight1 = book
-  X-Slant1 = r
-  X-Spacing1 = c m p
-  Transform1 = Slant Boldize
-  TTCap1 = halfwidth-bw=0.5 italic-angle=0.167
-  Family2 = UKaiTW
-  FontName2 = UKaiTW
-  Encoding2 = Unicode
-  Location2 = Chinese-Taiwan English
-  Charset2 = ISO10646-1 BIG5
-  UniCharset2 = BIG5
-  GeneralFamily2 = Kai
-  Weight2 = Book
-  Width2 = Variable
-  Shape2 = Upright
-  Foundry2 = Arphic
-  Priority2 = 20
-  X-Family2 = AR_PL_UKai_TW
-  X-Weight2 = book
-  X-Slant2 = r
-  X-Spacing2 = c m p
-  Transform2 = Slant Boldize
-  TTCap2 = halfwidth-bw=0.5 italic-angle=0.167
-  Family3 = UKaiTWMBE
-  FontName3 = UKaiTWMBE
-  Encoding3 = Unicode
-  Location3 = Chinese-Taiwan English
-  Charset3 = ISO10646-1 BIG5
-  UniCharset3 = BIG5
-  GeneralFamily3 = Kai
-  Weight3 = Book
-  Width3 = Variable
-  Shape3 = Upright
-  Foundry3 = Arphic
-  Alias3 = AR_PL_ZenKai_Uni_MBE
-  Priority3 = 20
-  X-Family3 = AR_PL_UKai_TW_MBE
-  X-Weight3 = book
-  X-Slant3 = r
-  X-Spacing3 = c m p
-  Transform3 = Slant Boldize
-  TTCap3 = halfwidth-bw=0.5 italic-angle=0.167
-end
-

Attachment: signature.asc
Description: Digital signature


Reply to: