summaryrefslogtreecommitdiffstats
path: root/multimedia/gstreamer-plugins/Makefile
blob: aef5865898de3de6ef3ec4f340473f27042774b2 (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
132
133
134
135
136
137
138
# 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-plugins/Makefile,v 1.76 2006/04/01 21:36:24 marcus Exp $
#

PORTNAME=   gstreamer
PORTVERSION?=   0.10.5
## SET BACK TO PORTREVISION?= when we reset PORTREVISION in all the gst plugin ports
PORTREVISION=   1
CATEGORIES?=    multimedia audio
MASTER_SITES=   ${MASTER_SITE_GNOME:S|$|sources/gst-plugins-base/0.10/:base|} \
        http://gstreamer.freedesktop.org/src/gst-plugins-base/:base \
        ${MASTER_SITE_LOCAL:S|$|ahze/:base|} \
        ${MASTER_SITE_LOCAL:S|$|ahze/:good|} \
        ${MASTER_SITE_LOCAL:S|$|ahze/:bad|} \
        ${MASTER_SITE_LOCAL:S|$|ahze/:ugly|} \
        http://gstreamer.freedesktop.org/src/gst-plugins-bad/:bad \
        ${MASTER_SITE_GNOME:S|$|sources/gst-plugins-good/0.10/:good|} \
        http://gstreamer.freedesktop.org/src/gst-plugins-good/:good \
        http://gstreamer.freedesktop.org/src/gst-plugins-ugly/:ugly \
        http://people.freebsd.org/~ahze/distfiles/:good \
        http://people.freebsd.org/~ahze/distfiles/:bad \
        http://people.freebsd.org/~ahze/distfiles/:ugly \
        http://people.freebsd.org/~ahze/distfiles/:base
PKGNAMESUFFIX=  -plugins${GST_PLUGIN_SUFFIX}
DISTFILES=  ${BASE_DISTFILE}:base \
        ${BAD_DISTFILE}:bad \
        ${GOOD_DISTFILE}:good \
        ${UGLY_DISTFILE}:ugly
DIST_SUBDIR=    gnome2

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

LIB_DEPENDS+=   gstreamer-0.10.0:${PORTSDIR}/multimedia/gstreamer \
        popt.0:${PORTSDIR}/devel/popt \
        oil-0.3.1:${PORTSDIR}/devel/liboil

BASE_PORTVERSION=   ${PORTVERSION}
BASE_DISTNAME=      gst-plugins-base-${BASE_PORTVERSION}
BASE_DISTFILE=      ${BASE_DISTNAME}${EXTRACT_SUFX}
BAD_PORTVERSION=    0.10.1
BAD_DISTNAME=       gst-plugins-bad-${BAD_PORTVERSION}
BAD_DISTFILE=       ${BAD_DISTNAME}${EXTRACT_SUFX}
GOOD_PORTVERSION=   0.10.2
GOOD_DISTNAME=      gst-plugins-good-${GOOD_PORTVERSION}
GOOD_DISTFILE=      ${GOOD_DISTNAME}${EXTRACT_SUFX}
UGLY_PORTVERSION=   0.10.2
UGLY_DISTNAME=      gst-plugins-ugly-${UGLY_PORTVERSION}
UGLY_DISTFILE=      ${UGLY_DISTNAME}${EXTRACT_SUFX}

SHLIB_VERSION=  1
USE_GETTEXT=    yes
VERSION=    ${GST_VERSION}
WANT_GSTREAMER= yes
USE_X_PREFIX=   yes
USE_BZIP2=  yes
USE_GMAKE=  yes
USE_GNOME+= gnomehack gnomeprefix gnometarget pkgconfig ltverhack
USE_AUTOTOOLS=  libtool:15
GST_PLUGIN?=    base

CONFIGURE_ENV=  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}"

DEFAULT_AUDIOSINK?= osssink
DEFAULT_AUDIOSRC?=  osssrc

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

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

.if ${GST_PLUGIN} == "base"
INSTALLS_SHLIB= yes
MAN1=       gst-visualise-0.10.1
WRKSRC=${WRKDIR}/${BASE_DISTNAME}
EXTRACT_ONLY=${BASE_DISTFILE}
PLIST_SUB+= VERSION="${VERSION}" \
        SHLIB_VERSION="${SHLIB_VERSION}"
.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-patch:
    @${FIND} ${WRKSRC} -type f | \
    ${XARGS} -n 10 ${REINPLACE_CMD} -e \
    's|malloc\.h|stdlib.h|; \
     s|stdint\.h|inttypes.h|; \
     s|%%VERSION%%|${VERSION}|'
     @${FIND} ${WRKSRC}/ext -name Makefile.in | \
     ${XARGS} -n 10 ${REINPLACE_CMD} -e \
     's|$$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la|${X11BASE}/lib/libgsttag-@GST_MAJORMINOR@.la|; \
      s|$$(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la|${X11BASE}/lib/libgstaudio-@GST_MAJORMINOR@.la|; \
      s|$$(top_builddir)/gst-libs/gst/riff/libgstriff-@GST_MAJORMINOR@.la|${X11BASE}/lib/libgstriff-@GST_MAJORMINOR@.la|; \
      s|$$(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la|${X11BASE}/lib/libgstcdda-@GST_MAJORMINOR@.la|'
    @${REINPLACE_CMD} -e 's|DEFAULT_AUDIOSINK="alsasink"|DEFAULT_AUDIOSINK="${DEFAULT_AUDIOSINK}"|; \
        s|DEFAULT_AUDIOSRC="alsasrc"|DEFAULT_AUDIOSRC="${DEFAULT_AUDIOSRC}"|' \
        ${WRKSRC}/configure

.include <bsd.port.post.mk>