aboutsummaryrefslogtreecommitdiffstats
path: root/audio/gnormalize/Makefile
blob: d5cb7b5e50413d9e65422855019dfb980e1a3bf7 (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
# New ports collection makefile for:    gnormalize
# Date created:             27 Oct 2007
# Whom:             Denise H. G. <darcsis@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   gnormalize
PORTVERSION=    0.63
PORTREVISION=   7
CATEGORIES= audio
MASTER_SITES=   SF

MAINTAINER= darcsis@gmail.com
COMMENT=    An alternative for replaygain

RUN_DEPENDS+=   p5-Gtk2>=0:${PORTSDIR}/x11-toolkits/p5-Gtk2 \
        wavegain:${PORTSDIR}/audio/wavegain

USE_PERL5_RUN=  yes
INSTALLS_ICONS= yes

NO_BUILD=   yes

MAN1=       gnormalize.1

OPTIONS=    \
    GNORMALIZE_MP3  "WAV <-> MP3 Support"   on  \
    GNORMALIZE_OGG  "Ogg Encoding and Playback" on  \
    GNORMALIZE_MP4  "WAV <-> MP4 Support"   on  \
    GNORMALIZE_CDRIP    "CD Ripping"    off \
    GNORMALIZE_CDDB "CDDB Support"  off \
    GNORMALIZE_CDPLAY   "CD Playback"   off \
    GNORMALIZE_FLAC "FLAC Encoding and Playback"    off \
    GNORMALIZE_MAC  "Monkey's Audio Encoding and Playback"  off \
    GNORMALIZE_MPC  "MPC (musepack) Audio"  off

.include <bsd.port.pre.mk>

.if defined(WITH_GNORMALIZE_MP3)
RUN_DEPENDS+=   lame:${PORTSDIR}/audio/lame \
    p5-MP3-Info>=0:${PORTSDIR}/audio/p5-MP3-Info
.endif

.if defined(WITH_GNORMALIZE_OGG)
RUN_DEPENDS+=   oggenc:${PORTSDIR}/audio/vorbis-tools
.endif

.if defined(WITH_GNORMALIZE_MP4)
RUN_DEPENDS+=   faac:${PORTSDIR}/audio/faac \
    faad:${PORTSDIR}/audio/faad
.endif

.if defined(WITH_GNORMALIZE_CDRIP)
.if defined(WITH_CDDA2WAV)
RUN_DEPENDS+=   cdda2wav:${PORTSDIR}/sysutils/cdrtools
.else
RUN_DEPENDS+=   cdparanoia:${PORTSDIR}/audio/cdparanoia
.endif
.endif

.if defined(WITH_GNORMALIZE_CDDB)
RUN_DEPENDS+=   cddb.pl:${PORTSDIR}/audio/p5-CDDB_get
.endif

.if defined(WITH_GNORMALIZE_CDPLAY)
RUN_DEPENDS+=   p5-Audio-CD>=0:${PORTSDIR}/audio/p5-Audio-CD
.endif

.if defined(WITH_GNORMALIZE_FLAC)
RUN_DEPENDS+=   flac:${PORTSDIR}/audio/flac
.endif

.if defined(WITH_GNORMALIZE_MAC)
RUN_DEPENDS+=   mac:${PORTSDIR}/audio/mac
.endif

.if defined(WITH_GNORMALIZE_MPC)
RUN_DEPENDS+=   mppenc:${PORTSDIR}/audio/musepack
.endif

.if ${OSVERSION} < 800505 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900012)
BUILD_DEPENDS+= lzma:${PORTSDIR}/archivers/xz
.endif

post-patch:
    @${REINPLACE_CMD} -e 's,^PREFIX=.*,PREFIX=${PREFIX},; \
        s,^MANDIR=.*,MANDIR=${MANPREFIX}/man,; \
        s,^BASE=.*,BASE=${DATADIR},' \
        ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e 's,/usr/share/gnormalize,${DATADIR},' \
        ${WRKSRC}/gnormalize

.include <bsd.port.post.mk>