summaryrefslogtreecommitdiff
path: root/debian/patches/01_fix-makefile.patch
blob: f599d8438e1a8e413a6311631ff7e16fb93c1f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Do not build OSMesa for a standalone configuration, since Debian only ships
OSMesa in a separate package.

Fix Mesa makefile to install the libGL and libOSMesa libraries when they
exist, not only depending on configuration.

This patch by Thierry Reding.
Hunk #2 submitted to Mesa and applied (post 6.5.1).

--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -107,7 +107,7 @@
 	$(OSMESA_DRIVER_OBJECTS)
 
 
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
 osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
 
@@ -154,7 +154,12 @@
 	$(INSTALL) -d $(INSTALL_DIR)/include/GL
 	$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
 	$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
-	$(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGL.* $(INSTALL_DIR)/$(LIB_DIR)
+	@if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
+		$(COPY_LIBS) $(TOP)/$(LIB_DIR)/lib$(GL_LIB).* $(INSTALL_DIR)/$(LIB_DIR); \
+	fi
+	@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
+		$(COPY_LIBS) $(TOP)/$(LIB_DIR)/lib$(OSMESA_LIB).* $(INSTALL_DIR)/$(LIB_DIR); \
+	fi
 	@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
 		cd drivers/dri ; $(MAKE) install ; \
 	fi