From owner-svn-ports-all@FreeBSD.ORG Wed Jun 18 05:22:52 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A860A93; Wed, 18 Jun 2014 05:22:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 564872690; Wed, 18 Jun 2014 05:22:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5I5MqLt032950; Wed, 18 Jun 2014 05:22:52 GMT (envelope-from shurd@svn.freebsd.org) Received: (from shurd@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5I5Mo1T032935; Wed, 18 Jun 2014 05:22:50 GMT (envelope-from shurd@svn.freebsd.org) Message-Id: <201406180522.s5I5Mo1T032935@svn.freebsd.org> From: Stephen Hurd Date: Wed, 18 Jun 2014 05:22:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r358205 - in head/comms: . xnec2c xnec2c/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 05:22:52 -0000 Author: shurd Date: Wed Jun 18 05:22:50 2014 New Revision: 358205 URL: http://svnweb.freebsd.org/changeset/ports/358205 QAT: https://qat.redports.org/buildarchive/r358205/ Log: xnec2c is a GTK+ graphical interactive version of nec2c. It incorporates the nec2c core which it uses for reading input files and calculating output data, but it does not need and indeed does not produce an output file by default. Graphs of frequency-related data and the current or charge distribution evolve as the frequency loop progresses, and radiation patterns (far and near field) are sequentially drawn for each frequency step. PR: ports/190815 Submitted by: shurd@FreeBSD.org Approved by: db, skreuzer (mentors) Added: head/comms/xnec2c/ head/comms/xnec2c/Makefile (contents, props changed) head/comms/xnec2c/distinfo (contents, props changed) head/comms/xnec2c/files/ head/comms/xnec2c/files/cexp.c (contents, props changed) head/comms/xnec2c/files/cexp.h (contents, props changed) head/comms/xnec2c/files/clog.c (contents, props changed) head/comms/xnec2c/files/patch-src_common.h (contents, props changed) head/comms/xnec2c/files/patch-src_somnec.c (contents, props changed) head/comms/xnec2c/pkg-descr (contents, props changed) Modified: head/comms/Makefile Modified: head/comms/Makefile ============================================================================== --- head/comms/Makefile Wed Jun 18 03:50:31 2014 (r358204) +++ head/comms/Makefile Wed Jun 18 05:22:50 2014 (r358205) @@ -173,6 +173,7 @@ SUBDIR += xdx SUBDIR += xlog SUBDIR += xmorse + SUBDIR += xnec2c SUBDIR += xnecview SUBDIR += xwota SUBDIR += yagiuda Added: head/comms/xnec2c/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/Makefile Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,35 @@ +# Created by: shurd@FreeBSD.org +# $FreeBSD$ + +PORTNAME= xnec2c +PORTVERSION= 2.8 +CATEGORIES= comms hamradio +MASTER_SITES= http://www.qsl.net/5b4az/pkg/nec2/xnec2c/ \ + ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= shurd + +MAINTAINER= shurd@FreeBSD.org +COMMENT= Used to calculate antenna patterns useful to ham radio + +LICENSE= GPLv2 + +LIB_DEPENDS= libccm.so:${PORTSDIR}/math/ccmath + +GNU_CONFIGURE= yes +USES= tar:bzip2 pkgconfig gmake +USE_GNOME= gtk20 + +PLIST_FILES= bin/xnec2c + +.include + +post-extract: + ${CP} ${PATCHDIR}/clog.c ${WRKSRC}/src +.if ${OSVERSION} < 900000 + ${CP} ${PATCHDIR}/cexp.[ch] ${WRKSRC}/src +.else + ${TOUCH} ${WRKSRC}/src/cexp.c + ${TOUCH} ${WRKSRC}/src/cexp.h +.endif + +.include Added: head/comms/xnec2c/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/distinfo Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,2 @@ +SHA256 (xnec2c-2.8.tar.bz2) = 988d90cea329959d05a203e40110128c3ceee27c30693d0fd585e775db4dfdeb +SIZE (xnec2c-2.8.tar.bz2) = 919166 Added: head/comms/xnec2c/files/cexp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/files/cexp.c Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,46 @@ +/* $NetBSD: cexp.c,v 1.1 2007/08/20 16:01:34 drochner Exp $ */ + +/*- + * Copyright (c) 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software written by Stephen L. Moshier. + * It is redistributed by the NetBSD Foundation by permission of the author. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +double complex +cexp(double complex z) +{ + double complex w; + double r, x, y; + + x = creal(z); + y = cimag(z); + r = exp(x); + w = r * cos(y) + r * sin(y) * I; + return w; +} Added: head/comms/xnec2c/files/cexp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/files/cexp.h Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,9 @@ +#ifndef CEXP_H_ +#define CEXP_H_ + +#include +#include + +double complex cexp(double complex z); + +#endif Added: head/comms/xnec2c/files/clog.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/files/clog.c Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,46 @@ +/* $NetBSD: clog.c,v 1.1 2007/08/20 16:01:35 drochner Exp $ */ + +/*- + * Copyright (c) 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software written by Stephen L. Moshier. + * It is redistributed by the NetBSD Foundation by permission of the author. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +double complex +clog(double complex z) +{ + double complex w; + double p, rr; + + rr = cabs(z); + p = log(rr); + rr = atan2(cimag(z), creal(z)); + w = p + rr * I; + return w; +} Added: head/comms/xnec2c/files/patch-src_common.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/files/patch-src_common.h Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,10 @@ +--- src/common.h.orig 2014-06-08 17:50:43.000000000 -0700 ++++ src/common.h 2014-06-08 17:50:53.000000000 -0700 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include "cexp.h" + + /* commonly used complex constants */ + #define CPLX_00 (0.0+I*0.0) Added: head/comms/xnec2c/files/patch-src_somnec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/files/patch-src_somnec.c Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,12 @@ +--- src/somnec.c.orig 2013-12-01 23:01:31.000000000 -0800 ++++ src/somnec.c 2014-06-08 17:51:47.000000000 -0700 +@@ -38,6 +38,9 @@ + #include "somnec.h" + #include "shared.h" + ++#include "clog.c" ++#include "cexp.c" ++ + /* common /evlcom/ */ + static int jh; + static double ck2, ck2sq, tkmag, tsmag, ck1r, zph, rho; Added: head/comms/xnec2c/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/xnec2c/pkg-descr Wed Jun 18 05:22:50 2014 (r358205) @@ -0,0 +1,8 @@ +xnec2c is a GTK+ graphical interactive version of nec2c. It incorporates the +nec2c core which it uses for reading input files and calculating output data, +but it does not need and indeed does not produce an output file by default. +Graphs of frequency-related data and the current or charge distribution +evolve as the frequency loop progresses, and radiation patterns (far and +near field) are sequentially drawn for each frequency step. + +WWW: http://www.qsl.net/5b4az/