summaryrefslogtreecommitdiff
path: root/audio/ocp/Makefile
blob: 4bbd86026d168216b53a41c2acd017853b8d05a8 (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
123
124
125
126
127
128
129
130
131
# New ports collection makefile for:	ocp
# Date created:				22 April 2005
# Whom:					Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#

PORTNAME=	ocp
PORTVERSION=	0.1.20
PORTREVISION=	2
PORTEPOCH=	1
CATEGORIES=	audio
MASTER_SITES=	http://stian.cubic.org/ocp/ \
		CRITICAL

MAINTAINER=	ehaupt@FreeBSD.org
COMMENT=	The legendary Open Cubic Player

LIB_DEPENDS=	id3tag.0:${PORTSDIR}/audio/libid3tag \
		mad.2:${PORTSDIR}/audio/libmad \
		vorbis.4:${PORTSDIR}/audio/libvorbis \
		sidplay.1:${PORTSDIR}/audio/libsidplay

ONLY_FOR_ARCHS=	i386 amd64

GNU_CONFIGURE=	yes
USE_GMAKE=	yes
USE_NCURSES=	yes
USE_LDCONFIG=	yes
INSTALLS_ICONS=	yes
MAKE_JOBS_UNSAFE=	yes
WANT_GNOME=	desktopfileutils

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

CONFIGURE_ENV=	CFLAGS="${CFLAGS} ${CPPFLAGS}" \
		CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}" \
		CPPFLAGS="${CPPFLAGS}" \
		LDFLAGS="${LDFLAGS}"

CONFIGURE_ARGS=	--with-dir-suffix="" \
		--without-alsa \
		--libdir=${PREFIX}/lib

LICENSE=	GPLv2
INFO=		ocp

TIMIDITY_CFG=	${LOCALBASE}/share/timidity/timidity.cfg

PFILES=		configure cpiface/cpianal.c cpiface/cpidots.c \
		cpiface/cpiface.c cpiface/cpigraph.c cpiface/cpiinst.c \
		cpiface/cpikube.c cpiface/cpilinks.c cpiface/cpimsg.c \
		cpiface/cpiphase.c cpiface/cpiscope.c cpiface/cpitrack.c \
		cpiface/mcpedit.c cpiface/volctrl.c filesel/cphlpfs.c \
		filesel/pfilesel.c filesel/pfilesel.c.bak help/cphelper.c \
		medialib/medialib.c playcda/cdapplay.c stuff/poutput-curses.c \
		stuff/poutput-dga.c stuff/poutput-keyboard.c \
		stuff/poutput-vcsa.c stuff/poutput-x11.c

OPTIONS=	ADPLUG "Build with adplug support" on \
		FLAC   "Build with FLAC support" on \
		MIDI   "Build with timidity support" on \
		X11    "Build with X11 support" on \
		SDL    "Build with SDL support" on

.include <bsd.port.pre.mk>

.if exists(${TIMIDITY_CFG}) || !defined(WITHOUT_MIDI)
RUN_DEPENDS+=	${TIMIDITY_CFG}:${PORTSDIR}/audio/eawpats
.endif

.if defined(WITHOUT_X11)
CONFIGURE_ARGS+=	--without-x11
PLIST_SUB+=		XORG="@comment "
.else
USE_XORG=		xxf86dga xxf86vm xpm
USE_GNOME=		desktopfileutils
CONFIGURE_ARGS+=	--with-x11=yes
PLIST_SUB+=		XORG=""
.endif

.if defined(WITH_ADPLUG)
LIB_DEPENDS+=		adplug-2.2:${PORTSDIR}/audio/libadplug
CONFIGURE_ARGS+=	--with-adplug
PLIST_SUB+=		ADPLUG=""
.else
PLIST_SUB+=		ADPLUG="@comment "
CONFIGURE_ARGS+=	--without-adplug
.endif

.if defined(WITH_SDL)
USE_SDL=		sound
USE_GNOME+=		desktopfileutils
CONFIGURE_ARGS+=	--with-sdl=yes
PLIST_SUB+=		SDL=""
.else
CONFIGURE_ARGS+=	--with-sdl=no
PLIST_SUB+=		SDL="@comment "
.endif

.if defined(WITH_SDL) || defined(WITH_X11)
PLIST_SUB+=		DESKTOP=""
.else
PLIST_SUB+=		DESKTOP="@comment "
.endif

.if defined(WITH_FLAC)
LIB_DEPENDS+=		FLAC.10:${PORTSDIR}/audio/flac
CONFIGURE_ARGS+=	--with-flac
PLIST_SUB+=		FLAC=""
.else
PLIST_SUB+=		FLAC="@comment "
CONFIGURE_ARGS+=	--without-flac
.endif

.if defined(NOPORTDOCS)
MAKE_ENV+=	DOCS="\#"
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|/etc/.*\.cfg|${TIMIDITY_CFG}|' \
		${WRKSRC}/playgmi/gmitimidity.c
# conflicts with fnmatch.h from security/heimdal
	@${REINPLACE_CMD} -e 's|<\(fnmatch.h\)>|"/usr/include/\1"|' \
		${WRKSRC}/filesel/adb.c \
		${WRKSRC}/filesel/pfilesel.c

.include <bsd.port.post.mk>