updated on Mon Jan 23 04:00:55 UTC 2012
[aur-mirror.git] / libgl-git-glselect / mesa-7.1-link-shared.patch
blob634ac59c96ee512bd86a686b2207bb7478b5f8f3
1 diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.da mesa-20091221/src/mesa/drivers/dri/Makefile
2 --- mesa-20091221/src/mesa/drivers/dri/Makefile.da 2009-12-21 08:09:11.000000000 +1000
3 +++ mesa-20091221/src/mesa/drivers/dri/Makefile 2009-12-21 08:43:03.000000000 +1000
4 @@ -6,12 +6,17 @@ include $(TOP)/configs/current
8 -default: $(TOP)/$(LIB_DIR) subdirs dri.pc
9 +default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs dri.pc
12 $(TOP)/$(LIB_DIR):
13 -mkdir $(TOP)/$(LIB_DIR)
15 +libdricore.so:
16 + gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive -lm -lpthread -lc
18 +$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
19 + $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
21 subdirs:
22 @for dir in $(DRI_DIRS) ; do \
23 @@ -32,12 +37,14 @@ dri.pc: dri.pc.in
24 $(pcedit) $< > $@
27 -install: dri.pc
28 +install: dri.pc $(TOP)/$(LIB_DIR)/libdricore.so
29 @for dir in $(DRI_DIRS) ; do \
30 if [ -d $$dir ] ; then \
31 (cd $$dir && $(MAKE) install) || exit 1 ; \
32 fi \
33 done
34 + $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
35 + $(INSTALL) -m 755 $(TOP)/$(LIB_DIR)/libdricore.so $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
36 $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
37 $(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
38 $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
39 @@ -51,5 +58,6 @@ clean:
40 (cd $$dir && $(MAKE) clean) ; \
41 fi \
42 done
43 + -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
44 -rm -f common/*.o
45 -rm -f *.pc
46 diff -bup mesa-build/src/mesa/drivers/dri/Makefile.template.orig mesa-build/src/mesa/drivers/dri/Makefile.template
47 --- mesa-build/src/mesa/drivers/dri/Makefile.template.orig 2010-02-28 23:54:01.519609865 -0500
48 +++ mesa-build/src/mesa/drivers/dri/Makefile.template 2010-02-28 23:58:35.326610981 -0500
49 @@ -1,6 +1,6 @@
50 # -*-makefile-*-
52 -MESA_MODULES = $(TOP)/src/mesa/libmesa.a
53 +MESA_MODULES = $(TOP)/$(LIB_DIR)/libdricore.so
55 COMMON_GALLIUM_SOURCES = \
56 ../common/utils.c \
57 @@ -53,7 +53,9 @@ lib: symlinks subdirs depend
58 $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) Makefile \
59 $(TOP)/src/mesa/drivers/dri/Makefile.template
60 $(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
61 - $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(DRI_LIB_DEPS)
62 + $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) \
63 + -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
64 + $(DRI_LIB_DEPS)
67 $(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)