From 226ea3d8b1bf5c9d5ed560a1c9cb7060199ac177 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 14 Dec 2016 18:09:39 -0800 Subject: liboop: Add recipe liboop is needed by ruli Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- .../liboop/liboop/explicit_linking.patch | 20 +++++++++++ .../liboop/liboop/new-readline-typedef.patch | 11 ++++++ .../liboop/liboop/read_bugfixes.patch | 40 ++++++++++++++++++++++ .../recipes-support/liboop/liboop/tcl_dev.patch | 22 ++++++++++++ meta-oe/recipes-support/liboop/liboop_1.0.bb | 23 +++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 meta-oe/recipes-support/liboop/liboop/explicit_linking.patch create mode 100644 meta-oe/recipes-support/liboop/liboop/new-readline-typedef.patch create mode 100644 meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch create mode 100644 meta-oe/recipes-support/liboop/liboop/tcl_dev.patch create mode 100644 meta-oe/recipes-support/liboop/liboop_1.0.bb diff --git a/meta-oe/recipes-support/liboop/liboop/explicit_linking.patch b/meta-oe/recipes-support/liboop/liboop/explicit_linking.patch new file mode 100644 index 0000000000..05d3bf6f44 --- /dev/null +++ b/meta-oe/recipes-support/liboop/liboop/explicit_linking.patch @@ -0,0 +1,20 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -51,7 +51,7 @@ noinst_PROGRAMS = test-oop + + test_oop_SOURCES = test-oop.c + test_oop_CFLAGS = $(GLIB2_CFLAGS) $(GLIB_INCLUDES) $(TCL_INCLUDES) $(WWW_INCLUDES) +-test_oop_LDADD = $(lib_LTLIBRARIES) ++test_oop_LDADD = $(lib_LTLIBRARIES) $(GLIB2_LIBS) $(ADNS_LIBS) $(TCL_LIBS) $(READLINE_LIBS) + + release: dist + gzip -dc $(PACKAGE)-$(VERSION).tar.gz | bzip2 -9 \ +--- a/liboop-glib2.pc.in ++++ b/liboop-glib2.pc.in +@@ -7,5 +7,5 @@ Name: liboop-glib2 + Description: Event loop management library (GLIB2 support) + Version: @VERSION@ + Requires: liboop = @VERSION@ glib-2.0 +-Libs: -L${libdir} -loop-glib2 ++Libs: -L${libdir} -loop-glib2 @GLIB2_LIBS@ + Cflags: -D_REENTRANT -I${includedir} diff --git a/meta-oe/recipes-support/liboop/liboop/new-readline-typedef.patch b/meta-oe/recipes-support/liboop/liboop/new-readline-typedef.patch new file mode 100644 index 0000000000..0a0242032f --- /dev/null +++ b/meta-oe/recipes-support/liboop/liboop/new-readline-typedef.patch @@ -0,0 +1,11 @@ +--- a/test-oop.c ++++ b/test-oop.c +@@ -180,7 +180,7 @@ static void *stop_readline(oop_source *s + static void add_readline(oop_source *src) { + rl_callback_handler_install( + (char *) "> ", /* readline isn't const-correct */ +- (VFunction *) on_readline); ++ (rl_vcpfunc_t *) on_readline); + oop_readline_register(src); + src->on_signal(src,SIGQUIT,stop_readline,NULL); + } diff --git a/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch b/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch new file mode 100644 index 0000000000..1880a241ac --- /dev/null +++ b/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch @@ -0,0 +1,40 @@ +From: Ian Jackson +Applied-Upstream: no +Bug-Debian: http://bugs.debian.org/579604 +Subject: oop-read.h bugfixes + +Some years ago I contributed a feature for reading lines and records +to liboop: oop-read.h and read.c. Since it took a while for that +feature to make it into distributed versions, for a long time I've +been using my own copy of the source file. It seems that I fixed a +couple of bugs in my copy which are still in the Debian package. I +can't find any record of me having told anyone about them and now I +find that 1.0-6 still has the bugs. + +There are two fixes: + * Initialise "rd->discard" properly + * Avoid rd->neednotcheck becoming negative + +--- a/read.c ++++ b/read.c +@@ -114,6 +114,7 @@ oop_read *oop_rd_new(oop_source *oop, oo + rd->allocbuf= 0; + rd->used= 0; + rd->alloc= buf ? bufsz : 0; ++ rd->discard= 0; + rd->neednotcheck= 0; + rd->displacedchar= -1; + rd->style= *OOP_RD_STYLE_IMMED; +@@ -235,7 +236,11 @@ static void *on_process(oop_source *oop, + + if (rd->discard) { + rd->used -= rd->discard; +- rd->neednotcheck -= rd->discard; ++ if (rd->neednotcheck > rd->discard) { ++ rd->neednotcheck -= rd->discard; ++ } else { ++ rd->neednotcheck= 0; ++ } + memmove(buf, buf + rd->discard, rd->used); + rd->discard= 0; + } diff --git a/meta-oe/recipes-support/liboop/liboop/tcl_dev.patch b/meta-oe/recipes-support/liboop/liboop/tcl_dev.patch new file mode 100644 index 0000000000..e738be54ca --- /dev/null +++ b/meta-oe/recipes-support/liboop/liboop/tcl_dev.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -19935,7 +19935,7 @@ + fi + + if test xno != x$with_tcl; then +- for version in 8.4 8.3 8.2 8.1 8.0 ; do ++ for version in "" 8.4 8.3 8.2 8.1 8.0 ; do + CPPFLAGS="$save_cppflags -I/usr/include/tcl$version" + as_ac_Lib=`echo "ac_cv_lib_tcl$version''_Tcl_Main" | $as_tr_sh` + echo "$as_me:$LINENO: checking for Tcl_Main in -ltcl$version" >&5 +--- a/configure.ac ++++ b/configure.ac +@@ -71,7 +71,7 @@ + fi + + if test xno != x$with_tcl; then +- for version in 8.4 8.3 8.2 8.1 8.0 ; do ++ for version in "" 8.4 8.3 8.2 8.1 8.0 ; do + CPPFLAGS="$save_cppflags -I/usr/include/tcl$version" + AC_CHECK_LIB(tcl$version,Tcl_Main,[ + AC_CHECK_HEADER(tcl.h,[ diff --git a/meta-oe/recipes-support/liboop/liboop_1.0.bb b/meta-oe/recipes-support/liboop/liboop_1.0.bb new file mode 100644 index 0000000000..82818c2424 --- /dev/null +++ b/meta-oe/recipes-support/liboop/liboop_1.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Liboop is a low-level event loop management library for POSIX-based operating systems" +HOMEPAGE = "http://liboop.org/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=8b54f38ccbd44feb80ab90e01af8b700" + +SRC_URI = "http://ftp.debian.org/debian/pool/main/libo/liboop/liboop_${PV}.orig.tar.gz \ + file://read_bugfixes.patch \ + file://explicit_linking.patch \ + file://tcl_dev.patch \ + file://new-readline-typedef.patch \ +" + +SRC_URI[md5sum] = "36cb971047d3af02369446f5e0b315a2" +SRC_URI[sha256sum] = "34d83c6e0f09ee15cb2bc3131e219747c3b612bb57cf7d25318ab90da9a2d97c" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[glib] = "--with-glib,--without-glib,glib-2.0 libpcre" +PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl" + +EXTRA_OECONF += "--without-adns -without-libwww" + +inherit autotools pkgconfig -- cgit 1.2.3-korg