aboutsummaryrefslogtreecommitdiffstats
path: root/audio/squash/Makefile
blob: 76b25b5539e753c838073506e749fb8ff2f32ae8 (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
# New ports collection makefile for: squash
# Date created:     5 August 2003
# Whom:         Matthias Andree <matthias.andree@gmx.de>
#
# $FreeBSD$

PORTNAME=       squash
PORTVERSION=        1.0.p1
PORTREVISION=       1
CATEGORIES=     audio
MASTER_SITES=       ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= squash
DISTNAME=       squash-1.0pre1

MAINTAINER= matthias.andree@gmx.de
COMMENT=    Learning console-based MP3/OGG player

LIB_DEPENDS+=   FLAC.5:${PORTSDIR}/audio/flac \
        fftw.2:${PORTSDIR}/math/fftw \
        id3-3.8.2:${PORTSDIR}/audio/id3lib \
        mad.2:${PORTSDIR}/audio/mad \
        vorbis.2:${PORTSDIR}/audio/libvorbis \
        ao.3:${PORTSDIR}/audio/libao
RUN_DEPENDS=    id3v2:${PORTSDIR}/audio/id3v2

PKGMESSAGE= ${WRKDIR}/pkg-message
USE_BZIP2=  yes
USE_GMAKE=  yes
USE_REINPLACE=  yes
USE_RUBY=   yes

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e "s|--std=gnu99|${CFLAGS} ${PTHREAD_CFLAGS}|; \
        s|-Iinclude|-Iinclude -I${LOCALBASE}/include|; \
        s|-lpthread|${PTHREAD_LIBS}|; s|-ldl|-L${LOCALBASE}/lib|" ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e "s,/usr/bin/ruby,${RUBY}," \
        ${WRKSRC}/extra/*.rb
    @${REINPLACE_CMD} -e "s,/etc/squash.conf,${PREFIX}/etc/squash.conf," \
        ${WRKSRC}/src/global.c
    @${SED} "s,%%DD%%,${DOCSDIR}," ${FILESDIR}/pkg-message.in > ${PKGMESSAGE}

do-install:
    ${MKDIR} ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/squash ${PREFIX}/bin
.for FILE in collect_info edit_tag export_music import_music joystick uncollect_info
    ${INSTALL_SCRIPT} ${WRKSRC}/extra/${FILE}.rb ${PREFIX}/bin
.endfor
    ${INSTALL_DATA} ${WRKSRC}/extra/musicdb_lib.rb ${RUBY_SITELIBDIR}
    ${INSTALL_DATA} ${WRKSRC}/extra/squash.conf ${PREFIX}/etc
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in README doc/FEATURES doc/LOCKS doc/INSTALL doc/USERS_GUIDE
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

.if ${OSVERSION} < 501100

IGNORE= "ignored: FreeBSD before 5.1 lacks the wordexp interface"

.endif

.include <bsd.port.post.mk>