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 (-16 / +117 lines)
Lines 4-10 Link Here
4
4
5
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
5
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
6
6
7
inherit autotools multilib flag-o-matic git portability
7
inherit autotools multilib flag-o-matic git portability toolchain-funcs
8
8
9
OPENGL_DIR="xorg-x11"
9
OPENGL_DIR="xorg-x11"
10
10
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-118 Link Here
111
	eautoreconf
114
	eautoreconf
112
}
115
}
113
116
114
src_compile() {
117
mesa_src_compile() {
115
	local myconf
118
	local myconf
119
	local OCFLAGS=""
120
	local OCXXFLAGS=""
121
	local OCHOST=""
122
	CC="$(tc-getCC)"
123
	CXX="$(tc-getCXX)"
124
125
	if has_multilib_profile ; then
126
		OCFLAGS="${CFLAGS}"
127
		OCXXFLAGS="${CXXFLAGS}"
128
		OCHOST="${CHOST}"
129
		if use amd64 || use ppc64 ; then
130
			case ${ABI} in
131
				x86) 	CHOST="i686-${OCHOST#*-}"
132
					CFLAGS="${OCFLAGS} -m32"
133
					CXXFLAGS="${OCXXFLAGS} -m32"
134
					;;
135
				amd64)  CHOST="x86_64-${OCHOST#*-}"
136
					CFLAGS="${OCFLAGS} -m64"
137
					CXXFLAGS="${CXXFLAGS} -m64"
138
					;;
139
				ppc)	CHOST="powerpc-${OCHOST#*-}"
140
					CFLAGS="${OCFLAGS} -m32"
141
					CXXFLAGS="${OCXXFLAGS} -m32"
142
					;;
143
				ppc64)	CHOST="powerpc64-${OCHOST#*-}"
144
					CFLAGS="${OCFLAGS} -m64"
145
					CXXFLAGS="${OCXXFLAGS} -m64"
146
					;;
147
				*)	die "Unknown ABI"
148
					;;
149
			esac
150
		fi
151
	fi
116
152
117
	# This is where we might later change to build xlib/osmesa
153
	# This is where we might later change to build xlib/osmesa
118
	myconf="${myconf} --with-driver=dri"
154
	myconf="${myconf} --with-driver=dri"
Lines 148-184 Link Here
148
184
149
	myconf="${myconf} --without-demos"
185
	myconf="${myconf} --without-demos"
150
186
151
	myconf="${myconf} $(use_enable xcb)"
187
	# xcb is not yet used for the binary 32bit compatibility libs
152
188
	if is_final_abi ; then
189
		myconf="${myconf} $(use_enable xcb)"
190
        fi
191
  	
153
	# Get rid of glut includes
192
	# Get rid of glut includes
154
	rm -f "${S}"/include/GL/glut*h
193
	rm -f "${S}"/include/GL/glut*h
155
194
156
	myconf="${myconf} $(use_enable motif glw)"
195
	myconf="${myconf} $(use_enable motif glw)"
157
196
197
	# Create seperate build dir for each ABI since the Mesa build system
198
	# doesn't handle building both ABIs in the same tree
199
	cp -al ${S} ${WORKDIR}/builddir.${ABI}
200
	cd ${WORKDIR}/builddir.${ABI}
201
	
158
	econf ${myconf} || die
202
	econf ${myconf} || die
203
159
	emake || die
204
	emake || die
205
	if has_multilib_profile; then
206
		CFLAGS="${OCFLAGS}"
207
		CXXFLAGS="${OCXXFLAGS}"
208
		CHOST="${OCHOST}"
209
	fi
160
}
210
}
161
211
162
src_install() {
212
src_compile() {
213
	if [[ -z ${OABI} ]] ; then 
214
		local abilist=""
215
		if has_multilib_profile ; then
216
			abilist=$(get_install_abis)
217
			einfo "Building multilib Mesa for ABIs: ${abilist}"
218
		elif is_crosscompile || tc-is-cross-compiler ; then
219
			abilist=${DEFAULT_ABI}
220
		fi
221
		if [[ -n ${abilist} ]] ; then
222
			OABI=${ABI}
223
			for ABI in ${abilist} ; do
224
				export ABI
225
				src_compile
226
			done
227
			ABI=${OABI}
228
			unset OABI
229
			return 0
230
		fi
231
	fi
232
	mesa_src_compile
233
}
234
235
mesa_src_install() {
236
	einfo "Installing Mesa ${ABI} ..."
237
	cd ${WORKDIR}/builddir.${ABI}
238
163
	dodir /usr
239
	dodir /usr
164
	emake \
240
	emake \
165
		DESTDIR="${D}" \
241
		DESTDIR="${D}" \
166
		install || die "Installation failed"
242
		install || die "Installation failed"
167
243
168
	if ! use motif; then
169
		rm "${D}"/usr/include/GL/GLwMDrawA.h
170
	fi
171
172
	# Don't install private headers
173
	rm -f "${D}"/usr/include/GL/GLw*P.h
174
175
	fix_opengl_symlinks
244
	fix_opengl_symlinks
176
	dynamic_libgl_install
245
	dynamic_libgl_install
177
246
178
	# Install libtool archives
247
	# Install libtool archives
179
	insinto /usr/$(get_libdir)
248
	sed -e "s:\/usr\/lib:/usr/$(get_libdir):g" "${FILESDIR}"/lib/libGLU.la \
180
	# (#67729) Needs to be lib, not $(get_libdir)
249
		> "${D}"/usr/$(get_libdir)/libGLU.la
181
	doins "${FILESDIR}"/lib/libGLU.la
182
	sed -e "s:\${libdir}:$(get_libdir):g" "${FILESDIR}"/lib/libGL.la \
250
	sed -e "s:\${libdir}:$(get_libdir):g" "${FILESDIR}"/lib/libGL.la \
183
		> "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
251
		> "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
184
252
Lines 190-202 Link Here
190
		"${D}"/usr/$(get_libdir)/libGLU.la \
258
		"${D}"/usr/$(get_libdir)/libGLU.la \
191
		"${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
259
		"${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la
192
260
261
        is_final_abi || return 0
262
193
	# libGLU doesn't get the plain .so symlink either
263
	# libGLU doesn't get the plain .so symlink either
194
	#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
264
	#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so
195
265
266
	if ! use motif; then
267
		rm "${D}"/usr/include/GL/GLwMDrawA.h
268
	fi
269
270
	# Don't install private headers
271
	rm -f "${D}"/usr/include/GL/GLw*P.h
272
196
	# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
273
	# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to
197
	# as the default libGL.so.1
274
	# as the default libGL.so.1
198
}
275
}
199
276
277
src_install() {
278
        if [[ -z ${OABI} ]] ; then
279
                local abilist=""
280
                if has_multilib_profile ; then
281
                        abilist=$(get_install_abis)
282
                        einfo "Installing multilib Mesa for ABIs: ${abilist}"
283
                elif is_crosscompile || tc-is-cross-compiler ; then
284
                        abilist=${DEFAULT_ABI}
285
                fi
286
                if [[ -n ${abilist} ]] ; then
287
                        OABI=${ABI}
288
                        for ABI in ${abilist} ; do
289
                                export ABI 
290
                                src_install
291
                        done
292
                        ABI=${OABI}
293
                        unset OABI 
294
                        return 0
295
                fi
296
        fi
297
298
	mesa_src_install
299
}
300
200
pkg_postinst() {
301
pkg_postinst() {
201
	switch_opengl_implem
302
	switch_opengl_implem
202
303

Return to bug 204755