aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libquicktime/Makefile
blob: 0bda1247f6a343628d89744fc91890fffa4b1780 (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
# Ports collection makefile for:    libquicktime
# Date Created:         Jul 17, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   libquicktime
PORTVERSION=    1.0.2
PORTREVISION=   1
CATEGORIES= multimedia
MASTER_SITES=   SFE

MAINTAINER= multimedia@FreeBSD.org
COMMENT=    A library for reading and writing quicktime files

LIB_DEPENDS=    vorbis.4:${PORTSDIR}/audio/libvorbis

USE_LDCONFIG=   yes
USE_GNOME=  gnometarget gnomehack pkgconfig
USE_XORG=   xaw xv
USE_GMAKE=  yes
USE_AUTOTOOLS=  autoconf:261
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
        LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS} -lintl"
CONFIGURE_ARGS= --with-x --enable-gpl
CFLAGS+=    -fPIC
MAN1=       lqtplay.1

OPTIONS=    LAME "Enable Lame mp3 encoding support" Off \
        OPENGL "Enable OpenGL support" On \
        DV "Enable libdv support for digital cameras" On \
        JPEG "Enable JPEG support" On \
        PNG "Enable PNG support" On \
        FFMPEG "Enable FFmpeg support" On \
        FAAC "Enable FAAC support" Off \
        FAAD "Enable FAAD support" On \
        X264 "Enable X264 codec support" On \
        GTK2 "Enable Gtk+2 Frontend" Off \
        OPTIMIZED_CFLAGS "Enable Optimized CFLAGS" Off

PORTDOCS=   api_usage.html codecs.html qt4l_building.html \
        qt4l_codecs.html qt4l_index.html \
        qt4l_license.html qt4l_opening.html qt4l_positioning.html \
        qt4l_reading.html qt4l_util.html qt4l_writing.html

.include <bsd.port.pre.mk>

.if !defined(WITH_OPTIMIZED_CFLAGS)
CONFIGURE_ARGS+=    --without-cpuflags
.endif

.if ${HAVE_GNOME:Mgtk20}!="" && defined(WITH_GTK2)
USE_GNOME+= gtk20
CONFIGURE_ARGS+=    --with-gtk
PLIST_SUB+= GTK=""
.else
CONFIGURE_ARGS+=    --without-gtk
PLIST_SUB+= GTK="@comment "
.endif

.if defined(WITH_LAME)
LIB_DEPENDS+=   mp3lame.0:${PORTSDIR}/audio/lame
PLIST_SUB+= LAME=""
CONFIGURE_ARGS+=    --with-lame
.else
PLIST_SUB+= LAME="@comment "
CONFIGURE_ARGS+=    --without-lame
.endif

.if !defined(WITHOUT_OPENGL)
USE_GL=     yes
CONFIGURE_ARGS+=    --with-opengl
.else
CONFIGURE_ARGS+=    --without-opengl
.endif

.if !defined(WITHOUT_DV)
LIB_DEPENDS+=   dv.4:${PORTSDIR}/multimedia/libdv
PLIST_SUB+= DV=""
CONFIGURE_ARGS+=    --with-libdv
.else
PLIST_SUB+= DV="@comment "
CONFIGURE_ARGS+=    --without-libdv
.endif

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

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

.if !defined(WITHOUT_FFMPEG)
LIB_DEPENDS+=   avcodec.1:${PORTSDIR}/multimedia/ffmpeg
PLIST_SUB+= FFMPEG=""
CONFIGURE_ARGS+=    --with-ffmpeg
.else
PLIST_SUB+= FFMPEG="@comment "
CONFIGURE_ARGS+=    --without-ffmpeg
.endif

.if defined(WITH_FAAC)
LIB_DEPENDS+=   faac.0:${PORTSDIR}/audio/faac
PLIST_SUB+= FAAC=""
CONFIGURE_ARGS+=    --with-faac
.else
PLIST_SUB+= FAAC="@comment "
CONFIGURE_ARGS+=    --without-faac
.endif

.if !defined(WITHOUT_FAAD)
LIB_DEPENDS+=   faad.0:${PORTSDIR}/audio/faad
PLIST_SUB+= FAAD=""
CONFIGURE_ARGS+=    --with-faad2
.else
PLIST_SUB+= FAAD="@comment "
CONFIGURE_ARGS+=    --without-faad2
.endif

.if !defined(WITHOUT_X264)
LIB_DEPENDS+=   x264.50:${PORTSDIR}/multimedia/x264
PLIST_SUB+= X264=""
CONFIGURE_ARGS+=    --with-x264
.else
PLIST_SUB+= X264="@comment "
CONFIGURE_ARGS+=    --without-x264
.endif

.if ${MACHINE_CPU:Mmmx}
CONFIGURE_ARGS+=    --enable-mmx
.else
CONFIGURE_ARGS+=    --disable-mmx
.endif

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=    --disable-nls
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|stdint.h|inttypes.h|' \
        ${WRKSRC}/plugins/audiocodec/* \
        ${WRKSRC}/plugins/videocodec/*
    @${REINPLACE_CMD} -e '/objformat=/s|=.*|=elf|' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-DG.*_DISABLE_DEPRECATED||g' \
        ${WRKSRC}/configure*

pre-configure:
    @${CHMOD} +x ${WRKSRC}/configure

.if !defined(NOPORTDOCS)
post-install:
    @${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
    @${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>