From 885c27e5b4fba9523b1e12e417c187a9db4dc323 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Fri, 16 Aug 2019 15:09:25 +0300 Subject: [PATCH] stfl: fix makefile for on-device build support --- packages/stfl/001-makefile.patch | 27 ++++++++++++++++----------- packages/stfl/build.sh | 3 +-- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/stfl/001-makefile.patch b/packages/stfl/001-makefile.patch index dcf86a3ce..0e6c9c093 100644 --- a/packages/stfl/001-makefile.patch +++ b/packages/stfl/001-makefile.patch @@ -1,18 +1,23 @@ -diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile ---- stfl-0.24.orig/Makefile 2015-02-12 14:14:33.000000000 +0100 -+++ stfl-0.24/Makefile 2016-05-31 21:26:11.162048447 +0200 -@@ -20,10 +20,6 @@ +diff -uNr stfl-0.24/Makefile stfl-0.24.mod/Makefile +--- stfl-0.24/Makefile 2015-02-12 15:14:33.000000000 +0200 ++++ stfl-0.24.mod/Makefile 2019-08-16 15:05:15.360298872 +0300 +@@ -20,9 +20,12 @@ include Makefile.cfg -export CC = gcc -pthread -export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC -export LDLIBS += -lncursesw -- ++CC ?= gcc ++AR ?= ar ++RANLIB ?= ranlib ++ ++CFLAGS += -Wall -D_GNU_SOURCE -fPIC -I. ++LDLIBS += -lncursesw + SONAME := libstfl.so.0 VERSION := 0.24 - -@@ -34,12 +30,12 @@ +@@ -34,12 +37,12 @@ libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \ $(patsubst %.c,%.o,$(wildcard widgets/*.c)) rm -f $@ @@ -28,7 +33,7 @@ diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile clean: rm -f libstfl.a example core core.* *.o Makefile.deps -@@ -65,6 +61,7 @@ +@@ -65,6 +68,7 @@ install -m 644 stfl.pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/ install -m 644 libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir) ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libstfl.so @@ -36,9 +41,9 @@ diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile stfl.pc: stfl.pc.in sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@ -diff -Naur stfl-0.24.orig/Makefile.cfg stfl-0.24/Makefile.cfg ---- stfl-0.24.orig/Makefile.cfg 2009-05-31 20:20:39.000000000 +0200 -+++ stfl-0.24/Makefile.cfg 2016-05-30 05:50:59.051375377 +0200 +diff -uNr stfl-0.24/Makefile.cfg stfl-0.24.mod/Makefile.cfg +--- stfl-0.24/Makefile.cfg 2009-05-31 21:20:39.000000000 +0300 ++++ stfl-0.24.mod/Makefile.cfg 2019-08-16 15:20:06.621673157 +0300 @@ -20,7 +20,6 @@ export libdir ?= lib diff --git a/packages/stfl/build.sh b/packages/stfl/build.sh index ba49fe877..422cda8cb 100644 --- a/packages/stfl/build.sh +++ b/packages/stfl/build.sh @@ -12,6 +12,5 @@ TERMUX_PKG_BUILD_IN_SRC=true termux_step_configure() { CC+=" $CPPFLAGS" - CFLAGS+=" -fPIC -I. -D_XOPEN_SOURCE_EXTENDED=1" - LDFLAGS+=" -lncursesw -liconv" + export LDLIBS="-liconv" }