File: make-gcc-substitutable

package info (click to toggle)
superkb 0.23-5
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 492 kB
  • sloc: ansic: 3,915; sh: 187; makefile: 182
file content (38 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download
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
Description: <short summary of the patch>
 Taken from Helmut's e-mail:
 .
 superkb fails to cross build from source, because the upstream build
 system hard codes build architecture build tools (gcc and pkg-config).
 The attached patch makes gcc substitutable, but it doesn't make
 superkb cross buildable due to its use of help2man [*]. Please consider
 applying the attached patch anyway and close this bug when doing so even
 though superkb will continue to fail cross building.
 .
 [*] A later patch fixes this too.

Author: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/929005
Forwarded: https://gitlab.com/alvarezp2000/superkb/-/commit/5a5c2251b0e4781706332c8a32a4fa39cae0b4b3
Reviewed-By: Octavio Alvarez <alvarezp@alvarezp.com>
Last-Update: 2020-09-05

--- superkb-0.23.orig/Makefile
+++ superkb-0.23/Makefile
@@ -73,7 +73,7 @@ MACROS=-DPREFIX=$(PREFIX) -DLIBDIRNAME=$
 
 #Special variables
 SHELL=/bin/sh
-CC=gcc
+CC ?= gcc
 CFLAGS+=-Wall -std=c99 $(PEDANTIC_ERRORS) $(WEXTRA) $(syms-y) $(cflags-y) $(cflags-m) -ggdb -fPIC -DVEXTRA=\""$(version_extrainfo)"\" $(MACROS)
 OBJS=superkb.o main.o superkbrc.o imagelib.o drawkblib.o debug.o timeval.o $(obj-y)
 LDPARAMS=-lX11 -lm -ldl -L/usr/X11R6/lib -L/usr/X11/lib $(ldlibs-y)
@@ -142,7 +142,7 @@ puticon/puticon-gdkpixbuf.o: puticon/put
 
 
 $(SHARED): %.so: %.o
-	gcc -shared -o $@ $< $(LDFLAGS) $(ldlibs-m)
+	$(CC) -shared -o $@ $< $(LDFLAGS) $(ldlibs-m)
 
 .PHONY : relink
 relink: