update to lcdproc-0.5.9 and patch to fix commons

This commit is contained in:
sthen 2021-02-20 01:14:03 +00:00
parent fe9964327d
commit ac4982f803
9 changed files with 122 additions and 182 deletions

View File

@ -1,36 +1,36 @@
# $OpenBSD: Makefile,v 1.20 2019/07/12 20:43:47 sthen Exp $
# $OpenBSD: Makefile,v 1.21 2021/02/20 01:14:03 sthen Exp $
COMMENT = interface to various LCD displays
DISTNAME = lcdproc-0.5.5
REVISION = 13
V = 0.5.9
DISTNAME = lcdproc-$V
CATEGORIES = comms devel
HOMEPAGE = http://www.lcdproc.org
# GPLv2
# GPLv2+
PERMIT_PACKAGE = Yes
LIB_DEPENDS = devel/libftdi \
devel/libhid
# XXX If we ever get an xmlto update, we could build some user docs
#BUILD_DEPENDS = textproc/xmlto
WANTLIB += c ftdi hid kvm curses pthread usb
LIB_DEPENDS = devel/libftdi1 \
devel/libhid \
graphics/png
WANTLIB += X11 c curses ftdi1 hid kvm pthread png usb-1.0 usb
USE_GMAKE = Yes
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=lcdproc/}
MASTER_SITES = https://github.com/lcdproc/lcdproc/releases/download/v$V/
CONFIGURE_STYLE = gnu
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include ${WITH_APM}" \
LDFLAGS="-L${LOCALBASE}/lib -pthread" \
ac_cv_port_have_lpt=no
# xosd driver is busted, working on it upstream
# http://lists.omnipotent.net/pipermail/lcdproc/2011-November/013871.html
CONFIGURE_ARGS = --enable-drivers=all,!xosd
CONFIGURE_ARGS = --enable-drivers=all,!icp_a106
# user docs; adds BDEP on xmlto, but currently has a validation failure
#INSTALL_TARGET = install install-html-userguide
EXAMPLE_DIR = ${PREFIX}/share/examples/lcdproc
post-install:
# our xmlto port version is too old
# cd ${WRKBUILD} && ${MAKE_PROGRAM} install-html-userguide
${INSTALL_DATA_DIR} ${EXAMPLE_DIR}
${SUBST_CMD} -c ${WRKBUILD}/LCDd.conf ${EXAMPLE_DIR}/LCDd.conf
${SUBST_CMD} -c ${WRKBUILD}/clients/lcdexec/lcdexec.conf \
@ -42,7 +42,6 @@ post-install:
rm ${PREFIX}/bin/lcdvc ${PREFIX}/man/man1/lcdvc.1
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mapm}
WITH_APM = -DWITH_APM
.endif

View File

@ -1,2 +1,2 @@
SHA256 (lcdproc-0.5.5.tar.gz) = sTa0fXv1haADM09DLYcwo2717RzVIAhLkZZn2CXkjUI=
SIZE (lcdproc-0.5.5.tar.gz) = 946206
SHA256 (lcdproc-0.5.9.tar.gz) = 1IqRVJbJb/d1s3fSIi3jFQrlFyv7hKbsn5zquWL5e4M=
SIZE (lcdproc-0.5.9.tar.gz) = 1091292

View File

