[Momonga-devel.ja:01177] GNU ghostscript -> ESP ghostscript


小松です。

[Momonga-devel.ja:01056] で少し触れたように、
GNU ghostscript ではなく ESP ghostscript (*1) を使うように
したいと思います。

GNU gs から ESP gs に変えるメリットは、

    ・ 必要な printer driver がほぼすべて入っている上に
       しっかり最新を追いかけてくれているので
       メンテが非常にラク。
    ・ ./configure --with-drivers=... で必要な driver を組込める。

といったところでしょうか。
あと、RedHat などで見付かった bug もいくつか修正されています。

ただ、現在の momonga の ghostscript に入っている patch のうち
いくつかは ESP gs には入っていないようなので、
この辺を調整したものを現在の spec との diff として添付します。
だいぶ spec がスッキリしたのがわかると思います。;)

(*1) http://www.cups.org/ghostscript.html


それから、今 ghostscript の sub package になっている
ghostscript-fonts を別 spec にしたいと思います。
これからもしばしば ghostscript をいじることになると思うのですが、
そのたびに実質変更がない font の Release が上がるのは
いかがなものか、と思うからです。
# 今はまだ binary 公開してないからいいといえばいいのですが、
# binary が公開されたら mph-get するたびに font を
# 落とすことになるわけで、回線が細い人にはツライでしょう。

別 spec にした ghostscript-fonts の spec を添付しておきます。
ghostscript の変更は、上の diff の中に入っています。
また、ghostscript-fonts の Version を tar ball の version (6.0)
にしましたが、これによって version down したので
Epoch: 1 としました。そしたら dgs の Requires を

    -Requires: ghostscript-fonts >= 6.53-7m
    +Requires: ghostscript-fonts >= 0:6.53-7m

とする必要がありました(添付 patch 参照)。


以上、結構大きな変更になりますので、
コメントなどよろしくお願いします。
例によって nosrc.rpm を

    http://kamuy.c.u-tokyo.ac.jp/~koma2/comp/momonga/tmp/gs/

以下に置きますので、詳しくはそちらを御覧下さい。

正月休みに入ってる人が多いと思われるので
commit するのは週明けまで待ちます。

-- 
---------------------------------------
東京大学大学院総合文化研究科
広域科学専攻相関基礎科学系 
  佐々研究室  博士3年
    小松  晋一朗            
koma2@xxxxxxxxxxxxxxxxxxxx
koma2@xxxxxxxxxxxxxxxxx
http://kamuy.c.u-tokyo.ac.jp/~koma2/
---------------------------------------
Index: ghostscript.spec
===================================================================
RCS file: /home/cvs/pkgs/ghostscript/ghostscript.spec,v
retrieving revision 1.14
diff -u -u -r1.14 ghostscript.spec
--- ghostscript.spec	2002/12/23 20:14:20	1.14
+++ ghostscript.spec	2003/01/01 15:36:20
@@ -1,6 +1,9 @@
 %define gs_fontpath %{_datadir}/fonts/default/Type1:%{_datadir}/fonts/default/amspsfnt/pfb:%{_datadir}/fonts/default/cmpsfont/pfb:%{_datadir}/fonts/default/ghostscript:%{_datadir}/fonts/truetype/chinese-zh_CN:%{_datadir}/fonts/truetype/chinese-zh_TW:%{_datadir}/fonts/truetype/japanese:%{_datadir}/fonts/truetype/korean
 
-%define gs_ver 7.05
+%define gs_ver		7.05
+%define espgs_ver	7.05.5
+%define espgs_date	20021228
+
 Summary: A PostScript(TM) interpreter and renderer.
 Name: ghostscript
 Version: %{gs_ver}
@@ -12,78 +15,56 @@
 Requires: truetype-fonts-ja >= 3.1
 Requires: truetype-fonts-ko >= 2.1
 BuildPreReq: gimp-print-devel
-BuildPreReq: patchutils >= 0.2.13
+#BuildPreReq: patchutils >= 0.2.13
 BuildPreReq: zlib-devel, libpng-devel, gtk+1-devel
