aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/gmerlin/Makefile
blob: e4933362c978326093a2b9a45f9ef0787da63241 (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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# New ports collection makefile for:    gmerlin
# Date created:     07 Nov 2008
# Whom:         Dmitry Marakasov <amdmi3@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gmerlin
PORTVERSION=    0.4.1
PORTREVISION=   4
CATEGORIES= multimedia
MASTER_SITES=   SF

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Multimedia framework

LIB_DEPENDS=    gavl.1:${PORTSDIR}/multimedia/gavl

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --without-doxygen --without-texinfo --disable-alsa \
        --disable-v4l --disable-alsamixer --disable-camelot \
        --without-cpuflags --disable-v4l2 --disable-v4lconvert
USE_GNOME=  gtk20 gnomehack libxml2
USE_GL=     gl
USE_XORG=   x11 xv xinerama ice
USE_GETTEXT=    yes
USE_LDCONFIG=   yes

CONFIGURE_ENV=  LDFLAGS="-L${LOCALBASE}/lib" \
        CPPFLAGS="-I${LOCALBASE}/include/libvisual-0.4 -I${LOCALBASE}/include"

PORTDOCS=   README

INFO=       gmerlin
MAN1=       gmerlin_play.1

OPTIONS=    PULSEAUDIO "Enable PulseAudio support" on \
        QUICKTIME "Enable QuickTime support" on \
        LIBVISUAL "Enable libvisual support" on \
        LIBCDIO "Enable libcdio support" on \
        MUSICBRAINZ "Enable MusicBrainz support" on \
        CDDB    "Enable CDDB support" on \
        ESOUND  "Enable ESounD support" off \
        JACK    "Enable Jack support" on \
        JPEG    "Enable JPEG support" on \
        PNG "Enable PNG support" on \
        TIFF    "Enable TIFF support" on \
        MJPEGTOOLS "Enable mjpegtools support" on \
        PLUGINCFG "Build plugin configurator" on \
        PLAYER  "Build player" on \
        KBD "Build keyboard daemon" on \
        TRANSCODER "Build transcoder" on \
        VISUALIZER "Build visualizer" on \
        THUMBNAILER "Build thumbnailer" on \
        OPTIMIZED_CFLAGS "Additional optimizations" on

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_PULSEAUDIO)
LIB_DEPENDS+=   pulse.0:${PORTSDIR}/audio/pulseaudio
PLIST_SUB+= PULSEAUDIO=""
.else
CONFIGURE_ARGS+=--disable-pulseaudio
PLIST_SUB+= PULSEAUDIO="@comment "
.endif

.if !defined(WITHOUT_QUICKTIME)
LIB_DEPENDS+=   quicktime.0:${PORTSDIR}/multimedia/libquicktime
PLIST_SUB+= QUICKTIME=""
.else
CONFIGURE_ARGS+=--disable-lqt
PLIST_SUB+= QUICKTIME="@comment "
.endif

.if !defined(WITHOUT_LIBVISUAL)
LIB_DEPENDS+=   visual-0.4:${PORTSDIR}/graphics/libvisual04
.else
CONFIGURE_ARGS+=--disable-libvisual
.endif

.if !defined(WITHOUT_LIBCDIO)
LIB_DEPENDS+=   cdio.12:${PORTSDIR}/sysutils/libcdio
PLIST_SUB+= CDIO=""
.else
CONFIGURE_ARGS+=--disable-libcdio
PLIST_SUB+= CDIO="@comment "
.endif

.if !defined(WITHOUT_MUSICBRAINZ)
LIB_DEPENDS+=   musicbrainz.4:${PORTSDIR}/audio/libmusicbrainz
.else
CONFIGURE_ARGS+=--disable-musicbrainz
.endif

.if !defined(WITHOUT_CDDB)
LIB_DEPENDS+=   cddb.4:${PORTSDIR}/audio/libcddb
.else
CONFIGURE_ARGS+=--disable-cddb
.endif

.if defined(WITH_ESOUND)
LIB_DEPENDS+=   esd.2:${PORTSDIR}/audio/esound
PLIST_SUB+= ESOUND=""
.else
CONFIGURE_ARGS+=--disable-esd
PLIST_SUB+= ESOUND="@comment "
.endif

