summaryrefslogtreecommitdiff
blob: 66d2a43b6e2e067fecaba7a16c299c2b7f82e24a (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-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg-mmx/jpeg-mmx-0.1.6-r1.ebuild,v 1.4 2005/09/02 17:24:10 sbriesen Exp $

inherit eutils flag-o-matic

DESCRIPTION="JPEG library with mmx enhancements"
HOMEPAGE="http://mjpeg.sourceforge.net/"
SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="-* x86"
IUSE=""

DEPEND="dev-lang/nasm"
RDEPEND=""

S=${WORKDIR}/jpeg-mmx

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-PIC.patch
	epatch "${FILESDIR}"/${P}-makefile.patch
}

src_compile() {
	# filter -fforce-addr because it breaks compile
	filter-flags -fforce-addr

	econf \
		--includedir=/usr/include/jpeg-mmx \
		--enable-shared \
		--enable-static \
		|| die "configure failed"
	emake || die "make failed"
}

src_install() {
	dodir /usr/include/jpeg-mmx
	make install-headers includedir="${D}"/usr/include/jpeg-mmx || die "headers"

	for x in cjpeg djpeg jpegtran ; do
		newbin .libs/${x} ${x}-mmx || die "dobin ${x}"
	done

	dolib.a .libs/libjpeg-mmx.a || die "dolib.a"
	cp -pPR .libs/libjpeg-mmx.so* libjpeg-mmx.la "${D}"/usr/lib/ || die "dolib.so"

	dodoc README change.log structure.doc libjpeg.doc
}