aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/raspidmx/raspidmx/0003-switch-to-pkg-config.patch
blob: 7adb12bb3b4ca5a61be72dc40332ac9bba356c8c (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
From 314fbde187e9187b1b3e18e50dd937c070e93633 Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 01:58:59 -0500
Subject: [PATCH] switch to "pkg-config"

I get a build error saying:

	ERROR: /usr/bin/libpng16-config should not be used, use an alternative such as pkg-config

Therefore switch to the more common and more generic "pkg-config" instead of
using a libpng-specific tool for flags and libraries.

Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 game/Makefile       | 4 ++--
 lib/Makefile        | 4 ++--
 mandelbrot/Makefile | 4 ++--
 offscreen/Makefile  | 4 ++--
 pngview/Makefile    | 4 ++--
 spriteview/Makefile | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/game/Makefile b/game/Makefile
index 6da6a6d..0a90a38 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -1,8 +1,8 @@
 OBJS=main.o
 BIN=game
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
 
diff --git a/lib/Makefile b/lib/Makefile
index 2765c91..1e8c759 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -11,9 +11,9 @@ OBJS=../common/backgroundLayer.o ../common/imageGraphics.o ../common/key.o \
 
 OBJSPNG=../common/spriteLayer.o ../common/loadpng.o ../common/savepng.o ../common/scrollingLayer.o
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
 LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm
-LDFLAGSPNG=${LDFLAGS} $(shell libpng-config --ldflags)
+LDFLAGSPNG=${LDFLAGS} $(shell pkg-config --libs libpng)
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
 
diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
index a6e6735..82910bb 100644
--- a/mandelbrot/Makefile
+++ b/mandelbrot/Makefile
@@ -1,8 +1,8 @@
 OBJS=main.o mandelbrot.o info.o
 BIN=mandelbrot
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
 
diff --git a/offscreen/Makefile b/offscreen/Makefile
index 8d23354..0120796 100644
--- a/offscreen/Makefile
+++ b/offscreen/Makefile
@@ -1,8 +1,8 @@
 OBJS=pngresize.o resizeDispmanX.o
 BIN=pngresize
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
 
diff --git a/pngview/Makefile b/pngview/Makefile
index 8c037ec..71a5d76 100644
--- a/pngview/Makefile
+++ b/pngview/Makefile
@@ -1,8 +1,8 @@
 OBJS=pngview.o
 BIN=pngview
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
 
diff --git a/spriteview/Makefile b/spriteview/Makefile
index ada9277..904c1e8 100644
--- a/spriteview/Makefile
+++ b/spriteview/Makefile
@@ -1,8 +1,8 @@
 OBJS=spriteview.o
 BIN=spriteview
 
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
 
 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux