diff options
author | db <db@FreeBSD.org> | 2014-10-08 06:30:36 +0800 |
---|---|---|
committer | db <db@FreeBSD.org> | 2014-10-08 06:30:36 +0800 |
commit | 99fc55a355b2894b864b145190a72796d6020438 (patch) | |
tree | 51c6893380c0a6b2e57f141121e05ed9d05f448e /comms/wspr | |
parent | f57ec642a8955c27aebdcf1128eeb48246bfdd3a (diff) | |
download | freebsd-ports-gnome-99fc55a355b2894b864b145190a72796d6020438.tar.gz freebsd-ports-gnome-99fc55a355b2894b864b145190a72796d6020438.tar.zst freebsd-ports-gnome-99fc55a355b2894b864b145190a72796d6020438.zip |
- update to the version 4 branch
- add LICENSE
Diffstat (limited to 'comms/wspr')
-rw-r--r-- | comms/wspr/Makefile | 54 | ||||
-rw-r--r-- | comms/wspr/Makefile.svn_rev | 2 | ||||
-rw-r--r-- | comms/wspr/distinfo | 4 | ||||
-rw-r--r-- | comms/wspr/files/patch-Makefile.in | 177 | ||||
-rw-r--r-- | comms/wspr/files/patch-configure.ac | 242 | ||||
-rw-r--r-- | comms/wspr/files/wspr | 11 | ||||
-rw-r--r-- | comms/wspr/files/wspr.sh.in | 60 | ||||
-rw-r--r-- | comms/wspr/pkg-plist | 76 |
8 files changed, 494 insertions, 132 deletions
diff --git a/comms/wspr/Makefile b/comms/wspr/Makefile index 30f5ded7318c..96da4ef865fc 100644 --- a/comms/wspr/Makefile +++ b/comms/wspr/Makefile @@ -1,9 +1,7 @@ -# Created by: Diane Bruce <db@db.net> # $FreeBSD$ PORTNAME= wspr DISTVERSION= ${VERSION}.r${SVN_REV} -PORTREVISION= 9 CATEGORIES= comms hamradio MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= db @@ -12,47 +10,35 @@ DISTNAME= wspr-r${SVN_REV} MAINTAINER= hamradio@FreeBSD.org COMMENT= Weak signal for HF ham radio communication package -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter \ - ${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow +LICENSE= GPLv3 + +BUILD_DEPENDS= ${PYNUMPY} +RUN_DEPENDS= ${PYTHON_LIBDIR}/tkinter:${PORTSDIR}/x11-toolkits/py-tkinter \ + ${PYTHON_SITELIBDIR}/PIL:${PORTSDIR}/graphics/py-pillow \ + ${PYTHON_SITELIBDIR}/scipy:${PORTSDIR}/science/py-scipy \ + ${LOCALBASE}/lib/portaudio2/libportaudio.so:${PORTSDIR}/audio/portaudio2 LIB_DEPENDS= libhamlib.so:${PORTSDIR}/comms/hamlib \ libfftw3f.so:${PORTSDIR}/math/fftw3-float \ libsamplerate.so:${PORTSDIR}/audio/libsamplerate -BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/scipy:${PORTSDIR}/science/py-scipy \ - ${LOCALBASE}/lib/portaudio2/libportaudio.so:${PORTSDIR}/audio/portaudio2 \ - ${PYNUMPY} -USES= fortran gmake libtool python tar:bzip2 -ALL_TARGET= build +DISABLE_MAKE_JOBS= yes +USE_AUTOTOOLS= autoconf +USES= fortran gmake libtool tar:bzip2 python:3.3 GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-gfortran --prefix=${STAGEDIR}${LOCALBASE} \ - --with-portaudio-include-dir=${LOCALBASE}/include/portaudio2 \ - --with-portaudio-lib-dir=${LOCALBASE}/lib/portaudio2 -CFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ARGS= --with-gfortran=${FC} \ + --with-f2py=f2py-${PYTHON_VER} \ + --with-python3=${PYTHON_CMD} MAKE_ENV+= PYTHONUSERBASE=${STAGEDIR}${PYTHONBASE} -PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \ - VERSION=${VERSION} -VERSION= 3.00 - -OPTIONS_DEFINE= DOCS +VERSION= 4.00 .include <bsd.port.pre.mk> -post-configure: - @${REINPLACE_CMD} -e 's|%%DESTDIR%%|${STAGEDIR}|' ${WRKSRC}/Makefile - @cp ${FILESDIR}/wspr ${WRKSRC} +pre-configure: + @${CP} ${FILESDIR}/wspr.sh.in ${WRKSRC} -post-build: - (cd ${STAGEDIR}${PREFIX} \ - && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ - -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}) - ${MKDIR} ${STAGEDIR}${DOCSDIR} -.for d in ${WRKSRC}/LICENSE.TXT ${WRKSRC}/WSPR_Announcement.TXT \ - ${WRKSRC}/WSPR0_Instructions.TXT ${WRKSRC}/WSPR_Quick_Start.TXT \ - ${WRKSRC}/supported_rigs.txt - ${INSTALL_DATA} ${WRKSRC}/${d} ${STAGEDIR}${DOCSDIR} -.endfor +post-install: .if defined(BOOTSTRAP) -SVN_REV!= svn info http://svn.code.sf.net/p/wsjt/code/branches/wspr | ${GREP} Revision | cut -d' ' -f2 +#portlint freaks over this but it's only for dev ignore. +SVN_REV!= svn info svn://svn.code.sf.net/p/wsjt/wsjt/branches/wspr | ${GREP} Revision | cut -d' ' -f2 .else .include "Makefile.svn_rev" .endif @@ -62,7 +48,7 @@ FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion do-fetch: ${MKDIR} ${WRKDIR} svn export -r ${SVN_REV} \ - http://svn.code.sf.net/p/wsjt/code/branches/wspr ${WRKDIR}/wspr-r${SVN_REV} + svn://svn.code.sf.net/p/wsjt/wsjt/branches/wspr ${WRKDIR}/wspr-r${SVN_REV} cd ${WRKDIR};rm -f ${DISTNAME}/*.a ${DISTNAME}/*.lib ${DISTNAME}/*.dll;\ tar cvfy ${DISTDIR}/${DISTNAME}.tar.bz2 ${DISTNAME} echo "SVN_REV= ${SVN_REV}" > ${MASTERDIR}/Makefile.svn_rev diff --git a/comms/wspr/Makefile.svn_rev b/comms/wspr/Makefile.svn_rev index ca63d73fe43d..229073fae48e 100644 --- a/comms/wspr/Makefile.svn_rev +++ b/comms/wspr/Makefile.svn_rev @@ -1 +1 @@ -SVN_REV= 2511 +SVN_REV= 4198 diff --git a/comms/wspr/distinfo b/comms/wspr/distinfo index 47c619f37a0d..afd8dec83cb4 100644 --- a/comms/wspr/distinfo +++ b/comms/wspr/distinfo @@ -1,2 +1,2 @@ -SHA256 (wspr-r2511.tar.bz2) = f7fa3e81431867418916e327317a05da2986def9220ad6173ff6e012fe91fb80 -SIZE (wspr-r2511.tar.bz2) = 320419 +SHA256 (wspr-r4198.tar.bz2) = 8ca522b52da16bd18568977d58aad85dcb771d3994136e374e4fd5ffe9fb350a +SIZE (wspr-r4198.tar.bz2) = 4617738 diff --git a/comms/wspr/files/patch-Makefile.in b/comms/wspr/files/patch-Makefile.in index baf240fd624f..7f48f9175caa 100644 --- a/comms/wspr/files/patch-Makefile.in +++ b/comms/wspr/files/patch-Makefile.in @@ -1,50 +1,127 @@ ---- Makefile.in.orig 2012-01-25 09:30:23.000000000 -0500 -+++ Makefile.in 2014-06-26 20:50:27.000000000 -0400 -@@ -8,6 +8,7 @@ - CPPFLAGS = @CPPFLAGS@ - CFLAGS = @CFLAGS@ - PREFIX = @PREFIX@ -+DESTDIR = %%DESTDIR%% - # ${CFLAGS}# WSPR specific C flags - CFLAGS += -DBIGSYM=1 -fPIC - DEFS = @DEFS@ -@@ -90,11 +91,16 @@ - - OBJS2F77 = ${SRCS2F77:.f=.o} deep65.o - --SRCS2C = padevsub.c start_threads.c sound.c gmtime2.c ptt_unix.c \ -+SRCS2C = start_threads.c sound.c gmtime2.c ptt_unix.c \ - nhash.c fthread.c - OBJS2C = ${SRCS2C:.c=.o} - -+padevsub.o: padevsub.c -+ ${CC} ${CPPFLAGS} ${CFLAGS} -c padevsub.c -+ - WsprMod/w.so: ${OBJS2C} $(SRCS2C) $(SRCS2F90) $(SRCS2F77) acom1.f90 -+ echo DESTDIR = ${DESTDIR} -+ echo PREFIX = ${PREFIX} - ${F2PY} -c --quiet --noopt --debug -m w \ - --f77flags="${FFLAGS}" --f90flags="${FFLAGS}" \ - --fcompiler=${FCV} --f77exec=${FC} --f90exec=${FC} \ -@@ -102,8 +108,9 @@ - ${CPPFLAGS} ${LDFLAGS} ${LIBS} \ - only: $(F2PYONLY) : \ - $(SRCS2F90) $(SRCS2F77) $(SRCS2C) -- ${MKDIR} -p build/lib/WsprMod - ${MV} w.so WsprMod/w.so -+ ${PYTHON} setup.py install --prefix=${DESTDIR}${PREFIX} -+# ${PYTHON} setup.py build_py - - fmt: fmt.f90 fil1.f90 four2a.f peakup.f db.f sound.o - $(FC) -o fmt fmt.f90 fil1.f90 four2a.f peakup.f db.f \ -@@ -140,9 +147,7 @@ - $(FC) -o wwv $(FFLAGS) $(LDFLAGS) $(OBJS6) -lportaudio -lsamplerate -lfftw3f - - install: WsprMod/w.so -- ${RM} -rf build/ -- ${PYTHON} setup.py install -- ${INSTALL} wspr ${PREFIX}/bin -+ ${INSTALL} wspr ${DESTDIR}${PREFIX}/bin - - deb: wspr.py WsprMod/w.so WsprMod/g.py WsprMod/__init__.py \ - WsprMod/advanced.py \ +--- Makefile.in.orig 2014-06-20 18:58:03.000000000 -0400 ++++ Makefile.in 2014-07-24 16:14:06.000000000 -0400 +@@ -25,7 +25,7 @@ + MKDIR := @MKDIR@ + + # Install locations +-INATALL := install ++INSTALL := install + BINDIR := @BINDIR@ + DOCDIR := @DOCDIR@ + HOMEDIR := @HOMEDIR@ +@@ -50,6 +50,8 @@ + CFLAGS += @CFLAGS@ + FFLAGS += @FFLAGS@ + FCOPT += @FCOPT@ ++PORTAUDIO_INCLUDE = @PORTAUDIO_INCLUDE@ ++PORTAUDIO_LIBDIR = @PORTAUDIO_LIBDIR@ + + # Config Definitions + DEFS := @DEFS@ +@@ -71,24 +73,24 @@ + + # Default Rules + %.o: %.c +- ${CC} ${CPPFLAGS} ${CFLAGS} -c $< ++ ${CC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${CPPFLAGS} -c $< + %.o: %.f +- ${FC} ${FFLAGS} -c $< ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} -c $< + %.o: %.F +- ${FC} ${FFLAGS} -c $< ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} -c $< + %.o: %.f90 +- ${FC} ${FFLAGS} -c $< ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} -c $< + %.o: %.F90 +- ${FC} ${FFLAGS} -c $< ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} -c $< + + # Objects + OBJS1 = wspr0.o wspr0init.o wspr0_rx.o wspr0_tx.o thnix_stub.o + + wspr0: ${OBJS1} +- ${FC} ${FFLAGS} -o wspr0 ${FFLAGS} ${OBJS1} libwspr.a -lfftw3f -lportaudio ++ ${FC} ${PORTAUDIO_LIBDIR} ${FFLAGS} ${LDFLAGS} -o wspr0 ${FFLAGS} ${OBJS1} libwspr.a -lfftw3f -lportaudio + + wsprcode: wsprcode.o thnix_stub.o +- ${FC} ${FFLAGS} -o wsprcode wsprcode.o thnix_stub.o libwspr.a -pthread ++ ${FC} ${PORTAUDIO_INCLUDE} ${FFLAGS} -o wsprcode wsprcode.o thnix_stub.o libwspr.a -pthread + + OBJS3 = azdist.o ccf2.o chklevel.o db.o decode.o decode162.o deg2grid.o \ + encode232.o fano232.o fchisq.o fil1.o flat3.o four2a.o\ +@@ -105,21 +107,22 @@ + + # Build Library: libwspr.a + libwspr.a: ${OBJS3} acom1.f90 acom2.f90 +- ${AR} cr libwspr.a ${OBJS3} + ranlib libwspr.a ++ ar cr libwspr.a ${OBJS3} ++# ${AR} cr libwspr.a ${OBJS3} + + # Build FMT Applications + fmtest: fmtest.f90 libwspr.a +- ${FC} ${FFLAGS} -o fmtest fmtest.f90 libwspr.a -lfftw3f -lportaudio ++ ${FC} ${CFLAGS} ${FFLAGS} ${PORTAUDIO_LIBDIR} ${LDFLAGS} -o fmtest fmtest.f90 libwspr.a -lfftw3f -lportaudio + + fmtave: fmtave.f90 +- ${FC} ${FFLAGS} -o fmtave fmtave.f90 ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} ${PORTAUDIO_LIBDIR} ${LDFLAGS} -o fmtave fmtave.f90 + + fcal: fcal.f90 +- ${FC} ${FFLAGS} -o fcal fcal.f90 ++ ${FC} ${PORTAUDIO_INCLUDE} ${CFLAGS} ${FFLAGS} ${PORTAUDIO_LIBDIR} ${LDFLAGS} -o fcal fcal.f90 + + fmeasure: fmeasure.f90 +- ${FC} ${FFLAGS} -o fmeasure fmeasure.f90 ++ ${FC} ${PORTAUIO_INCLUDE} ${CFLAGS} ${FFLAGS} ${PORTAUDIO_LIBDIR} ${LDFLAGS} -o fmeasure fmeasure.f90 + + # SRC for w.so + F2PYSRCS = wspr1.f90 getfile.f90 paterminate.f90 audiodev.f90 +@@ -127,7 +130,7 @@ + # Build W.SO & MV to WsprMod/ + WsprMod/w.so: libwspr.a ${F2PYSRCS} acom1.f90 + ${F2PY} -c --quiet --fcompiler=${FCV} --f77exec=${FC} --f90exec=${FC} \ +- --opt="${FCOPT}" thnix.o ${LDFLAGS} ${LIBS} libwspr.a -m w ${F2PYSRCS} ++ --opt="${FCOPT}" thnix.o ${PORTAUDIO_LIBDIR} ${LDFLAGS} ${LIBS} libwspr.a -m w ${F2PYSRCS} + ${MV} w*.so WsprMod/w.so + + # Install target wspr +@@ -137,20 +140,23 @@ + @echo " Installing ${PROGRAM}" + @echo '-----------------------------------' + @echo '' +- @${MKDIR} -p ${DOCDIR}/examples +- @${MKDIR} -p ${SHARED}/save/Samples +- @${MKDIR} -p ${WSPRLIB}/WsprMod +- @install -m 755 --strip fmtest fcal fmeasure fmtave wspr0 wsprcode ${BINDIR} +- @install -m 644 manpages/man1/*.1 ${MANDIR} +- @install -m 644 save/Samples/* ${SHARED}/save/Samples/ +- @install -m 755 ./{gocal,Pmw*.py,wspr.py,wspr.sh,wsprrc} ${SHARED} +- @install -m 644 ./{AUTHORS,README,NEWS,COPYING,COPYRIGHT} ${DOCDIR} +- @install -m 644 ./hamlib_rig* ${SHARED} +- @install -m 755 WsprMod/* ${WSPRLIB}/WsprMod +- @${MV} -T ${SHARED}/wspr.sh ${BINDIR}/wspr +- @${CHMOD} 755 ${BINDIR}/wspr +- @${CP} -r doc/examples/* ${DOCDIR}/examples/ +- @${CHMOD} -R 644 ${DOCDIR}/examples/* ++ @${MKDIR} -p ${DESTDIR}${DOCDIR}/examples ++ @${MKDIR} -p ${DESTDIR}${SHARED}/save/Samples ++ @${MKDIR} -p ${DESTDIR}${WSPRLIB}/WsprMod ++ @install -m 555 fmtest fcal fmeasure fmtave wspr0 wsprcode ${DESTDIR}${BINDIR} ++ @strip ${DESTDIR}${BINDIR}/fmtest ${DESTDIR}${BINDIR}/fcal \ ++ ${DESTDIR}${BINDIR}/fmeasure ${DESTDIR}${BINDIR}/fmtave \ ++ ${DESTDIR}${BINDIR}/wspr0 ${DESTDIR}${BINDIR}/wsprcode ++ @install -m 644 manpages/man1/*.1 ${DESTDIR}${MANDIR} ++ @install -m 644 save/Samples/* ${DESTDIR}${SHARED}/save/Samples/ ++ @install -m 755 gocal Pmw*.py wspr.py wspr.sh wsprrc ${DESTDIR}${SHARED} ++ @install -m 644 AUTHORS README NEWS COPYING COPYRIGHT ${DESTDIR}${DOCDIR} ++ @install -m 644 hamlib_rig* ${DESTDIR}${SHARED} ++ @install -m 755 WsprMod/* ${DESTDIR}${WSPRLIB}/WsprMod ++ @install -m 755 wspr.sh ${DESTDIR}${BINDIR}/wspr ++ @${CHMOD} 755 ${DESTDIR}${BINDIR}/wspr ++ @${CP} -r doc/examples/* ${DESTDIR}${DOCDIR}/examples/ ++ @${CHMOD} -R 644 ${DESTDIR}${DOCDIR}/examples/* + @echo "Finished Installing ${PROGRAM}" + @echo '' + @echo '..To run, type..: wspr' diff --git a/comms/wspr/files/patch-configure.ac b/comms/wspr/files/patch-configure.ac new file mode 100644 index 000000000000..bebfbecc3bd6 --- /dev/null +++ b/comms/wspr/files/patch-configure.ac @@ -0,0 +1,242 @@ +--- configure.ac.orig 2014-06-04 15:38:13.000000000 -0400 ++++ configure.ac 2014-09-26 15:03:51.000000000 -0400 +@@ -10,18 +10,33 @@ + dnl path vars + dnl ---------------------------------------------------------------------------- + ++AC_PREFIX_DEFAULT("/usr") ++ + AC_CONFIG_AUX_DIR([build-aux]) + AC_CANONICAL_HOST + AC_CANONICAL_BUILD + AC_SUBST([USER], ["$USER"]) ++ ++gfortran="gfortran" ++ ++AC_DEFINE_UNQUOTED(PREFIX, "${prefix}", [Prefix where wspr is installed.]) ++ ++ + AC_SUBST([HOMEDIR], [/home/"$USER"/.wspr]) +-AC_SUBST([PREFIX], [/usr]) +-AC_SUBST([BINDIR], [/usr/bin]) +-AC_SUBST([WSPRLIB], [/usr/lib/wspr]) +-AC_SUBST([SHARED], [/usr/share/wspr]) +-AC_SUBST([MANDIR], [/usr/share/man/man1]) +-AC_SUBST([DOCDIR], [/usr/share/doc/wspr]) ++AC_SUBST([PREFIX], [${prefix}]) ++AC_SUBST([BINDIR], [${prefix}/bin]) ++AC_SUBST([WSPRLIB], [${prefix}/lib/wspr]) ++AC_SUBST([SHARED], [${prefix}/share/wspr]) ++AC_SUBST([DOCDIR], [${prefix}/share/doc/wspr]) + ++case "${host_os}" in ++ *bsd* ) ++ AC_SUBST([MANDIR], [${prefix}/man/man1]) ++ ;; ++ * ) ++ AC_SUBST([MANDIR], [${prefix}/share/man/man1]) ++ ;; ++esac + + dnl ---------------------------------------------------------------------------- + dnl check compilers +@@ -59,9 +74,17 @@ + AC_SUBST([OS], ["$host_os"]) + AC_SUBST([CPU], ["$host_cpu"]) + +-dnl ---------------------------------------------------------------------------- ++dnl --------------------------------------------------------------------------- + dnl check headers +-dnl ---------------------------------------------------------------------------- ++dnl --------------------------------------------------------------------------- ++ ++dnl --------------------------------------------------------------------------- ++dnl Lots of BSD/Solaris/ other systems look in /usr/local ++dnl --------------------------------------------------------------------------- ++ ++CPPFLAGS="-I/usr/local/include ${CPPFLAGS}" ++LDFLAGS="-L/usr/local/lib ${LDFLAGS}" ++ + AC_HEADER_STDC + AC_HEADER_DIRENT + AC_HEADER_TIME +@@ -88,36 +111,36 @@ + dnl add additional lib paths + dnl ---------------------------------------------------------------------------- + if test -d "/usr/lib64"; then LDFLAGS="-L/usr/lib64 ${LDFLAGS}"; fi +-if test -d "/usr/local/lib"; then LDFLAGS="-L/usr/local/lib ${LDFLAGS}"; fi ++#if test -d "/usr/local/lib"; then LDFLAGS="${LDFLAGS} -L/usr/local/lib"; fi + if test -d "/usr/lib/x86_64-linux-gnu"; then LDFLAGS="-L/usr/lib/x86_64-linux-gnu ${LDFLAGS}"; fi + if test -d "/usr/lib/i386-linux-gnu"; then LDFLAGS="-L/usr/lib/i386-linux-gnu ${LDFLAGS}"; fi +-if test -d "/usr/lib"; then LDFLAGS="-L/usr/lib ${LDFLAGS}"; fi ++if test -d "/usr/lib"; then LDFLAGS="${LDFLAGS} -L/usr/lib"; fi + if test -d "/usr/lib/arm-linux-gnueabihf"; then LDFLAGS="-L/usr/lib/arm-linux-gnueabihf ${LDFLAGS}"; fi + ++ + dnl ---------------------------------------------------------------------------- + dnl find Python3 + dnl ---------------------------------------------------------------------------- + + HAVE_PY3=no + +-# check with-enable first ++# check with-python3 first + AC_MSG_CHECKING([Python3 --with-python3]) +-AC_ARG_WITH([f2py], [ --with-python3=PATH path to: ../python3], ++AC_ARG_WITH([python3], [ --with-python3=PATH path to: ../python3], + PY3="$withval") + + # if --with-python3 is not empty +-if test -n "$PY3"; then ++if test -n ${PY3}; then + + # check if user provided python3 is >= 3.2 +-python3 -c "import sys; sys.exit(sys.version < '3.2')" >/dev/null 2>&1 +- ++${PY3} -c "import sys; sys.exit(sys.version < '3.2')" >/dev/null 2>&1 + if test "$?" != "0"; then +- HAVE_PY3=no ++ HAVE_PY3="no" + AC_MSG_RESULT([no]) + else +- HAVE_PY3=yes +- PY3_PATH="$PY3" +- PY3V=`$PY3 -V` ++ HAVE_PY3="yes" ++ PY3_PATH=${PY3} ++ PY3V=`${PY3} -V` + AC_DEFINE([HAVE_PY3], [1]) + AC_DEFINE_UNQUOTED([PY3_PATH], ["${PY3}"], [Path to Python3]) + AC_SUBST([PYTHON], ["${PY3}"]) +@@ -128,6 +151,7 @@ + fi + + # if not user supplied, check by calling python ++ + if test "$HAVE_PY3" = "no"; then + + AC_MSG_CHECKING([Python3 using: python]) +@@ -172,7 +196,7 @@ + + HAVE_F2PY=no + +-# check with-enable first ++# check with-f2py first + AC_MSG_CHECKING([F2PY --with-f2py]) + AC_ARG_WITH([f2py], [ --with-f2py=PATH path to: ../f2py ../f2py3], + F2PY="$withval") +@@ -244,13 +268,23 @@ + dnl check gfortran + dnl ---------------------------------------------------------------------------- + ++AC_MSG_CHECKING([gfortran --with-gfortran]) ++AC_ARG_WITH([gfortran], [ --with-gfortran=PATH path to: ../gfortran],]) ++ ++# if --with-gfortran is not empty ++if test -n ${withval}; then ++ gfortran="${withval}" ++ gfpath=`${gfortran} --print-file-name=|awk -F/ '{print $1 "/" $2 "/" $3 "/" $4 "/" $5}'` ++ LDFLAGS="-L${gfpath} ${LDFLAGS}" ++fi ++ + AC_CHECK_LIB([gfortran], [_gfortran_st_write], [], []) + + if test "$ac_cv_lib_gfortran__gfortran_st_write" != "yes"; then + HAVE_GFORTRAN=0 + else + HAVE_GFORTRAN=1 +- FC=gfortran ++ FC=${gfortran} + FCV=gnu95 + FC_LIB_PATH=`${FC} -print-file-name=` + AC_DEFINE_UNQUOTED([FC_LIB_PATH], ["${FC_LIB_PATH}"], [Path to Gfortran libs.]) +@@ -266,12 +300,27 @@ + dnl ---------------------------------------------------------------------------- + dnl check portaudio + dnl ---------------------------------------------------------------------------- ++# ++# This unpleasant hack due to FreeBSD supporting both portaudio2 (v19+) ++# and older portaudio. Many programs depend on older. Sorry :-( - db ++# ++ ++case "${host_os}" in ++ *freebsd* ) ++ AC_SUBST([PORTAUDIO_INCLUDE], ["-I/usr/local/include/portaudio2"]) ++ AC_SUBST([PORTAUDIO_LIBDIR], ["-L/usr/local/lib/portaudio2"]) ++ LDFLAGS="-L/usr/local/lib/portaudio2 ${LDFLAGS}" ++ ;; ++ *) ++ ;; ++esac + + AC_CHECK_LIB([portaudio], [Pa_Initialize], [], []) + if test "$ac_cv_lib_portaudio_Pa_Initialize" = "yes"; then +- LIBS="-lportaudio ${LIBS}" ++ LIBS="-lportaudio ${LIBS}" + fi + ++ + # if headers and libs found, set define + if test "$ac_cv_header_portaudio_h" = "yes" -a "$ac_cv_lib_portaudio_Pa_Initialize" = "yes"; then + HAVE_PORTAUDIO=1 +@@ -279,7 +328,6 @@ + AC_DEFINE([HAVE_PORTAUDIO_LIB], [1], [Portaudio Lib]) + fi + +- + dnl ---------------------------------------------------------------------------- + dnl check fftw3 + dnl ---------------------------------------------------------------------------- +@@ -322,8 +370,10 @@ + _LBU=$(echo "-lpthread $LIBS" |tr ' ' '\n'|sort -su |tr '\n' ' ') + LIBS="$_LBU" + +-_LDU=$(echo "$LDFLAGS" |tr ' ' '\n'|sort -su |tr '\n' ' ') +-LDFLAGS="$_LDU" ++# This of course destroys FreeBSD builds ++#_LDU=$(echo "$LDFLAGS" |tr ' ' '\n'|sort -su |tr '\n' ' ') ++#LDFLAGS="$_LDU" ++ + + _CPPU=$(echo "-I/usr/include -I/usr/local/include $CPPFLAGS" |tr ' ' '\n'|sort -su |tr '\n' ' ') + CPPFLAGS="$_CPPU" +@@ -355,6 +405,10 @@ + FFLAGS="-O2 -m64 -Wall -fbounds-check -fno-second-underscore \ + -Wno-conversion -Wno-character-truncation -fPIC" + ;; ++ *freebsd* ) ++ CFLAGS="${CFLAGS} -fpic" ++ FFLAGS="-O2 -m64 -Wall -fbounds-check -fno-second-underscore \ ++-Wno-conversion -Wno-character-truncation -fPIC" ;; + *) + AC_MSG_ERROR([Unsupported System: ${host_os}.]) + ;; +@@ -377,10 +431,6 @@ + echo + echo 'Example:' + echo './configure --with-python3="/home/$USER/test/python3"' +-else +- # add python3 path to wspr.sh script +- sed -i '/wspr.py/d' wspr.sh +- echo "$PY3_PATH -O wspr.py" >> wspr.sh + fi + + +@@ -502,7 +552,7 @@ + AC_SUBST([PROGRAM], ["$PACKAGE_NAME"]) + AC_SUBST([VERSION], ["$PACKAGE_VERSION"]) + AC_SUBST([WEB], ["$PACKAGE_URL"]) +-AC_CONFIG_FILES([Makefile]) ++AC_CONFIG_FILES([Makefile wspr.sh]) + AC_OUTPUT + + +@@ -523,7 +573,7 @@ + echo " Package: .........: ${PROGRAM} ${VERSION}" + echo " Python3: .........: ${PYTHON}" + echo " F2py: ............: ${F2PY}" +-echo " Fcomplier: .......: ${FC}" ++echo " Fcompiler: .......: ${FC}" + echo " Samplerate: ......: ${srstatus}" + echo " FFTW3: ...........: ${ffstatus}" + echo " Portaudio: .......: ${pastatus}" diff --git a/comms/wspr/files/wspr b/comms/wspr/files/wspr deleted file mode 100644 index 9aee4a30a12a..000000000000 --- a/comms/wspr/files/wspr +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ -e /usr/local/bin/python ] ; then - LOCALBASE=/usr/local/ -else - LOCALBASE=/usr/ -fi -if [ ! -e ~/.wspr ] ; then - mkdir ~/.wspr -fi -cd ~/.wspr -python ${LOCALBASE}/bin/wspr.py diff --git a/comms/wspr/files/wspr.sh.in b/comms/wspr/files/wspr.sh.in new file mode 100644 index 000000000000..437a2eb07d2a --- /dev/null +++ b/comms/wspr/files/wspr.sh.in @@ -0,0 +1,60 @@ +#!/bin/sh +#------------------------------------------------------------------------------- +# This file is part of the WSPR application, Weak Signal Propogation Reporter +# +# File Name: wspr.sh +# Description: Shell script wrapper to update or copy files from system install +# +# Copyright (C) 2001-2014 Joseph Taylor, K1JT +# License: GNU GPL v3 +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 3 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin +# Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +#------------------------------------------------------------------------------- + +set -e + +copyur() { + for f in $1/*;do + if [ $f -nt `basename $f` ]; then + if [ ! -d `basename $f` ]; then + cp $f . + fi + fi + done +} + +# set dir's +_HOMEDIR="/home/$USER/.wspr" + +# update out of date files +if [ -e $_HOMEDIR ] ; then + cd $_HOMEDIR + copyur /usr/local/share/wspr + copyur /usr/local/share/doc/wspr + cd $_HOMEDIR/WsprMod + copyur /usr/local/lib/wspr/WsprMod + cd $_HOMEDIR +else +# if _HOMEDIR does not exist make it + mkdir $_HOMEDIR + cp -R @PREFIX@/share/wspr/* $_HOMEDIR + cp -R @PREFIX@/share/doc/wspr/* $_HOMEDIR + cp -R @PREFIX@/lib/wspr/* $_HOMEDIR +fi + +# run: py location updated by configure.ac +cd $_HOMEDIR +@PYTHON@ -O wspr.py diff --git a/comms/wspr/pkg-plist b/comms/wspr/pkg-plist index f0c30a72a1e4..033c35dbdbd6 100644 --- a/comms/wspr/pkg-plist +++ b/comms/wspr/pkg-plist @@ -1,35 +1,43 @@ +bin/fcal +bin/fmeasure +bin/fmtave +bin/fmtest bin/wspr -bin/wspr.py -%%PORTDOCS%%%%DOCSDIR%%/LICENSE.TXT -%%PORTDOCS%%%%DOCSDIR%%/WSPR_Announcement.TXT -%%PORTDOCS%%%%DOCSDIR%%/WSPR0_Instructions.TXT -%%PORTDOCS%%%%DOCSDIR%%/WSPR_Quick_Start.TXT -%%PORTDOCS%%%%DOCSDIR%%/supported_rigs.txt -%%PYTHON_SITELIBDIR%%/WsprMod/w.so -%%PYTHON_SITELIBDIR%%/WsprMod/__init__.py -%%PYTHON_SITELIBDIR%%/WsprMod/__init__.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/Pmw.py -%%PYTHON_SITELIBDIR%%/WsprMod/Pmw.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/PmwBlt.py -%%PYTHON_SITELIBDIR%%/WsprMod/PmwBlt.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/PmwColor.py -%%PYTHON_SITELIBDIR%%/WsprMod/PmwColor.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/advanced.py -%%PYTHON_SITELIBDIR%%/WsprMod/advanced.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/hopping.py -%%PYTHON_SITELIBDIR%%/WsprMod/hopping.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/g.py -%%PYTHON_SITELIBDIR%%/WsprMod/g.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/iq.py -%%PYTHON_SITELIBDIR%%/WsprMod/iq.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/options.py -%%PYTHON_SITELIBDIR%%/WsprMod/options.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/palettes.py -%%PYTHON_SITELIBDIR%%/WsprMod/palettes.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/smeter.py -%%PYTHON_SITELIBDIR%%/WsprMod/smeter.pyc -%%PYTHON_SITELIBDIR%%/WsprMod/specjt.py -%%PYTHON_SITELIBDIR%%/WsprMod/specjt.pyc -%%PYTHON_SITELIBDIR%%/Wspr-WSPR.Version.%%VERSION%%_.by.K1JT-py%%PYVER%%.egg-info -@dirrm %%PYTHON_SITELIBDIR%%/WsprMod -%%PORTDOCS%%@dirrm %%DOCSDIR%% +bin/wspr0 +bin/wsprcode +lib/wspr/WsprMod/__init__.py +lib/wspr/WsprMod/advanced.py +lib/wspr/WsprMod/g.py +lib/wspr/WsprMod/hopping.py +lib/wspr/WsprMod/iq.py +lib/wspr/WsprMod/libgcc_s_dw2-1.dll +lib/wspr/WsprMod/options.py +lib/wspr/WsprMod/palettes.py +lib/wspr/WsprMod/smeter.py +lib/wspr/WsprMod/specjt.py +lib/wspr/WsprMod/w.so +man/man1/fcal.1.gz +man/man1/fmeasure.1.gz +man/man1/fmtave.1.gz +man/man1/fmtest.1.gz +man/man1/wspr.1.gz +man/man1/wspr0.1.gz +man/man1/wsprcode.1.gz +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/examples/README +%%PORTDOCS%%%%DOCSDIR%%/examples/fcal.out +%%PORTDOCS%%%%DOCSDIR%%/examples/fmt.all +%%PORTDOCS%%%%DOCSDIR%%/examples/fmtave.out +%%DATADIR%%/Pmw.py +%%DATADIR%%/PmwBlt.py +%%DATADIR%%/PmwColor.py +%%DATADIR%%/gocal +%%DATADIR%%/hamlib_rig_numbers +%%DATADIR%%/save/Samples/091022_0436.wav +%%DATADIR%%/wspr.py +%%DATADIR%%/wspr.sh +%%DATADIR%%/wsprrc |