Lines 2-11
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/freeimage/freeimage-3.11.0.ebuild,v 1.2 2008/11/25 09:17:05 nyhm Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/freeimage/freeimage-3.11.0.ebuild,v 1.2 2008/11/25 09:17:05 nyhm Exp $ |
4 |
|
4 |
|
5 |
inherit toolchain-funcs multilib |
5 |
inherit eutils multilib |
6 |
|
6 |
|
7 |
MY_PN=FreeImage |
7 |
MY_PN=FreeImage |
8 |
MY_P=${MY_PN}${PV//.} |
8 |
MY_P=${MY_PN}${PV//.} |
|
|
9 |
|
9 |
DESCRIPTION="Image library supporting many formats" |
10 |
DESCRIPTION="Image library supporting many formats" |
10 |
HOMEPAGE="http://freeimage.sourceforge.net/" |
11 |
HOMEPAGE="http://freeimage.sourceforge.net/" |
11 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip |
12 |
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip |
Lines 23-39
S=${WORKDIR}/${MY_PN}
Link Here
|
23 |
|
24 |
|
24 |
src_unpack() { |
25 |
src_unpack() { |
25 |
unpack ${A} |
26 |
unpack ${A} |
26 |
cd "${S}" |
27 |
epatch "${FILESDIR}/Makefiles.patch" |
27 |
sed -i \ |
|
|
28 |
-e "/^CC =/s:gcc:$(tc-getCC) ${CFLAGS} -Wall:" \ |
29 |
-e "/^CXX =/s:g++:$(tc-getCXX) ${CXXFLAGS} -Wall:" \ |
30 |
-e "/^AR = /s:ar:$(tc-getAR):" \ |
31 |
-e "/^INCDIR = /s:/usr/include:${D}/usr/include:" \ |
32 |
-e "/^INSTALLDIR = /s:/usr/lib:${D}/usr/$(get_libdir):" \ |
33 |
-e '/^COMPILERFLAGS =/s:-O3::' \ |
34 |
-e "/\$(CC) -s /s: -s : ${LDFLAGS} :" \ |
35 |
Makefile.{gnu,fip} \ |
36 |
|| die "sed failed" |
37 |
} |
28 |
} |
38 |
|
29 |
|
39 |
src_compile() { |
30 |
src_compile() { |
Lines 44-54
src_compile() {
Link Here
|
44 |
} |
35 |
} |
45 |
|
36 |
|
46 |
src_install() { |
37 |
src_install() { |
47 |
dodir /usr/include /usr/$(get_libdir) |
38 |
local paths="DESTDIR=\"${D}\" INSTALLDIR=\"${D}/usr/$(get_libdir)\"" |
48 |
emake -f Makefile.gnu install || die "emake install failed" |
39 |
|
|
|
40 |
emake -f Makefile.gnu ${paths} install || die "emake install failed" |
49 |
if use cxx ; then |
41 |
if use cxx ; then |
50 |
emake -f Makefile.fip install || die "emake install fip failed" |
42 |
emake -f Makefile.fip ${paths} install || die "emake install fip failed" |
51 |
fi |
43 |
fi |
52 |
dodoc README.linux Whatsnew.txt |
44 |
|
|
|
45 |
dodoc README.linux Whatsnew.txt || die "dodoc failed" |
53 |
use doc && dodoc "${DISTDIR}"/${MY_P}.pdf |
46 |
use doc && dodoc "${DISTDIR}"/${MY_P}.pdf |
54 |
} |
47 |
} |