aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/beep-media-player/Makefile
blob: 2d796e58046328f4b2dda1556e6fdd0df835a2bf (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
# Created by: Miguel Mendez <flynn@energyhq.es.eu.org>
# $FreeBSD$

PORTNAME=   beep-media-player
PORTVERSION=    0.9.7.1
PORTREVISION=   11
PORTEPOCH=  1
CATEGORIES= multimedia audio ipv6
MASTER_SITES=   SF/beepmp/bmp/${PORTVERSION}
DISTNAME=   bmp-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    GTK2 multimedia player

LIB_DEPENDS=    id3-3.8:${PORTSDIR}/audio/id3lib

USES=       pkgconfig
USE_GNOME=  gnomehack gtk20 libglade2 desktopfileutils
USE_AUTOTOOLS=  libtool
USE_GMAKE=  yes
USE_LDCONFIG=   yes

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

MAN1=       beep-media-player.1

OPTIONS_MULTI=      OUTPUT
OPTIONS_MULTI_OUTPUT=   ALSA ESOUND OSS
OPTIONS_DEFINE=     NLS GCONF GNOMEVFS2 IPV6 VORBIS
OPTIONS_DEFAULT=    OSS VORBIS

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if ${PORT_OPTIONS:MIPV6}
PATCH_SITES+=   http://ns.ael.ru/ports/distfiles/
PATCHFILES+=    bmp-0.9.7-ipv6-simple.diff
PATCH_DIST_STRIP+=  -p1
.endif

.if ${PORT_OPTIONS:MGCONF}
USE_GNOME+= gconf2
CONFIGURE_ARGS+=--enable-gconf
.endif

.if ${PORT_OPTIONS:MGNOMEVFS2}
USE_GNOME+= gnomevfs2
CONFIGURE_ARGS+=--enable-gnome-vfs
.endif

.if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+=   vorbis:${PORTSDIR}/audio/libvorbis
PLIST_SUB+= VORBIS=""
.else
CONFIGURE_ARGS+=--disable-vorbis
PLIST_SUB+= VORBIS="@comment "
.endif

.if ${PORT_OPTIONS:MALSA}
LIB_DEPENDS+=   asound:${PORTSDIR}/audio/alsa-lib
RUN_DEPENDS+=   ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
PLIST_SUB+= ALSA=""
.else
CONFIGURE_ARGS+=--disable-alsa
PLIST_SUB+= ALSA="@comment "
.endif

.if ${PORT_OPTIONS:MESOUND}
USE_GNOME+= esound
PLIST_SUB+= ESOUND=""
.else
CONFIGURE_ARGS+=--disable-esd
PLIST_SUB+= ESOUND="@comment "
.endif

.if ${PORT_OPTIONS:MOSS}
PLIST_SUB+= OSS=""
.else
CONFIGURE_ARGS+=--disable-oss
PLIST_SUB+= OSS="@comment "
.endif

.if ${ARCH} == i386
.if ${MACHINE_CPU:M3dnow} || ${MACHINE_CPU:Mmmx}
CONFIGURE_ARGS+=--enable-simd
.endif
.endif

post-patch:
#Fix asm comments and mnemonics for clang
    @${FIND} ${WRKSRC} -name "*.s" -type f | ${XARGS} ${REINPLACE_CMD} \
        -e 's|\/|#|g' -e 's|fist |fists |g' -e 's|fistp |fistps |g'

post-install:
    @${MKDIR} ${PREFIX}/lib/bmp/General
    @${MKDIR} ${PREFIX}/share/beep/Skins
    -@update-desktop-database
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>