summaryrefslogtreecommitdiff
path: root/debian/patches/0001_jam.patch
blob: 69156bd34dfe12eb3279465c4fad3e82faa887b4 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Description: Add multiarch support to jam files
Author: Jörg Frings Fürst <debian@jff-webhosting.net>
Forwarded: http://www.freelists.org/post/argyllcms/Some-buildsystem-issues
Last-Update: 2015-08-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: trunk/Jambase
===================================================================
--- trunk.orig/Jambase
+++ trunk/Jambase
@@ -941,7 +941,7 @@ else if $(UNIX)
 
 	# UNIX defaults
 
-	CCFLAGS			?= -DUNIX -D_THREAD_SAFE -pipe ;
+	CCFLAGS			?= $(CPPFLAGS) -g -DUNIX -D_THREAD_SAFE -pipe -fPIC ;
 	CCOPTFLAG		?= -O2 ;		
 	CCDEBUGFLAG		?= -g ;		
 	CCPROFFLAG		?= ;		
@@ -951,7 +951,7 @@ else if $(UNIX)
 	CHGRP			?= chgrp ;
 	CHOWN			?= chown ;
 	LEX				?= lex ;
-	LINKFLAGS		?= ;
+	LINKFLAGS		?= $(LDFLAGS) ;
 	LINKOPTFLAG		?= -O ;				# Affects creating .so's
 	LINKSTRIPFLAG	?= -s ;
 	LINKDEBUGFLAG	?= ;
@@ -1037,7 +1037,7 @@ else if $(UNIX)
 	RMDIR			?= $(RM) ;
 	RSH				?= rsh ;
 	SED				?= sed ;
-	SHELLHEADER		?= "#!/bin/sh" ;
+	SHELLHEADER		?= "#!/bin/bash" ;
 	SHELLMODE		?= 755 ;
 	SLASH			?= / ;
 	STDHDRS			?= /usr/include ;
Index: trunk/Jamtop
===================================================================
--- trunk.orig/Jamtop
+++ trunk/Jamtop
@@ -23,6 +23,7 @@ ANCHORED_PATH_VARS = DESTDIR ;
 # Should we also allow CFLAGS, CXXFLAGS, CPPFLAGS & LDFLAGS env. variables
 # to have effect ?
 
+BUILD_SHARED_LIB = 1 ;
 
 # Tell standalone libraries that they are part of Argyll:
 DEFINES += ARGYLLCMS ;
@@ -139,17 +140,82 @@ rule CheckForLibrary {
 	}
 
 	if ! $(BUILTIN_$(UCASE)) && $(UNIX) {
-		if  [ GLOB /usr/include$(subd) : $(lcase).h $(lcase)lib.h ]
-	     || [ GLOB /usr/local/include$(subd) : $(lcase).h $(lcase)lib.h ]
-		 || [ GLOB /usr/include/x86_64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
-	     || [ GLOB /usr/include/i386-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ] {
-			if  [ GLOB /usr/lib : lib$(lcase).so ] || [ GLOB /usr/lib : lib$(lcase).a ]
-			 || [ GLOB /usr/local/lib : lib$(lcase).so ] || [ GLOB /usr/local/lib : lib$(lcase).a ]
-			 || [ GLOB /usr/lib64 : lib$(lcase).so ] || [ GLOB /usr/lib64 : lib$(lcase).a ]
-			 || [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).so ]
-			 || [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).a ]
-	         || [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).so ]
-	         || [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).a ] {
+	    if  [ GLOB /usr/include$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/local/include$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/x86_64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/i386-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/alpha-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/aarch64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/arm-linux-gnueabi$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/arm-linux-gnueabihf$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/hppa-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/i386-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/x86_64-kfreebsd-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/i386-kfreebsd-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/m68k-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/mips-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/mipsel-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/mips64el-linux-gnuabi64$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/powerpc-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/powerpc-linux-gnuspe$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/powerpc64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/powerpc64le-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/s390x-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/sh4-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/sparc-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/sparc64-linux-gnu$(subd) : $(lcase).h $(lcase)lib.h ]
+		|| [ GLOB /usr/include/x86_64-linux-gnux32$(subd) : $(lcase).h $(lcase)lib.h ] {
+		    if  [ GLOB /usr/lib : lib$(lcase).so ] || [ GLOB /usr/lib : lib$(lcase).a ]
+			|| [ GLOB /usr/local/lib : lib$(lcase).so ]
+			|| [ GLOB /usr/local/lib : lib$(lcase).a ]
+			|| [ GLOB /usr/lib64 : lib$(lcase).so ]
+			|| [ GLOB /usr/lib64 : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/x86_64-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/i386-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/alpha-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/alpha-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/aarch64-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/aarch64-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/arm-linux-gnueabi : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/arm-linux-gnueabi : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/arm-linux-gnueabihf : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/arm-linux-gnueabihf : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/hppa-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/hppa-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/i386-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/i386-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/x86_64-kfreebsd-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/x86_64-kfreebsd-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/i386-kfreebsd-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/i386-kfreebsd-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/m68k-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/m68k-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/mips-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/mips-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/mipsel-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/mipsel-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/mips64el-linux-gnuabi64 : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/mips64el-linux-gnuabi64 : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/powerpc-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/powerpc-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/powerpc-linux-gnuspe : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/powerpc-linux-gnuspe : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/powerpc64-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/powerpc64-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/powerpc64le-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/powerpc64le-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/s390x-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/s390x-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/sh4-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/sh4-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/sparc-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/sparc-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/sparc64-linux-gnu : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/sparc64-linux-gnu : lib$(lcase).a ]
+			|| [ GLOB /usr/lib/x86_64-linux-gnux32 : lib$(lcase).so ]
+			|| [ GLOB /usr/lib/x86_64-linux-gnux32 : lib$(lcase).a ] {
 				echo "Using system $(UCASE) library" ;
 				$(UCASE)LIB = ;
 				$(UCASE)INC = ;