Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2007 23:59:10 +0200
From:      "Markus Dolze" <bsdfan@nurfuerspam.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/115843: [MAINTAINER] sysutils/lcdproc: Enable build on amd64
Message-ID:  <20070826222543.E9AC113C45B@mx1.freebsd.org>
Resent-Message-ID: <200708262230.l7QMU1YR077944@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         115843
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/lcdproc: Enable build on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 26 22:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Markus Dolze
>Release:        FreeBSD 6.2-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD rymelda.intra.mdolze.de 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #6: Tue Jul 10 16:56:47 CEST 2007
>Description:
Enable build on AMD64 architecure and fix compliation failure due to
missing APM interface.

Added file(s):
- files/patch-clients__lcdproc__machine_FreeBSD.c
- files/patch-configure.in

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- lcdproc-0.5.2_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/lcdproc.orig/Makefile /usr/ports/sysutils/lcdproc/Makefile
--- /usr/ports/sysutils/lcdproc.orig/Makefile	Sun Aug 26 23:16:18 2007
+++ /usr/ports/sysutils/lcdproc/Makefile	Sun Aug 26 23:34:45 2007
@@ -7,6 +7,7 @@
 
 PORTNAME=	lcdproc
 PORTVERSION=	0.5.2
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -14,7 +15,7 @@
 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 -ruN --exclude=CVS /usr/ports/sysutils/lcdproc.orig/files/patch-clients__lcdproc__machine_FreeBSD.c /usr/ports/sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c
--- /usr/ports/sysutils/lcdproc.orig/files/patch-clients__lcdproc__machine_FreeBSD.c	Thu Jan  1 01:00:00 1970
+++ /usr/ports/sysutils/lcdproc/files/patch-clients__lcdproc__machine_FreeBSD.c	Sun Aug 26 23:22:54 2007
@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/lcdproc.orig/files/patch-configure.in /usr/ports/sysutils/lcdproc/files/patch-configure.in
--- /usr/ports/sysutils/lcdproc.orig/files/patch-configure.in	Thu Jan  1 01:00:00 1970
+++ /usr/ports/sysutils/lcdproc/files/patch-configure.in	Sun Aug 26 23:22:54 2007
@@ -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
+ 
--- lcdproc-0.5.2_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070826222543.E9AC113C45B>