我的Gentoo系统备份与还原方案
Java 应用程序中文显示及输入的解决方案

Gentoo下如何编译安装xetex-dev

lyanry posted @ 2007年10月15日 17:39 in 我爱用Gentoo with tags gentoo xetex , 9090 阅读

现在已经可以:$ sudo emerge -avt texlive-xetex 来安装 xetex 0.997 了。下文无需再看。


我的系统中安装了texlive 2007套件,该套件中的xetex版本是0.996。最近yindian写了一个zhspacing宏包,可以帮助xetex中文用户处理中文标点间距紧责、中英文字体自动切换等问题。但是zhspacing是利用的xetex-0.997提供的几个特性,因此xetex-0.996是不行的。对于Linux用户,目前只有从xetex svn上迁出 (checkout) 正在开发中的xetex-0.997,并进行编译后才能得到支持zhspacing宏包的xetex。下面讲一讲我的做法。

1 获取xetex源码

首先是获取xetex与xdvipdfmx的svn版本,在终端当前的工作目录下:

$ svn co http://scripts.sil.org/svn-public/xetex/TRUNK xetex-dev
$ svn co http://scripts.sil.org/svn-public/xdvipdfmx/TRUNK xdvipdfmx-dev

这样就将xetex与xdvipdfmx的源码分别下载到当前工作目录的xetex-dev与xdvipdfmx-dev目录下了。

2 编译kpathsea库

因为要编译xetex与xdvipdfmx,需要kpathsea库的支持,但是texlive 2007安装时没有包含kpathsea库,所以也只好自己从texlive 2007光盘镜像中解出kpathsea源码自行编译。

在TeXlive的光盘中的source目录下有source.tar.bz2文件,我们将它解压到临时目录中。解压出来的文件中有一个texk目录,其下有kpathsea目录,这就是kpathsea的源文件。关于如何编译kpathsea库,可以参考kpathsea目录中的INSTALL文件。如果你不想阅读这份英文文档,而且对我也足够信任,可以参考一下我的编译过程。

首先进入kpathsea目录,执行:

$ ./configure

然后执行make,进行编译:

$ make

这时,你可能会得到这样的错误信息:

... ...
/bin/sh: ../libtool: 没有那个文件或目录
make: *** [tex-file.lo] 错误 127

之所以得到这样的错误信息,是因为现在你是在单独编译kpathsea源码,而不是在编译整个的tex工具集。这样在编译kpathsea时,它默认以为libtool工具已经在其父目录下准备好了的,实际上是没有的,所以报错。要想顺利编译kpathsea,就必须在Makefile中申明libtool的正确位置,有两种做法。

第一种做法很简单,在 kapthsea 源码目录下实际上是已经生成了一个 libtool 工具的,只需要将其复制到上一层目录下即可。

第二种做法是使用Gentoo系统中的libtool,做法如下:

  1. 打开kpathsea目录下的Makefile文件;
  2. 找到“LIBTOOL = $(SHELL) $(kpathsea_parent)/libtool”这样一行信息;
  3. 将其修改为“LIBTOOL = $(SHELL) /usr/bin/libtool”

采用以上方法的任一种,完成后,就应该可以顺利编译kpathsea了:

$ make
$ sudo make install

要注意的一个问题就是在安装所编译的 kpathsea 库时,会把一些编译的 kpathsea 相关的程序复制到了 /usr/local/bin 目录下了。由于我们只是想使用 kpathsea 库,而不是这些程序,另外这些程序实际上已经存在你的 TeX Live 目录下了,因此这里可以把 /usr/local/bin 目录下的有关 kpathsea 的程序都清除掉。否则系统默认会优先调用它们,导致你的 TeX Live 系统配置文件的位置有可能访问出错。

3  编译xdvipdfmx-dev

进入xdvipdfmx-dev目录,执行:

./configure --with-ft2lib=/usr/lib/libfreetype.a --with-ft2include=/usr/include/freetype2

