Initial push
[termux-packages] / packages / libtermkey / Makefile.patch
1 diff -u -r ../libtermkey-0.17/Makefile ./Makefile
2 --- ../libtermkey-0.17/Makefile 2014-01-06 13:03:51.000000000 -0500
3 +++ ./Makefile 2015-03-02 15:49:31.323905282 -0500
4 @@ -19,12 +19,14 @@
5 LDFLAGS+=-pg
6 endif
7
8 -ifeq ($(shell pkg-config --atleast-version=0.1.0 unibilium && echo 1),1)
9 - CFLAGS +=$(shell pkg-config --cflags unibilium) -DHAVE_UNIBILIUM
10 - LDFLAGS+=$(shell pkg-config --libs unibilium)
11 -else ifeq ($(shell pkg-config ncursesw && echo 1),1)
12 - CFLAGS +=$(shell pkg-config --cflags ncursesw)
13 - LDFLAGS+=$(shell pkg-config --libs ncursesw)
14 +PKG_CONFIG?=pkg-config
15 +
16 +ifeq ($(shell $(PKG_CONFIG) --atleast-version=0.1.0 unibilium && echo 1),1)
17 + CFLAGS +=$(shell $(PKG_CONFIG) --cflags unibilium) -DHAVE_UNIBILIUM
18 + LDFLAGS+=$(shell $(PKG_CONFIG) --libs unibilium)
19 +else ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
20 + CFLAGS +=$(shell $(PKG_CONFIG) --cflags ncursesw)
21 + LDFLAGS+=$(shell $(PKG_CONFIG) --libs ncursesw)
22 else
23 LDFLAGS+=-lncurses
24 endif
25 @@ -34,7 +36,7 @@
26
27 DEMOS=demo demo-async
28
29 -ifeq ($(shell pkg-config glib-2.0 && echo 1),1)
30 +ifeq ($(shell $(PKG_CONFIG) glib-2.0 && echo 1),1)
31 DEMOS+=demo-glib
32 endif
33
34 @@ -50,7 +52,7 @@
35 VERSION_REVISION=0
36 VERSION_AGE=11
37
38 -PREFIX=/usr/local
39 +PREFIX?=/usr/local
40 LIBDIR=$(PREFIX)/lib
41 INCDIR=$(PREFIX)/include
42 MANDIR=$(PREFIX)/share/man
43 @@ -72,10 +74,10 @@
44 $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^
45
46 demo-glib.lo: demo-glib.c termkey.h
47 - $(LIBTOOL) --mode=compile --tag=CC $(CC) -o $@ -c $< $(shell pkg-config glib-2.0 --cflags)
48 + $(LIBTOOL) --mode=compile --tag=CC $(CC) -o $@ -c $< $(shell $(PKG_CONFIG) glib-2.0 --cflags)
49
50 demo-glib: $(LIBRARY) demo-glib.lo
51 - $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ $(shell pkg-config glib-2.0 --libs)
52 + $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ $(shell $(PKG_CONFIG) glib-2.0 --libs)
53
54 t/%.t: t/%.c $(LIBRARY) t/taplib.lo
55 $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^