summaryrefslogtreecommitdiff
path: root/debian/patches/03_optional-progs-and-install.patch
blob: f802a429601778d8cf856098f4a865e3ffd99480 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Allow the programs that are to be built to be defined in the build
configuration.

Provide an install target for installing the programs in $(INSTALL_DIR)/bin.

This patch by Thierry Reding.
Not submitted to Mesa.
--
Also remove references to GLU library since it is not required
and we don't actually build it at this point.


Index: mesa/progs/xdemos/Makefile
===================================================================
--- mesa.orig/progs/xdemos/Makefile	2007-11-11 00:34:12.000000000 +0100
+++ mesa/progs/xdemos/Makefile	2007-11-11 02:07:52.000000000 +0100
@@ -6,11 +6,11 @@
 
 INCDIR = $(TOP)/include
 
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
 
-PROGS = glthreads \
+PROGS ?= glthreads \
 	glxdemo \
 	glxgears \
 	glxgears_fbconfig \
@@ -46,6 +46,9 @@
 
 default: $(PROGS)
 
+install: $(PROGS)
+	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/bin
+	$(INSTALL) -m 755 $(PROGS) $(DESTDIR)$(INSTALL_DIR)/bin
 
 clean:
 	-rm -f $(PROGS)
Index: mesa/progs/Makefile
===================================================================
--- mesa.orig/progs/Makefile	2007-11-11 00:34:12.000000000 +0100
+++ mesa/progs/Makefile	2007-11-11 02:06:48.000000000 +0100
@@ -21,8 +21,12 @@
 		fi \
 	done
 
-# Dummy install target
 install:
+	@for dir in $(SUBDIRS) ; do \
+		if [ -d $$dir ] ; then \
+			(cd $$dir ; $(MAKE) install) ; \
+		fi \
+	done
 
 clean:
 	@for dir in $(SUBDIRS) tests ; do \