aboutsummaryrefslogtreecommitdiffstats
path: root/audio/mp3blaster/Makefile
blob: 0ded05d6d3761cdbb524f54553102d5b7975e66d (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
# New ports collection makefile for:    mp3blaster
# Date created:     5 January 2000
# Whom:         Michael Vasilenko <acid@stu.cn.ua>
#
# $FreeBSD$
#

PORTNAME=   mp3blaster
PORTVERSION=    3.2.0
PORTREVISION=   2
CATEGORIES= audio
MASTER_SITES=   http://www.stack.nl/~brama/mp3blaster/src/

MAINTAINER= novel@FreeBSD.org
COMMENT=    MP3 console ncurses-based player

USE_GETOPT_LONG=    yes
USE_REINPLACE=  yes
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --with-cxxflags="${CXXFLAGS}"

MAN1=       mp3blaster.1 nmixer.1 splay.1

CPPFLAGS=   -I${LOCALBASE}/include -DHAVE_DECL_GETOPT ${PTHREAD_CFLAGS}
LDFLAGS=    -L${LOCALBASE}/lib ${PTHREAD_LIBS}

OPTIONS=    LIRC "LIRC support" off \
        SIDPLAY "Sidplayer support" on \
        VORBIS "Ogg Vorbis support" on

.if !defined(NOPORTDOCS)
PORTDOCS=   AUTHORS CREDITS ChangeLog FAQ README TODO
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 400010
LIB_DEPENDS+=   ncurses.5:${PORTSDIR}/devel/ncurses
.endif

.if defined(WITH_LIRC)
LIB_DEPENDS+=   lirc_client.0:${PORTSDIR}/comms/lirc
CONFIGURE_ARGS+=    --with-lirc
.endif

.if !defined(WITHOUT_SIDPLAY)
LIB_DEPENDS+=   sidplay.1:${PORTSDIR}/audio/libsidplay
.else
CONFIGURE_ARGS+=    --without-sidplay
.endif

.if defined(WITHOUT_VORBIS)
CONFIGURE_ARGS+=    --without-oggvorbis
.else
LIB_DEPENDS+=   vorbisfile.4:${PORTSDIR}/audio/libvorbis
.endif

post-extract:
    @${FIND} ${WRKSRC} -name "getopt*" -delete

post-patch:
    @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|/usr/local/share/mp3blaster/win2koi.tbl|${DATADIR}/charmap/win2koi.tbl|' \
                ${WRKSRC}/doc/sample.mp3blasterrc

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
    @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>