Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 477594
Collapse All | Expand All

(-)a/opera-12.16_p1860.ebuild (-10 / +14 lines)
Lines 10-17 HOMEPAGE="http://www.opera.com/" Link Here
10
10
11
SLOT="0"
11
SLOT="0"
12
LICENSE="OPERA-12 LGPL-2 LGPL-3"
12
LICENSE="OPERA-12 LGPL-2 LGPL-3"
13
KEYWORDS="amd64 x86 ~x86-fbsd"
13
KEYWORDS="amd64 x86 ~amd64-fbsd ~x86-fbsd"
14
IUSE="elibc_FreeBSD gtk kde +gstreamer multilib"
14
IUSE="elibc_FreeBSD gtk kde kernel_linux +gstreamer multilib"
15
15
16
O_V="$(get_version_component_range 1-2)" # Version, i.e. 11.00
16
O_V="$(get_version_component_range 1-2)" # Version, i.e. 11.00
17
O_B="$(get_version_component_range 3)"   # Build number, i.e. 1156
17
O_B="$(get_version_component_range 3)"   # Build number, i.e. 1156
Lines 38-43 if [[ "pre${O_B/pre/}" = "${O_B}" ]]; then # snapshot: _pre Link Here
38
38
39
	SRC_URI="
39
	SRC_URI="
40
		amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
40
		amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
41
		amd64-fbsd? ( ${O_U}${O_D}/${O_P}.amd64.freebsd.tar.xz )
41
		x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
42
		x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
42
		x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
43
		x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
43
	"
44
	"
Lines 48-53 else # release: _p Link Here
48
49
49
	SRC_URI="
50
	SRC_URI="
50
		amd64? ( ${O_U}linux/${O_D}/${O_P}.x86_64.linux.tar.xz )
51
		amd64? ( ${O_U}linux/${O_D}/${O_P}.x86_64.linux.tar.xz )
52
		amd64-fbsd? ( ${O_U}unix/${O_D}/${O_P}.amd64.freebsd.tar.xz )
51
		x86? ( ${O_U}linux/${O_D}/${O_P}.i386.linux.tar.xz )
53
		x86? ( ${O_U}linux/${O_D}/${O_P}.i386.linux.tar.xz )
52
		x86-fbsd? ( ${O_U}unix/${O_D}/${O_P}.i386.freebsd.tar.xz )
54
		x86-fbsd? ( ${O_U}unix/${O_D}/${O_P}.i386.freebsd.tar.xz )
53
	"
55
	"
Lines 85-91 GSTRDEPEND=" Link Here
85
RDEPEND="
87
RDEPEND="
86
	media-libs/fontconfig
88
	media-libs/fontconfig
87
	media-libs/freetype
89
	media-libs/freetype
88
	sys-apps/util-linux
90
	kernel_linux? ( sys-apps/util-linux )
89
	sys-libs/zlib
91
	sys-libs/zlib
90
	virtual/opengl
92
	virtual/opengl
91
	x11-libs/libICE
93
	x11-libs/libICE
Lines 182-208 src_prepare() { Link Here
182
		>> ${PN}
184
		>> ${PN}
183
	echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
185
	echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
184
186
185
	# Change libz.so.3 to libz.so.1 for gentoo/freebsd
187
	# Change libfreetype.so.9 to libfreetype.so.6 for Gentoo/FreeBSD, bug #477594
186
	if use elibc_FreeBSD; then
188
	if use elibc_FreeBSD; then
187
		scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
189
		scanelf -qR -N libfreetype.so.9 -F "#N" lib/${PN}/ | \
188
		while read i; do
190
		while read i; do
189
			if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
191
			if [[ $(strings "$i" | fgrep -c libfreetype.so.9) -ne 1 ]];
190
			then
192
			then
191
				export SANITY_CHECK_LIBZ_FAILED=1
193
				export SANITY_CHECK_LIBFREETYPE_FAILED=1
192
				break
194
				break
193
			fi
195
			fi
194
			sed -i \
196
			sed -i \
195
				"$i" \
197
				"$i" \
196
				-e 's/libz\.so\.3/libz.so.1/g'
198
				-e 's/libfreetype\.so\.9/libfreetype.so.6/g'
197
		done
199
		done
198
		[[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
200
		[[ "$SANITY_CHECK_LIBFREETYPE_FAILED" = "1" ]] && die
199
	fi
201
	fi
200
}
202
}
201
203
202
src_install() {
204
src_install() {
203
	# We install into usr instead of opt as Opera does not support the latter
205
	# We install into usr instead of opt as Opera does not support the latter
204
	dodir /usr
206
	dodir /usr
205
	rm lib/${PN}/opera_autoupdatechecker || die
207
	if ! use elibc_FreeBSD; then
208
		rm lib/${PN}/opera_autoupdatechecker || die
209
	fi
206
	mv lib/ "${D}/${OPREFIX}" || die
210
	mv lib/ "${D}/${OPREFIX}" || die
207
	mv share/ "${D}/usr/" || die
211
	mv share/ "${D}/usr/" || die
208
212

Return to bug 477594