summaryrefslogtreecommitdiff
blob: 2077fea1b36892fc51900e363007384a3f769a12 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/tiff-3.6.1-r1.ebuild,v 1.4 2004/06/24 23:24:27 agriffis Exp $

MY_S=${P/tiff-/tiff-v}
MY_P=${PN}-v${PV/_beta/-beta}
S=${WORKDIR}/${MY_P}
DESCRIPTION="Library for manipulation of TIFF (Tag Image File Format) images."
HOMEPAGE="http://www.libtiff.org/"
SRC_URI="ftp://ftp.remotesensing.org/pub/libtiff/${MY_P}.tar.gz
	ftp://ftp.remotesensing.org/libtiff/libtiff-lzw-compression-kit-1.5.tar.gz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc mips ~alpha arm hppa amd64 ~ia64 s390"
IUSE="lzw-tiff"

DEPEND=">=media-libs/jpeg-6b
	>=sys-libs/zlib-1.1.3-r2"

src_unpack() {
	unpack ${MY_P}.tar.gz
	if use lzw-tiff ; then
		ewarn "Applying lzw-compression toolkit..."
		unpack  libtiff-lzw-compression-kit-1.5.tar.gz || die "lzw unpack failed"
		cd libtiff-lzw-compression-kit-1.5/
		cp -f tif_lzw.c ${S}/.
		cp README-LZW-COMPRESSION ${S}/.
	fi
	cd ${S}
	cp ${FILESDIR}/config.site config.site
	echo "DIR_HTML="${D}/usr/share/doc/${PF}/html"" >> config.site
}

src_compile() {
	OPTIMIZER="${CFLAGS}" ./configure --noninteractive || die
	emake || die
}

src_install() {
	dodir /usr/{bin,lib,share/man,share/doc/${PF}/html}
	dodir /usr/share/doc/${PF}/html
	make ROOT="" INSTALL="/bin/sh ${S}/port/install.sh" install || die
	preplib /usr
	dodoc README TODO VERSION README-LZW-COMPRESSION
}

pkg_postinst() {
	einfo "The LZW Compression Toolkit is now an optional component"
	einfo "of libtiff.  Add USE="lzw-tiff" to the emerge command to enable."
	ewarn "And don't forget to see README-LZW-COMPRESSION for license info."
}