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 || use ppc64 ; then |
121 |
case ${ABI} in |
122 |
x86|ppc) myconf="${myconf} --enable-32-bit" |
123 |
;; |
124 |
amd64|ppc64) 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-184
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 |
|
|
|
175 |
# Create seperate build dir for each ABI since the Mesa build system |
176 |
# doesn't handle building both ABIs in the same tree |
177 |
cp -al ${S} ${WORKDIR}/builddir.${ABI} |
178 |
cd ${WORKDIR}/builddir.${ABI} |
179 |
|
158 |
econf ${myconf} || die |
180 |
econf ${myconf} || die |
|
|
181 |
|
159 |
emake || die |
182 |
emake || die |
160 |
} |
183 |
} |
161 |
|
184 |
|
162 |
src_install() { |
185 |
src_compile() { |
|
|
186 |
if [[ -z ${OABI} ]] ; then |
187 |
local abilist="" |
188 |
if has_multilib_profile ; then |
189 |
abilist=$(get_install_abis) |
190 |
einfo "Building multilib Mesa for ABIs: ${abilist}" |
191 |
elif is_crosscompile || tc-is-cross-compiler ; then |
192 |
abilist=${DEFAULT_ABI} |
193 |
fi |
194 |
if [[ -n ${abilist} ]] ; then |
195 |
OABI=${ABI} |
196 |
for ABI in ${abilist} ; do |
197 |
export ABI |
198 |
src_compile |
199 |
done |
200 |
ABI=${OABI} |
201 |
unset OABI |
202 |
return 0 |
203 |
fi |
204 |
fi |
205 |
mesa_src_compile |
206 |
} |
207 |
|
208 |
mesa_src_install() { |
209 |
einfo "Installing Mesa ${ABI} ..." |
210 |
cd ${WORKDIR}/builddir.${ABI} |
211 |
|
163 |
dodir /usr |
212 |
dodir /usr |
164 |
emake \ |
213 |
emake \ |
165 |
DESTDIR="${D}" \ |
214 |
DESTDIR="${D}" \ |
166 |
install || die "Installation failed" |
215 |
install || die "Installation failed" |
167 |
|
216 |
|
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 |
217 |
fix_opengl_symlinks |
176 |
dynamic_libgl_install |
218 |
dynamic_libgl_install |
177 |
|
219 |
|
178 |
# Install libtool archives |
220 |
# Install libtool archives |
179 |
insinto /usr/$(get_libdir) |
221 |
sed -e "s:\/usr\/lib:/usr/$(get_libdir):g" "${FILESDIR}"/lib/libGLU.la \ |
180 |
# (#67729) Needs to be lib, not $(get_libdir) |
222 |
> "${D}"/usr/$(get_libdir)/libGLU.la |
181 |
doins "${FILESDIR}"/lib/libGLU.la |
|
|
182 |
sed -e "s:\${libdir}:$(get_libdir):g" "${FILESDIR}"/lib/libGL.la \ |
223 |
sed -e "s:\${libdir}:$(get_libdir):g" "${FILESDIR}"/lib/libGL.la \ |
183 |
> "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la |
224 |
> "${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la |
184 |
|
225 |
|
Lines 190-202
Link Here
|
190 |
"${D}"/usr/$(get_libdir)/libGLU.la \ |
231 |
"${D}"/usr/$(get_libdir)/libGLU.la \ |
191 |
"${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la |
232 |
"${D}"/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.la |
192 |
|
233 |
|
|
|
234 |
is_final_abi || return 0 |
235 |
|
193 |
# libGLU doesn't get the plain .so symlink either |
236 |
# libGLU doesn't get the plain .so symlink either |
194 |
#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so |
237 |
#dosym libGLU.so.1 /usr/$(get_libdir)/libGLU.so |
195 |
|
238 |
|
|
|
239 |
if ! use motif; then |
240 |
rm "${D}"/usr/include/GL/GLwMDrawA.h |
241 |
fi |
242 |
|
243 |
# Don't install private headers |
244 |
rm -f "${D}"/usr/include/GL/GLw*P.h |
245 |
|
196 |
# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to |
246 |
# Figure out why libGL.so.1.5 is built (directfb), and why it's linked to |
197 |
# as the default libGL.so.1 |
247 |
# as the default libGL.so.1 |
198 |
} |
248 |
} |
199 |
|
249 |
|
|
|
250 |
src_install() { |
251 |
if [[ -z ${OABI} ]] ; then |
252 |
local abilist="" |
253 |
if has_multilib_profile ; then |
254 |
abilist=$(get_install_abis) |
255 |
einfo "Installing multilib Mesa for ABIs: ${abilist}" |
256 |
elif is_crosscompile || tc-is-cross-compiler ; then |
257 |
abilist=${DEFAULT_ABI} |
258 |
fi |
259 |
if [[ -n ${abilist} ]] ; then |
260 |
OABI=${ABI} |
261 |
for ABI in ${abilist} ; do |
262 |
export ABI |
263 |
src_install |
264 |
done |
265 |
ABI=${OABI} |
266 |
unset OABI |
267 |
return 0 |
268 |
fi |
269 |
fi |
270 |
|
271 |
mesa_src_install |
272 |
} |
273 |
|
200 |
pkg_postinst() { |
274 |
pkg_postinst() { |
201 |
switch_opengl_implem |
275 |
switch_opengl_implem |
202 |
|
276 |
|