Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2003 20:08:26 -0500 (EST)
From:      David Magda <dmagda+fbugs@magda.ca>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/47380: xcircuit port has old version
Message-ID:  <200301230108.h0N18QWw017544@number6.magda.ca>

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

>Number:         47380
>Category:       ports
>Synopsis:       xcircuit port has old version
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 17:10:09 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     David Magda
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
We're organized?
>Environment:
System: FreeBSD number6.magda.ca 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Dec 27 10:36:12 EST 2002 dave@number6.magda.ca:/usr/obj/usr/src/sys/MYKERNELE i386

>Description:

The current available version of xcircuit is 2.5.3, the version
in the Ports tree is 2.3.3. This PR should help part way in
bringing it up to date.

There are some compiler errors that I can't manage to solve
when updating to the new version.

>How-To-Repeat:

make install

>Fix:

Appended to the end of this PR are the new versions of 
patch-aa and patch-ab that should be used. 

patch-aa is functionally the same, but for some reason it didn't 
like applying so I generated a new one. 

patch-ab is similiar to the original, but two things have 
been changed:
 * the line containing 
	#include <machine/floatingpoint.h>
   was changed to
	#include <ieeefp.h>
   as <ieeefp.h> includes <machine...>, and the fpsetmask(3)
   man page specifices that <ieeefp.h> should be used;
 * the following conditionalized definition was added:
	#define TEMP_DIR "/tmp"
   as the compiler complained about an undefined variable
   otherwise.

When these patches are applied, a 'make build' dies with the
following output:
[...]
xcircuit.c: In function `main':
xcircuit.c:2039: syntax error before `char'
xcircuit.c:2205: syntax error before `RESOURCES_DIR'
xcircuit.c:2215: `argfb' undeclared (first use in this function)
xcircuit.c:2215: (Each undeclared identifier is reported only once
xcircuit.c:2215: for each function it appears in.)
*** Error code 1

The code around line 2039 is:

[...]
   char         *argv0;         /* find root of argv[0] */
   short initargc = argc;       /* because XtInitialize() absorbs the     */
                                /* -schem flag and renumbers argc! (bug?) */
#ifdef __FreeBSD__
   fpsetmask(0);
#endif
   char *argfb[] = {                    /* Fallback resources */
        "xcircuit*foreground : brown4", /* These are the values that    */
        "xcircuit*background : beige",  /* not or cannot be explicitly  */
        "xcircuit.foreground : black",  /* initialized by               */
        "xcircuit.background : white",  /* XtGetApplicationResources()  */
        "xcircuit*borderWidth : 2",     /* below.                       */
        "xcircuit*borderColor : Red",
        NULL                            /* Sentinel */
   };
[..]

If that __FreeBSD__ #ifdef is commented errors magically go away,
and a 'make build' results in:
[...]
xcircuit.c: In function `main':
xcircuit.c:2205: syntax error before `RESOURCES_DIR'
*** Error code 1

The code around this area is:
[...]
#ifdef HAVE_PUTENV
   if (getenv("XAPPLRESDIR") == NULL)
      putenv("XAPPLRESDIR=" RESOURCES_DIR);
#else
   setenv("XAPPLRESDIR", RESOURCES_DIR, 0);
#endif
[...]

I have no idea how to fix this.

The new patch-aa:

--- Imakefile	Wed Jan 22 19:27:50 2003
+++ Imakefile.new	Wed Jan 22 19:17:24 2003
@@ -28,23 +28,24 @@
 #CCOPTIONS = -O2
 #
 # for debugging purposes uncomment the following line:
-CDEBUGFLAGS = -g
-STD_INCLUDES = -I. -I/usr/X11R6/include/X11
+#CDEBUGFLAGS = -g
+STD_INCLUDES = -I. -I$(INCDIR)/X11
+EXTRA_DEFINES = -DHAVE_DIRENT_H -DHAVE_PUTENV
 
 # The "m4" macro processor is used to generate the man page such that
 # the man page reflects the configured options.
-M4 = m4
+M4 = gm4
 
 #------------------------------------------------------------------------
 # Installation directories:
 # Change the following as desired to suit your environment:
 #------------------------------------------------------------------------
 #
-PREFIX = /usr/local
+# PREFIX = /usr/local
 # XCIRCUIT_LIB_DIR = $(PREFIX)/src/xcircuit-2.5.2/lib
-XCIRCUIT_LIB_DIR = $(PREFIX)/lib/xcircuit-2.5
-XCIRCUIT_BIN_DIR = $(PREFIX)/bin
-XCIRCUIT_MAN_DIR = $(PREFIX)/man/man1
+XCIRCUIT_LIB_DIR = $(LIBDIR)/xcircuit
+XCIRCUIT_BIN_DIR = $(BINDIR)
+XCIRCUIT_MAN_DIR = $(MANDIR)
 XAPPLRESDIR = ${XCIRCUIT_LIB_DIR}/app-defaults
 
 #------------------------------------------------------------------------
@@ -63,7 +64,7 @@
 # Support for background rendering through ghostscript.  Change this
 # to the path where gs can be found.
 # GS_EXEC= /usr/local/src/gs5.50/obj/gs
-GS_EXEC= /usr/bin/gs
+GS_EXEC=${LOCALBASE}/bin/gs
 
 #------------------------------------------------------------------------
 # Window manager bug workaround---If you don't like xcircuit grabbing kbd
@@ -91,7 +92,7 @@
 # Support for embedded Python interpreter
 # (requires libpython${PYTHON_VERSION}.a)
 #
-#define HAVE_PYTHON
+/* #define HAVE_PYTHON */
 
 PYTHON_VERSION=2.1
 PYTHON_LIB_DIR=/usr/local/lib

The new patch-ab:

--- xcircuit.c	Wed Jan 22 19:47:23 2003
+++ xcircuit.c.new	Wed Jan 22 19:46:36 2003
@@ -32,7 +32,7 @@
 #if defined(DARWIN)
 #include <sys/malloc.h>
 #else
-#include <malloc.h>
+#include <stdlib.h>
 #endif
 #include <signal.h>
 #include <sys/types.h>
@@ -41,6 +41,9 @@
 #include <limits.h>
 #include <locale.h>
 #include <unistd.h>   /* for unlink() */
+#ifdef __FreeBSD__
+#include <machine/floatingpoint.h>
+#endif
 
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
@@ -62,6 +65,10 @@
 #include "Xw/TextEdit.h"
 #include "Xw/Toggle.h"
 
+#ifndef TEMP_DIR
+#define TEMP_DIR "/tmp"
+#endif
+
 #ifndef P_tmpdir
 #define P_tmpdir TMPDIR
 #endif
@@ -2024,6 +2031,10 @@
    char		*argv0;		/* find root of argv[0] */
    short initargc = argc;	/* because XtInitialize() absorbs the     */
    				/* -schem flag and renumbers argc! (bug?) */
+
+#ifdef __FreeBSD__
+   fpsetmask(0);
+#endif
 
    char *argfb[] = {			/* Fallback resources */
 	"xcircuit*foreground : brown4", /* These are the values that 	*/
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




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