之所以要指定freetype2头文件目录与库文件,是因为编译xdvipdfmx需要freetype2库的支持。此处目录的设定只是针对我的Gentoo系统配置而言的。

如果configure成功,就可以进行编译并安装了:

$ make
$ sudo make install

所编译的xdvipdfmx默认是安装在/usr/local/bin目录下的,建议你将它移动到$TEXLIVE/current/bin/i386-linux目录下,覆盖texlive 2007原有的xdvipdfmx。

4 编译xetex-dev

进入xetex-dev目录,执行:

$ ./build-xetex
$ sudo  ./install-xetex
$ rm -rf ~/.texlive2007/texmf-var/web2c/xetex/*

上述第三行代码是删除个人home目录下的上一版本xetex的一些fmt文件,因为它们与新安装的xetex版本不符,而它们的优先权又最高,所以应当都干掉。

5 生成xelatex

$TEXLIVE/current/bin/i386-linux目录中原有的xelatex调用的是xetex-0.996,因此它已经没有存在的必要了,把它干掉。yulewang言:在该目录下建立一个指向xetex的连接,即xelatex:

$ ln -s xetex xelatex

这样在执行xelatex的时候,它会根据argv来获知该load哪个format.

Avatar_small
rex 说:
2007年11月07日 22:15

该文很有用,被我收藏了。谢谢作者的努力。

Avatar_small
thom 说:
2007年11月26日 22:35 您好,我在gentoo里安装了texlive-xetex,发现xetex/xelatex还是0.996版本的。 另外,xetex/xelatex不是texlive-xetex这个包提供的,而是texlive-core这个包提供的。 hanyiny A-T gmail DOT com
Avatar_small
bbcc 说:
2007年12月07日 17:20 我在debian下,apt-get了“libkpathsea-dev”这个包,就搞定kpathsea那一步了,ubuntu应该也可以吧,这样对新手简单一点。
Avatar_small
lyanry 说:
2007年12月07日 17:30 恩。 ubuntu 下我曾经试过,是可以的。
Avatar_small
bbcc 说:
2007年12月07日 19:12 大侠,看看这个错误,编译你给的那个zhspacing示例,字体名换成我有的了,出错如下:好象是kpathsea的问题 (/usr/share/texmf/tex/xelatex/euenc/lm/eu1lmr.fd)kpathsea: Illegal fontname `[lmroman10-regular]:mapping=tex-text': contains '[' ! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab le: Metric (TFM) file or installed font not found.
Avatar_small
lyanry 说:
2007年12月07日 21:35 可能是字体没有找到。 用 fc-list 查看一下系统安装的字体名称,多试几个看看。
Avatar_small
norwalk weight loss 说:
2011年11月19日 02:09

Auto installed gentoo are also available in the market just buy them to avoid the problem of the instalation.

Avatar_small
ps5 release date 说:
2020年4月14日 12:46

It is wonderful to be here with everyone, I have a lot of knowledge from what you share, to say thank you, the information and knowledge here helps me a lot

Avatar_small
ch 说:
2021年6月03日 06:36

Hey what a splendid post I have run over and trust me I have been scanning out for this comparative sort of post for recent week and scarcely ran over this. Much thanks and will search for more postings from you.  click here

Avatar_small
chalsea 说:
2021年6月07日 05:01

All influencers are provided a Social media scheduling, posting and unified communications platform that helps have all the conversations in one place and connected to a influencer bot Influencer marketing

Avatar_small
amelia 说:
2021年6月10日 20:09

I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. professionals. I thank you to help making people more aware of possible issues. read more

Avatar_small
amelia 说:
2021年6月16日 04:42

I'm glad to see the great detail here!. cheap sex doll

Avatar_small
amelia 说:
2021年6月16日 04:42

I have perused your web journal it is extremely useful for me. I need to express profound gratitude to you. I have bookmark your site for future redesigns. packaging manufacturers

Avatar_small
amelia 说:
2021年6月17日 23:37

This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post. botox 100iu

Avatar_small
amelia 说:
2021年6月22日 19:27

Extraordinary post, you have pointed out some amazing focuses, I also trust this is an exceptionally radiant site.  PON Optical Receiver

Avatar_small
amelia 说:
2021年6月22日 19:27

Brilliant site! I discovered it while surfing around on Yahoo News. Do you have any proposals on the most proficient method to get recorded in Yahoo News? I've been striving for some time however I never appear to arrive! Welcome it.  canni gel

Avatar_small
ch 说:
2021年7月05日 19:02

This is a really decent site post. Not very numerous individuals would really, the way you simply did. I am truly awed that there is such a great amount of data about this subject have been revealed and you've given a valiant effort, with so much class. In the event that needed to know more about green smoke audits, than by all methods come in and check our stuff.  outdoor furniture

Avatar_small
ch 说:
2021年7月05日 19:02

You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. car windshield sun shade

Avatar_small
ch 说:
2021年7月13日 03:57

I truly thank you for the profitable data on this incredible subject and anticipate more extraordinary posts. Much appreciated for getting a charge out of this magnificence article with me. I am valuing it all that much! Anticipating another extraordinary article. Good fortunes to the creator! All the best!  mobile mechanic shenandoah

Avatar_small
ch 说:
2021年8月20日 18:30

Love what you're doing here folks, keep it up!..  cbd

Avatar_small
ch 说:
2021年10月09日 01:31

I truly value this superb post that you have accommodated us. I guarantee this would be helpful for a large portion of the general population.  myloweslife.com login

Avatar_small
ch 说:
2021年10月23日 23:28

I'm glad to see the great detail here!. corsi per adulti

Avatar_small
ch 说:
2021年10月27日 20:23

I truly thank you for the profitable data on this incredible subject and anticipate more extraordinary posts. Much appreciated for getting a charge out of this magnificence article with me. I am valuing it all that much! Anticipating another extraordinary article. Good fortunes to the creator! All the best!  read this page

Avatar_small
ch 说:
2021年11月13日 21:42

I as of late ran over your online journal and have been perusing along. I thought I would leave my first remark. I don't recognize what to say aside from that I have delighted in perusing. Pleasant web journal, I will continue going to this website frequently. motorcycle vest back patches

Avatar_small
ch 说:
2021年12月01日 19:23

Much appreciated such a great amount for this data. I need to tell you I agree on a few of the focuses you make here and others may require some further audit, yet I can see your perspective. Lead Generation

Avatar_small
ch 说:
2021年12月15日 04:46

Incredible data! I as of late ran over your online journal and have been perusing along. I thought I would leave my first remark. I don't comprehend what to say with the exception of that I have. FENUGREC

Avatar_small
ch 说:
2021年12月19日 00:07

Much obliged for this incredible post, i discover it exceptionally fascinating and extremely well thoroughly considered and set up together. I anticipate perusing your work later on. voyance par téléphone

Avatar_small
ch 说:
2021年12月25日 19:41

Howdy! A debt of gratitude is in order for the considerable data you havr gave! You have touched on crucuial focuses! maryland affordable home inspections

Avatar_small
ch 说:
2022年2月05日 23:51

Decent information picking up article. This post is truly the best on this profitable subject. message board

Avatar_small
ch 说:
2022年2月17日 18:25

Incredible articles and extraordinary format. Your blog entry merits the greater part of the positive criticism it's been getting. Know About Forex Trading for Beginners

Avatar_small
ch 说:
2022年2月25日 03:18

I have perused your article, it is extremely enlightening and supportive for me.I respect the profitable data you offer in your articles. A debt of gratitude is in order for posting it.. Покраска авто на Троещине

Avatar_small
ch 说:
2022年2月27日 23:55

It turned out to be Very useful to me and I am certain to every one of the observers here! อีซีสล็อต

Avatar_small
ch 说:
2022年2月28日 04:32

Superb article. Extremely fascinating to peruse. I truly love to peruse such a pleasant article. Much obliged! continue shaking. เว็บรวมสล็อต

Avatar_small
ch 说:
2022年3月02日 23:08

I was taking a gander at some of your posts on this site and I imagine this site is truly informational! Keep setting up.. สล็อต xo เครดิตฟรี

Avatar_small
ch 说:
2022年3月09日 23:02

Much thanks to you such a great amount for sharing this incredible blog.Very motivating and accommodating too.Hope you keep on sharing a greater amount of your ideas.I will love to peruse. placenta donation

Avatar_small
ch 说:
2022年3月11日 04:11

Superb article, a debt of gratitude is in order for assembling this! This is clearly one awesome post. Much obliged for the profitable data and bits of knowledge you have so given here. winner เครดิตฟรี 100 บาท

Avatar_small
ch 说:
2022年3月13日 23:30

Affection to peruse it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks. mega slot game

Avatar_small
ch 说:
2022年3月17日 20:19

A debt of gratitude is in order for sharing the post.. folks are universes best individual in every existences of individual..they need or must succeed to maintain needs of the gang. https://voyance-tel-avenir.com

Avatar_small
ch 说:
2022年3月18日 04:12

That is the phenomenal mentality, in any case is simply not make each sence at all proclaiming about that mather. For all intents and purposes any strategy an abundance of thanks notwithstanding i had attempt to advance your own particular article into delicius by and by it is evidently a situation utilizing your data locales would you be able to please recheck the thought. much appreciated yet again. Photographer Swansea

Avatar_small
ch 说:
2022年3月22日 23:45

Companion, this site may be fabolous, i simply like it. Medyum

Avatar_small
ch 说:
2022年4月06日 03:38

I truly adored perusing your web journal. It was extremely all around wrote and straightforward. Not at all like different online journals I have perused which are truly not that good.Thanks alot! slot168.com

Avatar_small
amelia 说:
2022年5月08日 00:46

Much obliged to you for such an elegantly composed article. It's brimming with astute data and diverting depictions. Your perspective is the best among numerous. Spring Lawn Service

Avatar_small
amelia 说:
2022年5月14日 19:51

More often than not I don't make remarks on sites, yet I'd like to say this article truly constrained me to do as such. Truly pleasant post! nettips

Avatar_small
amelia 说:
2022年5月19日 00:27

This web journal site is really cool! How was it made ! สล็อตทดลองเล่น

Avatar_small
amelia 说:
2022年5月19日 04:22

A debt of gratitude is in order for giving late reports with respect to the worry, I anticipate read more. Care at Home

Avatar_small
amelia 说:
2022年6月12日 00:36

I have as of late begun an online journal, the information you give on this website has helped me extraordinarily. Much obliged for the majority of your time and work. Homes for sale Oregon central coast

Avatar_small
amelia 说:
2022年6月14日 18:25

The post is written in very a good manner and it contains many useful information for me. BMK oil for sale

Avatar_small
amelia 说:
2022年6月16日 04:00

Great site! I really cherish how it is simple on my eyes it is. I am considering how I may be informed at whatever point another post has been made. I have subscribed to your RSS which may do the trap? Have an incredible Diabetes

Avatar_small
amelia 说:
2022年6月24日 00:18

It ended up being Very useful to me and I am certain to every one of the observers here! landscape lighting

Avatar_small
amelia 说:
2022年6月24日 00:40

I experience serious difficulties my contemplations on substance, yet I truly felt I ought to here. Your article is truly awesome. I like the way you composed this dat สล็อต

Avatar_small
amelia 说:
2022年6月25日 18:35

Your web journal furnished us with significant data to work with. Each and every tips of your post are magnificent. Much obliged for sharing. Continue blogging, computer courses


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter