aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-07-14 05:13:26 +0800
committerpav <pav@FreeBSD.org>2005-07-14 05:13:26 +0800
commite71ae964e057b59b261678837e9c9c143c8d7034 (patch)
tree3c33332007af3d04da38c71d4e1942be0272ebc0 /comms
parent20d070fc714ee6d01d0f84ccbb81744e2ca39401 (diff)
downloadfreebsd-ports-gnome-e71ae964e057b59b261678837e9c9c143c8d7034.tar.gz
freebsd-ports-gnome-e71ae964e057b59b261678837e9c9c143c8d7034.tar.zst
freebsd-ports-gnome-e71ae964e057b59b261678837e9c9c143c8d7034.zip
nec2c is a translation of the NEC2 FORTRAN source code to the C language.
The translation was performed mostly "by hand" and a lot of modifications to the original program were introduced in order to modernize the NEC2 and to remove as many built-in limitations as possible. The attendant SOMNEC program was also translated to C and incorporated in nec2c as a function so that Sommerfeld ground solutions are a part of the program. PR: ports/83392 Submitted by: Diane Bruce <db@db.net>
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/nec2c/Makefile46
-rw-r--r--comms/nec2c/distinfo2
-rw-r--r--comms/nec2c/files/carg.c20
-rw-r--r--comms/nec2c/files/patch-Makefile18
-rw-r--r--comms/nec2c/pkg-descr24
-rw-r--r--comms/nec2c/pkg-plist108
7 files changed, 219 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 3f8a1280b370..57dbc70b1a30 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -61,6 +61,7 @@
SUBDIR += mwavem
SUBDIR += nasawash
SUBDIR += ncid
+ SUBDIR += nec2c
SUBDIR += nokryptia
SUBDIR += obexapp
SUBDIR += openobex
diff --git a/comms/nec2c/Makefile b/comms/nec2c/Makefile
new file mode 100644
index 000000000000..58f451cc4315
--- /dev/null
+++ b/comms/nec2c/Makefile
@@ -0,0 +1,46 @@
+# ports collection makefile for: splat
+# Date created: 8 July 2005
+# Whom: db
+#
+# $FreeBSD$
+
+PORTNAME= nec2c
+PORTVERSION= .9
+CATEGORIES= comms
+MASTER_SITES= http://www.si-list.org/NEC_Archives/
+DISTNAME= nec2c
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER= db@db.net
+COMMENT= Used to calculate antenna patterns useful to ham radio
+
+#
+# both libccm and files/carg.c can "go away" once libc is filled in
+# with missing posix complex functions.
+#
+LIB_DEPENDS= ccm:${PORTSDIR}/math/ccmath
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= "does not build (gcc does not understand complex numbers)"
+.endif
+
+post-patch:
+ ${CP} ${FILESDIR}/carg.c ${WRKSRC}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/nec2c ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Input/*.nec ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Input/*.NEC ${EXAMPLESDIR}
+ @${ECHO} ""
+ @${ECHO} "nec2c docs installed in ${DOCSDIR}"
+ @${ECHO} "nec2c sample Input files installed in ${EXAMPLESDIR}"
+ @${ECHO} ""
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/comms/nec2c/distinfo b/comms/nec2c/distinfo
new file mode 100644
index 000000000000..45cd55b5992b
--- /dev/null
+++ b/comms/nec2c/distinfo
@@ -0,0 +1,2 @@
+MD5 (nec2c/nec2c.tar.gz) = 70aa63ee006b1a179d0a08c7b0dece0b
+SIZE (nec2c/nec2c.tar.gz) = 180034
diff --git a/comms/nec2c/files/carg.c b/comms/nec2c/files/carg.c
new file mode 100644
index 000000000000..0e021032c0dd
--- /dev/null
+++ b/comms/nec2c/files/carg.c
@@ -0,0 +1,20 @@
+/* carg.f -- translated by f2c (version 20000817).
+*/
+#include <math.h>
+#include <complex.h>
+
+double carg(complex z__)
+{
+ /* System generated locals */
+ double ret_val;
+
+/* april 1977 version. w. fullerton, c3, los alamos scientific lab. */
+
+ ret_val = (float)0.;
+ if (creal(z__) != (float)0. || cimag(z__) != (float)0.) {
+ ret_val = atan2(cimag(z__), creal(z__));
+ }
+
+ return ret_val;
+} /* carg */
+
diff --git a/comms/nec2c/files/patch-Makefile b/comms/nec2c/files/patch-Makefile
new file mode 100644
index 000000000000..205033af3e6f
--- /dev/null
+++ b/comms/nec2c/files/patch-Makefile
@@ -0,0 +1,18 @@
+--- Makefile.orig Tue Jan 27 14:53:38 2004
++++ Makefile Sat Jul 9 00:19:39 2005
+@@ -1,12 +1,11 @@
+ #Makefile for nec2c 21 Aug 2003
+
+-SHELL = /bin/sh
+-CC = gcc -Wall -O3 -g
++all: nec2c
+
+-objects = nec2c.o misc.o somnec.o
++objects = nec2c.o misc.o somnec.o carg.o
+
+ nec2c : $(objects)
+- $(CC) -lm -lefence -o nec2c $(objects)
++ $(CC) -lm -o nec2c $(objects) -L${PREFIX}/lib -lccm
+
+ $(objects) : nec2c.h
+
diff --git a/comms/nec2c/pkg-descr b/comms/nec2c/pkg-descr
new file mode 100644
index 000000000000..0643019ab44d
--- /dev/null
+++ b/comms/nec2c/pkg-descr
@@ -0,0 +1,24 @@
+nec2c is a translation of the NEC2 FORTRAN source code to the C language.
+The translation was performed mostly "by hand" and a lot of modifications
+to the original program were introduced in order to modernize the NEC2
+and to remove as many built-in limitations as possible. The attendant
+SOMNEC program was also translated to C and incorporated in nec2c as a
+function so that Sommerfeld ground solutions are a part of the program.
+
+Originally Written by:
+
+Numerical Electromagnetics Code (NEC2) developed at Lawrence
+Livermore lab., Livermore, CA. (contact G. Burke at 415-422-8414
+for problems with the NEC code. For problems with the vax implem-
+entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+422-5936)
+file created 4/11/80.
+
+Translation by:
+
+Neoklis Kyriazis 5B4AZ Limassol, Cyprus, neoklisk@cytanet.com.cy
+
+WWW: http://www.si-list.org/swindex2.html#nec2c
+
+- Diane Bruce, VA3DB
+db@db.net
diff --git a/comms/nec2c/pkg-plist b/comms/nec2c/pkg-plist
new file mode 100644
index 000000000000..0eb21cf450ec
--- /dev/null
+++ b/comms/nec2c/pkg-plist
@@ -0,0 +1,108 @@
+bin/nec2c
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%EXAMPLESDIR%%/10RA432.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/19el_432_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/20RA432.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/20RA_X4.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/3E_.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/9EL_GRA.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX2b_gr.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX2b_mast.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX2b_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX2bm_gr.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX_gra.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elX_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elXb_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elXb_tonnaf.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9el_p_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9el_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9el_tonnaf.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/9elv_tonna.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/BSZ09.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/BSZ10.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/CAR.NEC
+%%PORTDOCS%%%%EXAMPLESDIR%%/DIP2_7T.NEC
+%%PORT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+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_2el_24b18.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_2el_28_0.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_2el_28_1.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_2el_28_1t.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_2el_28_f.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_4el_20.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/dl_4el_20f.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/firstrhombic.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/i5tdjiiif.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/log_periodic.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/logperA9.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/quad17m_1.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/quad17m_2.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/rombica_t.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg2_5el_50.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg2_5el_50t.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_16el_220.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_16el_220M_1.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_16el_220M_2.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_2el_24.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_4el_20.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_4el_20f.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_4el_20g.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_5el_50.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_5el_50_opt.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_5el_50p_opt.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_5el_50t.nec
+%%PORTDOCS%%%%EXAMPLESDIR%%/yg_9el_144.nec
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%