aboutsummaryrefslogtreecommitdiffstats
path: root/audio/xmp/Makefile
blob: fe7303291c11c1fb965ba9b8317f5c4c283c0126 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# New ports collection makefile for:    xmp
# Date created:             18 September 1999
# Whom:                 Anders Nordby <anders@fix.no>
#
# $FreeBSD$
#

PORTNAME=   xmp
PORTVERSION=    3.1.0
PORTREVISION=   1
PORTEPOCH=  1
CATEGORIES= audio
MASTER_SITES=   SF

MAINTAINER= ehaupt@FreeBSD.org
COMMENT=    A player for many different Amiga and PC module formats

USE_GMAKE=  yes
WANT_GNOME= yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc

MAN1=       xmp.1

OPTIONS=    ARTS    "aRts output driver" off \
        AUDACIOUS   "Audacious plugin" off \
        BMP "BeepMP plugin" off \
        ESOUND  "EsounD output driver" off \
        NAS "Network Audio System ouptut driver" off \
        PULSEAUDIO  "PulseAudio output driver" off \
        UNZIP   "Use unzip(1) not bsdtar(1) to read .zip files" on \
        XMMS    "XMMS plugin" off

MAKE_JOBS_SAFE= yes

.include <bsd.port.pre.mk>

.if !defined(NOPORTDOCS)
PORTDOCS=   *
.endif

.if defined(WITH_ARTS)
LIB_DEPENDS+=   artsc.0:${PORTSDIR}/audio/arts
CONFIGURE_ARGS+=    --enable-arts
.else
CONFIGURE_ARGS+=    --disable-arts
.endif

.if defined(WITH_AUDACIOUS)
LIB_DEPENDS+=   audclient.2:${PORTSDIR}/multimedia/audacious
CONFIGURE_ARGS+=    --enable-audacious-plugin
PLIST_SUB+= AUDACIOUS=""
.else
CONFIGURE_ARGS+=    --disable-audacious-plugin
PLIST_SUB+= AUDACIOUS="@comment "
.endif

.if defined(WITH_BMP)
LIB_DEPENDS+=   beep.2:${PORTSDIR}/multimedia/beep-media-player
CONFIGURE_ARGS+=    --enable-bmp-plugin
PLIST_SUB+= BMP=""
.else
CONFIGURE_ARGS+=    --disable-bmp-plugin
PLIST_SUB+= BMP="@comment "
.endif

.if defined(WITH_ESOUND)
USE_GNOME+= esound
CONFIGURE_ARGS+=    --enable-esd
.else
CONFIGURE_ARGS+=    --disable-esd
.endif

.if defined(WITH_NAS)
LIB_DEPENDS+=   audio.2:${PORTSDIR}/audio/nas
CONFIGURE_ARGS+=    --enable-nas
.else
CONFIGURE_ARGS+=    --disable-nas
.endif

.if defined(WITH_PULSEAUDIO)
LIB_DEPENDS+=   pulse-simple.0:${PORTSDIR}/audio/pulseaudio
CONFIGURE_ARGS+=    --enable-pulseaudio
.else
CONFIGURE_ARGS+=    --disable-pulseaudio
.endif

.if defined(WITH_UNZIP)
RUN_DEPENDS+=   ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
.else
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-src-misc-load.c
.endif

.if defined(WITH_XMMS)
LIB_DEPENDS+=   xmms.4:${PORTSDIR}/multimedia/xmms
CONFIGURE_ARGS+=    --enable-xmms-plugin
PLIST_SUB+= XMMS=""
.else
CONFIGURE_ARGS+=    --disable-xmms-plugin
PLIST_SUB+= XMMS="@comment "
.endif

post-patch: .SILENT
.for f in docs/xmp.1 etc/xmp.conf etc/modules.conf
    ${REINPLACE_CMD} -e "s|/etc/xmp|${ETCDIR}|g" ${WRKSRC}/${f}
.endfor
    ${REINPLACE_CMD} -e \
        '/$$(INSTALL_DATA)/s|\([[:alnum:]]*\.conf\).*$$|&\1.sample|' \
        ${WRKSRC}/etc/Makefile

post-install:   .SILENT
    if  [ ! -f ${ETCDIR}/${PORTNAME}.conf ]; then \
        ${INSTALL_DATA} ${ETCDIR}/${PORTNAME}.conf.sample \
            ${ETCDIR}/${PORTNAME}.conf; \
    fi
    if [ ! -f ${ETCDIR}/modules.conf ]; then \
        ${INSTALL_DATA} ${ETCDIR}/modules.conf.sample \
            ${ETCDIR}/modules.conf; \
    fi

.if !defined(NOPORTDOCS)
    ${ECHO_MSG} Installing documentation in ${DOCSDIR}
    ( cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* \
        ${DOCSDIR} '! ( -name Makefile -or -name xmp.1 \
        -or -name *.bak -or -name *.orig )' )
.endif

.include <bsd.port.post.mk>