-BuildPreReq: glib1-devel, XFree86-devel, freetype-devel
+BuildPreReq: glib1-devel, XFree86-devel
+#BuildPrereq: freetype-devel
+BuildPrereq: autoconf >= 2.53
 # Omni requires libxml
-BuildPreReq: libxml-devel
+#BuildPreReq: libxml-devel
 Obsoletes: ghostscript-pdfencrypt
 BuildRoot: %{_tmppath}/%{name}-%{gs_ver}-root
-Release: 3m
+Release: 3m3test
 
 License: GPL
-URL: http://www.ghostscript.com/doc/gnu/
+URL: http://www.cups.org/ghostscript.html
 Group: Applications/Publishing
-Source0: ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/gs705/%{name}-%{gs_ver}.tar.bz2
+Source0: http://us.dl.sf.net/sourceforge/espgs/espgs-%{espgs_ver}-source.tar.bz2
 NoSource: 0
 %define jpeg_ver 6b
 Source1: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{jpeg_ver}.tar.gz 
 NoSource: 1
-%define pcl3_ver 3.3
-Source2: http://home.t-online.de/home/Martin.Lottermoser/pcl3dist/pcl3-%{pcl3_ver}.tar.gz
-%define md2k_ver 0.2a
-Source3: http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/gdevmd2k-%{md2k_ver}.tar.gz
-Source4: http://lcewww.et.tudelft.nl/~haver/cgi-bin/download/linux/epson740.tgz
-%define lxm_ver 0.4.1-gs5.50
-Source6: http://www.geocities.com/dgordini/lxm3200-%{lxm_ver}-src.tar.gz
-Source7: http://www.powerup.com.au/~pbwest/lexmark/gdevlx50.c
-Source8: ftp://bimbo.fjfi.cvut.cz/users/paluch/lexmarkgs/lexmarkgs990908.tar.gz
 # Url for gs-cjk project, the source of Source9:
 # http://www.gyve.org/gs-cjk/
 %define cjk_ver 6.51-cjk-M2-R3
 Source9: ftp://ftp.gyve.org/pub/gs-cjk/M2/gs%{cjk_ver}.tar.gz
-%define gsj_ver gs550j1
-Source11: %{gsj_ver}.tar.gz
-# Source12 is gs6.51 friendly contrib.mak-add for gsj
-Source12: contrib.mak-gsj651.add
 Source13: ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200204.tar.gz
 NoSource: 13
 Source16: ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz
 NoSource: 16
-Source17: gdevgdi.c
-%define   eplaser_ver 3.0.4
-Source18: http://www.epkowa.on.arena.ne.jp/pips/data/gs65_301/eplaser-%{eplaser_ver}-651.tgz
 Source20: CIDFnmap-cjk-20021205.tar.gz
-# Some drivers mistakenly got left out of 7.05.
-Source21: gnu-drivers.tar.gz
-# fonts
-Source30: ftp://ftp.ring.gr.jp/pub/text/CTAN/support/ghostscript/gnu/fonts/gnu-gs-fonts-other-6.0.tar.gz
-NoSource: 30
 # The CJK patch is for an older version of ghostscript; some patches don't
 # apply cleanly to the current one. Fixed versions here...
 Source100: lib_gs_cidcm.ps.patch
 Source101: lib_pdf_font.ps.patch
+
+### patch between ESP gs release version and CVS snapshot
+Patch0: espgs-%{espgs_ver}-%{espgs_date}.patch
+### patch between GNU ghostscript 7.05 and 7.06rc
+### which will be created some day in the near future. ;)
+#Patch1: ghostscript-7.05-7.06rc2.patch.bz2
+Patch2: espgs-7.05.5-dll-cflags.patch
+Patch3: espgs-7.05.5-gs_res.in.patch
 
