aboutsummaryrefslogtreecommitdiff
path: root/audio/grip/Makefile
blob: 7b600a8b946281cd358e9807fd3e3b5d1745a935 (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
# New ports collection makefile for:	grip
# Date created:				31 May 2000
# Whom:					kbyanc@posi.net
#
# $FreeBSD$
#

PORTNAME=	grip
PORTVERSION=	3.2.0
PORTREVISION=	5
CATEGORIES=	audio
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	ahze@FreeBSD.org
COMMENT=	GTK front-end to external cd rippers and audio encoders

LIB_DEPENDS=	id3-3.8.3:${PORTSDIR}/audio/id3lib \
		curl.3:${PORTSDIR}/ftp/curl
PATCH_DEPENDS=	iconv:${PORTSDIR}/converters/libiconv

USE_X_PREFIX=	yes
USE_GNOME=	gnomehack gnomeprefix gnometarget libgnomeui vte
USE_GMAKE=	yes
USE_LIBTOOL_VER=	15
USE_REINPLACE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"

OPTIONS=	CDPARANOIA "Ripper: Enable cdparanoia support" on \
		CDDA2WAV "Ripper: cdda2wav: Install sysutils/cdrtools" off
.if defined(PACKAGE_BUILDING)
OPTIONS+=	LAME "Encoder: lame: Install audio/lame" off \
		VORBIS "Encoder: oggenc: Install audio/vorbis-tools" on
.else
OPTIONS+=	LAME "Encoder: lame: Install audio/lame" on \
		VORBIS "Encoder: oggenc: Install audio/vorbis-tools" off
.endif
OPTIONS+=	BLADEENC "Encoder: bladeenc: Install audio/bladeenc" off \
		FAAC "Encoder: faac: Install audio/faac" off \
		FLAC "Encoder: flac: Install audio/flac" off \
		GOGO "Encoder: gogo: Install audio/gogo" off \
		MP3ENCODE "Encoder: mp3encode: Install audio/mp3encode" off

ISO_LOCALES=	de es fr pt_BR ru

.include <bsd.port.pre.mk>

.if defined(WITH_CDROM_DEVICE)
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE}
.else
.if ${OSVERSION} < 500000
DEFAULT_CDROM_DEVICE=/dev/acd0c
.else
DEFAULT_CDROM_DEVICE=/dev/acd0
.endif
.endif

.if !defined(WITHOUT_CDPARANOIA)
LIB_DEPENDS+=	cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia
CONFIGURE_ARGS+=	--enable-cdpar
.else
CONFIGURE_ARGS+=	--disable-cdpar
.endif

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

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

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

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

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

.if defined(WITH_MP3ENCODE)
RUN_DEPENDS+=	encode:${PORTSDIR}/audio/mp3encode
.endif

.if !defined(WITHOUT_LAME)
RUN_DEPENDS+=	lame:${PORTSDIR}/audio/lame
.endif

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

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

pre-everything::
.if !defined(WITH_CDROM_DEVICE)
	@${ECHO_MSG} "===> The default CDROM device is ${DEFAULT_CDROM_DEVICE}"
	@${ECHO_MSG} "===> Define WITH_CDROM_DEVICE if you want to change the default"
	@${ECHO_MSG} "===> For example, 'make WITH_CDROM_DEVICE=\"/dev/somedevice\"'"
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
		${WRKSRC}/src/grip.c
	@${REINPLACE_CMD} -e 's|{"xingmp3enc","-B %b -Q %w","mp3"},||; \
		s|{"l3enc","-br %b %w %m","mp3"},|{"faac","-w --artist %a --album %d --track %t --year %y --genre %g -b %b %w -o %m", "m4a"},|; \
		s|mp3encode|encode|' \
		${WRKSRC}/src/gripcfg.c
.for l in ${ISO_LOCALES}
	@${MV} ${WRKSRC}/po/${l}.po ${WRKSRC}/po/_${l}.po
	${LOCALBASE}/bin/iconv -f ISO-8859-15 -t UTF-8 \
		${WRKSRC}/po/_${l}.po > ${WRKSRC}/po/${l}.po
.endfor

.include <bsd.port.post.mk>