aboutsummaryrefslogtreecommitdiffstats
path: root/audio/beast/Makefile
blob: 266bb42345e060ca7f4a0155d8e484201ce4db2d (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
# Created by: Jean-Yves Lefort <jylefort@brutele.be>
# $FreeBSD$

PORTNAME=   beast
PORTVERSION=    0.7.8
CATEGORIES= audio
MASTER_SITES=   http://dist.testbit.eu/beast/%SUBDIR%/
MASTER_SITE_SUBDIR= v${PORTVERSION:R}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Powerful music composition and modular synthesis application

LICENSE=    LGPL21

LIB_DEPENDS=    asound:${PORTSDIR}/audio/alsa-lib \
        mad:${PORTSDIR}/audio/libmad \
        vorbisfile:${PORTSDIR}/audio/libvorbis \
        guile:${PORTSDIR}/lang/guile
RUN_DEPENDS=    xdg-open:${PORTSDIR}/devel/xdg-utils

OPTIONS_DEFINE_i386=    SSE

USE_BZIP2=  yes
USES=       pathfix gettext
USE_GCC=    4.6+
USE_GNOME=  gnomehier libgnomecanvas
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-silent-rules \
        --enable-osspcm=/dev/dsp \
        --enable-ossmidi=/dev/midi
USE_LDCONFIG=   yes

CXXFLAGS+=  -fpermissive
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PLIST_SUB=  VERSION="${PORTVERSION}"

MAN1=       beast.1 bsescm.1 bsewavetool.1 sfidl.1
MAN5=       bse.5

.include <bsd.port.pre.mk>

.if ${ARCH} == "powerpc"
BROKEN=     Does not compile on powerpc: array bound is not an integer constant
.endif

.if ${PORT_OPTIONS:MSSE} || ${ARCH} == "amd64"
PLIST_SUB+= SSE=""
SSE_FLAGS=  -mmmx -msse
.else
PLIST_SUB+= SSE="@comment "
SSE_FLAGS=  # none
.endif

.if empty(PORT_OPTIONS:MDEBUG)
CONFIGURE_ARGS+=--disable-debug
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        '/^[[:space:]].*FLAGS -[Ofgp].*"/s|^|#| ; \
         s|-mmmx -msse \(-ftree-vectorize\)|${SSE_FLAGS} \1| ; \
         s|\(if test 0\) ==|\1 -eq| ; \
         s|\(bseladspapath=\)$${|\1\\\$${| ; \
         s|\(LDFLAGS=\)""|\1"$$LDFLAGS"|' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        's|/bin/bash|${SH}|' ${WRKSRC}/mkrelease.sh
    @${REINPLACE_CMD} -e \
        's|BIRNET_.*_UINT == 0|1|' ${WRKSRC}/birnet/birnetcdefs.h
    @${REINPLACE_CMD} -e \
        's|; q|;| ; \
         s|-o \(pipefail\)|\1|' ${WRKSRC}/docs/Makefile.in

.include <bsd.port.post.mk>