blob: e7627af4c4427220ed434d6128786921fc70889c (
plain)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Created by: trevor
# $FreeBSD$
PORTNAME= pd
DISTVERSION= 0.45-4
DISTVERSIONSUFFIX= .src
CATEGORIES= audio
MASTER_SITES= http://msp.ucsd.edu/Software/
MAINTAINER= ports@FreeBSD.org
COMMENT= MIDI-capable real-time audio processor/synthesizer
LICENSE= BSD
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils \
dejavu>0:${PORTSDIR}/x11-fonts/dejavu
OPTIONS_DEFINE= ALSA FFTW JACK DOCS
OPTIONS_DEFAULT=FFTW
WRKSRC= ${WRKDIR}/${DISTNAME:S,${DISTVERSIONSUFFIX},,}
USES= gettext gmake libtool pkgconfig shebangfix tk:wrapper
SHEBANG_FILES= tcl/pkg_mkIndex.tcl
SHEBANG_LANG= tclsh
tclsh_OLD_CMD= /usr/bin/tclsh
tclsh_CMD= ${LOCALBASE}/bin/tclsh
USE_AUTOTOOLS= aclocal libtoolize autoconf automake
ACLOCAL_ARGS= -I m4/generated -I m4
LIBTOOLIZE_ARGS=--install --copy --force
AUTOMAKE_ARGS= --add-missing --copy --force-missing
CONFIGURE_ENV= ac_cv_lib_pthread_pthread_create=no
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -pthread
DESKTOP_ENTRIES= "Pd" "${COMMENT}" \
"${LOCALBASE}/lib/pd/tcl/pd.ico" "pd" "" false
ALSA_CONFIGURE_ENABLE= alsa
ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
FFTW_CONFIGURE_ENABLE= fftw
FFTW_BUILD_DEPENDS= fftw3>0:${PORTSDIR}/math/fftw3
FFTW_LIB_DEPENDS= libfftw3f.so:${PORTSDIR}/math/fftw3-float
JACK_CONFIGURE_ENABLE= jack
JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack
post-patch:
@${FIND} ${PATCH_WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \
's|__FreeBSD_kernel__|__FreeBSD__|g ; \
s|__x86_64__|__amd64__|g ; \
s|<alloca\.h>|<stdlib.h>|g'
@${REINPLACE_CMD} -e \
's|\*kfreebsd\*gnu\*)|*freebsd*)| ; \
s|portaudio=yes|portaudio=no| ; \
s|-O3|| ; \
s|fftw,|fftw3f,| ; \
s|fftw_one,|fftwf_execute,| ; \
s|fftw"|fftw3f"|' ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e \
'/^pkgconfigdir/s|=.*|= $$(prefix)/libdata/pkgconfig| ; \
/^libpddir/s|=.*|= $$(pkglibdir)| ; \
s|make -C|$$(MAKE) -C|' ${WRKSRC}/Makefile.am
@${REINPLACE_CMD} -e \
'/^pd_LDADD/s| =.*| = $$(LIBM)|' ${WRKSRC}/src/Makefile.am
@${REINPLACE_CMD} -e \
's|PD_BASEDIR/LICENSE|${DOCSDIR}/LICENSE|g ; \
s|PD_BASEDIR/doc/1|${DOCSDIR}/1|g' \
${WRKSRC}/doc/1.manual/1.introduction.txt
@${REINPLACE_CMD} -e \
's|-O2 | | ; \
s|-lc ||g' ${WRKSRC}/extra/makefile.subdir
@${REINPLACE_CMD} -e \
's|-O2 |$$(CFLAGS) | ; \
s|-g ||g ; \
s|-lc ||g' ${WRKSRC}/extra/expr~/makefile
@${REINPLACE_CMD} -e \
'/libpthread/s|_ERROR|_WARN|' ${WRKSRC}/portaudio/configure.in
pre-configure:
@(cd ${WRKSRC}/portaudio \
&& ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
&& ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE} ${LIBTOOLIZE_ARGS} \
&& ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF})
do-install:
.for i in src man tcl po extra
@(cd ${WRKSRC}/${i} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.endfor
(cd ${WRKSRC} && ${INSTALL_DATA} pd.pc \
${STAGEDIR}${PREFIX}/libdata/pkgconfig)
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(${TAR} -C ${WRKSRC}/doc --exclude "*.bak" --exclude "*.orig" \
-cf - . | ${TAR} -C ${STAGEDIR}${DOCSDIR} --unlink -xf -)
.for i in LICENSE.txt README.txt
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
.endfor
@${LN} -sf ${DOCSDIR} ${STAGEDIR}${PREFIX}/lib/pd/doc
.include <bsd.port.mk>
|