@ -1,12 +1,11 @@
$OpenBSD: patch-LCDd_conf,v 1.1.1.1 2011/12/01 19:05:11 edd Exp $
$OpenBSD: patch-LCDd_conf,v 1.2 2021/02/20 01:14:03 sthen Exp $
OpenBSD path and there is no point in logging to stderr if we use daemon() to daemonise
(stderr will get closed).
OpenBSD path and there is no point in logging to stderr if we use
daemon() to daemonise (stderr will get closed).
Fix a typo.
--- LCDd.conf.orig Wed Nov 9 19:50:01 2011
+++ LCDd.conf Wed Nov 16 18:10:31 2011
Index: LCDd.conf
--- LCDd.conf.orig
+++ LCDd.conf
@@ -34,7 +34,7 @@
# the driver modules and will thus not be able to
# function properly.
@ -16,35 +15,12 @@ Fix a typo.
# Tells the server to load the given drivers. Multiple lines can be given.
# The name of the driver is case sensitive and determines the section
@@ -50,7 +50,7 @@ DriverPath=server/drivers/
# mdm166a, ms6931, mtc_s16209x, MtxOrb, mx5000, NoritakeVFD, picolcd,
# pyramid, sed1330, sed1520, serialPOS, serialVFD, shuttleVFD, sli,
# stv5730, svga, t6963, text, tyan, ula200, xosd
-Driver=curses
+Driver=<<<CHOOSE A DRIVER!>>>
@@ -68,7 +68,7 @@ Port=13666
# Tells the driver to bind to the given interface
Bind=127.0.0.1
@@ -62,11 +62,11 @@ Port=13666
#ReportLevel=3
# Should we report to syslog instead of stderr ? [default: no; legal: yes, no]
-#ReportToSyslog=yes
+ReportToSyslog=yes
# User to run as. LCDd will drop its root privileges, if any,
# and run as this user instead.
# User to run as. LCDd will drop its root privileges and run as this user
# instead. [default: nobody]
-User=nobody
+User=_lcdproc
# The server will stay in the foreground if set to true.
#Foreground=no
@@ -79,7 +79,7 @@ User=nobody
#GoodBye="Thanks for using"
#GoodBye=" LCDproc!"
-# Sets the default time in seconds to displays a screen.
+# Sets the default time in seconds to display a screen.
WaitTime=5
# If set to no, LCDd will start with screen rotation disabled. This has the
# The server will stay in the foreground if set to yes.
# [default: no, legal: yes, no]

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-clients_lcdexec_lcdexec_conf,v 1.1.1.1 2011/12/01 19:05:11 edd Exp $
$OpenBSD: patch-clients_lcdexec_lcdexec_conf,v 1.2 2021/02/20 01:14:03 sthen Exp $
OpenBSD path and there is no point in logging to stderr if we use daemon() to daemonise
(stderr will get closed).
OpenBSD path and there is no point in logging to stderr if we use
daemon() to daemonise (stderr will get closed).
--- clients/lcdexec/lcdexec.conf.orig Mon Dec 27 13:32:55 2010
+++ clients/lcdexec/lcdexec.conf Mon Nov 28 20:42:00 2011
Index: clients/lcdexec/lcdexec.conf
--- clients/lcdexec/lcdexec.conf.orig
+++ clients/lcdexec/lcdexec.conf
@@ -12,13 +12,13 @@ Port=13666
ReportLevel=2
@ -19,5 +20,5 @@ OpenBSD path and there is no point in logging to stderr if we use daemon() to da
-#PidFile=/var/run/lcdexec.pid
+PidFile=/var/lcdproc/lcdexec.pid
# shell to use for executing programsi
# shell to use for executing programs
# [default: $SHELL or /bin/sh; legal: any shell that understands: -c COMMAND]

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-clients_lcdproc_iface_c,v 1.1 2021/02/20 01:14:03 sthen Exp $
From 084126b03f29b33ab3e657c66e8c6a439f27f8e1 Mon Sep 17 00:00:00 2001
From: Harald Geyer <harald@ccbib.org>
Date: Mon, 10 Feb 2020 13:15:10 +0100
Subject: [PATCH] Fix compilation with GCC >= 10.x
Index: clients/lcdproc/iface.c
--- clients/lcdproc/iface.c.orig
+++ clients/lcdproc/iface.c
@@ -32,6 +32,7 @@
#define UNSET_INT -1
#define UNSET_STR "\01"
+IfaceInfo iface[MAX_INTERFACES];
static int iface_count = 0; /* number of interfaces */
static char unit_label[10] = "B"; /* default unit label is Bytes */

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-clients_lcdproc_iface_h,v 1.1 2021/02/20 01:14:03 sthen Exp $
From 084126b03f29b33ab3e657c66e8c6a439f27f8e1 Mon Sep 17 00:00:00 2001
From: Harald Geyer <harald@ccbib.org>
Date: Mon, 10 Feb 2020 13:15:10 +0100
Subject: [PATCH] Fix compilation with GCC >= 10.x
Index: clients/lcdproc/iface.h
--- clients/lcdproc/iface.h.orig
+++ clients/lcdproc/iface.h
@@ -18,7 +18,7 @@
/** max number of interfaces in multi-interface mode */
#define MAX_INTERFACES 3
-IfaceInfo iface[MAX_INTERFACES]; /* interface info */
+extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */
/** Update screen content */
int iface_screen(int rep, int display, int *flags_ptr);

