freebsd-ports/comms/uhd/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

74 lines
2 KiB
Makefile

# $FreeBSD$
PORTNAME= uhd
PORTVERSION= 3.10.1.1
PORTREVISION= 4
CATEGORIES= comms hamradio
MASTER_SITES= http://files.ettus.com/binaries/images/
DISTFILES= ${IMAGE_FILE}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= mr@FreeBSD.org
COMMENT= Ettus Research UHD driver framework
LIB_DEPENDS= libboost_python.so:devel/boost-python-libs
BUILD_DEPENDS= ${LOCALBASE}/include/boost/tuple/tuple.hpp:devel/boost-libs \
cheetah-analyze:devel/py-cheetah@${PY_FLAVOR} \
rst2html:textproc/py-docutils@${PY_FLAVOR} \
orcc:devel/orc \
${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
USE_GITHUB= yes
GH_ACCOUNT= EttusResearch
GH_TAGNAME= c705922a08e32c8b0ec7ef6af6137835f87b2f42
CONFLICTS= usrp-[0-9]*
BROKEN_powerpc64= fails to link: undefined reference to boost function
USES= compiler:c++0x cmake:outsource ncurses pkgconfig \
dos2unix python:2.7 shebangfix
USE_LDCONFIG= yes
CMAKE_SOURCE_PATH= ${WRKSRC}/host
#MAKE_JOBS_UNSAFE= yes
CXXFLAGS_amd64= -msse2
CXXFLAGS_i386= -msse2
SHEBANG_GLOB= *.py *.py.in
CMAKE_ARGS+= -DPKG_LIB_DIR:STRING="share/uhd" -DUHD_TXRX_DEBUG_PRINTS="yes"
# for excruciating debug use this -db
#CMAKE_ARGS+= --debug-output --trace
IMAGE_FILE= uhd-images_003.010.001.001-release.zip
OPTIONS_DEFINE= DOXYGEN
#OPTIONS_DEFAULT= DOXYGEN
OPTIONS_SUB=yes
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MDOXYGEN}
BUILD_DEPENDS+= doxygen:devel/doxygen
CMAKE_ARGS+= -DENABLE_DOXYGEN:STRING="ON"
HAVEDOCS= YES
.endif
post-patch:
# USES=pathfix handles LIBRARY_INSTALL_DIR but not LIBRARY_DIR
@${REINPLACE_CMD} '/pkgconfig/s|LIBRARY_DIR}|CMAKE_INSTALL_PREFIX}/libdata|' \
${PATCH_WRKSRC}/host/CMakeLists.txt
do-install:
# install host component
# hack the install prefix now
@${REINPLACE_CMD} -e "s|/usr/local|${STAGEDIR}${PREFIX}|g" \
${CONFIGURE_WRKSRC}/cmake_install.cmake
cd ${CONFIGURE_WRKSRC} && ${MAKE_CMD} install
.for subdir in images
${CP} -Rp ${WRKDIR}/${IMAGE_FILE:S|.zip||}/share/uhd/${subdir} ${STAGEDIR}${DATADIR}
.endfor
.include <bsd.port.post.mk>