summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc')
-rw-r--r--external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch33
-rw-r--r--external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0002-Include-limits.h-for-PATH_MAX-definition.patch41
-rw-r--r--external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0003-Fix-non-x86-platforms-on-musl.patch35
-rw-r--r--external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb105
4 files changed, 214 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch
new file mode 100644
index 00000000..f6a7956d
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch
@@ -0,0 +1,33 @@
+From a20feee4963bc38975fbaf44bbe85a31825f59db Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 6 Apr 2019 17:28:28 -0700
+Subject: [PATCH 1/3] Fix parallel build (fix port-internal make dependencies)
+ on many cores
+
+Upstream-Status: Submitted [https://github.com/lcdproc/lcdproc/pull/142]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ server/drivers/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/server/drivers/Makefile.am b/server/drivers/Makefile.am
+index e08f2b2d..4fd2e3f1 100644
+--- a/server/drivers/Makefile.am
++++ b/server/drivers/Makefile.am
+@@ -47,11 +47,11 @@ CwLnx_LDADD = libLCD.a libbignum.a
+ futaba_LDADD = @LIBUSB_LIBS@ @LIBUSB_1_0_LIBS@ libLCD.a
+ g15_LDADD = @LIBG15@
+ glcd_LDADD = libLCD.a @GLCD_DRIVERS@ @FT2_LIBS@ @LIBPNG_LIBS@ @LIBSERDISP@ @LIBUSB_LIBS@ @LIBX11_LIBS@
+-glcd_DEPENDENCIES = @GLCD_DRIVERS@ glcd-glcd-render.o
++glcd_DEPENDENCIES = @GLCD_DRIVERS@ glcd-glcd-render.o libLCD.a
+ glcdlib_LDADD = @LIBGLCD@
+ glk_LDADD = libbignum.a
+ hd44780_LDADD = libLCD.a @HD44780_DRIVERS@ @HD44780_I2C@ @LIBUSB_LIBS@ @LIBFTDI_LIBS@ @LIBUGPIO@ libbignum.a
+-hd44780_DEPENDENCIES = @HD44780_DRIVERS@ @HD44780_I2C@
++hd44780_DEPENDENCIES = @HD44780_DRIVERS@ @HD44780_I2C@ libLCD.a libbignum.a
+ i2500vfd_LDADD = @LIBFTDI_LIBS@
+ imon_LDADD = libLCD.a libbignum.a
+ imonlcd_LDADD = libLCD.a
+--
+2.24.1
+
diff --git a/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0002-Include-limits.h-for-PATH_MAX-definition.patch b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0002-Include-limits.h-for-PATH_MAX-definition.patch
new file mode 100644
index 00000000..eb866bf1
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0002-Include-limits.h-for-PATH_MAX-definition.patch
@@ -0,0 +1,41 @@
+From d447a05ee560ba5894d2ed4cd93d0475c2f3c08e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 17 Dec 2019 17:39:32 -0800
+Subject: [PATCH 2/3] Include <limits.h> for PATH_MAX definition
+
+musl libc exposes the missing include
+
+Upstream-Status: Submitted [https://github.com/lcdproc/lcdproc/pull/142]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ server/drivers/hidraw_lib.c | 1 +
+ server/drivers/linux_input.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/server/drivers/hidraw_lib.c b/server/drivers/hidraw_lib.c
+index 49b03f20..3b51f279 100644
+--- a/server/drivers/hidraw_lib.c
++++ b/server/drivers/hidraw_lib.c
+@@ -8,6 +8,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+diff --git a/server/drivers/linux_input.c b/server/drivers/linux_input.c
+index 5b914d4c..6fcfc591 100644
+--- a/server/drivers/linux_input.c
++++ b/server/drivers/linux_input.c
+@@ -5,6 +5,7 @@
+
+ #include <dirent.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--
+2.24.1
+
diff --git a/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0003-Fix-non-x86-platforms-on-musl.patch b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0003-Fix-non-x86-platforms-on-musl.patch
new file mode 100644
index 00000000..e39e9bda
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0003-Fix-non-x86-platforms-on-musl.patch
@@ -0,0 +1,35 @@
+From 7fd144f101fa5c9316d3468ed26f55629afe1305 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 17 Dec 2019 17:55:54 -0800
+Subject: [PATCH 3/3] Fix non x86 platforms on musl
+
+Musl only specifies in/outb for x86/x86. Use the fallback path in case
+musl is used.
+
+This should fail compilation during the linking stage but for some reason
+does not. Will do if -Werror=implicit-function-declaration is specified.
+
+Original here: https://github.com/openwrt/packages/blob/master/utils/lcdproc/patches/110-in-outb.patch
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ server/drivers/port.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/server/drivers/port.h b/server/drivers/port.h
+index c584cd4e..bde235b3 100644
+--- a/server/drivers/port.h
++++ b/server/drivers/port.h
+@@ -94,7 +94,7 @@ static inline int port_deny_multiple(unsigned short port, unsigned short count);
+ /* ---------------------------- Linux ------------------------------------ */
+ /* Use ioperm, inb and outb in <sys/io.h> (Linux) */
+ /* And iopl for higher addresses of PCI LPT cards */
+-#if defined HAVE_IOPERM
++#if defined(__GLIBC__) || (defined(__x86__) || defined(__x86_64__))
+
+ /* Glibc2 and Glibc1 */
+ # ifdef HAVE_SYS_IO_H
+--
+2.24.1
+
diff --git a/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb
new file mode 100644
index 00000000..275b984e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb
@@ -0,0 +1,105 @@
+DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \
+shipped with this package can be used to acquire various kinds of system stats."
+SUMMARY = "Drivers for character-based LCD displays"
+HOMEPAGE = "http://lcdproc.org"
+SECTION = "utils"
+LICENSE = "GPLv2+"
+DEPENDS = "ncurses lirc"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
+ file://README.md;beginline=107;md5=5db392f043253a2d64b1737068ce6b58"
+
+PV = "0.5.9+git${SRCPV}"
+SRCREV = "3a3d622d9bb74c44fa67bc20573751a207514134"
+SRC_URI = "git://github.com/lcdproc/lcdproc \
+ file://0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch \
+ file://0002-Include-limits.h-for-PATH_MAX-definition.patch \
+ file://0003-Fix-non-x86-platforms-on-musl.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig update-rc.d
+
+LCD_DRIVERS ?= "all,!irman,!svga${SERIALVFD}"
+SERIALVFD ?= ""
+SERIALVFD_libc-musl = ",!serialVFD"
+SERIALVFD_libc-musl_x86 = ""
+SERIALVFD_libc-musl_x86-64 = ""
+
+LCD_DEFAULT_DRIVER ?= "curses"
+
+PACKAGECONFIG ??= "usb"
+PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
+PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"
+PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render,"
+PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid"
+PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng"
+
+LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}"
+
+EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'"
+
+do_install () {
+ # binaries
+ install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
+ install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
+
+ # init scripts
+ install -d ${D}${sysconfdir}/init.d
+ # so far, not fixed :-( and now even uglier :-((
+ cat scripts/init-LCDd.debian | sed -e s'/--oknodo//' -e 's/ -s -f / -s 1 -f 1 /' -e 's/force-reload/force-restart/' -e 's/sleep 1/sleep 4/' > ${D}${sysconfdir}/init.d/lcdd
+ chmod 0755 ${D}${sysconfdir}/init.d/lcdd
+ install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
+ sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
+
+ # configuration files
+ install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf
+ sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
+ sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
+ install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
+
+ # driver library files
+ install -d ${D}${libdir}/lcdproc
+ for i in server/drivers/*.so; do
+ install -m 0644 $i ${D}${libdir}/lcdproc/
+ done
+ # binaries
+ install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc
+
+ # configuration files
+ install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf
+}
+
+PACKAGES =+ "lcdd lcdvc"
+
+RRECOMMENDS_${PN} = "lcdd"
+
+FILES_lcdd = "${sysconfdir}/LCDd.conf \
+ ${sbindir}/LCDd \
+ ${sysconfdir}/init.d/lcdd"
+
+CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
+CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
+CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf"
+FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc"
+
+# Driver packages
+
+# USB / no USB trickery
+
+RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
+RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
+
+INITSCRIPT_PACKAGES = "lcdd lcdproc"
+INITSCRIPT_NAME_lcdd = "lcdd"
+INITSCRIPT_NAME_lcdproc = "lcdproc"
+INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
+INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
+
+python populate_packages_prepend() {
+ plugindir = d.expand('${libdir}/lcdproc')
+ do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
+}
+
+PACKAGES_DYNAMIC += "^lcdd-driver-.*"