View File

@ -1,76 +0,0 @@
$OpenBSD: patch-clients_lcdproc_machine_OpenBSD_c,v 1.3 2014/09/17 14:52:18 espie Exp $
The code distributed with LCDproc for querying the process table is out of date.
--- clients/lcdproc/machine_OpenBSD.c.orig Mon Dec 27 06:32:56 2010
+++ clients/lcdproc/machine_OpenBSD.c Wed Sep 17 08:49:43 2014
@@ -44,13 +44,14 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/sysctl.h>
-#include <sys/dkstat.h>
+#include <sys/sched.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <sys/time.h>
#include <sys/user.h>
-/* take care if $ARCH != i386! */
-#include <i386/apmvar.h>
+#ifdef WITH_APM
+#include <machine/apmvar.h>
+#endif
#include <kvm.h>
#include <errno.h>
@@ -61,7 +62,7 @@
static int pageshift;
#define pagetok(size) ((size) << pageshift)
-#define PROCSIZE(pp) ((pp).vm_tsize + (pp).vm_dsize + (pp).vm_ssize)
+#define PROCSIZE(pp) ((pp)->p_vm_tsize + (pp)->p_vm_dsize + (pp)->p_vm_ssize)
int machine_init(void)
@@ -88,6 +89,7 @@ int machine_close(void)
int machine_get_battstat(int *acstat, int *battflag, int *percent)
{
+#ifdef WITH_APM
int apmd;
struct apm_power_info api;
@@ -145,6 +147,11 @@ int machine_get_battstat(int *acstat, int *battflag, i
*percent = api.battery_life;
close(apmd);
+#else
+ *acstat = LCDP_AC_ON;
+ *battflag = LCDP_BATT_ABSENT;
+ *percent = 100;
+#endif
return(TRUE);
}
@@ -294,7 +301,7 @@ int machine_get_procs(LinkedList *procs)
return(FALSE);
}
- kprocs = kvm_getprocs(kvmd, KERN_PROC_ALL, 0, &nproc);
+ kprocs = kvm_getprocs(kvmd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc), &nproc);
if (kprocs == NULL)
{
perror("kvm_getprocs");
@@ -311,10 +318,10 @@ int machine_get_procs(LinkedList *procs)
kvm_close(kvmd);
return(FALSE);
}
- strncpy(p->name, kprocs->kp_proc.p_comm, 15);
+ strncpy(p->name, kprocs->p_comm, 15);
p->name[15] = '\0';
- p->totl = pagetok(PROCSIZE(kprocs->kp_eproc.e_vm));
- p->number = kprocs->kp_proc.p_pid;
+ p->totl = pagetok(PROCSIZE(kprocs));
+ p->number = kprocs->p_pid;
LL_Push(procs, (void *)p);
kprocs++;

View File

@ -1,8 +1,11 @@
$OpenBSD: patch-configure,v 1.1 2012/09/29 09:15:10 landry Exp $
$OpenBSD: patch-configure,v 1.2 2021/02/20 01:14:03 sthen Exp $
Fix packaging on hppa
--- configure.orig Sat Sep 29 02:32:55 2012
+++ configure Sat Sep 29 02:33:12 2012
@@ -6606,8 +6606,6 @@ _ACEOF
Index: configure
--- configure.orig
+++ configure
@@ -7025,8 +7025,6 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking module extension" >&5
$as_echo_n "checking module extension... " >&6; }
case $host in

View File

