File:  [cvs.NetBSD.org] / pkgsrc / ham / gnuradio-core / Makefile.common
Revision 1.41: download - view: text, annotated - select for diffs
Thu May 26 15:20:09 2022 UTC (2 years, 10 months ago) by mef
Branches: MAIN
CVS tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, HEAD
(ham/gnuradio-core) Updated 3.10.1.1  to 3.10.2.0

## [3.10.2.0] - 2022-04-09
### Changed
#### Project Scope

- Clayton Smith continues the effort to replace Boost usage with
  modern C++ equivalents. In a related effort, he has continued the
  logging modernization started by Marcus M端ller. In his spare time,
  he has tackled some tricky, intermittent CI failures, some of which
  turned out to be real bugs. Much of this work is invisible to end
  users, but is extremely useful in making GNU Radio more reliable and
  maintainable. Special thanks are due to Clayton for a lot of hard
  work this cycle.

- Use exceptions instead of `exit()` in several places.
- Fixed a variety of Python deprecation warnings.

- Packager note: `jsonschema` is required for the JSON Config and YAML
  Config blocks. Those blocks will be disabled if `jsonschema` is not
  found.

#### gnuradio-runtime
- Correct size/usage for single-mapped buffers (part of the new Custom
  Buffers feature).

- Correct buffer size allocation. This was actually the single change
  in v3.10.1.1, which did not get its own CHANGELOG entry.

#### GRC
- Improve discovery of xterm and related programs.

- Save generated hierarchical block code to the block library instead
  of the directory containing the current GRC flowgraph.

- New JSON Config and YAML Config blocks that load configuration
  variables from files at runtime. Those variables may then be used in
  block parameters.

- Store the GNU Radio version in flowgraph metadata when saving.

- Minor change in Python evaluation code to allow `affinity`,
  `minoutbuf` and `maxoutbuf` to be adjusted via script parameters.


#### Build system and packaging
- Require C++-17 for `gnuradio-runtime` and code compiled against it (via cmake flags).
- Add `pythonschema` to build- and run-time dependencies.

#### gr-blocks
- Add exponential distribution to Message Strobe Random block's `delay` selection.
- Quiet down debug messages in File Sink.
- Skip alignment check in File Source when the input file is not seekable (e.g., it is a pipe).

#### gr-filter
- Fix crash in Rational Resampler logging

#### gr-digital
- Add generic CRC blocks: CRC Append and CRC Check.

#### gr-qtgui
- Improve text/background color on Range widget.
- Digital Number Control emits message with new, instead of previous, value.

- Message Edit Box  sends message only when return  is pressed, rather
  than whenever focus is lost.

- Vector Sink allows legend to be disabled.
- Type error fixes (Python 3.10 is stricter about int casting).

#### gr-trellis

- Provide Python bindings for PCCC Encoder and Viterbi Combo.

#### gr-vocoder

- Add C++ generation support to gr-vocoder

#### Code generation tools

- Support strongly-typed enums in Python bindings

# $NetBSD: Makefile.common,v 1.41 2022/05/26 15:20:09 mef 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-network/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-fec/Makefile
# used by ham/gnuradio-qtgui/Makefile
# used by ham/gnuradio-soapy-sdr/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_TAG=	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

GCC_REQD+=		8

DEPENDS+=	${PYPKGPREFIX}-scipy-[0-9]*:../../math/py-scipy
DEPENDS+=	${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
# for companion
DEPENDS+=	${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3
DEPENDS+=	${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
DEPENDS+=	${PYPKGPREFIX}-cairo-[0-9]*:../../graphics/py-cairo
DEPENDS+=	${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml

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

# see CMakeLists.txt GR_PYTHON_MIN_VERSION
PYTHON_VERSIONS_INCOMPATIBLE=	27 37 # py-scipy

# three digit version number for shared library ex 3.10.2.0 -> 3.10.2
PKGVER_MICRO=	${PKGVERSION_NOREV:C/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.\3/}

PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX}
PLIST_SUBST+=	PYSITELIB=${PYSITELIB}
# avoid using the name PKGVERSION in variable, see Nocore.mk
PLIST_SUBST+=	PKGVER_MICRO=${PKGVER_MICRO}
PY_PATCHPLIST=	yes

CONFIGURE_DIRS=	build

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

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

INSTALLATION_DIRS+=	${EGDIR}

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

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+=	-DLIB_SUFFIX=""

# 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+=	-Dpybind11_DIR=${PREFIX}/${PYSITELIB}/pybind11/share/cmake/pybind11

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

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

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

.include "options.mk"

# 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+=		prefix
SUBST_STAGE.prefix=	pre-configure
SUBST_MESSAGE.prefix=	Substitute PREFIX
SUBST_FILES.prefix=	gnuradio-runtime/lib/constants.cc.in
SUBST_VARS.prefix=	PREFIX

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/spdlog/buildlink3.mk"
BUILDLINK_API_DEPENDS.py-pybind11+=	${PYPKGPREFIX}-pybind11>=2.6.0
.include	"../../devel/py-pybind11/buildlink3.mk"
.include	"../../graphics/cairo/buildlink3.mk"
.include	"../../graphics/cairo-gobject/buildlink3.mk"
# FIXME should be optional
.include	"../../lang/libunwind/buildlink3.mk"
.include	"../../lang/python/application.mk"
.include	"../../math/py-numpy/buildlink3.mk"
.include	"../../math/fftw/buildlink3.mk"
.include	"../../math/gsl/buildlink3.mk"
.include	"../../math/volk/buildlink3.mk"
.include	"../../textproc/icu/buildlink3.mk"
.include	"../../x11/gtk3/buildlink3.mk"

CVSweb <webmaster@jp.NetBSD.org>