summaryrefslogtreecommitdiff
blob: 247428380262bdd4d5926ca08c39226ca316041a (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
69
70
71
72
73
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/app-text/gv/gv-3.5.8-r1.ebuild,v 1.4 2001/12/02 03:25:50 drobbins Exp $

# this r1 is a major change. it uses sed instead of patches.
# hopefully this will enable everyone to compile gv on widely
# different configurations, eliminating the gv.man/gv._man problem

S=${WORKDIR}/${P}

DESCRIPTION="gv is a standard ghostscript frontend used e.g. by LyX"

SRC_URI="ftp://ftpthep.physik.uni-mainz.de/pub/gv/unix/${P}.tar.gz"
HOMEPAGE="http://wwwthep.physik.uni-mainz.de/~plass/gv/"

# There's probably more, but ghostscript also depends on it,
# so I can't identify it
DEPEND="virtual/x11 x11-libs/Xaw3d app-text/ghostscript"

src_unpack() {
    
    # need to check if this can be done automatically
    
    unpack ${P}.tar.gz
    cd ${S}
    
}

src_compile() {
    
    cd ${S}
    
    cp config.Unix 1
    sed -e 's/usr\/local/usr/' 1 > config.Unix
    rm 1
    
    try xmkmf
    try make Makefiles
    
    cd source

    cp Makefile 1
    cat 1 | sed -e 's/install.man:: gv.man/install.man::/' \
		-e 's/all:: gv./\#all:: gv./' \
		-e '/gv.man/ c \#removed by sed for ebuilding' > Makefile
    rm 1
    if [ ! "`grep gv.man Makefile`" = "" ];
    then
	echo "sed didn't completely remove gv.man references from the Makefile.
We'll just run make and pray."
	sleep 2s
    fi
    

    cd ${S}
    try emake
    
}

src_install () {
    
    cd ${S}
    try make DESTDIR=${D} install
    # try make DESTDIR=${D} install.man # don't use this!!!
    try make DESTDIR=${D} install.doc
    
    cd ${S}/doc
    cp gv.man gv.man.1
    doman gv.man.1
    
}