aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/lcdproc
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2007-09-02 21:30:22 +0800
committerarved <arved@FreeBSD.org>2007-09-02 21:30:22 +0800
commitd10962f1e31d54c8e84a2c07ee802701ae66ffb8 (patch)
tree28132db48efc2bdf6befab2ab09e52f90a1f9d52 /sysutils/lcdproc
parentb8ca0d8c20b79161e0f1074cd0be5b95325376a7 (diff)
downloadfreebsd-ports-gnome-d10962f1e31d54c8e84a2c07ee802701ae66ffb8.tar.gz
freebsd-ports-gnome-d10962f1e31d54c8e84a2c07ee802701ae66ffb8.tar.zst
freebsd-ports-gnome-d10962f1e31d54c8e84a2c07ee802701ae66ffb8.zip
Fix compilation on AMD64 due to missing APM interface
PR: 115843 Submitted by: "Markus Dolze" <bsdfan@nurfuerspam.de>
Diffstat (limited to 'sysutils/lcdproc')
-rw-r--r--sysutils/lcdproc/Makefile2
-rw-r--r--sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c62
-rw-r--r--sysutils/lcdproc/files/patch-configure.in11
3 files changed, 74 insertions, 1 deletions
diff --git a/sysutils/lcdproc/Makefile b/sysutils/lcdproc/Makefile
index ac12f3bab51e..c427a9d0816d 100644
--- a/sysutils/lcdproc/Makefile
+++ b/sysutils/lcdproc/Makefile
@@ -14,7 +14,7 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= bsdfan@nurfuerspam.de
COMMENT= A client/server suite for LCD devices
-ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS= i386 amd64
USE_AUTOTOOLS= autoconf:259 automake:19 aclocal:19
USE_GCC= 3.2+
diff --git a/sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c b/sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c
new file mode 100644
index 000000000000..967a4eab4fa3
--- /dev/null
+++ b/sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c
@@ -0,0 +1,62 @@
+--- ./clients/lcdproc/machine_FreeBSD.c.orig Sat Apr 14 16:38:15 2007
++++ ./clients/lcdproc/machine_FreeBSD.c Sun Aug 26 23:21:56 2007
+@@ -45,16 +45,22 @@
+ #include <sys/mount.h>
+ #include <sys/time.h>
+ #include <sys/user.h>
+-#include <machine/apm_bios.h>
+ #include <kvm.h>
+ #include <errno.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <net/if_mib.h>
+
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#ifdef HAVE_MACHINE_APM_BIOS_H
++# include <machine/apm_bios.h>
++#endif
++
+ #include "main.h"
+ #include "machine.h"
+-#include "config.h"
+ #include "shared/LL.h"
+
+ static int pageshift;
+@@ -86,13 +92,14 @@
+
+ int machine_get_battstat(int *acstat, int *battflag, int *percent)
+ {
+- int apmd;
+- struct apm_info aip;
+-
+ *acstat = LCDP_AC_ON;
+ *battflag = LCDP_BATT_ABSENT;
+ *percent = 100;
+
++#ifdef HAVE_MACHINE_APM_BIOS_H
++ int apmd;
++ struct apm_info aip;
++
+ if ((apmd = open("/dev/apm", O_RDONLY)) == -1)
+ {
+ perror("get_battstat_open");
+@@ -142,6 +149,7 @@
+ *percent = -1;
+
+ close(apmd);
++#endif
+
+ return(TRUE);
+ }
+@@ -197,7 +205,7 @@
+ static load_type last_load = { 0, 0, 0, 0, 0 };
+ static load_type last_ret_load;
+ load_type load;
+- u_int32_t cp_time[CPUSTATES];
++ long cp_time[CPUSTATES];
+ size_t size;
+
+ size = sizeof(cp_time);
diff --git a/sysutils/lcdproc/files/patch-configure.in b/sysutils/lcdproc/files/patch-configure.in
new file mode 100644
index 000000000000..5ad4dc7eca37
--- /dev/null
+++ b/sysutils/lcdproc/files/patch-configure.in
@@ -0,0 +1,11 @@
+--- ./configure.in.orig Fri Apr 27 11:42:45 2007
++++ ./configure.in Sun Aug 26 23:21:56 2007
+@@ -107,7 +107,7 @@
+ ])
+
+ dnl NetBSD, OpenBSD and FreeBSD
+-AC_CHECK_HEADERS(sched.h sys/sched.h machine/cpufunc.h sys/types.h machine/pio.h machine/sysarch.h sys/cpuvar.h)
++AC_CHECK_HEADERS(sched.h sys/sched.h machine/cpufunc.h sys/types.h machine/pio.h machine/sysarch.h sys/cpuvar.h machine/apm_bios.h)
+ ETR_SYSV_IPC
+ ETR_UNION_SEMUN
+