freebsd-ports/comms/wspr/Makefile
Mathieu Arnold 551be3c723 Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored.  They will
  automatically get flavors (py27, py34, py35, py36) depending on what
  versions they support.

  There is also a USE_PYTHON=flavors for ports that do not use distutils
  but need FLAVORS to be set.  A USE_PYTHON=noflavors can be set if
  using distutils but flavors are not wanted.

  A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
  added to cope with Python ports that did not have the Python
  PKGNAMEPREFIX but are flavored.

  USES=python now also exports a PY_FLAVOR variable that contains the
  current python flavor.  It can be used in dependency lines when the
  port itself is not python flavored.  For example, deskutils/calibre.

  By default, all the flavors are generated.  To only generate flavors
  for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
  BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.

  In all the ports with Python dependencies, the *_DEPENDS entries MUST
  end with the flavor so that the framework knows which to build/use.
  This is done by appending '@${PY_FLAVOR}' after the origin (or
  @${FLAVOR} if in a Python module with Python flavors, as the content
  will be the same).  For example:

    RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}

PR:		223071
Reviewed by:	portmgr, python
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12464
2017-11-30 15:50:30 +00:00

66 lines
1.9 KiB
Makefile

# $FreeBSD$
PORTNAME= wspr
DISTVERSION= ${VERSION}.r${SVN_REV}
PORTREVISION= 9
CATEGORIES= comms hamradio
MASTER_SITES= LOCAL/db
DISTNAME= wspr-r${SVN_REV}
MAINTAINER= hamradio@FreeBSD.org
COMMENT= Weak signal for HF ham radio communication package
LICENSE= GPLv3
BUILD_DEPENDS= ${PYNUMPY}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
LIB_DEPENDS= libhamlib.so:comms/hamlib \
libfftw3f.so:math/fftw3-float \
libsamplerate.so:audio/libsamplerate \
libportaudio.so:audio/portaudio
MAKE_JOBS_UNSAFE= yes
USES= autoreconf dos2unix fortran gmake libtool python:3.3+ tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-gfortran=${FC} \
--with-f2py=f2py-${PYTHON_VER} \
--with-python3=${PYTHON_CMD}
MAKE_ENV+= PYTHONUSERBASE=${STAGEDIR}${PYTHONBASE}
#LDFLAGS+= -shared
VERSION= 4.00
.include <bsd.port.pre.mk>
pre-configure:
@${CP} ${FILESDIR}/wspr.sh.in ${WRKSRC}
do-build:
(cd ${WRKSRC};${GMAKE})
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/wspr/WsprMod/w.so
.if defined(BOOTSTRAP)
#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
.if defined(BOOTSTRAP) || defined(SVN_FETCH)
FETCH_DEPENDS+= svn:devel/subversion
do-fetch:
${MKDIR} ${WRKDIR}
svn export -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
.if ${USER} == db
scp ${DISTDIR}/${DISTNAME}.tar.bz2 \
freefall.freebsd.org:public_distfiles/
.endif
.endif
.include <bsd.port.post.mk>