stfl: fix cross-compile, clean up template

This commit is contained in:
Enno Boland 2014-11-16 17:39:11 +01:00
parent c652833e7d
commit ffa401e84d
2 changed files with 24 additions and 5 deletions

View file

@ -0,0 +1,23 @@
--- Makefile.orig 2014-11-16 17:36:22.654752366 +0100
+++ Makefile 2014-11-16 17:36:51.204753383 +0100
@@ -20,9 +20,8 @@
include Makefile.cfg
-export CC = gcc -pthread
-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
-export LDLIBS += -lncursesw
+export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC -pthread
+export LDLIBS += -lncursesw -lpthread
SONAME := libstfl.so.0
VERSION := 0.23
@@ -39,7 +38,7 @@ libstfl.a: public.o base.o parser.o dump
libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
$(patsubst %.c,%.o,$(wildcard widgets/*.c))
- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
+ $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $(LDFLAGS) $^
clean:
rm -f libstfl.a example core core.* *.o Makefile.deps

View file

@ -1,7 +1,7 @@
# Template file for 'stfl'
pkgname=stfl
version=0.23
revision=1
revision=2
build_style=gnu-makefile
hostmakedepends="swig"
makedepends="ncurses-devel"
@ -12,14 +12,10 @@ homepage="http://www.clifford.at/stfl/"
distfiles="http://www.clifford.at/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=e75ed8427905ad50faf43ed5fefd0cf7b16ee0c1ca87e15d33e360bb92aedfde
do_build(){
unset LDFLAGS
}
post_install(){
ln -sf libstfl.so.${version} ${DESTDIR}/usr/lib/libstfl.so.0
}
# Devel
stfl-devel_package() {
depends="stfl>=${version}_${revision} $makedepends"
short_desc+=" - development files"