aboutsummaryrefslogtreecommitdiffstats
path: root/comms/gnuradio/Makefile
blob: fc3897bea4122a27874c4a1da422cc1f373471ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
## ports collection makefile for:   gnuradio
# Date created:     2 January 2006
# Whom:         db
#
# $FreeBSD$
#

PORTNAME=   gnuradio
PORTVERSION=    3.0.3
PORTREVISION=   1
CATEGORIES= comms astro hamradio
MASTER_SITES=   ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gnuradio
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= db@FreeBSD.org
COMMENT=    Amateur Radio Software defined radio

BUILD_DEPENDS=  sdcc:${PORTSDIR}/lang/sdcc \
        sdl-config:${PORTSDIR}/devel/sdl12 \
        swig:${PORTSDIR}/devel/swig13 \
        cppunit-config:${PORTSDIR}/devel/cppunit
LIB_DEPENDS=    fftw3:${PORTSDIR}/math/fftw3 \
        fftw3f:${PORTSDIR}/math/fftw3-float \
        usb:${PORTSDIR}/devel/libusb \
        boost_python:${PORTSDIR}/devel/boost-python
RUN_DEPENDS=    ${PYNUMERIC} \
        ${PYTHON_SITELIBDIR}/ephem.so:${PORTSDIR}/astro/pyephem

GNU_CONFIGURE=  yes
MAKE_ARGS+= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}"
USE_PYTHON= 2.4+
USE_WX=     2.6
WX_COMPS=   wx wx:build wx:run python:build python:run
USE_PERL5=  yes
USE_AUTOTOOLS=  autoconf:261 libtool:15
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-boost-include-dir="${LOCALBASE}/include/" \
        --enable-usrp \
        --enable-gr-usrp \
        --disable-gr-audio-jack \
        --disable-gr-audio-portaudio \
        --enable-gr-audio-oss \
        --enable-gr-wxgui \
        --enable-gnuradio-examples \
        --disable-doxygen \
        --disable-html-docs \
        --disable-latex-docs

PLIST_SUB+= RELEASE="${MACHINE_ARCH}-portbld-freebsd${OSREL}"

post-patch:
    @${REINPLACE_CMD} -e 's|%%LIBDATA%%|${PREFIX}/libdata|' \
        ${WRKSRC}/gnuradio-core/Makefile.in ${WRKSRC}/usrp/Makefile.in
pre-install:
    @${CP}  ${FILESDIR}/wxgui_src_python_init.py \
        ${WRKSRC}/gr-wxgui/src/python/__init__.py
post-install:
    @${INSTALL_DATA}    ${WRKSRC}/gnuradio-core/gnuradio-core.conf \
        ${PREFIX}/etc/gnuradio/gnuradio-core.conf.sample
    @${INSTALL_DATA}    ${WRKSRC}/gr-audio-oss/gr-audio-oss.conf \
        ${PREFIX}/etc/gnuradio/gr-audio-oss.conf.sample
    @${INSTALL_DATA}    ${WRKSRC}/gr-wxgui/gr-wxgui.conf \
        ${PREFIX}/etc/gnuradio/gr-wxgui.conf.sample
    ${MKDIR} ${EXAMPLESDIR}
    (cd ${WRKSRC}/gnuradio-examples && \
        ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/ "! -regex .*Makefile.*")
    @${ECHO}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README.hacking ${DOCSDIR}
    @${ECHO} gnuradio docs are in ${DOCSDIR}
.endif
    @${ECHO} sample conf files are in ${PREFIX}/etc/gnuradio
    @${ECHO} These must be copied to ${PREFIX}/etc/gnuradio/conf.d
    @${ECHO} without the .sample suffix and edited as needed before use.
    @${ECHO}

.include <bsd.port.mk>