diff options
author | mef <mef> | 2014-10-17 09:51:56 +0000 |
---|---|---|
committer | mef <mef> | 2014-10-17 09:51:56 +0000 |
commit | 55a4faf046a81c180cf9407d1804d09d496e88de (patch) | |
tree | 3c55d4c2f020118b6320f7e9b7b49e9f48c06673 /ham | |
parent | 7b06d4f1d0fcd58f45ce21a3248b505dce09538f (diff) | |
download | pkgsrc-55a4faf046a81c180cf9407d1804d09d496e88de.tar.gz |
Make ALSA selectable by PKG_OPTIONS and disabled by default. This makes sound come out (on NetBSD).
Diffstat (limited to 'ham')
-rw-r--r-- | ham/gnuradio-core/Makefile | 5 | ||||
-rw-r--r-- | ham/gnuradio-core/Makefile.common | 11 | ||||
-rw-r--r-- | ham/gnuradio-core/Makefile.version | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/Nocore.mk | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/PLIST | 3 | ||||
-rw-r--r-- | ham/gnuradio-core/PLIST.alsa | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/buildlink3.mk | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/distinfo | 3 | ||||
-rw-r--r-- | ham/gnuradio-core/files/REPLACE_PYTHON | 5 | ||||
-rw-r--r-- | ham/gnuradio-core/options.mk | 18 | ||||
-rw-r--r-- | ham/gnuradio-core/patches/patch-gnuradio_runtime_include_gnuradio_high__res__timer__h | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/patches/patch-gnuradio_runtime_lib_thread_thread_cc | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/patches/patch-gr-audio_lib_CMakeLists.txt | 15 | ||||
-rw-r--r-- | ham/gnuradio-core/patches/patch-gr-audio_lib_alsa_alsa__impl_h | 2 | ||||
-rw-r--r-- | ham/gnuradio-core/patches/patch-grc_script_gnuradio-companion | 2 |
15 files changed, 58 insertions, 18 deletions
diff --git a/ham/gnuradio-core/Makefile b/ham/gnuradio-core/Makefile index 0724356ed18..0b598ed25f2 100644 --- a/ham/gnuradio-core/Makefile +++ b/ham/gnuradio-core/Makefile @@ -1,13 +1,13 @@ -# $NetBSD: Makefile,v 1.42 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: Makefile,v 1.43 2014/10/17 09:51:56 mef Exp $ PKGNAME= gnuradio-core-${VERSION} +PKGREVISION= 1 COMMENT= Core part of GNU Radio, all others need this PLIST_MINUS= # empty .include "Makefile.common" CONF_FILES+= ${EGDIR}/gnuradio-runtime.conf ${PKG_SYSCONFDIR}/gnuradio-runtime.conf -CONF_FILES+= ${EGDIR}/gr-audio-alsa.conf ${PKG_SYSCONFDIR}/gr-audio-alsa.conf CONF_FILES+= ${EGDIR}/gr-audio-jack.conf ${PKG_SYSCONFDIR}/gr-audio-jack.conf CONF_FILES+= ${EGDIR}/gr-audio-oss.conf ${PKG_SYSCONFDIR}/gr-audio-oss.conf CONF_FILES+= ${EGDIR}/gr-audio-portaudio.conf ${PKG_SYSCONFDIR}/gr-audio-portaudio.conf @@ -21,5 +21,4 @@ post-install: ${MV} ${DESTDIR}${PREFIX}/etc/gnuradio/conf.d/* \ ${DESTDIR}${PREFIX}/${EGDIR}/ -#.include "../../devel/orc/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/ham/gnuradio-core/Makefile.common b/ham/gnuradio-core/Makefile.common index bca4d66bb23..c6669978de4 100644 --- a/ham/gnuradio-core/Makefile.common +++ b/ham/gnuradio-core/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.1 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: Makefile.common,v 1.2 2014/10/17 09:51:56 mef Exp $ # This Makefile fragment is included in the package Makefiles for # GNU Radio distributed packages (they all share common configure and build # settings). @@ -98,6 +98,14 @@ 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= post-patch + # REPLACE_PYTHON is some 600 files .include "../../ham/gnuradio-core/files/REPLACE_PYTHON" @@ -107,7 +115,6 @@ pre-configure: do-install: (cd ${WRKSRC}/build; ${GMAKE} DESTDIR=${DESTDIR} install) -.include "../../audio/alsa-lib/buildlink3.mk" .include "../../audio/gsm/buildlink3.mk" .include "../../audio/jack/buildlink3.mk" .include "../../audio/portaudio-devel/buildlink3.mk" diff --git a/ham/gnuradio-core/Makefile.version b/ham/gnuradio-core/Makefile.version index 1d0f0007e58..32a1648145a 100644 --- a/ham/gnuradio-core/Makefile.version +++ b/ham/gnuradio-core/Makefile.version @@ -1,3 +1,3 @@ -# $NetBSD: Makefile.version,v 1.1 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: Makefile.version,v 1.2 2014/10/17 09:51:56 mef Exp $ VERSION= 3.7.5 diff --git a/ham/gnuradio-core/Nocore.mk b/ham/gnuradio-core/Nocore.mk index f7e2d3f1fb7..32cc32014e6 100644 --- a/ham/gnuradio-core/Nocore.mk +++ b/ham/gnuradio-core/Nocore.mk @@ -1,4 +1,4 @@ -# $NetBSD: Nocore.mk,v 1.1 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: Nocore.mk,v 1.2 2014/10/17 09:51:56 mef Exp $ # Default list for reducing PLIST PLIST_MINUS= core DEPENDS+= gnuradio-core-[0-9]*:../../ham/gnuradio-core diff --git a/ham/gnuradio-core/PLIST b/ham/gnuradio-core/PLIST index 2bb216ff93a..6ed3b94f102 100644 --- a/ham/gnuradio-core/PLIST +++ b/ham/gnuradio-core/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.14 2014/10/13 12:46:33 mef Exp $ +@comment $NetBSD: PLIST,v 1.15 2014/10/17 09:51:56 mef Exp $ bin/gnuradio-config-info bin/gr_filter_design bin/volk-config-info @@ -879,7 +879,6 @@ share/doc/gnuradio-${PKGVERSION}/README.fft share/doc/gnuradio-${PKGVERSION}/README.filter share/doc/gnuradio-${PKGVERSION}/README.hacking share/examples/gnuradio/conf.d/gnuradio-runtime.conf -share/examples/gnuradio/conf.d/gr-audio-alsa.conf share/examples/gnuradio/conf.d/gr-audio-jack.conf share/examples/gnuradio/conf.d/gr-audio-oss.conf share/examples/gnuradio/conf.d/gr-audio-portaudio.conf diff --git a/ham/gnuradio-core/PLIST.alsa b/ham/gnuradio-core/PLIST.alsa new file mode 100644 index 00000000000..99c55f5ef61 --- /dev/null +++ b/ham/gnuradio-core/PLIST.alsa @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST.alsa,v 1.1 2014/10/17 09:51:56 mef Exp $ +share/examples/gnuradio/conf.d/gr-audio-alsa.conf diff --git a/ham/gnuradio-core/buildlink3.mk b/ham/gnuradio-core/buildlink3.mk index 03ea97ba53f..e6d7e8ae7fc 100644 --- a/ham/gnuradio-core/buildlink3.mk +++ b/ham/gnuradio-core/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.27 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: buildlink3.mk,v 1.28 2014/10/17 09:51:56 mef Exp $ BUILDLINK_TREE+= gnuradio-core diff --git a/ham/gnuradio-core/distinfo b/ham/gnuradio-core/distinfo index 8fa65b04a91..57f0d3d174c 100644 --- a/ham/gnuradio-core/distinfo +++ b/ham/gnuradio-core/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.14 2014/10/13 12:46:33 mef Exp $ +$NetBSD: distinfo,v 1.15 2014/10/17 09:51:56 mef Exp $ SHA1 (gnuradio-3.7.5.tar.gz) = fe30be815aca149bfac1615028a279aea40c3bbb RMD160 (gnuradio-3.7.5.tar.gz) = c0f45116f72a7da7b6428f8eb55efe7c6dbcdc03 Size (gnuradio-3.7.5.tar.gz) = 3529717 bytes SHA1 (patch-gnuradio_runtime_include_gnuradio_high__res__timer__h) = 59ad8192e7ac76b2ce35cda68c378bc2abad20a5 SHA1 (patch-gnuradio_runtime_lib_thread_thread_cc) = 3ca2d41c4762442422539958eb15d4fc459b3920 +SHA1 (patch-gr-audio_lib_CMakeLists.txt) = 00ff8c14658acd2d1dc8be18ea6a19ace8d12968 SHA1 (patch-gr-audio_lib_alsa_alsa__impl_h) = d61dcd31058c04a6050479a6e8c321ca15420d49 SHA1 (patch-grc_script_gnuradio-companion) = 5fd6ed47941c29054f78d968abd98a4197a69100 diff --git a/ham/gnuradio-core/files/REPLACE_PYTHON b/ham/gnuradio-core/files/REPLACE_PYTHON index 51f9d45f3e6..ce3be50107a 100644 --- a/ham/gnuradio-core/files/REPLACE_PYTHON +++ b/ham/gnuradio-core/files/REPLACE_PYTHON @@ -617,4 +617,7 @@ REPLACE_PYTHON = \ gr-atsc/python/atsc/qa_atsc.py \ gr-atsc/lib/gen_encoder.py \ gr-filter/freq_xlating_fft_filter.py \ - gnuradio-runtime/python/digital/packet_utils.py + gnuradio-runtime/python/digital/packet_utils.py \ + gnuradio-runtime/python/gnuradio/gr/packet_utils.py \ + gr-digital/python/digital/packet_utils.py \ + gr-filter/python/filter/freq_xlating_fft_filter.py \ diff --git a/ham/gnuradio-core/options.mk b/ham/gnuradio-core/options.mk index 19306803793..11824ebc376 100644 --- a/ham/gnuradio-core/options.mk +++ b/ham/gnuradio-core/options.mk @@ -1,7 +1,9 @@ -# $NetBSD: options.mk,v 1.1 2014/10/13 12:46:33 mef Exp $ +# $NetBSD: options.mk,v 1.2 2014/10/17 09:51:56 mef Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.gnuradio -PKG_SUPPORTED_OPTIONS= ninja-build filter-design +PKG_SUPPORTED_OPTIONS= ninja-build filter-design alsa +# ninja-build is said supported, but not working +# alas is said supported, but not good on NetBSD # Adding ninja-build to following line (now) stops # [164/850] cd /PATH/ham/gnuradio-core/work/gnuradio-3.7.5/build/gr-audio/swig && "" @@ -27,3 +29,15 @@ do-build: # Running gr_filter_design asks for the package DEPENDS+= ${PYPKGPREFIX}-scipy-[0-9]*:../../math/py-scipy .endif + +# if set optionally, we need to initialize (as an standard) +PLIST_SRC+= ${PKGDIR}/PLIST +.if !empty(PKG_OPTIONS:Malsa) +.include "../../audio/alsa-lib/buildlink3.mk" +ALSA_ENABLED= +CONF_FILES+= ${EGDIR}/gr-audio-alsa.conf ${PKG_SYSCONFDIR}/gr-audio-alsa.conf +PLIST_SRC+= ${PKGDIR}/PLIST.alsa +.else +# disable ALSA, see patches/patch-gr-audio_lib_CMakeLists.txt +ALSA_ENABLED= \# +.endif diff --git a/ham/gnuradio-core/patches/patch-gnuradio_runtime_include_gnuradio_high__res__timer__h b/ham/gnuradio-core/patches/patch-gnuradio_runtime_include_gnuradio_high__res__timer__h index 0044eede145..d3fb9e93023 100644 --- a/ham/gnuradio-core/patches/patch-gnuradio_runtime_include_gnuradio_high__res__timer__h +++ b/ham/gnuradio-core/patches/patch-gnuradio_runtime_include_gnuradio_high__res__timer__h @@ -1,4 +1,4 @@ -$NetBSD: patch-gnuradio_runtime_include_gnuradio_high__res__timer__h,v 1.1 2014/10/13 12:46:33 mef Exp $ +$NetBSD: patch-gnuradio_runtime_include_gnuradio_high__res__timer__h,v 1.2 2014/10/17 09:51:56 mef Exp $ This patch is kind of joke, but better than nothing for packaging diff --git a/ham/gnuradio-core/patches/patch-gnuradio_runtime_lib_thread_thread_cc b/ham/gnuradio-core/patches/patch-gnuradio_runtime_lib_thread_thread_cc index 8cf7fa5b9b5..5da45326dce 100644 --- a/ham/gnuradio-core/patches/patch-gnuradio_runtime_lib_thread_thread_cc +++ b/ham/gnuradio-core/patches/patch-gnuradio_runtime_lib_thread_thread_cc @@ -1,4 +1,4 @@ -$NetBSD: patch-gnuradio_runtime_lib_thread_thread_cc,v 1.1 2014/10/13 12:46:33 mef Exp $ +$NetBSD: patch-gnuradio_runtime_lib_thread_thread_cc,v 1.2 2014/10/17 09:51:56 mef Exp $ Extending for BSD diff --git a/ham/gnuradio-core/patches/patch-gr-audio_lib_CMakeLists.txt b/ham/gnuradio-core/patches/patch-gr-audio_lib_CMakeLists.txt new file mode 100644 index 00000000000..d99941a6926 --- /dev/null +++ b/ham/gnuradio-core/patches/patch-gr-audio_lib_CMakeLists.txt @@ -0,0 +1,15 @@ +$NetBSD: patch-gr-audio_lib_CMakeLists.txt,v 1.1 2014/10/17 09:51:56 mef Exp $ + +Patch and SUBST to disable/enable ALSA depending on PKGOPTIONS. + +--- gr-audio/lib/CMakeLists.txt.orig 2014-08-18 02:53:59.000000000 +0900 ++++ gr-audio/lib/CMakeLists.txt 2014-10-14 21:39:56.000000000 +0900 +@@ -44,7 +44,7 @@ endif(ENABLE_GR_CTRLPORT) + ######################################################################## + ## ALSA Support + ######################################################################## +-find_package(ALSA) ++@@ALSA@@find_package(ALSA) + + if(ALSA_FOUND) + diff --git a/ham/gnuradio-core/patches/patch-gr-audio_lib_alsa_alsa__impl_h b/ham/gnuradio-core/patches/patch-gr-audio_lib_alsa_alsa__impl_h index 90cb4e83c9c..2817e39be04 100644 --- a/ham/gnuradio-core/patches/patch-gr-audio_lib_alsa_alsa__impl_h +++ b/ham/gnuradio-core/patches/patch-gr-audio_lib_alsa_alsa__impl_h @@ -1,4 +1,4 @@ -$NetBSD: patch-gr-audio_lib_alsa_alsa__impl_h,v 1.1 2014/10/13 12:46:33 mef Exp $ +$NetBSD: patch-gr-audio_lib_alsa_alsa__impl_h,v 1.2 2014/10/17 09:51:56 mef Exp $ gnuradio-3.7.2.1/gr-audio/lib/alsa/alsa_source.cc:477:23: error: 'ESTRPIPE' was not declared in this scope See also diff --git a/ham/gnuradio-core/patches/patch-grc_script_gnuradio-companion b/ham/gnuradio-core/patches/patch-grc_script_gnuradio-companion index 4d1356013e4..d39a30e97a8 100644 --- a/ham/gnuradio-core/patches/patch-grc_script_gnuradio-companion +++ b/ham/gnuradio-core/patches/patch-grc_script_gnuradio-companion @@ -1,4 +1,4 @@ -$NetBSD: patch-grc_script_gnuradio-companion,v 1.1 2014/10/13 12:46:33 mef Exp $ +$NetBSD: patch-grc_script_gnuradio-companion,v 1.2 2014/10/17 09:51:56 mef Exp $ Add message for NetBSD when failed to import gnuradio. Or missing gnuradio-core package. |