summaryrefslogtreecommitdiff
blob: 5167e0e13dc8fda837437c8d437fbbfb60afcc11 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--- x264-0.0.20100605.ebuild	2012-04-13 21:51:52.000000000 +0900
+++ /home/benda/gentoo/usr/portage/media-libs/x264/x264-0.0.20100605.ebuild	2010-08-05 04:01:52.000000000 +0900
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20100605.ebuild,v 1.7 2010/11/14 19:07:01 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20100605.ebuild,v 1.1 2010/06/06 10:37:33 aballier Exp $
 
 EAPI=2
 inherit eutils multilib toolchain-funcs versionator
@@ -13,19 +13,32 @@ SRC_URI="ftp://ftp.videolan.org/pub/vide
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="alpha amd64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+KEYWORDS="~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
 IUSE="debug +threads pic"
 
 RDEPEND=""
 DEPEND="amd64? ( >=dev-lang/yasm-0.6.2 )
 	x86? ( >=dev-lang/yasm-0.6.2 )
-	x86-fbsd? ( >=dev-lang/yasm-0.6.2 )"
+	x86-fbsd? ( >=dev-lang/yasm-0.6.2 )
+	x86-macos? ( >=dev-lang/yasm-0.6.2 )
+	x64-macos? ( >=dev-lang/yasm-0.6.2 )
+	x86-solaris? ( >=dev-lang/yasm-0.6.2 )
+	x64-solaris? ( >=dev-lang/yasm-0.6.2 )"
 
 S=${WORKDIR}/${MY_P}
 
 src_prepare() {
 	epatch "${FILESDIR}"/${PN}-nostrip.patch \
 		"${FILESDIR}"/${PN}-onlylib-20100605.patch
+
+	# Solaris' /bin/sh doesn't grok the syntax in these files
+	sed -i -e '1c\#!/usr/bin/env sh' configure version.sh || die
+	# for sparc-solaris
+	if [[ ${CHOST} == sparc*-solaris* ]] ; then
+		sed -i -e 's:-DPIC::g' configure || die
+	fi
+	# for OSX
+	sed -i -e "s|-arch x86_64||g" configure || die
 }
 
 src_configure() {
@@ -39,11 +52,10 @@ src_configure() {
 	fi
 
 	./configure \
-		--prefix=/usr \
-		--libdir=/usr/$(get_libdir) \
+		--prefix="${EPREFIX}"/usr \
+		--libdir="${EPREFIX}"/usr/$(get_libdir) \
 		--disable-avs-input \
 		--disable-lavf-input \
-		--disable-mp4-output \
 		$(use_enable threads pthread) \
 		--enable-pic \
 		--enable-shared \
@@ -59,3 +71,9 @@ src_install() {
 	emake DESTDIR="${D}" install || die
 	dodoc AUTHORS doc/*.txt
 }
+
+pkg_postinst() {
+	elog "Please note that this package now only installs"
+	elog "${PN} libraries. In order to have the encoder,"
+	elog "please emerge media-video/x264-encoder."
+}