From owner-freebsd-questions Mon Feb 5 14:19:38 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 72E6637B401 for ; Mon, 5 Feb 2001 14:19:14 -0800 (PST) Received: (qmail 26025 invoked by uid 100); 5 Feb 2001 22:19:13 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14975.9953.504941.518804@guru.mired.org> Date: Mon, 5 Feb 2001 16:19:13 -0600 (CST) To: "O. Hartmann" Cc: questions@freebsd.org Subject: Re: NCAR Graphics for FreeBSD 4.2-STABLE? In-Reply-To: <19569665@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG O. Hartmann types: > Dear Sirs, > I asked for that subject prior; I try to compile the newest 4.2.2-NCARG stuff > on a FreeBSD 4.2-STABLE SMP box, without success. It seems, that something > is unset and the creation of Makefiles terminates abnormaly. Actually, it's quoting in the shell scripts that breaks things. I'm not sure why it worked elsewhere, or why it fails on BSD, but that's it. Here's a patch file for the version I compiled on a 4.1.1-STABLE box. You need to patch the original sources. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. diff -ru /home/vendor/ncarg/common/src/libncarg_c/usleep.c ./common/src/libncarg_c/usleep.c --- /home/vendor/ncarg/common/src/libncarg_c/usleep.c Mon Nov 6 13:33:21 2000 +++ ./common/src/libncarg_c/usleep.c Tue Nov 7 10:49:31 2000 @@ -48,7 +48,7 @@ void USleep(usec) unsigned usec; { -#ifdef SUN +#if defined(SUN) || defined(BSD) (void) usleep(usec); #else struct timeval tv; diff -ru /home/vendor/ncarg/common/src/libncarg_c/yMakefile ./common/src/libncarg_c/yMakefile --- /home/vendor/ncarg/common/src/libncarg_c/yMakefile Mon Nov 6 13:33:21 2000 +++ ./common/src/libncarg_c/yMakefile Tue Nov 7 14:14:03 2000 @@ -31,7 +31,7 @@ EXFSRCS = gbytes.f sbytes.f EXOBJS = sbytes.o gbytes.o logic32.o -#elif defined(linux) +#elif defined(linux) || defined(BSD) EXCSRCS = bcopyswap.c gsbytes.c logic32.c EXOBJS = bcopyswap.o gsbytes.o logic32.o SHLIBSRCS = g77.c diff -ru /home/vendor/ncarg/config/ymake ./config/ymake --- /home/vendor/ncarg/config/ymake Mon Nov 6 13:33:17 2000 +++ ./config/ymake Tue Nov 7 10:44:48 2000 @@ -247,7 +247,7 @@ # configuration options permanently with the distribution. set hostname = "UnKnown" -set foo = `/bin/uname -s` +set foo = `uname -s` if (-e /bin/hostname) then if ("$foo" == "Linux") then @@ -273,7 +273,7 @@ echo "$0 : Unknown operating system" > /dev/tty exit 1 endif -set mach = `/bin/uname -m` +set mach = `uname -m` if ($status != 0) then echo "$0 : Unknown machine type" > /dev/tty exit 1 @@ -290,8 +290,13 @@ case Linux: set opsys = $foo breaksw +case FreeBSD: +case NetBSD: +case OpenBSD: + set opsys = BSD + breaksw default: - set foo = `/bin/uname -m` + set foo = `uname -m` if ($status != 0) exit 1 switch ("$foo") case CRAY* @@ -307,7 +312,7 @@ switch ("$opsys") case SunOS: - set foo = `/bin/uname -r` + set foo = `uname -r` if ($status != 0) exit 1 switch ("$foo") @@ -385,6 +390,25 @@ breaksw +case BSD: + set os = $opsys + + switch ("$mach") + case i*86: + case alpha: + set model = $mach + set arch = $mach + breaksw + default: + echo "$0 : Unknown machine type" > /dev/tty + exit 1 + endsw + + set sysincs = BSD + set vendor = IBM + + breaksw + case IRIX: case IRIX64: set os = $opsys @@ -585,6 +609,8 @@ set cpp = /usr/ccs/lib/cpp else if (-e /opt/ctl/bin/cpp) then set cpp = /opt/ctl/bin/cpp +else if (-e /usr/bin/cpp) then + set cpp = /usr/bin/cpp else set cpp = /lib/cpp endif @@ -595,6 +621,7 @@ case UNICOS: set cppopt = -N breaksw +case BSD: case Linux: set cppopt = -traditional breaksw diff -ru /home/vendor/ncarg/ncarg2d/src/bin/yMakefile ./ncarg2d/src/bin/yMakefile --- /home/vendor/ncarg/ncarg2d/src/bin/yMakefile Tue Nov 7 11:10:55 2000 +++ ./ncarg2d/src/bin/yMakefile Tue Nov 7 11:16:31 2000 @@ -4,5 +4,5 @@ #define IHaveSubdirs -SUBDIRS = scripts impltest ncargworld ncargsrcx findg psfltrs pre2ncgm \ +SUBDIRS = scripts impltest ncargworld findg psfltrs pre2ncgm \ psplit tdpackdemo ezmapdemo diff -ru /home/vendor/ncarg/ncarview/src/bin/idt/talkto.c ./ncarview/src/bin/idt/talkto.c --- /home/vendor/ncarg/ncarview/src/bin/idt/talkto.c Mon Nov 6 13:32:01 2000 +++ ./ncarview/src/bin/idt/talkto.c Tue Nov 7 14:47:29 2000 @@ -34,6 +34,10 @@ * This file handles all communication between idt and ictrans */ +#ifdef BSD +#undef _POSIX_SOURCE +#endif + #include #include #include diff -ru /home/vendor/ncarg/ncarview/src/bin/idt/yMakefile ./ncarview/src/bin/idt/yMakefile --- /home/vendor/ncarg/ncarview/src/bin/idt/yMakefile Mon Nov 6 13:32:01 2000 +++ ./ncarview/src/bin/idt/yMakefile Tue Nov 7 14:47:15 2000 @@ -16,6 +16,9 @@ EXTRA_LIBS = $(XMUATHENACLIENTLIBS) SYS_LIBS = -lm +#ifdef BSD +EXTRA_CLDFLAGS = -pthread +#endif #if defined(IRIX) && (MAJOR == 5) diff -ru /home/vendor/ncarg/ncarview/src/bin/rasview/yMakefile ./ncarview/src/bin/rasview/yMakefile --- /home/vendor/ncarg/ncarview/src/bin/rasview/yMakefile Mon Nov 6 13:32:01 2000 +++ ./ncarview/src/bin/rasview/yMakefile Tue Nov 7 13:56:35 2000 @@ -16,6 +16,9 @@ XLIBS = $(XTOOLLIB) $(XLIB) EXTRA_LIBS = $(XLIBS) $(NETCDFLIB) $(HDFLIB) SYS_LIBS = -lm +#ifdef BSD +EXTRA_CLDFLAGS = -pthread +#endif CProgram($(MYNAME),$(OBJS),$(DEPLIBS)) DependTarget($(SRCS)) diff -ru /home/vendor/ncarg/ncarview/src/lib/libictrans/yMakefile ./ncarview/src/lib/libictrans/yMakefile --- /home/vendor/ncarg/ncarview/src/lib/libictrans/yMakefile Mon Nov 6 13:32:02 2000 +++ ./ncarview/src/lib/libictrans/yMakefile Tue Nov 7 12:34:47 2000 @@ -20,7 +20,7 @@ GENERIC_OBJS = commands.o cmd_tab.o get_cmd.o \ glob.o spooler.o ictrans.o lex_stuff.o input.o -#if defined(linux) +#if defined(linux) || defined(BSD) LEX_OBJS = lex.yy_linux.o #else LEX_OBJS = lex.yy.o @@ -38,11 +38,11 @@ DependTarget($(SRCS)) CleanFilesTarget(lex.yy.c lex.yy.c.sed sedscript) -#if defined(linux) +#if defined(linux) || defined(BSD) lex.yy_linux.o: lex.yy_linux.c #else lex.yy.c: lex.l Makefile - @echo '1a\' > sedscript + @echo '1a\\' > sedscript @echo '#include "input.h"' >> sedscript @echo 's/yylex/my_yylex/g' >> sedscript @echo 's/getc/my_getc/g' >> sedscript To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message