--- Portfile	2005-11-09 01:46:35.000000000 +0900
+++ Portfile.new	2006-02-01 01:59:56.000000000 +0900
@@ -29,6 +29,12 @@
         libpng-1.2.8.tar.gz:libpng \
         zlib-1.2.3.tar.gz:zlib
 
+extract.only	${distname}.tar.gz \
+		ghostscript-fonts-std-8.11.tar.gz \
+		jpegsrc.v6b.tar.gz \
+		libpng-1.2.8.tar.gz \
+		zlib-1.2.3.tar.gz
+
 checksums   ${distname}.tar.gz md5 882a4cbe1704256f906e18e02c7b877b \
         ghostscript-fonts-std-8.11.tar.gz md5 6865682b095f8c4500c54b285ff05ef6 \
         jpegsrc.v6b.tar.gz md5 dbd5f3b47ed13132f04c685d608a7547 \
@@ -79,3 +85,89 @@
             file rename Makefile.CONFIGURE Makefile
         }
 }
+
+# Japanese Hiragino font support
+variant hiragino    {
+	master_sites-append      http://www.interq.or.jp/mars/cherry/mac/:hiragino
+	distfiles-append         Font.tar.bz2:hiragino
+	checksums-append	 Font.tar.bz2 md5 e612110d5c365eb59b47d81ec1d2a298 \
+				 	      sha1 d027e4c2e53011c4a7853b8b87b498911dc16cd3 \
+					      rmd160 19f0b37df2d52b3eb4d4cd9fb9c74c4f22023281
+	post-extract {
+		     system "cd ${workpath}/${distname}/Resource && bzcat -dc ${distpath}/Font.tar.bz2 | tar xf -"
+	}
+	post-destroot {
+		     set gsresourcedir ${destroot}${prefix}/share/${name}/${version}/Resource
+		     xinstall -m 755 -d ${gsresourcedir}/CIDFont
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ角ゴ Pro W3.otf\" ${gsresourcedir}/CIDFont/HiraKakuPro-W3"
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ角ゴ Pro W6.otf\" ${gsresourcedir}/CIDFont/HiraKakuPro-W6"
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ角ゴ Std W8.otf\" ${gsresourcedir}/CIDFont/HiraKakuStd-W8"
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ丸ゴ Pro W4.otf\" ${gsresourcedir}/CIDFont/HiraMaruPro-W4"
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ明朝 Pro W3.otf\" ${gsresourcedir}/CIDFont/HiraMinPro-W3"
+                     system "ln -s \"/System/Library/Fonts/ヒラギノ明朝 Pro W6.otf\" ${gsresourcedir}/CIDFont/HiraMinPro-W6"
+
+		     set cidfmap ${destroot}${prefix}/share/${name}/${version}/lib/cidfmap
+		     system "echo \"/Ryumin-Light /HiraMinPro-W3 ;\" >>  ${cidfmap}"
+		     system "echo \"/Ryumin-Regular /HiraMinPro-W6 ;\" >> ${cidfmap}"
+		     system "echo \"/FutoMinA101-Bold /HiraKakuStd-W8 ;\" >> ${cidfmap}"
+		     system "echo \"/GothicBBB-Medium /HiraKakuPro-W3 ;\" >> ${cidfmap}"
+		     system "echo \"/FutoGoB101-Bold /HiraKakuPro-W6 ;\" >> ${cidfmap}"
+		     system "echo \"/Jun101-Light /HiraMaruPro-W4 ;\" >> ${cidfmap}"
+	}
+}
+
+# Adobe Japan 1-6 (Japanese) CMap support
+variant aj16  {
+	master_sites-append	http://examples.oreilly.de/english_examples/nutshell/cjkv/adobe/:aj16 \
+				ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/:aj16
+	distfiles-append	aj16.tar.Z:aj16
+	checksums-append	aj16.tar.Z md5 1d17e5f53d20ba8b8abcaeae3300aa26 \
+				sha1 13396c4af952ee405c16459b83843711f029d63a \
+				rmd160 8e63a74f14dc9eaa1dfd5a847edc43302244bd46
+	post-extract {
+		     system "cd ${workpath} && zcat -dc ${distpath}/aj16.tar.Z | tar xf -"
+		     system "cp ${workpath}/aj16/CMap/* ${workpath}/${distname}/Resource/CMap/"
+	}
+}
+
+# Adobe GB 1-4 (Traditional Chinese) CMap support
+variant ag14  {
+	master_sites-append	http://examples.oreilly.de/english_examples/nutshell/cjkv/adobe/:ag14 \
+				ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/:ag14
+	distfiles-append	ag14.tar.Z:ag14
+	checksums-append	ag14.tar.Z md5 f9cad1b32e56f65339da26266f568e97 \
+				sha1 8728580d9ea74fad1245d54ad16243220eaae077 \
+				rmd160 162041c3c7db71c0e004f5a5f823a2cfc5837488
+	post-extract {
+		     system "cd ${workpath} && zcat -dc ${distpath}/ag14.tar.Z | tar xf -"
+		     system "cp ${workpath}/ag14/CMap/* ${workpath}/${distname}/Resource/CMap/"
+	}
+}
+
+# Adobe CNS 1-5 (Simplified Chinese) CMap support
+variant ac15  {
+	master_sites-append	http://examples.oreilly.de/english_examples/nutshell/cjkv/adobe/:ac15 \
+				ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/:ac15
+	distfiles-append	ac15.tar.Z:ac15
+	checksums-append	ac15.tar.Z md5 a9d876f28dde1d4a0a6571eb0e281761 \
+				sha1 257b0d4bc3547af1aee09e34cc00f747de94a7eb \
+				rmd160 ec4c07cd521cc906711c649b63e9c0a94038b0f7
+	post-extract {
+		     system "cd ${workpath} && zcat -dc ${distpath}/ac15.tar.Z | tar xf -"
+		     system "cp ${workpath}/ac15/CMap/* ${workpath}/${distname}/Resource/CMap/"
+	}
+}
+
+# Adobe Korea 1-2 (Korean) CMap support
+variant ak12  {
+	master_sites-append	http://examples.oreilly.de/english_examples/nutshell/cjkv/adobe/:ak12 \
+				ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/:ak12
+	distfiles-append	ak12.tar.Z:ak12
+	checksums-append	ak12.tar.Z md5 ef1d6470cd9bdfed1399b922f12432da \
+				sha1 5ded7b548e01448e8c98d0b878a6b996cd6fa7cc \
+				rmd160 968f2807ae4a97e6c75b1a26e32f693b3e8803d4
+	post-extract {
+		     system "cd ${workpath} && zcat -dc ${distpath}/ak12.tar.Z | tar xf -"
+		     system "cp ${workpath}/ak12/CMap/* ${workpath}/${distname}/Resource/CMap/"
+	}
+}