@ -1,6 +1,9 @@
@comment $OpenBSD: PLIST,v 1.6 2018/09/04 12:46:09 espie Exp $
@comment $OpenBSD: PLIST,v 1.7 2021/02/20 01:14:03 sthen Exp $
@newgroup _lcdproc:687
@newuser _lcdproc:687:687:daemon:LCDproc Daemon:/var/lcdproc:/sbin/nologin
@rcscript ${RCDIR}/lcdd
@rcscript ${RCDIR}/lcdexec
@rcscript ${RCDIR}/lcdproc
bin/fortune.pl
bin/iosock.pl
@bin bin/lcdexec
@ -10,42 +13,45 @@ bin/lcdmetar.pl
bin/tail.pl
bin/x11amp.pl
lib/lcdproc/
lib/lcdproc/CFontz.so
lib/lcdproc/CFontz633.so
lib/lcdproc/CFontzPacket.so
lib/lcdproc/CwLnx.so
lib/lcdproc/EyeboxOne.so
lib/lcdproc/IOWarrior.so
lib/lcdproc/MD8800.so
lib/lcdproc/MtxOrb.so
lib/lcdproc/NoritakeVFD.so
lib/lcdproc/SureElec.so
lib/lcdproc/bayrad.so
lib/lcdproc/curses.so
lib/lcdproc/ea65.so
lib/lcdproc/glk.so
lib/lcdproc/hd44780.so
lib/lcdproc/i2500vfd.so
lib/lcdproc/icp_a106.so
lib/lcdproc/imon.so
lib/lcdproc/imonlcd.so
lib/lcdproc/irtrans.so
lib/lcdproc/lb216.so
lib/lcdproc/lcdm001.so
lib/lcdproc/lcterm.so
lib/lcdproc/lis.so
lib/lcdproc/mdm166a.so
lib/lcdproc/ms6931.so
lib/lcdproc/mtc_s16209x.so
lib/lcdproc/picolcd.so
lib/lcdproc/pyramid.so
lib/lcdproc/serialPOS.so
lib/lcdproc/serialVFD.so
lib/lcdproc/shuttleVFD.so
lib/lcdproc/sli.so
lib/lcdproc/text.so
lib/lcdproc/tyan.so
lib/lcdproc/ula200.so
@so lib/lcdproc/CFontz.so
@so lib/lcdproc/CFontzPacket.so
@so lib/lcdproc/CwLnx.so
@so lib/lcdproc/EyeboxOne.so
@so lib/lcdproc/IOWarrior.so
@so lib/lcdproc/MD8800.so
@so lib/lcdproc/MtxOrb.so
@so lib/lcdproc/NoritakeVFD.so
@so lib/lcdproc/SureElec.so
@so lib/lcdproc/bayrad.so
@so lib/lcdproc/curses.so
@so lib/lcdproc/ea65.so
@so lib/lcdproc/futaba.so
@so lib/lcdproc/glcd.so
@so lib/lcdproc/glk.so
@so lib/lcdproc/hd44780.so
@so lib/lcdproc/i2500vfd.so
@so lib/lcdproc/imon.so
@so lib/lcdproc/imonlcd.so
@so lib/lcdproc/irtrans.so
@so lib/lcdproc/lb216.so
@so lib/lcdproc/lcdm001.so
@so lib/lcdproc/lcterm.so
@so lib/lcdproc/lis.so
@so lib/lcdproc/mdm166a.so
@so lib/lcdproc/ms6931.so
@so lib/lcdproc/mtc_s16209x.so
@so lib/lcdproc/picolcd.so
@so lib/lcdproc/pyramid.so
@so lib/lcdproc/rawserial.so
@so lib/lcdproc/serialPOS.so
@so lib/lcdproc/serialVFD.so
@so lib/lcdproc/shuttleVFD.so
@so lib/lcdproc/sli.so
@so lib/lcdproc/text.so
@so lib/lcdproc/tyan.so
@so lib/lcdproc/ula200.so
@so lib/lcdproc/vlsys_m428.so
@so lib/lcdproc/yard2LCD.so
@man man/man1/lcdexec.1
@man man/man1/lcdproc.1
@man man/man5/lcdproc-config.5
@ -63,9 +69,3 @@ share/examples/lcdproc/lcdproc.conf
@owner _lcdproc
@group _lcdproc
@sample /var/lcdproc/
@mode
@owner
@group
@rcscript ${RCDIR}/lcdd
@rcscript ${RCDIR}/lcdexec
@rcscript ${RCDIR}/lcdproc