Import stfl-0.22.
STFL is a library which implements a curses-based widget set for text terminals. The public STFL API is only 14 simple function calls big and there are already generic SWIG bindings. Thus is very easy to port STFL to additional scripting languages. <...> ok jasper@
This commit is contained in:
parent
d25771c359
commit
15ce3a1ece
50
devel/stfl/Makefile
Executable file
50
devel/stfl/Makefile
Executable file
@ -0,0 +1,50 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= Structured Terminal Forms Language/Library
|
||||
|
||||
DISTNAME= stfl-0.22
|
||||
|
||||
SHARED_LIBS+= stfl 0.0
|
||||
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://www.clifford.at/stfl/
|
||||
|
||||
# LGPLv3
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += ncursesw pthread
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
||||
MODULES= converters/libiconv
|
||||
|
||||
ALL_TARGET= libstfl.so.${LIBstfl_VERSION}
|
||||
USE_GMAKE= Yes
|
||||
NO_REGRESS= Yes
|
||||
|
||||
MAKE_FLAGS= FOUND_SPL=0 \
|
||||
FOUND_SWIG=0 \
|
||||
FOUND_PERL5=0 \
|
||||
FOUND_PYTHON=0 \
|
||||
FOUND_RUBY=0
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/Makefile
|
||||
|
||||
post-build:
|
||||
cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} ${MAKEFILE} stfl.pc
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKBUILD}/libstfl.so.${LIBstfl_VERSION} ${PREFIX}/lib
|
||||
${INSTALL_DATA} ${WRKSRC}/stfl.h ${PREFIX}/include/
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/pkgconfig
|
||||
${INSTALL_DATA} ${WRKSRC}/stfl.pc ${PREFIX}/lib/pkgconfig
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/stfl/distinfo
Normal file
2
devel/stfl/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (stfl-0.22.tar.gz) = Ld2v0zHmGtBLrxJRzOyzpp/q+ZiA3XUVW+hCPBzFVBg=
|
||||
SIZE (stfl-0.22.tar.gz) = 41412
|
46
devel/stfl/patches/patch-Makefile
Normal file
46
devel/stfl/patches/patch-Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
|
||||
--- Makefile.orig Mon Oct 24 08:20:48 2011
|
||||
+++ Makefile Sun Dec 30 10:31:35 2012
|
||||
@@ -20,14 +20,14 @@
|
||||
|
||||
include Makefile.cfg
|
||||
|
||||
-export CC = gcc -pthread
|
||||
-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
|
||||
-export LDLIBS += -lncursesw
|
||||
+export CC ?= gcc -pthread
|
||||
+export CFLAGS += -I. -Wall -ggdb -D_XOPEN_SOURCE_EXTENDED -fPIC -I${LOCALBASE}/include
|
||||
+export LDLIBS += -lpthread -lncursesw -L${LOCALBASE}/lib -liconv -Wl,-R${LOCALBASE}/lib
|
||||
|
||||
-SONAME := libstfl.so.0
|
||||
+SONAME := libstfl.so.${LIBstfl_VERSION}
|
||||
VERSION := 0.22
|
||||
|
||||
-all: libstfl.so.$(VERSION) libstfl.a example
|
||||
+all: $(SONAME) libstfl.a example
|
||||
|
||||
example: libstfl.a example.o
|
||||
|
||||
@@ -37,9 +37,9 @@ libstfl.a: public.o base.o parser.o dump.o style.o bin
|
||||
ar qc $@ $^
|
||||
ranlib $@
|
||||
|
||||
-libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
|
||||
+$(SONAME): 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) $(CFLAGS) -shared -o $@ $(LDLIBS) $^
|
||||
|
||||
clean:
|
||||
rm -f libstfl.a example core core.* *.o Makefile.deps
|
||||
@@ -53,8 +53,8 @@ clean:
|
||||
rm -f stfl.pc libstfl.so libstfl.so.*
|
||||
|
||||
Makefile.deps: *.c widgets/*.c *.h
|
||||
- $(CC) -I. -MM *.c > Makefile.deps_new
|
||||
- $(CC) -I. -MM widgets/*.c | sed 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new
|
||||
+ $(CC) $(CFLAGS) -I. -MM *.c > Makefile.deps_new
|
||||
+ $(CC) $(CFLAGS) -I. -MM widgets/*.c | sed 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new
|
||||
mv -f Makefile.deps_new Makefile.deps
|
||||
|
||||
install: all stfl.pc
|
15
devel/stfl/patches/patch-stfl_internals_h
Normal file
15
devel/stfl/patches/patch-stfl_internals_h
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-stfl_internals_h,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
|
||||
--- stfl_internals.h.orig Sun Dec 30 09:25:50 2012
|
||||
+++ stfl_internals.h Sun Dec 30 09:26:11 2012
|
||||
@@ -28,7 +28,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "stfl.h"
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <curses.h>
|
||||
+#else
|
||||
#include <ncursesw/ncurses.h>
|
||||
+#endif
|
||||
#include <pthread.h>
|
||||
|
||||
struct stfl_widget_type;
|
11
devel/stfl/patches/patch-stfl_pc_in
Normal file
11
devel/stfl/patches/patch-stfl_pc_in
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-stfl_pc_in,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
|
||||
--- stfl.pc.in.orig Sun Dec 30 10:31:46 2012
|
||||
+++ stfl.pc.in Sun Dec 30 10:31:59 2012
|
||||
@@ -8,6 +8,6 @@ includedir=${prefix}/include
|
||||
Name: STFL
|
||||
Description: Structured Terminal Forms Language/Library
|
||||
Version: @VERSION@
|
||||
-Libs: -L${libdir} -lstfl
|
||||
+Libs: -Wl,-R${libdir} -L${libdir} -lstfl
|
||||
Libs.private: -lncursesw
|
||||
Cflags: -I${includedir}
|
22
devel/stfl/pkg/DESCR
Executable file
22
devel/stfl/pkg/DESCR
Executable file
@ -0,0 +1,22 @@
|
||||
STFL is a library which implements a curses-based widget set for text
|
||||
terminals. The public STFL API is only 14 simple function calls big and
|
||||
there are already generic SWIG bindings. Thus is very easy to port STFL
|
||||
to additional scripting languages.
|
||||
|
||||
A special language (the Structured Terminal Forms Language) is used to
|
||||
describe STFL GUIs. The language is designed to be easy and fast to
|
||||
write so an application programmer does not need to spend ages fiddling
|
||||
around with the GUI and can concentrate on the more interesting
|
||||
programming tasks.
|
||||
|
||||
There are two different syntaxes for STFL code, one designed to make
|
||||
handwriting of STFL code as easy as possible and one aiming at generated
|
||||
STFL code.
|
||||
|
||||
The STFL GUI descriptions (written in STFL code) do not contain any
|
||||
concrete layouting information such as x/y coordinates of widgets.
|
||||
Instead container widgets such as vertical and horizontal boxes as well
|
||||
as tables are used to group widgets and the actual layouting work is
|
||||
done by the STFL library. Thus STFL GUIs can handle terminals of
|
||||
different sizes and terminal resize events transparently for the
|
||||
application programmer.
|
5
devel/stfl/pkg/PLIST
Normal file
5
devel/stfl/pkg/PLIST
Normal file
@ -0,0 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
|
||||
include/stfl.h
|
||||
@lib lib/libstfl.so.${LIBstfl_VERSION}
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/stfl.pc
|
Loading…
Reference in New Issue
Block a user