blob: 5b12f92e7bd07938fdf61033d3085ade25644ae4 (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/jpeg2ps/jpeg2ps-1.9-r1.ebuild,v 1.15 2008/01/26 10:37:58 grobian Exp $
inherit eutils
DESCRIPTION="Converts JPEG images to Postscript using a wrapper"
HOMEPAGE="http://www.pdflib.com/download/free-software/jpeg2ps/"
SRC_URI="http://www.pdflib.com/products/more/jpeg2ps/${P}.tar.gz"
LICENSE="free-noncomm"
SLOT="0"
KEYWORDS="amd64 ppc ~ppc64 sparc x86"
IUSE=""
DEPEND="sys-apps/sed"
RDEPEND=""
src_unpack() {
unpack ${A}
#bug 105561
epatch "${FILESDIR}"/${P}-include.diff
}
src_compile() {
pagesize=""
if [ -h /etc/localtime ]; then
local continent=$(readlink /etc/localtime | cut -d / -f 5)
[ "${continent}" = "Europe" ] && pagesize="-DA4"
fi
emake CFLAGS="-c ${CFLAGS} ${pagesize}" || die "emake failed"
}
src_install() {
# The Makefile is hard-coded to install to /usr/local/ so we
# simply copy the files manually
dobin jpeg2ps || die "dobin failed"
doman jpeg2ps.1 || die "doman failed"
dodoc jpeg2ps.txt || die "dodoc failed"
}
pkg_postinst() {
elog
if [ -z ${pagesize} ]; then
elog "By default, this installation of jpeg2ps will generate"
elog "letter size output. You can force A4 output with"
elog " jpeg2ps -p a4 file.jpg > file.ps"
else
elog "By default, this installation of jpeg2ps will generate"
elog "A4 size output. You can force letter output with"
elog " jpeg2ps -p letter file.jpg > file.ps"
fi
elog
}
|