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

Collapse All | Expand All

(-)/usr/portage/local/layman/x11/media-libs/mesa/mesa-9999.ebuild (-15 / +106 lines)
Lines 23-28 Link Here
23
LICENSE="LGPL-2"
23
LICENSE="LGPL-2"
24
SLOT="0"
24
SLOT="0"
25
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
25
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
26
EMULTILIB_PKG="true"
27
26
IUSE_VIDEO_CARDS="
28
IUSE_VIDEO_CARDS="
27
	video_cards_i810
29
	video_cards_i810
28
	video_cards_mach64
30
	video_cards_mach64
Lines 44-50 Link Here
44
	motif
46
	motif
45
	nptl
47
	nptl
46
	xcb
48
	xcb
47
	kernel_FreeBSD"
49
	kernel_FreeBSD
50
	multilib"
48
51
49
RDEPEND="app-admin/eselect-opengl
52
RDEPEND="app-admin/eselect-opengl
50
	dev-libs/expat
53
	dev-libs/expat
Lines 111-119 Link Here
111
	eautoreconf
114
	eautoreconf
112
}
115
}
113
116
114
src_compile() {
117
mesa_src_compile() {
115
	local myconf
118
	local myconf
116
119
120
	if use amd64; then
121
		case ${ABI} in
122
			x86) 	myconf="${myconf} --enable-32-bit"
123
				;;
124
			amd64)  myconf="${myconf} --enable-64-bit"
125
				;;
126
			*)	die "Unknown ABI"
127
				;;
128
		esac
129
	fi
130
117
	# This is where we might later change to build xlib/osmesa
131
	# This is where we might later change to build xlib/osmesa
118
	myconf="${myconf} --with-driver=dri"
132
	myconf="${myconf} --with-driver=dri"
119
133
Lines 148-180 Link Here
148
162
149
	myconf="${myconf} --without-demos"
163
	myconf="${myconf} --without-demos"
150
164
151
	myconf="${myconf} $(use_enable xcb)"
165
	# xcb is not yet used for the binary 32bit compatibility libs
152
166
	if is_final_abi ; then
167
		myconf="${myconf} $(use_enable xcb)"
168
        fi
169
  	
153
	# Get rid of glut includes
170
	# Get rid of glut includes
154
	rm -f "${S}"/include/GL/glut*h
171
	rm -f "${S}"/include/GL/glut*h
155
172
156
	myconf="${myconf} $(use_enable motif glw)"
173
	myconf="${myconf} $(use_enable motif glw)"
157
174
158
	econf ${myconf} || die
175
	econf ${myconf} || die
176
177
	# store the config for the install stage
178
	cp configs/current configs/gentoo-${ABI}
179
180
	# force recompile after the config change
181
	find -name '*.o' | xargs rm -f
182
159
	emake || die
183
	emake || die
160
}
184
}
161
185
162
src_install() {
186
src_compile() {
187
	if [[ -z ${OABI} ]] ; then 
188
		local abilist=""
189
		if has_multilib_profile ; then
190
			abilist=$(get_install_abis)
191
			einfo "Building multilib Mesa for ABIs: ${abilist}"
192
		elif is_crosscompile || tc-is-cross-compiler ; then
193
			abilist=${DEFAULT_ABI}
194
		fi
195
		if [[ -n ${abilist} ]] ; then
196
			OABI=${ABI}
197
			for ABI in ${abilist} ; do
198
				export ABI
199
				src_compile
200
			done
201
			ABI=${OABI}
202
			unset OABI
203
			return 0
204
		fi
205
	fi
206
	mesa_src_compile
207
}
208
209
mesa_src_install() {
210
	einfo "Installing Mesa ${ABI} ..."
211
 
212
	pushd configs
213
	ln -sf gentoo-${ABI} current
214
	popd
215
216
        # Ensure the binaries are not re-linked on install
217
        for FILE in `find $(get_libdir)`; do touch $FILE; done
218
163
	dodir /usr
219
	dodir /usr
220
 
164
	emake \
221
	emake \
165
		DESTDIR="${D}" \
222
		DESTDIR="${D}" \
166
		install || die "Installation failed"
223
		install || die "Installation failed"
167
224
168
	if ! use motif; then
225
	# The dri drivers get installed from the src tree but with multilib
169
		rm "${D}"/usr/include/GL/GLwMDrawA.h
226
	# this contains the final ABI build.  Copy the dri drivers from the
170
	fi
227
	# lib{32|64} object directories
171
228
	insinto /usr/$(get_libdir)/dri
172
	# Don't install private headers
229
	for FILE in `find $(get_libdir) -name '*_dri.so'`; do
173
	rm -f "${D}"/usr/include/GL/GLw*P.h
230
		doins "${FILE}"
174
231
	done
175
	fix_opengl_symlinks
232
	
176
	dynamic_libgl_install
177
178
	# Install libtool archives
233
	# Install libtool archives
179
	insinto /usr/$(get_libdir)
234
	insinto /usr/$(get_libdir)
180
	# (#67729) Needs to be lib, not $(get_libdir)
235
	# (#67729) Needs to be lib, not $(get_libdir)
Lines 193-202 Link Here
193
	# libGLU doesn't get the plain .so symlink either
248
	# libGLU doesn't get the plain .so symlink either
194
	#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
249
	#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
195
250
251
        is_final_abi || return 0
252
253
	if ! use motif; then
254
		rm "${D}"/usr/include/GL/GLwMDrawA.h
255
	fi
256
257
	# Don't install private headers
258
	rm -f "${D}"/usr/include/GL/GLw*P.h
259
260
	fix_opengl_symlinks
261
	dynamic_libgl_install
262
196
	# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
263
	# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
197
	# as the default libGL.so.1
264
	# as the default libGL.so.1
198
}
265
}
199
266
267
src_install() {
268
        if [[ -z ${OABI} ]] ; then
269
                local abilist=""
270
                if has_multilib_profile ; then
271
                        abilist=$(get_install_abis)
272
                        einfo "Installing multilib Mesa for ABIs: ${abilist}"
273
                elif is_crosscompile || tc-is-cross-compiler ; then
274
                        abilist=${DEFAULT_ABI}
275
                fi
276
                if [[ -n ${abilist} ]] ; then
277
                        OABI=${ABI}
278
                        for ABI in ${abilist} ; do
279
                                export ABI 
280
                                src_install
281
                        done
282
                        ABI=${OABI}
283
                        unset OABI 
284
                        return 0
285
                fi
286
        fi
287
288
	mesa_src_install
289
}
290
200
pkg_postinst() {
291
pkg_postinst() {
201
	switch_opengl_implem
292
	switch_opengl_implem
202
293

Return to bug 204755