summaryrefslogtreecommitdiff
path: root/multimedia/kmplayer-kde4/Makefile
blob: 5d8e4f4c4372a4c0e3868befcff8353af83376d2 (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
# New ports collection makefile for:	KMplayer
# Date created:				Jan 31, 2003
# Whom:					will
#
# $FreeBSD$
#

PORTNAME=	kmplayer
DISTVERSION=	0.8.4-rc4b
PORTREVISION=	1
CATEGORIES=	multimedia audio kde
MASTER_SITES=	http://www.xs4all.nl/%7Ejjvrieze/
#DISTNAME=	${PORTNAME}-${PORTVERSION:C/\.r/-rc/}

MAINTAINER=	lioux@FreeBSD.org
COMMENT=	KDE frontend to mplayer

#EXTRA_PATCHES=	${.CURDIR}/../../x11/kde3/files/extrapatch-configure
EXTRA_PATCHES=	${PORTSDIR}/x11/kde3/files/extrapatch-configure

RUN_DEPENDS=	mplayer:${PORTSDIR}/multimedia/mplayer

USE_BZIP2=	yes
USE_KDEBASE_VER=3
USE_XLIB=	yes
USE_GMAKE=	yes
USE_REINPLACE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_TARGET=
CONFIGURE_ARGS+=--with-x=${X11BASE} --disable-debug

OPTIONS=	GSTREAMER "Enable support for video playback using gstreamer" off \
		XINE "Enable support for video playback using libxine" off

WANT_GNOME=	gstreamerplugins

###
## Lib Detection
###
# gstreamer
.if exists(${X11BASE}/lib/libgstplay-0.8.so)
WITH_GSTREAMER=yes
.endif
# xine
.if exists(${X11BASE}/lib/libxine.so)
WITH_XINE=yes
.endif

post-patch:
# remove -pedantic where possible to fix build errors on -CURRENT
# remove optimizations
	@${REINPLACE_CMD} -e \
		's|-O2||; s|-pedantic ||' \
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
# do not try to roll our own mimetypes
	@${REINPLACE_CMD} -E -e \
		's|^(SUBDIRS.*)mimetypes|\1|' \
		${WRKSRC}/Makefile.in

.include <bsd.port.pre.mk>

###
## Internal Detection
###
# gstreamer
.if ${HAVE_GNOME:Mgstreamerplugins}
WITH_GSTREAMER=yes
.endif

###
## Support Activation
###
# gstreamer
.undef WITH_GSTREAMER
.if defined(WITH_GSTREAMER)
USE_GNOME+=	gstreamerplugins

PLIST_FILES+=	bin/kgstplayer
.else
CONFIGURE_ARGS+=	--without-gstreamer
.endif
# xine
.if defined(WITH_XINE)
LIB_DEPENDS+=	xine:${PORTSDIR}/multimedia/libxine

PLIST_FILES+=	bin/kxineplayer
.endif

# GCC < 3.1
.if ${OSVERSION} < 500035
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src::kmplayerplaylist.cpp
.endif

.include <bsd.port.post.mk>