aboutsummaryrefslogtreecommitdiffstats
path: root/main/stfl
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-07-09 17:11:41 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-07-09 17:11:41 +0200
commit858dc0f98f9ce0a4b4212f72a87ad40b2caf36b4 (patch)
tree2adf944a70f6c3b702859805291ad2baf1af4dab /main/stfl
parentb578818036742256eea942ad128543d7c22d1c94 (diff)
downloadaports-858dc0f98f9ce0a4b4212f72a87ad40b2caf36b4.tar.bz2
aports-858dc0f98f9ce0a4b4212f72a87ad40b2caf36b4.tar.xz
testing/stfl: move to main
Diffstat (limited to 'main/stfl')
-rw-r--r--main/stfl/APKBUILD46
-rw-r--r--main/stfl/libiconv.patch13
-rw-r--r--main/stfl/libs.patch57
-rw-r--r--main/stfl/ncurses.patch26
4 files changed, 142 insertions, 0 deletions
diff --git a/main/stfl/APKBUILD b/main/stfl/APKBUILD
new file mode 100644
index 0000000000..5d1a4f5cb4
--- /dev/null
+++ b/main/stfl/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=stfl
+pkgver=0.24
+pkgrel=1
+pkgdesc="The Structured Terminal Forms Language/Library"
+url="http://www.clifford.at/stfl/"
+arch="all"
+license="LGPLv3+"
+depends=""
+depends_dev=""
+makedepends="$depends_dev ncurses-dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.clifford.at/stfl/stfl-$pkgver.tar.gz
+ ncurses.patch"
+
+_builddir="$srcdir"/stfl-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make prefix=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make prefix=/usr DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la "$pkgdir"/usr/lib/*.a
+ cd "$pkgdir"/usr/lib
+ ln -s libstfl.so.0.24 libstfl.so.0
+}
+
+md5sums="98c764ccc8f13ed05ea22559d7116b96 stfl-0.24.tar.gz
+63198ddede520b856065c7f813effdf6 ncurses.patch"
+sha256sums="d4a7aa181a475aaf8a8914a8ccb2a7ff28919d4c8c0f8a061e17a0c36869c090 stfl-0.24.tar.gz
+851ddaa7835b9adc47528522f8a99fb504affd8b95e542c309b7cc8907d3ea4b ncurses.patch"
+sha512sums="95df4574b1bc32d795751156dc5b93afbca3ba241607a3a55210c89dda61b9a26ad574bb5f729a0158c9052235dbf63d6c58b38e7f1061d14ab7062af6150fa0 stfl-0.24.tar.gz
+d445b7bebd53ab23765f8386d8e69080df1cf95ca7368dee98594176e5a99f73d741a14e81af1500dc249c2a485574a5323d16fffa12536f7f3f20049b636de6 ncurses.patch"
diff --git a/main/stfl/libiconv.patch b/main/stfl/libiconv.patch
new file mode 100644
index 0000000000..e96f8024de
--- /dev/null
+++ b/main/stfl/libiconv.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index d481e68..55aa66e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@ include Makefile.cfg
+
+ export CC = gcc -pthread
+ export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
+-export LDLIBS += -lncursesw
++export LDLIBS += -lncursesw -liconv
+
+ SONAME := libstfl.so.0
+ VERSION := 0.22
diff --git a/main/stfl/libs.patch b/main/stfl/libs.patch
new file mode 100644
index 0000000000..ce093ceaed
--- /dev/null
+++ b/main/stfl/libs.patch
@@ -0,0 +1,57 @@
+diff --git a/Makefile b/Makefile
+index d481e68..f7452b5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@ include Makefile.cfg
+
+ export CC = gcc -pthread
+ export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
+-export LDLIBS += -lncursesw
++export LDLIBS += -lncursesw -liconv
+
+ SONAME := libstfl.so.0
+ VERSION := 0.22
+@@ -39,7 +39,7 @@ libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \
+
+ 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 $(LDLIBS) -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
+
+ clean:
+ rm -f libstfl.a example core core.* *.o Makefile.deps
+@@ -65,6 +65,7 @@ install: all stfl.pc
+ 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
++ ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/$(SONAME)
+
+ stfl.pc: stfl.pc.in
+ sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@
+diff --git a/Makefile.cfg b/Makefile.cfg
+index af3e102..346682e 100644
+--- a/Makefile.cfg
++++ b/Makefile.cfg
+@@ -19,7 +19,7 @@
+ #
+
+ export libdir ?= lib
+-export prefix ?= /usr/local
++export prefix ?= /usr
+ export DESTDIR ?= /
+
+ ifneq ($(shell spl-config --cflags 2>/dev/null),)
+diff --git a/python/Makefile.snippet b/python/Makefile.snippet
+index 8fd4052..af95b01 100644
+--- a/python/Makefile.snippet
++++ b/python/Makefile.snippet
+@@ -33,8 +33,7 @@ python/_stfl.so python/stfl.py python/stfl.pyc: libstfl.a stfl.h python/stfl.i s
+
+ install_python: python/_stfl.so python/stfl.py python/stfl.pyc
+ mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/
+- mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
+- cp python/_stfl.so $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
++ cp python/_stfl.so $(DESTDIR)$(PYTHON_SITEARCH)//
+ cp python/stfl.pyc $(DESTDIR)$(PYTHON_SITEARCH)/
+ cp python/stfl.py $(DESTDIR)$(PYTHON_SITEARCH)/
+
diff --git a/main/stfl/ncurses.patch b/main/stfl/ncurses.patch
new file mode 100644
index 0000000000..215d35d024
--- /dev/null
+++ b/main/stfl/ncurses.patch
@@ -0,0 +1,26 @@
+We need -D_XOPEN_SOURCE_EXTENDED for widechar in ncurses
+
+diff --git a/stfl_internals.h b/stfl_internals.h
+index 3f9f45b..1559626 100644
+--- a/stfl_internals.h
++++ b/stfl_internals.h
+@@ -28,7 +28,7 @@ extern "C" {
+ #endif
+
+ #include "stfl.h"
+-#include <ncursesw/ncurses.h>
++#include <ncurses.h>
+ #include <pthread.h>
+
+ struct stfl_widget_type;
+--- ./Makefile.orig
++++ ./Makefile
+@@ -21,7 +21,7 @@
+ include Makefile.cfg
+
+ export CC = gcc -pthread
+-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
++export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -fPIC
+ export LDLIBS += -lncursesw
+
+ SONAME := libstfl.so.0