-Patch0: ghostscript-7.05-config.patch
-Patch3: ghostscript-6.51-gcc296.patch
-Patch5: ghostscript-7.05-gsj.patch
-Patch6: ghostscript-7.05-_ds.patch
-Patch7: ghostscript-6.51-gx_device.patch
-Patch8: ghostscript-6.51-gsj_update.patch
-Patch13: ghostscript-6.51-res_path.patch
+Patch13: ghostscript-6.51-gcc296.patch
 Patch14: ghostscript-7.05-ps2epsi.patch
-Patch16: ghostscript-6.51-gdevgdi.patch
-Patch17: ghostscript-6.51-Epson_eplaseren.patch
 Patch18: ghostscript-6.51-gs_path.patch
 Patch19: ghostscript-6.51-ia64_jmp_buf.patch
-Patch21: Omni-7.05-071902.patch
 Patch24: ghostscript-7.05-scripts.patch
-Patch25: ghostscript-7.05-gsj-fixups.patch
 Patch26: ghostscript-7.05-dx6.patch
 Patch27: ghostscript-7.05-fPIC.patch
 Patch28: ghostscript-7.05-gb18030.patch
 Patch30: ghostscript-7.05-x11.patch
-Patch31: ghostscript-7.05-ps1.patch
 
 %description
 Ghostscript is a set of software that provides a PostScript(TM)
@@ -126,7 +107,10 @@
 and X11.
 
 %prep
-%setup -q -a 21
+%setup -q -n espgs-%{espgs_ver}
+%patch0 -p1
+%patch2 -p0 -b .dll~
+%patch3 -p0 -b .res~
 
 # Set up the jpeg library
 	tar xzf %{SOURCE1}
@@ -149,7 +133,6 @@
 #	done
 
 	# Create a Resource directory
-%patch13 -p1 -b .res_path
 	mkdir Resource
 	mkdir Resource/Font
 	mkdir Resource/CIDFont
@@ -162,245 +145,11 @@
         tar xzf %{SOURCE20} -C lib
 
 
-# RPM configuration changes to the makefile
-# The config patch sets up the use of a symbol, _XXX_RPM_GS_DEVICES_XXX_ which
-# gets replaced by sed with the contents of the variable GS_DEVS. This
-# allows devices to be added to the Makefile by adding them to the
-# GS_DEVS string in this spec file. New devices in this spec file
-# should be added with the line:
-#     GS_DEVS=$GS_DEVS'$(DD)foo.dev ' <-- note the space
-# Those paying attention will wonder why it works this way, the reason is that
-# the DEVICE_DEVS? are NOT treated as real variables by ghostscript's build
-# system, and so we have to actually change the file.
-# 
-%patch0 -p1 -b .config
-
-# Turn on every possibly pertinent builtin device
-	GS_DEVS=$GS_DEVS'$(DD)dmprt.dev $(DD)cdj880.dev '
-	GS_DEVS=$GS_DEVS'$(DD)ap3250.dev $(DD)appledmp.dev $(DD)atx23.dev '
-	GS_DEVS=$GS_DEVS'$(DD)atx24.dev $(DD)atx38.dev $(DD)bmpa16.dev '
-	GS_DEVS=$GS_DEVS'$(DD)bmpa16m.dev $(DD)bmpa256.dev $(DD)bmpa32b.dev '
-	GS_DEVS=$GS_DEVS'$(DD)bmpamono.dev $(DD)bmpasep1.dev $(DD)bmpasep8.dev '
-	GS_DEVS=$GS_DEVS'$(DD)ccr.dev $(DD)cdj1600.dev $(DD)cdj500.dev '
-	GS_DEVS=$GS_DEVS'$(DD)cdj670.dev $(DD)cdj850.dev '
-	GS_DEVS=$GS_DEVS'$(DD)cdj890.dev $(DD)cdj970.dev $(DD)cfax.dev '
-	GS_DEVS=$GS_DEVS'$(DD)cgm24.dev $(DD)cgm8.dev $(DD)cgmmono.dev '
-	GS_DEVS=$GS_DEVS'$(DD)cljet5pr.dev $(DD)coslw2p.dev $(DD)coslwxl.dev '
-	GS_DEVS=$GS_DEVS'$(DD)cp50.dev $(DD)declj250.dev $(DD)dfaxlow.dev '
-	GS_DEVS=$GS_DEVS'$(DD)dfaxhigh.dev $(DD)djet500c.dev $(DD)dl2100.dev '
-	GS_DEVS=$GS_DEVS'$(DD)dnj650c.dev $(DD)eps9high.dev '
-	GS_DEVS=$GS_DEVS'$(DD)eps9mid.dev $(DD)epson.dev $(DD)epsonc.dev '
-	GS_DEVS=$GS_DEVS'$(DD)escp.dev $(DD)fax.dev $(DD)fs600.dev '
-	GS_DEVS=$GS_DEVS'$(DD)hl1250.dev $(DD)hl7x0.dev $(DD)ibmpro.dev '
-	GS_DEVS=$GS_DEVS'$(DD)imagen.dev $(DD)inferno.dev $(DD)iwhi.dev '
-	GS_DEVS=$GS_DEVS'$(DD)iwlo.dev $(DD)iwlq.dev $(DD)jetp3852.dev '
-	GS_DEVS=$GS_DEVS'$(DD)la50.dev $(DD)la70.dev $(DD)la75.dev '
-	GS_DEVS=$GS_DEVS'$(DD)la75plus.dev $(DD)lbp8.dev $(DD)lj250.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lj3100sw.dev $(DD)lj4dith.dev $(DD)ln03.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp2563.dev $(DD)lp8000.dev $(DD)lq850.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lxm5700m.dev $(DD)m8510.dev $(DD)mgr4.dev '
-	GS_DEVS=$GS_DEVS'$(DD)mgr8.dev $(DD)mgrgray2.dev $(DD)mgrgray4.dev '
-	GS_DEVS=$GS_DEVS'$(DD)mgrgray8.dev $(DD)mgrmono.dev $(DD)miff24.dev '
-	GS_DEVS=$GS_DEVS'$(DD)necp6.dev $(DD)oce9050.dev '
-	GS_DEVS=$GS_DEVS'$(DD)oki182.dev $(DD)okiibm.dev $(DD)paintjet.dev '
-	GS_DEVS=$GS_DEVS'$(DD)photoex.dev $(DD)pjetxl.dev $(DD)plan9bm.dev '
-	GS_DEVS=$GS_DEVS'$(DD)psdf.dev $(DD)sgirgb.dev $(DD)r4081.dev '
-	GS_DEVS=$GS_DEVS'$(DD)sj48.dev $(DD)st800.dev '
-	GS_DEVS=$GS_DEVS'$(DD)stcolor.dev $(DD)sunhmono.dev $(DD)t4693d2.dev '
-	GS_DEVS=$GS_DEVS'$(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev '
-	GS_DEVS=$GS_DEVS'$(DD)tfax.dev $(DD)tiffs.dev $(DD)xes.dev '
-	GS_DEVS=$GS_DEVS'$(DD)x11_.dev $(DD)x11alt_.dev $(DD)x11cmyk2.dev '
-	GS_DEVS=$GS_DEVS'$(DD)x11cmyk4.dev $(DD)x11cmyk8.dev $(DD)x11rg16x.dev '
-	GS_DEVS=$GS_DEVS'$(DD)x11rg32x.dev '
-
-
-## Add a monkey-load of Japanese Printers
-	mkdir gsj
-	tar xzf %{SOURCE11} -C gsj
-
-	# Zap the older version of the okidata driver
-	rm gsj/gdevop4w.*
-
-	cp gsj/*.[ch] src/
-	cp gsj/*.{ps,src} lib/
-%patch5 -p1 -b .gsj
-
-	# Repair the gsj code
-%patch7 -p1 -b .gx_device
-%patch8 -p1 -b .gsj_update
-
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)ljet4pjl.dev $(DD)lj4dithp.dev $(DD)dj505j.dev '
-	GS_DEVS=$GS_DEVS'$(DD)picty180.dev $(DD)pr201.dev $(DD)pr150.dev '
-	GS_DEVS=$GS_DEVS'$(DD)pr1000.dev $(DD)pr1000_4.dev $(DD)jj100.dev '
-	GS_DEVS=$GS_DEVS'$(DD)bj10v.dev $(DD)bj10vh.dev $(DD)mag16.dev '
-	GS_DEVS=$GS_DEVS'$(DD)mag256.dev $(DD)mj700v2c.dev $(DD)mj500c.dev '
-	GS_DEVS=$GS_DEVS'$(DD)mj6000c.dev $(DD)mj8000c.dev $(DD)fmpr.dev '
-	GS_DEVS=$GS_DEVS'$(DD)fmlbp.dev $(DD)ml600.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lbp310.dev $(DD)lbp320.dev $(DD)lips2p.dev '
-	GS_DEVS=$GS_DEVS'$(DD)bjc880j.dev $(DD)lips4.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lips4v.dev $(DD)escpage.dev $(DD)lp2000.dev '
-	GS_DEVS=$GS_DEVS'$(DD)npdl.dev $(DD)md50Mono.dev $(DD)md50Eco.dev '
-	GS_DEVS=$GS_DEVS'$(DD)md1xMono.dev '
-	cat %{SOURCE12} >> src/contrib.mak
-
-
-# Turn on IBM's Omni print driver interface
-	GS_DEVS=$GS_DEVS'$(DD)omni.dev '
-	
-	# Apply the 071902 patch.
-%patch21 -p0 -b .Omni.071902
-
 	# Fix some shell scripts
 %patch24 -p1 -b .scripts
 
-
-# Add pcl3 driver support for some other HP printers
-	tar xzfO %{SOURCE2} pcl3-%{pcl3_ver}/pcl3.tar | tar xf -
-	mv doc/*.1 man
-
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)pcl3.dev '
-	ln -s . pcl3
-	cat src/contrib.mak-6.51.add >> src/contrib.mak
-
-
-# Add support for ALPS printers
-	tar xzf %{SOURCE3}
-	mv gdevmd2k-%{md2k_ver}/*.[ch] src/
-	
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)md2k.dev $(DD)md5k.dev '
-	cat gdevmd2k-%{md2k_ver}/gdevmd2k.mak-5.8x >> src/contrib.mak
-
-
-# Add *.upp files for Epson 740
-	tar xzf %{SOURCE4}
-	mv epson740/*.upp lib/
-
-
-# Add the gimp-print stp driver
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)stp.dev '
-
-
-# Add Daniel Gordini's lxm3200 driver
-	tar xzf %{SOURCE6}
-	mv lxm3200-%{lxm_ver}-src/*.[ch] src/
-
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)lxm3200.dev '
-	echo '
-### ---------------- Lexmark 3200 device ----------------- ###
-lxm3200_=$(GLOBJ)gdevlx32.$(OBJ)
-
-$(GLOBJ)gdevlx32.$(OBJ): $(GLSRC)gdevlx32.c $(PDEVH) $(gsparam_h)
-	$(GLCC) $(GLO_)gdevlx32.$(OBJ) $(C_) $(GLSRC)gdevlx32.c
-
-$(DD)lxm3200.dev: $(lxm3200_) $(DD)page.dev
-	$(SETPDEV) $(DD)lxm3200 $(lxm3200_)
-
-' >> src/contrib.mak
-
-
-# Add the lx5000 driver
-	cp %{SOURCE7} src/
-
-	GS_DEVS=$GS_DEVS'$(DD)lx5000.dev '
-	echo '
-### ----------------- Lexmark 5000 printer ----------------------------- ###
-### Note: this driver was contributed by users.  Please contact:         ###
-###   Peter B. West <pbwest@xxxxxxxxxxxx>                                ###
-###   Reported to work with Z51.  May work with 5700 & 7000              ###
-###   Provides colour and black-only, unidirectional 300/600x600dpi.     ###
-
-lx5000_=$(GLOBJ)gdevlx50.$(OBJ)
-
-$(GLOBJ)gdevlx50.$(OBJ) : $(GLSRC)gdevlx50.c $(PDEVH)
-	$(GLCC) $(GLO_)gdevlx50.$(OBJ) $(C_) $(GLSRC)gdevlx50.c
-
-$(DD)lx5000.dev: $(lx5000_) $(DD)page.dev
-	$(SETPDEV) $(DD)lx5000 $(lx5000_)
-
-' >> src/contrib.mak
-
-
-# Add Henryk Paluch's additional lexmark drivers
-	tar xzf %{SOURCE8} 
-	cp lexmarkgs/gdevlx7.c src/
-
-	# update the make files
-	GS_DEVS=$GS_DEVS'$(DD)lex7000.dev $(DD)lex5700.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lex3200.dev $(DD)lex2050.dev '
-echo '
-### ------ Lexmark 2050, 3200, 5700 and 7000 devices ------- ###
-
-lex7000_=$(GLOBJ)gdevlx7.$(OBJ)
-
-$(GLOBJ)gdevlx7.$(OBJ): $(GLSRC)gdevlx7.c $(PDEVH) $(gsparam_h)
-	$(GLCC) $(GLO_)gdevlx7.$(OBJ) $(C_) $(GLSRC)gdevlx7.c
-
-$(DD)lex7000.dev: $(lex7000_) $(DD)page.dev
-	$(SETPDEV) $(DD)lex7000 $(lex7000_)
-
-$(DD)lex5700.dev: $(lex7000_) $(DD)page.dev
-	$(SETPDEV) $(DD)lex5700 $(lex7000_)
-
-$(DD)lex3200.dev: $(lex7000_) $(DD)page.dev
-	$(SETPDEV) $(DD)lex3200 $(lex7000_)
-
-$(DD)lex2050.dev: $(lex7000_) $(DD)page.dev
-	$(SETPDEV) $(DD)lex2050 $(lex7000_)
-
-' >> src/contrib.mak
-
-
-# Add Samsung GDI driver for ML-4500
-	cp %{SOURCE17} src/
-%patch16 -p1 -b .gdevgdi
-
-       # update the make files
-       GS_DEVS=$GS_DEVS'$(DD)gdi.dev '
-echo '
-### ---------------- The Samsung SmartGDI laser printer devices --------- ###
-### Note : this driver is used by Samsung SmartGDI compatible printers.   ###
-###
-
-GDIMONO=$(GLOBJ)gdevgdi.$(OBJ) $(HPPCL)
-
-$(GLOBJ)gdevgdi.$(OBJ): $(GLSRC)gdevgdi.c $(PDEVH) $(gsparam_h)
-	$(GLCC) $(GLO_)gdevgdi.$(OBJ) $(C_) $(GLSRC)gdevgdi.c
-
-$(DD)gdi.dev: $(GDIMONO) $(DD)page.dev
-	$(SETPDEV) $(DD)gdi $(GDIMONO)
-
-' >> src/contrib.mak
-
-
-# Add Epson's eplaseren drivers
-	tar xzf %{SOURCE18} -C src
-	perl -p -i -e 's,MAJOR == 6,MAJOR == 7,' src/eplaser-%{eplaser_ver}/*.c
-#%patch17 -p1 -b .Epson_eplaseren
-
-	GS_DEVS=$GS_DEVS'$(DD)lp8800c.dev $(DD)lp8300c.dev $(DD)lp8500c.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp3000c.dev $(DD)lp8200c.dev $(DD)lp8000c.dev '
-	GS_DEVS=$GS_DEVS'$(DD)alc8600.dev $(DD)alc8500.dev $(DD)alc2000.dev '
-	GS_DEVS=$GS_DEVS'$(DD)alc4000.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp7500.dev $(DD)lp2400.dev $(DD)lp2200.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp9400.dev $(DD)lp8900.dev $(DD)lp8700.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp8100.dev $(DD)lp7700.dev $(DD)lp8600f.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp8400f.dev $(DD)lp8300f.dev $(DD)lp1900.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp9600s.dev $(DD)lp9300.dev $(DD)lp9600.dev '
-	GS_DEVS=$GS_DEVS'$(DD)lp8600.dev $(DD)lp1800.dev $(DD)epl6100.dev '
-	GS_DEVS=$GS_DEVS'$(DD)epl5900.dev $(DD)epl5800.dev $(DD)epl2050.dev '
-	GS_DEVS=$GS_DEVS'$(DD)epl2050p.dev $(DD)epl2120.dev '
-	cat src/eplaser-%{eplaser_ver}/*.mak >> src/contrib.mak
-
-	# Repair the gsj code
-%patch6 -p1 -b ._ds
-
 # Patch to make gcc296 happier
-%patch3 -p1 -b .gcc296
+%patch13 -p1 -b .gcc296
 
 # Patch to make ps2espi better/work
 %patch14 -p1 -b .ps2epsi
@@ -411,9 +160,6 @@
 # Stupid ia64 jmp_buf alignment patch
 %patch19 -p1 -b .ia64_jmp_buf
 
-# Fix-up gdevdmpr.c
-%patch25 -p1 -b .gsj-fixups
-
 # Fix gtk+ initial window size
 %patch26 -p0 -b .dx6
 
@@ -426,31 +172,13 @@
 # Fix XLIBDIR
 %patch30 -p1 -b .x11
 
-# Fix level 1 PostScript output (bug #78450).
-%patch31 -p1 -b .ps1
-
-# Set up for a unix os, gcc compiler build, and replace our insertion string
-sed -e "s/_XXX_RPM_GS_DEVICES_XXX_/$GS_DEVS/;" src/unix-gcc.mak > Makefile
-
-# Link with gimp-print
-cat << EOF >> Makefile
-
-STPLIB=gimpprint
-EOF
-
-# Turn on IJS support
-cat << EOF >> Makefile
-
-IJSDIR=ijs
-IJSDEVS='\$(DD)ijs.dev'
-IJSEXECTYPE=unix
-EOF
-
 %build
-make RPM_OPT_FLAGS="%{optflags}" prefix=%{_prefix} \
-  GS_LIB_DEFAULT='%{_datadir}/ghostscript/%{gs_ver}/lib:%{gs_fontpath}'
-make so RPM_OPT_FLAGS="%{optflags}" prefix=%{_prefix} \
-  GS_LIB_DEFAULT='%{_datadir}/ghostscript/%{gs_ver}/lib:%{gs_fontpath}'
+autoconf
+%configure --with-ijs --with-drivers=ALL --with-fontpath=%gs_fontpath \
+           --with-omni --with-gimp-print --with-x
+
+make
+make so
 
 %install
 rm -rf %{buildroot}
@@ -458,7 +186,9 @@
 mkdir -p %{buildroot}/{%{_mandir},%{_bindir},%{_datadir},%{_docdir}}
 mkdir -p %{buildroot}/{%{_libdir},%{_includedir}/ijs}
 
-make install soinstall	prefix=%{buildroot}%{_prefix} \
+make install soinstall \
+  prefix=%{buildroot}%{_prefix} \
+  install_prefix=%{buildroot} \
   mandir=%{buildroot}%{_mandir} \
   datadir=%{buildroot}%{_datadir} \
   bindir=%{buildroot}%{_bindir} \
@@ -492,13 +222,6 @@
   grep -v '/$\|/hpijs$\|/gsx$\|/ijs-config$' \
   >> $MAIN_PWD/rpm.sharelist)
 
-## install fonts
-mkdir -p %{buildroot}%{_datadir}/fonts/default
-tar xzf %{SOURCE30} -C %{buildroot}%{_datadir}/fonts/default
-mv %{buildroot}%{_datadir}/fonts/default/fonts \
-    %{buildroot}%{_datadir}/fonts/default/ghostscript
-ln -s %{_datadir}/fonts/default/ghostscript %{buildroot}%{_datadir}/ghostscript/fonts
-
 %clean
 rm -rf %{buildroot}
 
@@ -525,12 +248,19 @@
 %dir %{_includedir}/ghostscript
 %{_includedir}/ghostscript/*.h
 
-%files fonts
-%defattr(-, root, root, -)
-%{_datadir}/fonts/default/ghostscript
-%{_datadir}/ghostscript/fonts
-
 %changelog
+* Tue Dec 31 2002 KOMATSU Shinichiro <koma2@xxxxxxxxxxxxxxxxxxxx>
+- (7.05-3m3test)
+- Now, we use ESP ghostscript instead of GNU ghostscript
+  since the former contains almost all nessesary printer drivers 
+  and some bug fixes against the latter.
+
+  The version of ESP ghostscript at this time is
+  CVS snapshot as of 2002/12/28 (pre 7.05.6).
+
+- separate ghostscript-fonts into another spec.
+- remove some BuildPrereq:'s which seem to be unneeded.
+
 * Tue Dec 24 2002 KOMATSU Shinichiro <koma2@xxxxxxxxxxxxxxxxxxxx>
 - (7.05-3m)
 - separate hpijs
Summary: Fonts for GNU/ESP Ghostscript
Name: ghostscript-fonts
Version: 6.0
Epoch: 1
Release: 0m1test
License: GPL
Group: Applications/Publishing
Source0: ftp://ftp.ring.gr.jp/pub/text/CTAN/support/ghostscript/gnu/fonts/gnu-gs-fonts-other-6.0.tar.gz
NoSource: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch

%description
These fonts can be used by the GhostScript interpreter during text
rendering. They are in addition to the shared fonts between GhostScript
and X11.

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_datadir}/fonts/default
tar xzf %{SOURCE0} -C %{buildroot}%{_datadir}/fonts/default
mv %{buildroot}%{_datadir}/fonts/default/fonts \
    %{buildroot}%{_datadir}/fonts/default/ghostscript
mkdir -p %{buildroot}%{_datadir}/ghostscript
ln -sf %{_datadir}/fonts/default/ghostscript %{buildroot}/%{_datadir}/ghostscript/fonts

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%dir %{_datadir}/fonts/default/ghostscript
%{_datadir}/fonts/default/ghostscript/*
%{_datadir}/ghostscript/fonts

%changelog
* Thu Jan  2 2003 KOMATSU Shinichiro <koma2@xxxxxxxxxxxxxxxxxxxx>
- (1:6.0-0m1test)
- separate ghostscript-fonts into another spec.
- make Version be source tar ball's one (6.0).
  this makes "version down", so bump Epoch to 1.
Index: dgs.spec
===================================================================
RCS file: /home/cvs/pkgs/dgs/dgs.spec,v
retrieving revision 1.3
diff -u -u -r1.3 dgs.spec
--- dgs.spec	2002/10/14 02:02:16	1.3
+++ dgs.spec	2003/01/01 16:04:46
@@ -1,7 +1,7 @@
 Summary: Display Ghostscript System
 Name: dgs
 Version: 0.5.10
-Release: 3m
+Release: 3m1test
 License: GPL
 Group: Applications/Publishing
 URL: http://www.gyve.org/dgs/
@@ -15,7 +15,7 @@
 BuildPreReq: XFree86-devel >= 4.2.1-8m
 BuildPreReq: libpng, zlib
 Requires: urw-fonts
-Requires: ghostscript-fonts >= 6.53-7m
+Requires: ghostscript-fonts >= 0:6.53-7m
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 %description
@@ -92,6 +92,10 @@
 %{_datadir}/ghostscript/5.50
 
 %changelog
+* Thu Jan  2 2003 KOMATSU Shinichiro <koma2@xxxxxxxxxxxxxxxxxxxx>
+- (0.5.10-3m1test)
+- add Epoch to ghostscript-fonts requirement
+
 * Mon Oct 14 2002 Kenta MURATA <muraken2@xxxxxxxxx>
 - (0.5.10-3m)
 - apply some original patch.