aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/xmms/Makefile
blob: 1276a42835fbafea3f21e417622b4f0d5b80cd0b (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
# New ports collection makefile for:    xmms
# Date created:         3 July 1999
# Whom:             Espen Skoglund <esk@ira.uka.de>
#
# $FreeBSD$
#

PORTNAME=   xmms
PORTVERSION=    1.2.7
PORTREVISION=   3
CATEGORIES+=    audio
MASTER_SITES=   ftp://ftp.xmms.org/xmms/1.2.x/ \
        http://www.xmms.org/files/1.2.x/ \
        ftp://ftp.sunet.se/pub/multimedia/xmms/1.2.x/

MAINTAINER?=    esk@ira.uka.de

USE_BZIP2=  yes
USE_X_PREFIX=   yes
USE_GNOMENG=    yes
USE_GNOME=  gtk12 gnomehack libxml
USE_REINPLACE=  yes
WANT_GNOME= yes
USE_GMAKE=  yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib" \
        INPUT_PLUGINS="${INPUT_PLUGINS}" \
        OUTPUT_PLUGINS="${OUTPUT_PLUGINS}" \
        VISUALIZATION_PLUGINS="${VISUALIZATION_PLUGINS}"
MAN1=       gnomexmms.1 wmxmms.1 xmms.1

INPUT_PLUGINS=  cdaudio,idcin,mpg123,tonegen,wav
OUTPUT_PLUGINS= OSS,disk_writer
VISUALIZATION_PLUGINS=  blur_scope,sanalyzer

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_MIKMOD)
LIB_DEPENDS+=   mikmod.2:${PORTSDIR}/audio/libmikmod
INPUT_PLUGINS+= mikmod
PLIST_SUB+= MIKMODPLUGIN:=""
.else
CONFIGURE_ARGS+=    --disable-mikmod
PLIST_SUB+= MIKMODPLUGIN:="@comment "
.endif

.if !defined(WITHOUT_VORBIS)
LIB_DEPENDS+=   vorbis.2:${PORTSDIR}/audio/libvorbis
INPUT_PLUGINS+= vorbis
PLIST_SUB+= VORBISPLUGIN:=""
.else
CONFIGURE_ARGS+=    --disable-vorbis
PLIST_SUB+= VORBISPLUGIN:="@comment "
.endif

.if ${HAVE_GNOME:Mesound}!=""
USE_GNOME+= esound
OUTPUT_PLUGINS+=    esd
PLIST_SUB+= ESDPLUGIN:=""
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-esound
.else
PKGNAMESUFFIX=  -esound
.endif
.else
CONFIGURE_ARGS+=    --disable-esd
PLIST_SUB+= ESDPLUGIN:="@comment "
.endif

.if ${HAVE_GNOME:Mlibpanel}!=""
USE_GNOME+= libpanel gnomeprefix
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gnome
.else
PKGNAMESUFFIX=  -gnome
.endif
PLIST_SUB+= DATADIR="share/gnome" PANEL:=""
.else
CONFIGURE_ARGS+=    --without-gnome
PLIST_SUB+= DATADIR="share" PANEL:="@comment "
.endif

.if ${MACHINE_ARCH} != "i386"
WITHOUT_3DNOW=  yes
.endif

.if !defined(WITHOUT_3DNOW) && ${OSVERSION} >= 400021
CONFIGURE_ARGS+=    --enable-3dnow
.endif

.if defined(WITHOUT_3DNOW) || ${OSVERSION} < 400021
post-extract:
    (cd ${WRKSRC}/Input/mpg123 && ${MV} decode_i586.s decode_i586.S && \
      cd ${WRKSRC}/Visualization/blur_scope && ${MV} blur_8.s blur_8.S);
    ${REINPLACE_CMD} -e 's:\.s :\.S :g' ${WRKSRC}/Input/mpg123/Makefile.in
    ${REINPLACE_CMD} -e 's:blur_8.s:blur_8.S:g' \
      ${WRKSRC}/Visualization/blur_scope/Makefile.in
.endif

pre-extract:
.if !defined(WITHOUT_MIKMOD) || !defined(WITHOUT_VORBIS) || ( !defined(WITHOUT_3DNOW) && ${OSVERSION} >= 400021 ) || ${HAVE_GNOME:Mesound}!=""
    @${ECHO_MSG}
.if !defined(WITHOUT_MIKMOD)
    @${ECHO_MSG} "You can disable support for mikmod by defining WITHOUT_MIKMOD."
.endif
.if !defined(WITHOUT_VORBIS)
    @${ECHO_MSG} "You can disable support for vorbis by defining WITHOUT_VORBIS."
.endif
.if !defined(WITHOUT_3DNOW) && ${OSVERSION} >= 400021
    @${ECHO_MSG} "You can disable 3DNow! optimized decoding routines by defining WITHOUT_3DNOW."
.endif
.if ${HAVE_GNOME:Mesound}!=""
    @${ECHO_MSG} "You can disable support for esound by defining WITHOUT_GNOME=esound."
.endif
    @${ECHO_MSG}
.endif

post-patch:
    @find ${WRKSRC} -name "Makefile.in*" | xargs ${REINPLACE_CMD} -e \
         's|\(datadir\)/aclocal|(prefix)/share/aclocal|g'

post-install:
    @${MKDIR} ${PREFIX}/share/xmms/Skins
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>