Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 336393 | Differences between
and this patch

Collapse All | Expand All

(-)media-libs/libraw/libraw-0.9.1.ebuild (-12 / +25 lines)
Lines 6-12 Link Here
6
6
7
inherit eutils
7
inherit eutils
8
8
9
DESCRIPTION="LibRaw is a library for reading RAW files obtained from digital photo cameras"
9
DESCRIPTION="A library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"
10
HOMEPAGE="http://www.libraw.org/"
10
HOMEPAGE="http://www.libraw.org/"
11
SRC_URI="http://www.libraw.org/data/LibRaw-${PV}.tar.gz"
11
SRC_URI="http://www.libraw.org/data/LibRaw-${PV}.tar.gz"
12
12
Lines 18-52 Link Here
18
KEYWORDS="~amd64 ~x86"
18
KEYWORDS="~amd64 ~x86"
19
IUSE="lcms openmp examples"
19
IUSE="lcms openmp examples"
20
20
21
RDEPEND=""
21
RDEPEND="lcms? ( =media-libs/lcms-1* )"
22
DEPEND="${RDEPEND}"
22
23
23
S="${WORKDIR}/LibRaw-${PV}"
24
S="${WORKDIR}/LibRaw-${PV}"
25
MY_LIBDIR=$(get_libdir)
24
26
25
src_prepare() {
27
src_prepare() {
26
	# Add pkg-config support
28
	# Add pkg-config support
27
	epatch "${FILESDIR}/libraw-0.9.1-pkg-config.patch" || die "pkg-config patch failed."
29
	epatch "${FILESDIR}/${P}-pkg-config.patch" || die "pkg-config patch failed"
28
30
29
	sed -i -e "s:/usr/local/:${D}usr/:g" \
31
	sed -i -e "s:/usr/local/:${D}usr/:g" \
30
		-e "/^CFLAGS/ s:-O4:${CFLAGS}:" \
32
		-e "/^CFLAGS/ s:-O4:${CFLAGS}:" \
31
		Makefile || die "Patching the hell out of manual Makefile failed."
33
		-e "s:usr/lib:usr/${MY_LIBDIR}:g" \
34
		Makefile || die "Patching the hell out of manual Makefile failed"
35
	
36
	sed -i -e "s:LIBDIR:${MY_LIBDIR}:" \
37
		-e "s:VERSION:${PV}:" \
38
		*.pc || die "Patching pc files failed"
32
39
33
	if use lcms; then
40
	if use lcms; then
34
		sed -i -r '/^#LCMS/ s!^#!!' Makefile || die "Enabling LCMS failed."
41
		sed -i -r '/^#LCMS/ s!^#!!' Makefile || die "Enabling LCMS failed"
35
		sed -i -r -e '/^Libs/ s!$! -llcms!' \
42
		sed -i -r -e '/^Libs/ s!$! -llcms!' \
36
			-e '/^Requires/ s!$! lcms2!' *.pc || die "Adding pkg-config LCMS dependency failed."
43
			-e '/^Requires/ s!$! lcms!' \
44
			*.pc || die "Adding pkg-config LCMS dependency failed"
37
	fi
45
	fi
38
46
39
	if use openmp; then
47
	if use openmp; then
40
		sed -i -r '/^CFLAGS/ s!^(.*)$!\1 -fopenmp!' Makefile || die "Enabling OpenMP failed."
48
		sed -i -r '/^CFLAGS/ s!^(.*)$!\1 -fopenmp!' \
41
		sed -i -r '/^Cflags/ s!$! -fopenmp!' *.pc || die "Adding pkg-config OpenMP dependency failed."
49
			Makefile || die "Enabling OpenMP failed"
50
		sed -i -r -e '/^Cflags/ s!$! -fopenmp!' \
51
			-e '/^Libs/ s!$! -lgomp!' \
52
			*.pc || die "Adding pkg-config OpenMP dependency failed"
42
	fi
53
	fi
43
}
54
}
44
55
45
src_install() {
56
src_install() {
46
	# This makefile doesn't even make the directories..
57
	# This Makefile does not even make the directories.
47
	mkdir -p "${D}usr/include" "${D}usr/lib" "${D}usr/lib/pkgconfig" \
58
	mkdir -p "${D}usr/include" \
48
		$(use examples && echo "${D}/usr/bin") || die "Directory making failed."
59
		"${D}usr/${MY_LIBDIR}" \
60
		"${D}usr/${MY_LIBDIR}/pkgconfig" \
61
		$(use examples && echo "${D}/usr/bin") || die "Directory making failed"
49
62
50
	emake install \
63
	emake install \
51
		$(use examples && echo "install-binaries") || die "Install failed."
64
		$(use examples && echo "install-binaries") || die "Install failed"
52
}
65
}

Return to bug 336393