[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / ham / gnuradio-core

File: [cvs.NetBSD.org] / pkgsrc / ham / gnuradio-core / Makefile.common (download)

Revision 1.27, Sun Aug 30 20:43:46 2020 UTC (4 months, 2 weeks ago) by tnn
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Changes since 1.26: +34 -16 lines

gnuradio-core: update to 3.8.1.0

Here is a very high level list of changes:

## Changed
### Project Scope
- C++11
- merged the wholeness of the `next` branch
- Dependency version bumps: CMake, GCC, MSVC, Swig, Boost
- New dependencies: MPIR/GMP, Qt5, gsm, codec2
- Removed dependencies: libusb, Qt4, CppUnit
- Python: Python 2 & Python 3 compatible. 3.8 will be the last Py2k-compatible
  release series
- gengen was replaced by templates (if you don't know gengen, don't do any
  research; save yourself that sorrow)
- Modern CMake (as far as feasible at this point)
- VOLK version updated to v2.0.0
- .clang-format file now dictates coding style
- clang-format'ed the whole tree.
- installed CMake files now tell about configuration

### gnuradio-runtime
- reworked fractional tag time handling, especially in the context of resamplers

### GRC
- C++ generation as option
- YAML instead of XML
- removed `blks2`
- much better canvas tooling
- consistent gobject usage
- ROUNDED ARROWS

### gr-qtgui
- moving from Qt4 to Qt5

### gr-utils
- `gr_modtool` now vastly improved

### gr-vocoder
- improved versatility
- removed in-tree libgsm, libcodec2, use system-wide libs

## Removed
### Project Scope
- Modules `gr-comedi`, `gr-fcd` and `gr-wxgui` are gone
### gr-comedi
- nobody could remember who used this, or for what. It has seen 0 active code
  contributions in the 3.7 lifecycle
### gr-digital
- python-based `packet_encoder` and related tools: Bugs that were sporadic and
  never fixed, so after long deprecation, we're removing it
### gr-fcd
- since it's currently untestable by the CI, it's being removed, as there was no
  code contributions. Generally, we strive to include all batteries with GNU
  Radio. Re-integration within a more general SDR interface would be desirable.
### gr-utils
- removed PyQwt (dead) based tools
### gr-wxgui
- Unmaintained, breaks on increasingly many systems, always was slower than
  Qtgui. We've been starting to tell people to migrate to Qt since at
  least 2015. Now, we're finally removing it.

# $NetBSD: Makefile.common,v 1.27 2020/08/30 20:43:46 tnn Exp $
# This Makefile fragment is included in the package Makefiles for
# GNU Radio distributed packages (they all share common configure and build
# settings).

# used by ham/gnuradio-channels/Makefile
# used by ham/gnuradio-companion/Makefile
# used by ham/gnuradio-core/Makefile
# used by ham/gnuradio-ctrlport/Makefile
# used by ham/gnuradio-digital/Makefile
# used by ham/gnuradio-doxygen/Makefile
# used by ham/gnuradio-dtv/Makefile
# used by ham/gnuradio-fcd/Makefile
# used by ham/gnuradio-fec/Makefile
# used by ham/gnuradio-qtgui/Makefile
# used by ham/gnuradio-trellis/Makefile
# used by ham/gnuradio-uhd/Makefile
# used by ham/gnuradio-utils/Makefile
# used by ham/gnuradio-video-sdl/Makefile
# used by ham/gnuradio-vocoder/Makefile
# used by ham/gnuradio-wavelet/Makefile
# used by ham/gnuradio-zeromq/Makefile

.include	"../../ham/gnuradio-core/version.mk"

DISTNAME?=	gnuradio-${VERSION}
CATEGORIES+=	ham
#MASTER_SITES=	http://s3-dist.gnuradio.org/
#MASTER_SITES+=	http://gnuradio.org/releases/gnuradio/
MASTER_SITES=	${MASTER_SITE_GITHUB:=gnuradio/}
GITHUB_PROJECT=	gnuradio
GITHUB_RELEASE=	v${VERSION}

MAINTAINER?=	pkgsrc-users@NetBSD.org
HOMEPAGE?=	https://www.gnu.org/software/gnuradio/
LICENSE=	gnu-gpl-v3

USE_LANGUAGES=		c c++
USE_TOOLS=		perl gmake cmake pkg-config
USE_CMAKE=		yes
LDFLAGS.NetBSD+=	-lrt

DEPENDS+=	${PYPKGPREFIX}-cheetah-[0-9]*:../../devel/py-cheetah3
DEPENDS+=	${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
# gr_filter_design in gnuradio-core ask for:
DEPENDS+=	${PYPKGPREFIX}-qwt-qt5-[0-9]*:../../x11/py-qwt-qt5
DEPENDS+=	${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
DEPENDS+=	${PYPKGPREFIX}-cairo-[0-9]*:../../graphics/py-cairo
DEPENDS+=	${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
DEPENDS+=	${PYPKGPREFIX}-numpy-[0-9]*:../../math/py-numpy
DEPENDS+=	${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3

DISTINFO_FILE=		${.CURDIR}/../../ham/gnuradio-core/distinfo
PATCHDIR=		${.CURDIR}/../../ham/gnuradio-core/patches

PYTHON_VERSIONS_ACCEPTED= 37
PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX}
PLIST_SUBST+=	PYSITELIB=${PYSITELIB}
PY_PATCHPLIST=	yes

CONFIGURE_DIRS=	build

EGDIR=			share/gnuradio/examples
PKG_SYSCONFSUBDIR=	gnuradio/conf.d

CXXFLAGS+=		-pthread
CFLAGS+=		-pthread
LDFLAGS.DragonFly+=	-lboost_system
LDFLAGS.SunOS+=		-lboost_system
CXXFLAGS.SunOS+=	-pthreads

INSTALLATION_DIRS+=	${EGDIR}

# --------       R E S E T  CMAKE_ARGS  H E R E  -------------
CMAKE_ARGS=

# set default as minimum
# See  http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide
#      http://gnuradio.org/redmine/projects/gnuradio/wiki/CygwinInstallMain

CMAKE_ARGS+=	-DENABLE_GNURADIO_RUNTIME=ON
CMAKE_ARGS+=	-DENABLE_GR_ANALOG=ON
CMAKE_ARGS+=	-DENABLE_GR_AUDIO=ON
CMAKE_ARGS+=	-DENABLE_GR_BLOCKS=ON
CMAKE_ARGS+=	-DENABLE_GR_FFT=ON
CMAKE_ARGS+=	-DENABLE_GR_FILTER=ON
CMAKE_ARGS+=	-DENABLE_PYTHON=ON
CMAKE_ARGS+=	-DENABLE_VOLK=ON -DENABLE_INTERNAL_VOLK=OFF
CMAKE_ARGS+=	-DCMAKE_HAVE_PTHREADS_CREATE=OFF

# Default setting (for pkgsrc)
CMAKE_ARGS+=	-Wno-dev
CMAKE_ARGS+=	-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE
CMAKE_ARGS+=	-DCMAKE_INCLUDE_PATH=${PREFIX}/include/portaudio2
CMAKE_ARGS+=	-DCMAKE_LIBRARY_PATH=${PREFIX}/lib/portaudio2
CMAKE_ARGS+=	-DCMAKE_INSTALL_RPATH=${PREFIX}/lib:${PREFIX}/lib/portaudio2
CMAKE_ARGS+=	-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
CMAKE_ARGS+=	-DLIBUSB_INCLUDE_DIR=${PREFIX}/include/libusb-1.0

CMAKE_ARGS+=	-DGR_LIBRARY_DIR=${PREFIX}/lib -lrt
CMAKE_ARGS+=	-DGR_PREFSDIR=${PREFIX}/share/gnuradio/examples/

# adhoc setup not to pick non default version (say python3.6)
# at configure
#MAKE_ARGS+=	-DPYTHON_EXECUTABLE=${PREFIX}/bin/python${PYVERSSUFFIX}

CMAKE_ARGS+=	-DZEROMQ_INCLUDE_DIRS=${PREFIX}/include
CMAKE_ARG_PATH=	../

.include "options.mk"

# Fixes build errors w/ clang
SUBST_CLASSES+=		boost
SUBST_MESSAGE.boost=	prepend boost placeholders with namespace
SUBST_FILES.boost=	*/lib/*.cc
SUBST_SED.boost=	-e 's, _1), boost::placeholders::_1),'
SUBST_STAGE.boost=	pre-configure

# disable/enable ALSA, see also patches/patch-gr-audio_lib_CMakeLists.txt
SUBST_CLASSES+=		alsa
SUBST_MESSAGE.alsa=	Arrange the patched line depepending on alsa is in PKG_OPTIONS or not
SUBST_FILES.alsa+=	gr-audio/lib/CMakeLists.txt
## The value of ${ALSA_ENABLED} is either '#' or '' by options.mk.
SUBST_SED.alsa=		-e 's,@@ALSA@@,${ALSA_ENABLED},'
SUBST_STAGE.alsa=	pre-configure

SUBST_CLASSES+=		pyvers
SUBST_FILES.pyvers=	cmake/Modules/FindSphinx.cmake
SUBST_MESSAGE.pyvers=	Fix SPHINX_EXECUTABLE NAMES(sphinx-build)
SUBST_VARS.pyvers+=	PYVERSSUFFIX
SUBST_STAGE.pyvers=	pre-configure

REPLACE_PYTHON=		*/*.py */*/*.py */*/*/*.py */*/*/*/*.py */*/*/*/*/*.py \
			*/*/*/*/*/*/*.py */*/*/*/*/*/*/*.py */*/*/*/*/*/*/*/*.py

pre-configure:
	${MKDIR} ${WRKSRC}/build

do-install:
	cd ${WRKSRC}/${BUILD_DIRS} && ${GMAKE} DESTDIR=${DESTDIR} install

.include	"../../audio/gsm/buildlink3.mk"
.include	"../../audio/jack/buildlink3.mk"
.include	"../../audio/portaudio/buildlink3.mk"

.include	"../../devel/boost-headers/buildlink3.mk"
.include	"../../devel/boost-libs/buildlink3.mk"
.include	"../../devel/cppunit/buildlink3.mk"
.include	"../../devel/gmp/buildlink3.mk"
.include	"../../devel/swig3/buildlink3.mk"

.include	"../../lang/python/application.mk"
.include	"../../math/fftwf/buildlink3.mk"
.include	"../../math/gsl/buildlink3.mk"
.include	"../../math/volk/buildlink3.mk"
.include	"../../textproc/log4cpp/buildlink3.mk"
.include	"../../textproc/icu/buildlink3.mk"
.include	"../../graphics/cairo/buildlink3.mk"
.include	"../../graphics/cairo-gobject/buildlink3.mk"
.include	"../../x11/gtk3/buildlink3.mk"