--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/dvipdfmx/dvipdfmx-20050831.ebuild,v 1.1 2006/11/14 03:54:46 usata Exp $
+
+inherit eutils
+
+IUSE=""
+
+DESCRIPTION="DVI to PDF translator with multi-byte character support"
+HOMEPAGE="http://project.ktug.or.kr/dvipdfmx/"
+SRC_URI="http://project.ktug.or.kr/dvipdfmx/snapshot/current/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~alpha ~amd64 ~ppc ~sparc"
+
+RDEPEND="virtual/tetex
+ virtual/ghostscript
+ >=media-libs/libpng-1.2.1
+ >=sys-libs/zlib-1.1.4
+ >=dev-libs/openssl-0.9.6i"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+has_tetex_3() {
+ if has_version '>=app-text/tetex-3' || has_version '>=app-text/ptex-3.1.8' ; then
+ true
+ else
+ false
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i -e 's/\(f dvipdfm.map\)/%\1/' \
+ -e '/^%% GhostScript (Unix\/Linux)/,+1s/^%//g' \
+ data/config/dvipdfmx.cfg || die
+}
+
+src_install() {
+ # the default directory hierarchy doesn't match our scheme
+ #make DESTDIR=${D} install || die
+
+ dobin src/dvipdfmx || die
+
+ insinto /usr/share/texmf/dvipdfm
+ doins data/config/glyphlist.txt || die
+
+ insinto /usr/share/texmf/dvipdfm/config
+ doins data/config/dvipdfmx.cfg || die
+
+ insinto /usr/share/texmf/fonts/map/dvipdfm
+ doins ${FILESDIR}/cid-x.map || die
+
+ insinto /usr/share/texmf/fonts/cmap
+ doins data/CMap/*-UCS2*
+
+ dosym /usr/share/ghostscript/Resource /usr/share/texmf/fonts/cmap/ghostscript
+ dosym /opt/Acroread5/Resource /usr/share/texmf/fonts/cmap/Acroread5
+ dosym /opt/Acroread7/Resource /usr/share/texmf/fonts/cmap/Acroread7
+ dosym /usr/share/xpdf /usr/share/texmf/fonts/cmap/xpdf
+
+ dodoc BUGS ChangeLog FONTMAP INSTALL README TODO
+}
+
+pkg_postinst() {
+ has_tetex_3 && texmf-update || mktexlsr
+}
+
+pkg_postrm() {
+ has_tetex_3 && texmf-update || mktexlsr
+}
--- /dev/null
+%% FONTMAP: CID-keyed font mapping file for dvipdfmx
+%% =================================================
+%%
+%% Last modified: April 4, 2004
+%%
+%% FORMAT
+%% ------
+%%
+%% TFMNAME[@SFDNAME@] ENCNAME [:INDEX:][!]FONTNAME[/CSI][,VARIANT] [OPTIONS]
+%%
+%%
+%% DESCRIPTION
+%% -----------
+%%
+%% 1) TFMNAME[@SFDNAME@]
+%%
+%% TFM name is specified in the field TFMNAME without extension (.tfm),
+%% and the subfont definition name in the field SFDNAME without
+%% extension (.sfd). For example, jbtm@UKS@ specifies the TFM names,
+%% jbtm01 - jbtm35, used in the CJK package.
+%%
+%% 2) ENCNAME
+%%
+%% CMap resource name is specified in the field ENCNAME.
+%%
+%% 3) [:INDEX:][!]FONTNAME[/CSI][,VARIANT]
+%%
+%% Font name is specified in the field FONTNAME with or without
+%% extension. The field INDEX is used for TrueType collections (.ttc)
+%% to specify the font index number. The character `!' enables the
+%% no-embedding option. The /CSI option is required for TrueType fonts
+%% when Identity CMap is specified in the ENCNAME. The stylistic variants
+%% (Bold, Italic, BoldItalic) are specified in the filed VARIANT.
+%% See examples below.
+%%
+%% 4) [OPTIONS]
+%%
+%% All options available in the original dvipdfm are also valid here.
+%% The remap option [-r] is simply ignored.
+
+%%
+%% Omega Examples
+%%
+
+%% Chinese
+%% Arphic TrueType fonts as Adobe-{CNS1,GB1} CID-keyed font.
+%ombkai UniCNS-UCS2-H bkai00mp
+%ombsmi UniCNS-UCS2-H bsmi00lp
+%omgkai UniGB-UCS2-H gkai00mp
+%omgbsn UniGB-UCS2-H gbsn00lp
+
+%% Japanese
+%% Adobe-Japan1
+omrml UniJIS-UCS2-H Ryumin-Light
+omgbm UniJIS-UCS2-H GothicBBB-Medium
+
+%% Korean
+%omgtm UniKS-UCS2-H HYGoThic-Medium
+%ombtr UniKS-UCS2-H batang
+
+%%
+%% ASCII pTeX Examples
+%%
+
+%% Ryumin and GothicBBB found in PostScript printers:
+rml H Ryumin-Light
+gbm H GothicBBB-Medium
+rmlv V Ryumin-Light
+gbmv V GothicBBB-Medium
+
+%% Synthetic font used for futo* family.
+%% jun101 not available.
+%ryumin-l H Ryumin-Light
+%gtbbb-m H GothicBBB-Medium
+%futomin-b H Ryumin-Light,Bold
+%futogo-b H GothicBBB-Medium,Bold
+%ryumin-l-v V Ryumin-Light
+%gtbbb-m-v V GothicBBB-Medium
+%futomin-b-v V Ryumin-Light,Bold
+%futogo-b-v V GothicBBB-Medium,Bold
+
+%% Morisawa OpenType Basic 7 Family Pack
+%%
+%ryumin-l H A-OTF-RyuminPro-Light
+%ryumin-l-v V A-OTF-RyuminPro-Light
+%gtbbb-m H A-OTF-GothicBBBPro-Medium
+%gtbbb-m-v V A-OTF-GothicBBBPro-Medium
+%futomin-b H A-OTF-FutoMinA101Pro-Bold
+%futomin-b-v V A-OTF-FutoMinA101Pro-Bold
+%futogo-b H A-OTF-FutoGoB101Pro-Bold
+%futogo-b-v V A-OTF-FutoGoB101Pro-Bold
+%jun101-l H A-OTF-Jun101Pro-Light
+%jun101-l-v V A-OTF-Jun101Pro-Light
+
+%% MS Mincho/Gothic family
+%msmin H msmincho
+%msgot H msgothic
+
+%% MS-Mincho with proportional latin and kana:
+%msminp H :1:msmincho
+
+%% Hojo-Kanji (JIS X 0212-1990): Adobe-Japan2
+%hmin Hojo-H msmincho
+%hminv Hojo-V msmincho
+
+%%
+%% CJK-LaTeX/HLaTeX Examples
+%%
+
+%% Arphic Public Licence fonts:
+%% AR PL KaitiM, AR PL Mingti2L, AR PL SungtiL
+
+bsmi@Big5@ ETen-B5-H bsmi00lp
+bkai@Big5@ ETen-B5-H bkai00mp
+gbsn@EUC@ GB-EUC-H gbsn00lp
+gkai@EUC@ GB-EUC-H gkai00mp
+bsmir@Big5@ ETen-B5-V bsmi00lp
+bkair@Big5@ ETen-B5-V bkai00mp
+gbsnr@EUC@ GB-EUC-V gbsn00lp
+gkair@EUC@ GB-EUC-V gkai00mp
+
+%% Korean MS-Windows fonts with stylistic variants
+%jbtm@UKS@ UniKS-UCS2-H !batang
+%jbtmo@UKS@ UniKS-UCS2-H !batang,Italic
+%jbtb@UKS@ UniKS-UCS2-H !batang,Bold
+%jbtbo@UKS@ UniKS-UCS2-H !batang,BoldItalic
+
+%% Baekmuk fonts (used with HLaTeX package)
+%bbtm@KS-HLaTeX@ KSCms-UHC-H batang
+%bbtmo@UKS-HLaTeX@ UniKS-UCS2-H batang -s .167
+
+%% Heisei family of Acrobat Asian Font Packs:
+%% Not embedded.
+%mincho@UJIS@ UniJIS-UCS2-H HeiseiMin-W3-Acro
+%gothic@UJIS@ UniJIS-UCS2-H HeiseiKakuGo-W5-Acro
+
+%% Bitstream Cyberbit
+%% Available at:
+%% http://ftp.netscape.com/pub/communicator/extras/fonts/windows/ReadMe.htm
+
+%cyberb@Unicode@ Identity-H cyberbit/UCS