Commit 90d5acbd authored by Natanael Copa's avatar Natanael Copa

x11/mesa: pass lazy binding via LDFLAGS

parent a12b0e5f
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=7.6
pkgrel=0
pkgrel=1
pkgdesc="Mesa DRI OpenGL library"
url="http://www.mesa3d.org"
license="LGPL"
......@@ -26,28 +26,33 @@ depends_dev="libdrm-dev dri2proto libx11-dev libxext-dev libxxf86vm-dev
_dri_driverdir=/usr/lib/xorg/modules/dri
build ()
{
prepare() {
cd "$srcdir"/Mesa-$pkgver
for i in ../*.patch; do
msg "Applying $i..."
patch -p1 -i $i || return 1
done
export GCC_SPECS=/usr/share/gcc/hardenednoznow.specs
}
build() {
cd "$srcdir"/Mesa-$pkgver
export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
./configure --prefix=/usr \
--with-dri-driverdir=$_dri_driverdir \
--disable-asm \
--disable-glx-tls \
--with-driver=dri \
--with-state-trackers=dri,egl \
--enable-xcb \
--enable-glu \
--disable-glut \
--disable-glw || return 1
make || return 1
}
package() {
cd "$srcdir"/Mesa-$pkgver
make -j1 DESTDIR="$pkgdir" install || return 1
install -m755 -d "$pkgdir"/usr/lib/xorg/modules/extensions
ln -sf libglx.xorg "$pkgdir"/usr/lib/xorg/modules/extensions/libglx.so || return 1
}
......@@ -62,7 +67,7 @@ _mv_dri() {
done
}
ati() { _mv_dri radeon_dri r200_dri r300_dri; }
ati() { _mv_dri radeon_dri r200_dri r300_dri r600_dri; }
ffb() { _mv_dri ffb_dri; }
intel() { _mv_dri i810_dri i915_dri i965_dri EGL_i915; }
mach64() { _mv_dri mach64_dri; }
......@@ -76,6 +81,6 @@ trident() { _mv_dri trident_dri; }
unichrome() { _mv_dri unichrome_dri; }
md5sums="8c75f90cd0303cfac9e4b6d54f6759ca MesaLib-7.6.tar.bz2
9eddc02e23ec08295822911e726ae89a mesa-7.1-link-shared.patch
6e2bd02a8035fb165cf9d861fcf19e79 mesa-7.1-link-shared.patch
a111f4dc82e894f8801bc3fa129af7af intel-revert-vbl.patch
75e1bb69f384e9d60544fa03c15cc0ec mesa-7.4-parallel.patch"
......@@ -13,7 +13,7 @@ diff -up mesa-20080814/src/mesa/drivers/dri/Makefile.dricore mesa-20080814/src/m
-mkdir $(TOP)/$(LIB_DIR)
+libdricore.so:
+ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive -lm -lpthread -lc
+ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive $(LDFLAGS) -lm -lpthread -lc
+
+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
......@@ -59,8 +59,8 @@ diff -up mesa-20080814/src/mesa/drivers/dri/Makefile.template.dricore mesa-20080
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- $(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
+ $(OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) \
+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
+ $(OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) \
+ $(DRI_LIB_DEPS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment