summaryrefslogtreecommitdiff
blob: 1294bc216bec12406b2cee2e074f16dc27ddf491 (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
70
71
72
73
74
75
76
77
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-7.0-r5.ebuild,v 1.1 2006/12/23 20:36:59 peper Exp $

inherit multilib

DESCRIPTION="X11R6 libraries for emulation of 32bit x86 on amd64"
HOMEPAGE="http://www.gentoo.org/"
SRC_URI="http://dev.gentooexperimental.org/~peper/distfiles/${PF}.tar.bz2
		video_cards_i810? ( mirror://gentoo/emul-linux-x86-xlibs-i810_dri-${PV}.tar.bz2 )
		video_cards_mach64? ( mirror://gentoo/emul-linux-x86-xlibs-ati_dri-${PV}.tar.bz2 )
		video_cards_mga? ( mirror://gentoo/emul-linux-x86-xlibs-mga_dri-${PV}.tar.bz2 )
		video_cards_r128? ( mirror://gentoo/emul-linux-x86-xlibs-ati_dri-${PV}.tar.bz2 )
		video_cards_radeon? ( mirror://gentoo/emul-linux-x86-xlibs-ati_dri-${PV}.tar.bz2 )
		video_cards_s3virge? ( mirror://gentoo/emul-linux-x86-xlibs-s3virge_dri-${PV}.tar.bz2 )
		video_cards_savage? ( mirror://gentoo/emul-linux-x86-xlibs-savage_dri-${PV}.tar.bz2 )
		video_cards_sis? ( mirror://gentoo/emul-linux-x86-xlibs-sis_dri-${PV}.tar.bz2 )
		video_cards_tdfx? ( mirror://gentoo/emul-linux-x86-xlibs-tdfx_dri-${PV}.tar.bz2 )
		video_cards_trident? ( mirror://gentoo/emul-linux-x86-xlibs-trident_dri-${PV}.tar.bz2 )
		video_cards_via? ( mirror://gentoo/emul-linux-x86-xlibs-via_dri-${PV}.tar.bz2 )"


LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64"

IUSE_VIDEO_CARDS="
	video_cards_i810
	video_cards_mach64
	video_cards_mga
	video_cards_r128
	video_cards_radeon
	video_cards_s3virge
	video_cards_savage
	video_cards_sis
	video_cards_tdfx
	video_cards_trident
	video_cards_via"

IUSE="opengl ${IUSE_VIDEO_CARDS}"

DEPEND=""

RDEPEND="opengl? ( app-admin/eselect-opengl )
	 virtual/libc
	 >=app-emulation/emul-linux-x86-baselibs-2.5"

S=${WORKDIR}

RESTRICT="nostrip"

pkg_preinst() {
	# Check for bad symlink before installing, bug 84441.
	if [ -L /emul/linux/x86/usr/lib/X11 ]; then
		rm -f /emul/linux/x86/usr/lib/X11
	fi
}

src_install() {
	cp -RPvf ${WORKDIR}/* ${D}/

	local libdir="lib32"
	if has_multilib_profile; then
		libdir=$(get_abi_LIBDIR x86)
	fi

	dodir /usr/${libdir}/opengl
	dosym /emul/linux/x86/usr/lib/opengl/xorg-x11 /usr/${libdir}/opengl/xorg-x11
}

pkg_postinst() {
	#update GL symlinks
	if use opengl ; then
		/usr/bin/eselect opengl set --use-old
	fi
}