Date: Mon, 5 Feb 2001 16:19:13 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: "O. Hartmann" <ohartman@ipamzlx.physik.uni-mainz.de> Cc: questions@freebsd.org Subject: Re: NCAR Graphics for FreeBSD 4.2-STABLE? Message-ID: <14975.9953.504941.518804@guru.mired.org> In-Reply-To: <19569665@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
O. Hartmann <ohartman@ipamzlx.physik.uni-mainz.de> 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. <mike -- Mike Meyer <mwm@mired.org> 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 <stdlib.h> #include <stdio.h> #include <signal.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14975.9953.504941.518804>