/[gentoo-x86]/media-libs/libjpeg-turbo/libjpeg-turbo-1.2.1.ebuild
Gentoo

Contents of /media-libs/libjpeg-turbo/libjpeg-turbo-1.2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Jul 31 04:14:18 2012 UTC (23 months, 1 week ago) by ssuominen
Branch: MAIN
Changes since 1.6: +2 -2 lines
ppc/ppc64 stable wrt #426938

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/libjpeg-turbo/libjpeg-turbo-1.2.1.ebuild,v 1.6 2012/07/25 05:44:09 vapier Exp $
4
5 EAPI=4
6
7 JPEG_ABI=8
8
9 if [[ ${PV} == *_p20* ]]; then
10 SRC_URI="mirror://gentoo/${P}.tar.xz"
11 inherit autotools
12 elif [[ ${PV} != "9999" ]]; then
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
14 fi
15
16 inherit eutils java-pkg-opt-2 libtool toolchain-funcs
17
18 DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
19 HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
20 SRC_URI="${SRC_URI}
21 mirror://debian/pool/main/libj/libjpeg${JPEG_ABI}/libjpeg${JPEG_ABI}_${JPEG_ABI}d-1.debian.tar.gz"
22
23 LICENSE="BSD"
24 SLOT="0"
25 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
26 IUSE="java static-libs"
27
28 ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
29 COMMON_DEPEND="!media-libs/jpeg:0"
30 RDEPEND="${COMMON_DEPEND}
31 java? ( >=virtual/jre-1.5 )"
32 DEPEND="${COMMON_DEPEND}
33 amd64? ( ${ASM_DEPEND} )
34 x86? ( ${ASM_DEPEND} )
35 amd64-fbsd? ( ${ASM_DEPEND} )
36 x86-fbsd? ( ${ASM_DEPEND} )
37 amd64-linux? ( ${ASM_DEPEND} )
38 x86-linux? ( ${ASM_DEPEND} )
39 x64-macos? ( ${ASM_DEPEND} )
40 java? ( >=virtual/jdk-1.5 )"
41
42 src_prepare() {
43 epatch "${FILESDIR}"/${PN}-1.2.0-x32.patch #420239
44
45 if [[ -x ./configure ]]; then
46 elibtoolize
47 else
48 eautoreconf
49 fi
50
51 epunt_cxx #424689
52
53 java-pkg-opt-2_src_prepare
54 }
55
56 src_configure() {
57 if use java; then
58 export JAVACFLAGS="$(java-pkg_javac-args)"
59 export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
60 fi
61 local myconf=()
62 [[ ${ABI} == "x32" ]] && myconf+=( --without-simd ) #420239
63
64 econf \
65 $(use_enable static-libs static) \
66 --with-jpeg${JPEG_ABI} \
67 $(use_with java) \
68 "${myconf[@]}"
69 }
70
71 src_compile() {
72 local _java_makeopts
73 use java && _java_makeopts="-j1"
74 emake ${_java_makeopts}
75
76 ebegin "Building exifautotran and jpegexiforient extra tools"
77 pushd ../debian/extra >/dev/null
78 emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
79 popd >/dev/null
80 eend $?
81 }
82
83 src_test() {
84 emake test
85 }
86
87 src_install() {
88 emake \
89 DESTDIR="${D}" \
90 docdir="${EPREFIX}"/usr/share/doc/${PF} \
91 exampledir="${EPREFIX}"/usr/share/doc/${PF} \
92 install
93
94 prune_libtool_files
95
96 insinto /usr/share/doc/${PF}/html
97 doins -r doc/html/*
98
99 if use java; then
100 insinto /usr/share/doc/${PF}/html/java
101 doins -r java/doc/*
102 newdoc java/README README.java
103
104 rm -rf "${ED}"usr/classes
105 java-pkg_dojar java/turbojpeg.jar
106 fi
107
108 ebegin "Installing exifautotran and jpegexiforient extra tools"
109 pushd ../debian/extra >/dev/null
110 newdoc ../changelog changelog.debian
111
112 emake \
113 DESTDIR="${D}" prefix="${EPREFIX}"/usr \
114 INSTALL="install -m755" INSTALLDIR="install -d -m755" \
115 install
116 popd >/dev/null
117 eend $?
118 }

  ViewVC Help
Powered by ViewVC 1.1.20