Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 1999-2010 Gentoo Foundation | 1 # Copyright 1999-2010 Gentoo Foundation |
| 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/mesa/mesa-7.9.ebuild,v 1.3 2010/12 /05 17:19:14 arfrever Exp $ | 3 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.9.ebuild,v 1.3 2010/12 /05 17:19:14 arfrever Exp $ |
| 4 | 4 |
| 5 EAPI=3 | 5 EAPI=3 |
| 6 | 6 |
| 7 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" | 7 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
| 8 | 8 |
| 9 if [[ ${PV} = 9999* ]]; then | 9 if [[ ${PV} = 9999* ]]; then |
| 10 GIT_ECLASS="git" | 10 GIT_ECLASS="git" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" | 28 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
| 29 if [[ $PV = 9999* ]]; then | 29 if [[ $PV = 9999* ]]; then |
| 30 SRC_URI="${SRC_PATCHES}" | 30 SRC_URI="${SRC_PATCHES}" |
| 31 else | 31 else |
| 32 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz 2 | 32 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz 2 |
| 33 ${SRC_PATCHES}" | 33 ${SRC_PATCHES}" |
| 34 fi | 34 fi |
| 35 | 35 |
| 36 LICENSE="LGPL-2 kilgard" | 36 LICENSE="LGPL-2 kilgard" |
| 37 SLOT="0" | 37 SLOT="0" |
| 38 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86- fbsd" | 38 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fb sd" |
| 39 | 39 |
| 40 INTEL_CARDS="intel" | 40 INTEL_CARDS="intel" |
| 41 RADEON_CARDS="radeon" | 41 RADEON_CARDS="radeon" |
| 42 VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis v mware tdfx via" | 42 VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis v mware tdfx via" |
| 43 for card in ${VIDEO_CARDS}; do | 43 for card in ${VIDEO_CARDS}; do |
| 44 IUSE_VIDEO_CARDS+=" video_cards_${card}" | 44 IUSE_VIDEO_CARDS+=" video_cards_${card}" |
| 45 done | 45 done |
| 46 | 46 |
| 47 IUSE="${IUSE_VIDEO_CARDS} | 47 IUSE="${IUSE_VIDEO_CARDS} |
| 48 +classic debug +gallium gles llvm motif +nptl pic selinux kernel_FreeBSD " | 48 +classic debug +gallium gles llvm motif +nptl pic selinux kernel_FreeBSD " |
| 49 | 49 |
| 50 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.21" | 50 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.21" |
| 51 # keep correct libdrm and dri2proto dep | 51 # keep correct libdrm and dri2proto dep |
| 52 # keep blocks in rdepend for binpkg | 52 # keep blocks in rdepend for binpkg |
| 53 RDEPEND=" | 53 RDEPEND=" |
| 54 !<x11-base/xorg-server-1.7 | 54 !<x11-base/xorg-server-1.7 |
| 55 !<=x11-proto/xf86driproto-2.0.3 | 55 !<=x11-proto/xf86driproto-2.0.3 |
| 56 >=app-admin/eselect-mesa-0.0.3 | 56 >=app-admin/eselect-mesa-0.0.3 |
| 57 >=app-admin/eselect-opengl-1.1.1-r2 | 57 >=app-admin/eselect-opengl-1.1.1-r2 |
| 58 dev-libs/expat | 58 dev-libs/expat |
| 59 dev-libs/libxml2[python] | |
| 60 sys-libs/talloc | 59 sys-libs/talloc |
| 61 x11-libs/libICE | 60 x11-libs/libICE |
| 62 » >=x11-libs/libX11-1.3.99.901 | 61 » >=x11-libs/libX11-1.3.3 |
| 63 x11-libs/libXdamage | 62 x11-libs/libXdamage |
| 64 x11-libs/libXext | 63 x11-libs/libXext |
| 65 x11-libs/libXi | 64 x11-libs/libXi |
| 66 x11-libs/libXmu | 65 x11-libs/libXmu |
| 67 x11-libs/libXxf86vm | 66 x11-libs/libXxf86vm |
| 68 motif? ( x11-libs/openmotif ) | 67 motif? ( x11-libs/openmotif ) |
| 69 gallium? ( | 68 gallium? ( |
| 70 llvm? ( | 69 llvm? ( |
| 71 amd64? ( dev-libs/udis86 ) | 70 amd64? ( dev-libs/udis86 ) |
| 72 x86? ( dev-libs/udis86 ) | 71 x86? ( dev-libs/udis86 ) |
| 73 x86-fbsd? ( dev-libs/udis86 ) | 72 x86-fbsd? ( dev-libs/udis86 ) |
| 74 sys-devel/llvm | 73 sys-devel/llvm |
| 75 ) | 74 ) |
| 76 ) | 75 ) |
| 77 » ${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] | 76 » ${LIBDRM_DEPSTRING} |
| 78 " | 77 " |
| 79 for card in ${INTEL_CARDS}; do | |
| 80 RDEPEND="${RDEPEND} | |
| 81 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) | |
| 82 " | |
| 83 done | |
| 84 | |
| 85 for card in ${RADEON_CARDS}; do | |
| 86 RDEPEND="${RDEPEND} | |
| 87 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) | |
| 88 " | |
| 89 done | |
| 90 | 78 |
| 91 DEPEND="${RDEPEND} | 79 DEPEND="${RDEPEND} |
| 92 =dev-lang/python-2* | 80 =dev-lang/python-2* |
| 81 dev-libs/libxml2 | |
| 93 dev-util/pkgconfig | 82 dev-util/pkgconfig |
| 94 x11-misc/makedepend | 83 x11-misc/makedepend |
| 95 >=x11-proto/dri2proto-2.2 | 84 >=x11-proto/dri2proto-2.2 |
| 96 >=x11-proto/glproto-1.4.11 | 85 >=x11-proto/glproto-1.4.11 |
| 97 x11-proto/inputproto | 86 x11-proto/inputproto |
| 98 >=x11-proto/xextproto-7.0.99.1 | 87 >=x11-proto/xextproto-7.0.99.1 |
| 99 x11-proto/xf86driproto | 88 x11-proto/xf86driproto |
| 100 x11-proto/xf86vidmodeproto | 89 x11-proto/xf86vidmodeproto |
| 101 " | 90 " |
| 102 | 91 |
| 103 S="${WORKDIR}/${MY_P}" | 92 S="${WORKDIR}/${MY_P}" |
| 104 | 93 |
| 105 # It is slow without texrels, if someone wants slow | 94 # It is slow without texrels, if someone wants slow |
| 106 # mesa without texrels +pic use is worth the shot | 95 # mesa without texrels +pic use is worth the shot |
| 107 QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" | 96 QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
| 108 QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" | 97 QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
| 109 | 98 |
| 110 # Think about: ggi, fbcon, no-X configs | 99 # Think about: ggi, fbcon, no-X configs |
| 111 | 100 |
| 112 pkg_setup() { | 101 pkg_setup() { |
| 113 # gcc 4.2 has buggy ivopts | 102 # gcc 4.2 has buggy ivopts |
| 114 if [[ $(gcc-version) = "4.2" ]]; then | 103 if [[ $(gcc-version) = "4.2" ]]; then |
| 115 append-flags -fno-ivopts | 104 append-flags -fno-ivopts |
| 116 fi | 105 fi |
| 117 | 106 |
| 118 # recommended by upstream | 107 # recommended by upstream |
| 119 append-flags -ffast-math | 108 append-flags -ffast-math |
| 120 | 109 |
| 121 » python_set_active_version 2 | 110 » # python_set_active_version 2 |
| 122 » python_pkg_setup | 111 » # python_pkg_setup |
|
piman
2010/12/16 01:23:09
simply remove the 2 lines ?
| |
| 123 } | 112 } |
| 124 | 113 |
| 125 src_unpack() { | 114 src_unpack() { |
| 126 [[ $PV = 9999* ]] && git_src_unpack || base_src_unpack | 115 [[ $PV = 9999* ]] && git_src_unpack || base_src_unpack |
| 127 } | 116 } |
| 128 | 117 |
| 129 src_prepare() { | 118 src_prepare() { |
| 130 # apply patches | 119 # apply patches |
| 131 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then | 120 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
| 132 EPATCH_FORCE="yes" \ | 121 EPATCH_FORCE="yes" \ |
| 133 EPATCH_SOURCE="${WORKDIR}/patches" \ | 122 EPATCH_SOURCE="${WORKDIR}/patches" \ |
| 134 EPATCH_SUFFIX="patch" \ | 123 EPATCH_SUFFIX="patch" \ |
| 135 epatch | 124 epatch |
| 136 fi | 125 fi |
| 137 # FreeBSD 6.* doesn't have posix_memalign(). | 126 # FreeBSD 6.* doesn't have posix_memalign(). |
| 138 if [[ ${CHOST} == *-freebsd6.* ]]; then | 127 if [[ ${CHOST} == *-freebsd6.* ]]; then |
| 139 sed -i \ | 128 sed -i \ |
| 140 -e "s/-DHAVE_POSIX_MEMALIGN//" \ | 129 -e "s/-DHAVE_POSIX_MEMALIGN//" \ |
| 141 configure.ac || die | 130 configure.ac || die |
| 142 fi | 131 fi |
| 143 | 132 |
| 144 # In order for mesa to complete it's build process we need to use a tool | |
| 145 # that it compiles. When we cross compile this clearly does not work | |
| 146 # so we require mesa to be built on the host system first. -solar | |
| 147 if tc-is-cross-compiler; then | |
| 148 sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \ | |
| 149 "${S}"/src/mesa/shader/slang/library/Makefile || die | |
| 150 fi | |
| 151 | |
| 152 [[ $PV = 9999* ]] && git_src_prepare | 133 [[ $PV = 9999* ]] && git_src_prepare |
| 153 base_src_prepare | 134 base_src_prepare |
| 154 | 135 |
| 136 epatch "${FILESDIR}"/${PV}-get-maxsamples.patch | |
| 137 epatch "${FILESDIR}"/${PV}-add-discard.patch | |
| 138 epatch "${FILESDIR}"/${PV}-add-lower-pass-discards.patch | |
| 139 epatch "${FILESDIR}"/${PV}-conditional-discards.patch | |
| 140 epatch "${FILESDIR}"/${PV}-glbufferdata-0size.patch | |
| 141 epatch "${FILESDIR}"/${PV}-can_inline.patch | |
| 142 epatch "${FILESDIR}"/${PV}-glsl-vector-compare.patch | |
| 143 epatch "${FILESDIR}"/${PV}-gldeletebuffers.patch | |
| 144 epatch "${FILESDIR}"/${PV}-glisbuffer.patch | |
| 145 epatch "${FILESDIR}"/${PV}-optimize-discards.patch | |
| 146 epatch "${FILESDIR}"/${PV}-remove-discard-from-lower_jumps.patch | |
| 147 | |
| 155 eautoreconf | 148 eautoreconf |
| 156 } | 149 } |
| 157 | 150 |
| 158 src_configure() { | 151 src_configure() { |
| 159 local myconf | 152 local myconf |
| 160 | 153 |
| 161 if use classic; then | 154 if use classic; then |
| 162 # Configurable DRI drivers | 155 # Configurable DRI drivers |
| 163 driver_enable swrast | 156 driver_enable swrast |
| 164 | 157 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 rm "${x}" || die "Failed to remove ${x}" | 285 rm "${x}" || die "Failed to remove ${x}" |
| 293 fi | 286 fi |
| 294 done | 287 done |
| 295 popd | 288 popd |
| 296 eend $? | 289 eend $? |
| 297 fi | 290 fi |
| 298 } | 291 } |
| 299 | 292 |
| 300 pkg_postinst() { | 293 pkg_postinst() { |
| 301 # Switch to the xorg implementation. | 294 # Switch to the xorg implementation. |
| 302 echo | |
| 303 eselect opengl set --use-old ${OPENGL_DIR} | 295 eselect opengl set --use-old ${OPENGL_DIR} |
| 304 # Select classic/gallium drivers | 296 # Select classic/gallium drivers |
| 305 eselect mesa set --auto | 297 eselect mesa set --auto |
| 306 } | 298 } |
| 307 | 299 |
| 308 # $1 - VIDEO_CARDS flag | 300 # $1 - VIDEO_CARDS flag |
| 309 # other args - names of DRI drivers to enable | 301 # other args - names of DRI drivers to enable |
| 310 driver_enable() { | 302 driver_enable() { |
| 311 case $# in | 303 case $# in |
| 312 # for enabling unconditionally | 304 # for enabling unconditionally |
| 313 1) | 305 1) |
| 314 DRI_DRIVERS+=",$1" | 306 DRI_DRIVERS+=",$1" |
| 315 ;; | 307 ;; |
| 316 *) | 308 *) |
| 317 if use $1; then | 309 if use $1; then |
| 318 shift | 310 shift |
| 319 for i in $@; do | 311 for i in $@; do |
| 320 DRI_DRIVERS+=",${i}" | 312 DRI_DRIVERS+=",${i}" |
| 321 done | 313 done |
| 322 fi | 314 fi |
| 323 ;; | 315 ;; |
| 324 esac | 316 esac |
| 325 } | 317 } |
| OLD | NEW |