.if defined(WITH_JACK)
LIB_DEPENDS+=   jack.0:${PORTSDIR}/audio/jack
PLIST_SUB+= JACK=""
.else
CONFIGURE_ARGS+=--disable-jack
PLIST_SUB+= JACK="@comment "
.endif

.if !defined(WITHOUT_JPEG)
LIB_DEPENDS+=   jpeg.11:${PORTSDIR}/graphics/jpeg
PLIST_SUB+= JPEG=""
.else
CONFIGURE_ARGS+=--disable-libjpeg
PLIST_SUB+= JPEG="@comment "
.endif

.if !defined(WITHOUT_PNG)
LIB_DEPENDS+=   png.6:${PORTSDIR}/graphics/png
PLIST_SUB+= PNG=""
.else
CONFIGURE_ARGS+=--disable-libpng
PLIST_SUB+= PNG="@comment "
.endif

.if !defined(WITHOUT_TIFF)
LIB_DEPENDS+=   tiff.4:${PORTSDIR}/graphics/tiff
PLIST_SUB+= TIFF=""
.else
CONFIGURE_ARGS+=--disable-libtiff
PLIST_SUB+= TIFF="@comment "
.endif

.if !defined(WITHOUT_MJPEGTOOLS)
LIB_DEPENDS+=   lavjpeg-1.9.0:${PORTSDIR}/multimedia/mjpegtools
.else
CONFIGURE_ARGS+=--disable-mjpegtools
.endif

# applications
.if !defined(WITHOUT_PLUGINCFG)
PLIST_SUB+= PLUGINCFG=""
.else
CONFIGURE_ARGS+=--disable-plugincfg
PLIST_SUB+= PLUGINCFG="@comment "
.endif

.if !defined(WITHOUT_PLAYER)
MAN1+=      gmerlin.1 gmerlin_remote.1
PLIST_SUB+= PLAYER=""
.else
CONFIGURE_ARGS+=--disable-player
PLIST_SUB+= PLAYER="@comment "
.endif

.if !defined(WITHOUT_KBD)
PLIST_SUB+= KBD=""
.else
CONFIGURE_ARGS+=--disable-kbd
PLIST_SUB+= KBD="@comment "
.endif

.if !defined(WITHOUT_TRANSCODER)
MAN1+=      gmerlin_transcoder.1 gmerlin_transcoder_remote.1
PLIST_SUB+= TRANSCODER=""
.else
CONFIGURE_ARGS+=--disable-transcoder
PLIST_SUB+= TRANSCODER="@comment "
.endif

.if !defined(WITHOUT_VISUALIZER)
PLIST_SUB+= VISUALIZER=""
.else
CONFIGURE_ARGS+=--disable-visualizer
PLIST_SUB+= VISUALIZER="@comment "
.endif

.if !defined(WITHOUT_THUMBNAILER)
PLIST_SUB+= THUMBNAILER=""
.else
CONFIGURE_ARGS+=--disable-thumbnailer
PLIST_SUB+= THUMBNAILER="@comment "
.endif

# vendor ocflags from configure
.if !defined(WITHOUT_OPTIMIZED_CFLAGS)
CFLAGS+=    -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
CXXFLAGS+=  -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-O3.*-ffast-math||g; \
        s|-DGTK_DISABLE_DEPRECATED||; \
        /LIBS/ s|-ldl||g; s|^LDFLAGS="|&$${LDFLAGS} |' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-ldl||; s|-lpthread|${PTHREAD_LIBS}|; \
        /^LIBS = / s|$$| @LIBINTL@ ${PTHREAD_LIBS}|' \
        ${WRKSRC}/lib/Makefile.in ${WRKSRC}/tests/Makefile.in \
        ${WRKSRC}/apps/cmdlineplayer/Makefile.in \
        ${WRKSRC}/apps/kbd/Makefile.in \
        ${WRKSRC}/apps/player/Makefile.in \
        ${WRKSRC}/apps/transcoder/Makefile.in \
        ${WRKSRC}/apps/thumbnailer/Makefile.in

.if !defined(NOPORTDOCS)
post-install:
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include <bsd.port.post.mk>