From tijl@ulyssis.org  Mon Nov 17 11:20:16 2003
Return-Path: <tijl@ulyssis.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 34A3C16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Nov 2003 11:20:16 -0800 (PST)
Received: from nibbel.kulnet.kuleuven.ac.be (nibbel.kulnet.kuleuven.ac.be [134.58.240.41])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3237D43F75
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Nov 2003 11:20:12 -0800 (PST)
	(envelope-from tijl@ulyssis.org)
Received: from localhost (localhost [127.0.0.1])
	by nibbel.kulnet.kuleuven.ac.be (Postfix) with ESMTP id C1A0B4B50D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Nov 2003 20:20:10 +0100 (CET)
Received: from octavianus.kulnet.kuleuven.ac.be (octavianus.kulnet.kuleuven.ac.be [134.58.240.71])
	by nibbel.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 44E464B503
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Nov 2003 20:20:10 +0100 (CET)
Received: from localhost (kalimero.kotnet.org [10.4.5.217])
	by octavianus.kulnet.kuleuven.ac.be (Postfix) with SMTP id 30B49AEA63
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Nov 2003 20:20:09 +0100 (CET)
Message-Id: <20031117202007.76cf23f6.tijl@ulyssis.org>
Date: Mon, 17 Nov 2003 20:20:07 +0100
From: Tijl Coosemans <tijl@ulyssis.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] comms/libticables: fix build on alpha and sparc64

>Number:         59378
>Category:       ports
>Synopsis:       [patch] comms/libticables: fix build on alpha and sparc64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    osa
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 17 11:30:15 PST 2003
>Closed-Date:    Tue Nov 18 03:46:59 PST 2003
>Last-Modified:  Tue Nov 18 03:46:59 PST 2003
>Originator:     Tijl Coosemans
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD kalimero.kotnet.org 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Nov 13 19:40:35 CET 2003 root@kalimero.kotnet.org:/usr/obj/usr/src/sys/TIJL i386

	
>Description:
The build process is currently broken on sparc64 and alpha systems because they don't implement i386_set_ioperm(2). The added patch should work arround the problem.
>How-To-Repeat:
	
>Fix:

	

--- libticables begins here ---
diff -Nru libticables.orig/files/patch-configure libticables/files/patch-configure
--- libticables.orig/files/patch-configure	Sun Nov  2 21:59:12 2003
+++ libticables/files/patch-configure	Mon Nov 17 19:55:05 2003
@@ -1,15 +1,16 @@
 --- configure.orig	Wed Aug 27 12:17:39 2003
-+++ configure	Mon Oct 13 10:21:17 2003
-@@ -6257,7 +6257,7 @@
++++ configure	Mon Nov 17 19:41:58 2003
+@@ -6257,7 +6257,8 @@
  
  # detect system type
  case "$host" in
 -#	alpha-*-*bsd*)         ARCH="-D__FBSD__" ;;
++	i386-*-*bsd*)        ARCH="-D__BSD__ -D__I386__" ;;
 +	*-*-*bsd*)           ARCH="-D__BSD__" ;;
  	alpha*-*-linux-*)      ARCH="-D__ALPHA__ -D__LINUX__" ;;
  	alpha*-*-*-*)          ARCH="-D__ALPHA__ -D__LINUX__" ;;
  	arm*-*-linux-*)        ARCH="-D__ARM__ -D__LINUX__" ;;
-@@ -6266,7 +6266,6 @@
+@@ -6266,7 +6267,6 @@
  	i[3456]86-*-hurd-*)  ARCH="-D__LINUX__" ;;
  	i[3456]86-*-mingw*)  ARCH="-D__WIN32__ -D__MINGW32__ -Os -s" ;;
  	i[3456]86-*-cygwin)  ARCH="-D__WIN32__ -D__CYGWIN__ -mno-cygwin" ;;
@@ -17,7 +18,7 @@
  	ia64-*-linux-*)        ARCH="-D__LINUX__" ;;
  	m68k-*-linux-*)        ARCH="-D__M68K__ -D__LINUX__" ;;
  	mips-*-linux-*)        ARCH="-D__MIPS__ -D__LINUX__" ;;
-@@ -24767,6 +24766,7 @@
+@@ -24767,6 +24767,7 @@
  
  
  
diff -Nru libticables.orig/files/patch-src-ioports.c libticables/files/patch-src-ioports.c
--- libticables.orig/files/patch-src-ioports.c	Thu Jan  1 01:00:00 1970
+++ libticables/files/patch-src-ioports.c	Mon Nov 17 19:55:05 2003
@@ -0,0 +1,29 @@
+--- src/ioports.c.orig	Mon Nov 17 19:15:57 2003
++++ src/ioports.c	Mon Nov 17 19:39:35 2003
+@@ -107,7 +107,7 @@
+ }
+ #endif /* 0 */ /* __MACOSX__ */
+ 
+-#if defined(__I386__) && defined(HAVE_ASM_IO_H) && defined(HAVE_SYS_PERM_H) || defined(__ALPHA__) || defined(__BSD__)
++#if defined(__I386__) && defined(HAVE_ASM_IO_H) && defined(HAVE_SYS_PERM_H) || defined(__ALPHA__) || (defined(__BSD__) && defined(__I386__))
+ static int linux_asm_read_io(unsigned int addr)
+ {
+   return inb(addr);
+@@ -208,7 +208,7 @@
+ {
+ #if defined(__I386__) && defined(HAVE_ASM_IO_H) && defined(HAVE_SYS_PERM_H) || defined(__ALPHA__) || defined(__BSD__) || defined(__MACOSX__)
+ 
+-#ifndef __MACOSX__
++#if !(defined(__MACOSX__) || (defined(__BSD__) && !defined(__I386__)))
+   if (method & IOM_ASM) {
+     io_rd = linux_asm_read_io;
+     io_wr = linux_asm_write_io;
+@@ -417,7 +417,7 @@
+ int io_close(unsigned long from, unsigned long num)
+ {
+ #if defined(__I386__) && defined(HAVE_ASM_IO_H) && defined(HAVE_SYS_PERM_H) || defined(__ALPHA__) || defined(__BSD__) || defined(__MACOSX__)
+-#ifndef __MACOSX__
++#if !(defined(__MACOSX__) || (defined(__BSD__) && !defined(__I386__)))
+   if (method & IOM_ASM)
+ #ifndef __BSD__
+     return (ioperm(from, num, 0) ? ERR_ROOT : 0);
--- libticables ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->osa 
Responsible-Changed-By: osa 
Responsible-Changed-When: Tue Nov 18 03:32:27 PST 2003 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59378 
State-Changed-From-To: open->closed 
State-Changed-By: osa 
State-Changed-When: Tue Nov 18 03:46:48 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59378 
>Unformatted:
