summaryrefslogtreecommitdiffstats
path: root/multimedia/gstreamer-plugins80/Makefile
blob: 6d7c74bc2480d59ba4bc1dc849f7cbd82137b333 (plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# New ports collection makefile for:	gstreamer plugins
# Date created:		Wed Jul 10 23:38:01 UTC 2002
# Whom:			Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#    $MCom: ports/multimedia/gstreamer-plugins80/Makefile,v 1.63 2006/09/10 00:52:59 mezz Exp $
#

PORTNAME=	gstreamer
PORTVERSION=	0.8.12
PORTREVISION?=	2
PORTEPOCH=	1
CATEGORIES?=	multimedia audio
MASTER_SITES=	${MASTER_SITE_LOCAL} \
		http://gstreamer.freedesktop.org/src/gst-plugins/
MASTER_SITE_SUBDIR=	ahze
PKGNAMESUFFIX=	-plugins${GST_PLUGIN_SUFFIX}80
DISTNAME=	gst-plugins-${PORTVERSION}
DIST_SUBDIR=	gnome2

MAINTAINER=	multimedia@FreeBSD.org
COMMENT?=	GStreamer written collection of plugins handling several media types

LIB_DEPENDS+=	gstreamer-0.8.5:${PORTSDIR}/multimedia/gstreamer80 \
		popt.0:${PORTSDIR}/devel/popt

SHLIB_VERSION=	1
VERSION=	0.8

WANT_GSTREAMER=	yes
USE_XLIB=	yes
USE_BZIP2=	yes
USE_GMAKE=	yes
USE_GETTEXT=	yes
USE_GNOME+=	gnomehack \
		gnomeprefix \
		gnometarget \
		pkgconfig
GNU_CONFIGURE=	yes
GST_PLUGIN?=	base

CONFIGURE_ENV=	PKG_CONFIG=${PKG_CONFIG} \
		CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
		CPPFLAGS="${CPPFLAGS} -I${X11BASE}/include -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
		LDFLAGS="${LDFLAGS} -L${X11BASE}/lib -L${LOCALBASE}/lib ${EXTRA_LIBS} ${PTHREAD_LIBS}"

.include <bsd.port.pre.mk>
.include "${MASTERDIR}/Makefile.common"

.if !defined(WITH_CPUFLAGS)
WITHOUT_CPU_CFLAGS=	yes
.endif

.if ${GST_PLUGIN} == "base"

USE_LDCONFIG=	yes

PLIST_SUB+=	VERSION="${VERSION}" \
		SHLIB_VERSION="${SHLIB_VERSION}"

MAN1=		gst-launch-ext-0.8.1 gst-visualise-0.8.1

## Additional directories which should be both built and installed
## but configure neglected to correctly identify them
# cdrom/vcd support
EXTRA_BUILD_DIR+=	sys/vcd
# modplug
EXTRA_BUILD_DIR+=	gst/modplug
.else
.for f in ${GST_PLUGIN_DIR}
GST_PLUGIN_MAKEFILES+=	${f}/Makefile
.endfor
.endif

# cdrom default device
.ifdef(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

# dvd default device
.ifdef(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
. if ${OSVERSION} < 500000
DEFAULT_DVD_DEVICE=/dev/acd0c
. else
DEFAULT_DVD_DEVICE=/dev/acd0
. endif
.endif

pre-everything::
.if !defined(WITH_CPUFLAGS)
	@${ECHO_MSG} ""
	@${ECHO_MSG} "If you want to compile with CPUFLAGS"
	@${ECHO_MSG} "hit Ctrl+C now and use make \"WITH_CPUFLAGS=yes\""
	@${ECHO_MSG} "NOTE: This option may cause build, install, and/or"
	@${ECHO_MSG} "runtime failures. If this option does not work for you"
	@${ECHO_MSG} "please do not use it."
	@${ECHO_MSG} ""
.endif

post-extract:
# for cdrom/vcd support
# taken from mplayer distfile
# MD5 (MPlayer-1.0pre4.tar.bz2) = 83ebac0f05b192516a41fca2350ca01a
	@${CP} ${FILESDIR}/bsdi_dvd.h ${WRKSRC}/sys/vcd/

post-patch:
	@${FIND} ${WRKSRC} -type f | \
	${XARGS} -n 10 ${REINPLACE_CMD} -e \
	's|malloc\.h|stdlib.h|; \
	 s|stdint\.h|inttypes.h|; \
	 s|%%VERSION%%|${VERSION}|'
# cdrom default device
	@${REINPLACE_CMD} -e 's|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
		${WRKSRC}/ext/cdparanoia/gstcdparanoia.c \
		${WRKSRC}/sys/cdrom/gstcdplayer.c \
		${WRKSRC}/sys/vcd/vcdsrc.c
# dvd default device
	@${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|' \
		${WRKSRC}/ext/dvdnav/dvdnavsrc.c \
		${WRKSRC}/ext/dvdread/dvdreadsrc.c
# cdrom/vcd support
	@${REINPLACE_CMD} -e 's|<linux/cdrom.h>|"bsdi_dvd.h"|' \
		${WRKSRC}/sys/cdrom/gstcdplayer_ioctl.c \
		${WRKSRC}/sys/vcd/vcdsrc.c \
		${WRKSRC}/sys/vcd/vcdsrc.h
# mplex fix -- gst configure does not use mjpegtool's config to find include.
	@${REINPLACE_CMD} -E \
		-e 's|PFLAGS@|PFLAGS@ -I${LOCALBASE}/include/mjpegtools -I${LOCALBASE}/include/mjpegtools/mplex|' \
		${WRKSRC}/ext/mplex/Makefile.in
.if ${GST_PLUGIN}!="base"
	@${REINPLACE_CMD} -E -e 's|ac_config_files=\"*\"|ac_config_files="$$ac_config_files Makefile ${GST_PLUGIN_MAKEFILES}" #|' \
		${WRKSRC}/configure
.else
.for f in ${GST_ALL_PLUGINS}
	@${REINPLACE_CMD} -e 's|ext/${f}/Makefile||g' \
		${WRKSRC}/configure
.endfor
.endif

post-build:
.ifdef(EXTRA_BUILD_DIR)
. for dir in ${EXTRA_BUILD_DIR}
	@cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
. endfor
.endif

post-install:
.ifdef(EXTRA_BUILD_DIR)
. for dir in ${EXTRA_BUILD_DIR}
	@cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}
. endfor
.endif
# register plugins
	-@${LOCALBASE}/bin/gst-register-${VERSION} \
		--gst-registry=${PREFIX}/share/gnome/cache/gstreamer-${VERSION}/registry.xml 2>/dev/null

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud