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-177
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 |
|
|
232 |
|
175 |
fix_opengl_symlinks |
233 |
fix_opengl_symlinks |
176 |
dynamic_libgl_install |
234 |
dynamic_libgl_install |
177 |
|
235 |
|
Lines 193-202
Link Here
|
193 |
# libGLU doesn't get the plain .so symlink either |
251 |
# libGLU doesn't get the plain .so symlink either |
194 |
#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so |
252 |
#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so |
195 |
|
253 |
|
|
|
254 |
is_final_abi || return 0 |
255 |
|
256 |
if ! use motif; then |
257 |
rm "${D}"/usr/include/GL/GLwMDrawA.h |
258 |
fi |
259 |
|
260 |
# Don't install private headers |
261 |
rm -f "${D}"/usr/include/GL/GLw*P.h |
262 |
|
263 |
|
196 |
# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to |
264 |
# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to |
197 |
# as the default libGL.so.1 |
265 |
# as the default libGL.so.1 |
198 |
} |
266 |
} |
199 |
|
267 |
|
|
|
268 |
src_install() { |
269 |
if [[ -z ${OABI} ]] ; then |
270 |
local abilist="" |
271 |
if has_multilib_profile ; then |
272 |
abilist=$(get_install_abis) |
273 |
einfo "Installing multilib Mesa for ABIs: ${abilist}" |
274 |
elif is_crosscompile || tc-is-cross-compiler ; then |
275 |
abilist=${DEFAULT_ABI} |
276 |
fi |
277 |
if [[ -n ${abilist} ]] ; then |
278 |
OABI=${ABI} |
279 |
for ABI in ${abilist} ; do |
280 |
export ABI |
281 |
src_install |
282 |
done |
283 |
ABI=${OABI} |
284 |
unset OABI |
285 |
return 0 |
286 |
fi |
287 |
fi |
288 |
|
289 |
mesa_src_install |
290 |
} |
291 |
|
200 |
pkg_postinst() { |
292 |
pkg_postinst() { |
201 |
switch_opengl_implem |
293 |
switch_opengl_implem |
202 |
|
294 |
|