summaryrefslogtreecommitdiff
path: root/recipes-multimedia/kokkinizita/clxclient/0001-Align-Makefile.patch
blob: 3bed5aaffd72088e8254ad856a664d02e980badc (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
From 5b95fca0be36e0e57f65975cf5b295e1937bbbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 2 Aug 2017 21:08:36 +0200
Subject: [PATCH] Align Makefile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* don't hardcode g++
* make ldconfig work on installed directory only
* use pkgconfig to find freetype2
* do not add host path to compiler/linker

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 2b29cbf..0811df9 100644
--- a/Makefile
+++ b/Makefile
@@ -31,8 +31,8 @@ MINVERS = 9.0
 VERSION = $(MAJVERS).$(MINVERS)
 
 
-CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2 
-LDFLAGS += -L/usr/X11R6/$(LIBDIR) `freetype-config --libs`
+CPPFLAGS += -Wall -I. `pkg-config --cflags freetype2` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2 
+LDFLAGS += `pkg-config --libs freetype2`
 LDLIBS +=
 
 
@@ -46,14 +46,14 @@ CLXCLIENT_H = clxclient.h
 
 
 $(CLXCLIENT_MIN): $(CLXCLIENT_O)
-	g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
+	$(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
 
 
 install:	$(CLXCLIENT_MIN)
 	install -d $(PREFIX)/$(LIBDIR)
 	install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
 	install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
-	ldconfig
+	ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
 	ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
 
 
-- 
2.14.3