summaryrefslogtreecommitdiff
blob: 0dda72d3c5e29676eef24b46f34e0e2beba9428d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript/ghostscript-6.01-r1.ebuild,v 1.4 2000/09/15 20:08:46 drobbins Exp $

P=ghostscript-6.01
A="${P}.tar.gz ghostscript-fonts-std-6.0.tar.gz"
A1=jpegsrc.v6b.tar.gz
A2=zlib-1.1.3.tar.gz
A3=libpng-1.0.6.tar.gz

S=${WORKDIR}/gs6.01
DESCRIPTION="Aladin Ghostscript"
SRC_URI="http://download.sourceforge.net/ghostscript/${P}.tar.gz
	 http://download.sourceforge.net/gs-fonts/ghostscript-fonts-std-6.0.tar.gz"

src_unpack() {
  unpack ${A}
  cd ${S}
  mkdir zlib
  cd zlib
  unpack ${A2}
  cd ..
  mkdir jpeg
  cd jpeg
  unpack ${A1}
  cd ..
  mkdir libpng
  cd libpng
  unpack ${A3}
  cd ../src
  cp ${O}/files/all-arch.mak all-arch.mak

}

src_compile() {                           
  cd ${S}/src
  cp all-arch.mak all-arch.mak.orig
  sed -e "s:^SRCDIR.*:SRCDIR = ${S}:" all-arch.mak.orig > all-arch.mak
  cp unix-gcc.mak unix-gcc.mak.orig
  sed    -e "s:-O2:${CFLAGS}:" unix-gcc.mak.orig > unix-gcc.mak
  cd ..
  try make -f src/all-arch.mak linux prefix=/usr
}

src_install() {                               
  cd ${S}
  dodir /usr/bin  
  try make -f src/all-arch.mak prefix=${D}/usr install
  cd ${WORKDIR}
  cp -a fonts ${D}/usr/share/ghostscript
  cd ${S}

  prepman

  dodir /usr/doc/${PF}
  rm -rf ${D}/usr/share/ghostscript/6.01/doc
  dodoc doc/README doc/PUBLIC doc/ps2epsi.txt
  docinto html
  dodoc doc/*.html doc/*.htm
  insinto /usr/share/emacs/site-lisp
  doins doc/gsdoc.el

}