From anarcat@anarcat.dyndns.org  Fri Apr  5 13:05:34 2002
Return-Path: <anarcat@anarcat.dyndns.org>
Received: from tomts5-srv.bellnexxia.net (tomts5.bellnexxia.net [209.226.175.25])
	by hub.freebsd.org (Postfix) with ESMTP id 5918137B41B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  5 Apr 2002 13:05:33 -0800 (PST)
Received: from khan.anarcat.dyndns.org ([65.94.191.9])
          by tomts5-srv.bellnexxia.net
          (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP
          id <20020405210527.KPYC10852.tomts5-srv.bellnexxia.net@khan.anarcat.dyndns.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 5 Apr 2002 16:05:27 -0500
Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4])
	by khan.anarcat.dyndns.org (Postfix) with SMTP
	id 7BA5018B9; Fri,  5 Apr 2002 16:05:24 -0500 (EST)
Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Fri, 5 Apr 2002 16:04:23 -0500
Message-Id: <20020405210524.7BA5018B9@khan.anarcat.dyndns.org>
Date: Fri, 5 Apr 2002 16:04:23 -0500
From: The Anarcat <anarcat@anarcat.dyndns.org>
Reply-To: The Anarcat <anarcat@anarcat.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: anarcat@anarcat.dyndns.org
Subject: tvision 0.8 port upgrade breaks libh
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36800
>Category:       ports
>Synopsis:       tvision 0.8 port upgrade breaks libh
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 05 13:10:01 PST 2002
>Closed-Date:    Sun May 26 20:06:24 PDT 2002
>Last-Modified:  Sun May 26 20:06:24 PDT 2002
>Originator:     The Anarcat
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Nada, Inc.
>Environment:
System: FreeBSD lenny.anarcat.dyndns.org 4.5-STABLE FreeBSD 4.5-STABLE #1: Wed Mar 27 12:55:29 EST 2002 anarcat@lenny.anarcat.dyndns.org:/usr/src/sys/compile/LENNY i386

tvision 0.8 and libh 0.2.1

>Description:

The devel/tvision 0.8 update change endianess handling by using a
header file called "myendian.h" in the tvision source.

For some reason, this file doesn't get installed with tvision. But not
only that, the system.h file from tvision tries to include it using
<myendian.h> which should be instead <tvision/myendian.h>.

The file is also misplaced in the distro.

The errors reported by the libh build look like this:

/usr/local/include/tvision/drawbuf.h:113: myendian.h: No such file or
directory

>How-To-Repeat:

cd /usr/ports/misc/libh && make

>Fix:

Workaround: use tvision 0.7

Fix:

Plan A: (see also plan B below)

1- these diffs go into files/

[files/patch::lib-system.h]

--- lib/system.h.orig	Fri Apr  5 15:25:19 2002
+++ lib/system.h	Fri Apr  5 15:25:33 2002
@@ -182,7 +182,7 @@
     uchar buttons;
 };
 
-#include <myendian.h>
+#include <tvision/myendian.h>
 
 /**
  * This structure stores information about a key.

2- 

[files/patch::lib/Makefile.am]

--- Makefile.am.orig	Fri Apr  5 15:26:19 2002
+++ Makefile.am	Fri Apr  5 15:26:42 2002
@@ -14,7 +14,7 @@
 
 pkginclude_HEADERS = \
 app.h buffers.h colorsel.h dialogs.h drawbuf.h editors.h \
-help.h helpbase.h menus.h msgbox.h objects.h outline.h resource.h \
+help.h helpbase.h menus.h msgbox.h myendian.h objects.h outline.h resource.h \
 stddlg.h system.h textview.h tkeys.h tobjstrm.h ttypes.h tv.h \
 tvconfig.h tvobjs.h util.h validate.h views.h
 
3- I think the .in file also needs patching:

[files/patch::lib-Makefile.in]

--- lib/Makefile.in.orig	Fri Apr  5 15:35:02 2002
+++ lib/Makefile.in	Fri Apr  5 15:35:17 2002
@@ -86,7 +86,7 @@
 
 pkginclude_HEADERS = \
 app.h buffers.h colorsel.h dialogs.h drawbuf.h editors.h \
-help.h helpbase.h menus.h msgbox.h objects.h outline.h resource.h \
+help.h helpbase.h menus.h msgbox.h myendian.h objects.h outline.h resource.h \
 stddlg.h system.h textview.h tkeys.h tobjstrm.h ttypes.h tv.h \
 tvconfig.h tvobjs.h util.h validate.h views.h
 

4-

[files/patch-lib::drawbuf.h]

--- lib/drawbuf.h.orig	Fri Apr  5 15:51:31 2002
+++ lib/drawbuf.h	Fri Apr  5 15:51:40 2002
@@ -110,7 +110,7 @@
     ushort data[maxViewWidth];
 };
 
-#include <myendian.h>
+#include <tvision/myendian.h>
 
 #if (BYTE_ORDER == LITTLE_ENDIAN)
 	#define loByte(w)    (((uchar *)&w)[0])

5- for some odd reason, the myendian.h file is not with the other
header files (lib/) but in ./ :

--- /usr/ports/deve/tvision/Makefile.orig	Fri Apr  5 15:43:41 2002
+++ /usr/ports/deve/tvision/Makefile	Fri Apr  5 15:42:00 2002
@@ -18,4 +18,7 @@
 CONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
 INSTALLS_SHLIB=	yes
 
+pre-patch:
+	mv ${WRKSRC}/myendian.h ${WRKSRC}/lib/myendian.h
+
 .include <bsd.port.mk>


6- finally, the pkg-list needs patching:

--- /usr/ports/devel/tvision/pkg-plist.orig	Fri Apr  5 15:37:53 2002
+++ /usr/ports/devel/tvision/pkg-plist	Fri Apr  5 15:38:06 2002
@@ -8,6 +8,7 @@
 include/tvision/helpbase.h
 include/tvision/menus.h
 include/tvision/msgbox.h
+include/tvision/myendian.h
 include/tvision/objects.h
 include/tvision/outline.h
 include/tvision/resource.h

Plan B: patch system.h to use the old way of doing things:

anarcat@lenny[~/src/ports/distfiles]% diff -u tvision-0.7/lib/system.h tvision-0.8/lib/system.h | grep -5 endian
      */
     uchar buttons;
 };
 
-#ifdef __FreeBSD__
-#include <machine/endian.h>
-#else
-#include <endian.h>
-#endif
+#include <tvision/myendian.h>
 
 /**
- * This structure stores informations about a key.
+ * This structure stores information about a key.
  * @see KeyDownEvent


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: petef 
State-Changed-When: Sun May 26 20:06:02 PDT 2002 
State-Changed-Why:  
Committed, thanks! 

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