Subject: various patches for Linux (and maybe others)
To: None <tech-pkg@netbsd.org>
From: Roland Illig <roland.illig@gmx.de>
List: tech-pkg
Date: 07/03/2004 23:15:44
This is a multi-part message in MIME format.
--------------050107010107050606040206
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

after aonyther day of building packages, I have some patches:

* pkglocate should use "grep" and not "/usr/bin/grep". Linux doesn't 
have the latter. :(

* cu-prolog.patch makes cu-prolog build on Linux.

* devel-spiff.patch is analog for devel/spiff.

Enough for today. :)

Roland

--------------050107010107050606040206
Content-Type: text/plain;
 name="pkglocate.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pkglocate.patch"

--- pkglocate	31 May 2003 14:20:46 -0000	1.8
+++ pkglocate	3 Jul 2004 18:11:25 -0000
@@ -52,7 +52,7 @@
 
 case `pkg_info -e 'glimpse-*'` in
 glimpse-*)	grepname=agrep ;;
-*)		grepname=/usr/bin/grep ;;
+*)		grepname=grep; ;;
 esac
 
 approx=""

--------------050107010107050606040206
Content-Type: text/plain;
 name="cu-prolog.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="cu-prolog.patch"

diff -u -r1.2 patch-ab
--- patches/patch-ab	24 Feb 2001 15:45:52 -0000	1.2
+++ patches/patch-ab	3 Jul 2004 20:06:40 -0000
@@ -1,7 +1,7 @@
 $NetBSD: patch-ab,v 1.2 2001/02/24 15:45:52 jtb Exp $
 
---- include.h.orig	Fri Jan 27 07:38:48 1995
-+++ include.h
+--- include.h.orig	1995-01-27 08:38:48.000000000 +0100
++++ include.h	2004-07-03 21:54:12.000000000 +0200
 @@ -21,6 +21,7 @@
  
  #include <stdio.h>
@@ -22,11 +22,14 @@
  #define KANJI 1		/* 1: allow EUC Kanji for str functions */
  
  /* Tee print macro */
-@@ -135,8 +140,13 @@
+@@ -135,8 +140,16 @@
  #define head_of_list(Term) (((struct clause *)Term)->c_form)
  #define tail_of_list(Term) ((struct term *)((struct clause *)Term)->c_link)
  
-+#if (defined(BSD) && BSD >= 199306)
++#if defined(__linux__)
++#define is_readable(FP) (!(FP->_flags & _IO_NO_READS))
++#define is_writable(FP) (!(FP->_flags & _IO_NO_WRITES))
++#elif (defined(BSD) && BSD >= 199306)
 +#define is_readable(FP) (FP->_flags & __SRD)
 +#define is_writable(FP) (FP->_flags & __SWR)
 +#else

diff -u -r1.2 patch-ae
--- patches/patch-ae	24 Feb 2001 15:45:53 -0000	1.2
+++ patches/patch-ae	3 Jul 2004 20:06:40 -0000
@@ -1,7 +1,16 @@
 $NetBSD: patch-ae,v 1.2 2001/02/24 15:45:53 jtb Exp $
 
---- main.c.orig		Wed Jul  7 02:26:00 1999
-+++ main.c		Wed Jul  7 02:27:38 1999
+--- main.c.orig	1995-01-27 08:38:48.000000000 +0100
++++ main.c	2004-07-03 21:32:55.000000000 +0200
+@@ -33,7 +33,7 @@
+ 
+ struct itrace *newflist_save;
+ 
+-void main(argc,argv)
++int main(argc,argv)
+ int argc;
+ char *argv[];
+ {
 @@ -303,13 +303,16 @@
  
  void heap_realloc()		/* reallocate system/user heaps */

--------------050107010107050606040206
Content-Type: text/plain;
 name="devel-spiff.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="devel-spiff.patch"

Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/devel/spiff/patches/patch-ab,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-ab
--- patches/patch-ab	15 Oct 2001 10:12:08 -0000	1.1.1.1
+++ patches/patch-ab	3 Jul 2004 21:04:26 -0000
@@ -15,7 +15,7 @@
  /*
  **	lines needed to shut up lint
  */
-+#if !(defined(BSD) && BSD >= 199306)
++#if !(defined(BSD) && BSD >= 199306) && !defined(__linux__)
  extern char *sprintf();
  extern char *strcat();
  extern char *strncat();

--------------050107010107050606040206--