Lines 6-13
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= mjpegtools |
8 |
PORTNAME= mjpegtools |
9 |
PORTVERSION= 1.6.1 |
9 |
PORTVERSION= 1.6.2 |
10 |
PORTREVISION= 1 |
|
|
11 |
CATEGORIES= multimedia |
10 |
CATEGORIES= multimedia |
12 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
11 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
13 |
MASTER_SITE_SUBDIR= mjpeg |
12 |
MASTER_SITE_SUBDIR= mjpeg |
Lines 15-21
Link Here
|
15 |
MAINTAINER= lioux@FreeBSD.org |
14 |
MAINTAINER= lioux@FreeBSD.org |
16 |
COMMENT= Set of tools to record/playback/edit videos in MPEG format |
15 |
COMMENT= Set of tools to record/playback/edit videos in MPEG format |
17 |
|
16 |
|
18 |
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm |
|
|
19 |
LIB_DEPENDS= aviplay.0:${PORTSDIR}/multimedia/avifile \ |
17 |
LIB_DEPENDS= aviplay.0:${PORTSDIR}/multimedia/avifile \ |
20 |
jpeg.9:${PORTSDIR}/graphics/jpeg |
18 |
jpeg.9:${PORTSDIR}/graphics/jpeg |
21 |
|
19 |
|
Lines 25-61
Link Here
|
25 |
USE_REINPLACE= yes |
23 |
USE_REINPLACE= yes |
26 |
USE_XLIB= yes |
24 |
USE_XLIB= yes |
27 |
GNU_CONFIGURE= yes |
25 |
GNU_CONFIGURE= yes |
28 |
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}" \ |
26 |
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS} ${PTHREAD_CFLAGS}" \ |
29 |
LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS:S/"//g}" \ |
27 |
LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS} ${PTHREAD_LIBS:S/"//g}" \ |
30 |
PTHREAD_LIBS="${PTHREAD_LIBS:S/"//g}" |
28 |
PTHREAD_LIBS="${PTHREAD_LIBS:S/"//g}" |
|
|
29 |
CONFIGURE_ARGS= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} \ |
30 |
--program-transform-name="" |
31 |
WANT_GNOME= yes |
31 |
WANT_GNOME= yes |
32 |
WANT_SDL= yes |
32 |
WANT_SDL= yes |
33 |
|
33 |
|
34 |
MAN1= divxdec.1 jpeg2yuv.1 lav2divx.1 lav2mpeg.1 lav2wav.1 lav2yuv.1 \ |
34 |
MAN1_EXTRA= lavplay.1 lavrec.1 mjpegtools.1 mpeg2enc.1 mplex.1 \ |
35 |
lavpipe.1 lavplay.1 lavrec.1 lavtrans.1 mjpegtools.1 mp2enc.1 \ |
35 |
yuvplay.1 lav2wav.1 lav2yuv.1 lavtrans.1 mp2enc.1 \ |
36 |
mpeg2enc.1 mplex.1 ppmtoy4m.1 y4mcolorbars.1 y4mtoppm.1 \ |
36 |
yuvscaler.1 lavpipe.1 yuv2lav.1 yuvdenoise.1 jpeg2yuv.1 \ |
37 |
yuv2divx.1 yuv2lav.1 yuvdenoise.1 yuvkineco.1 yuvmedianfilter.1 \ |
37 |
pgmtoy4m.1 ppmtoy4m.1 y4mtoppm.1 y4mcolorbars.1 \ |
38 |
yuvplay.1 yuvscaler.1 yuvycsnoise.1 |
38 |
yuvkineco.1 yuvycsnoise.1 yuvmedianfilter.1 lav2mpeg.1 yuvfps.1 |
39 |
MAN5= yuv4mpeg.5 |
|
|
40 |
|
39 |
|
41 |
DOC_FILES= AUTHORS BUGS CHANGES COPYING ChangeLog HINTS NEWS \ |
40 |
MAN1= ${MAN1_EXTRA} yuvinactive.1 |
|
|
41 |
|
42 |
MAN5= yuv4mpeg.5 |
43 |
|
44 |
PORTDOCS= AUTHORS BUGS CHANGES COPYING ChangeLog HINTS NEWS \ |
42 |
PLANS README README.DV README.avilib README.glav \ |
45 |
PLANS README README.DV README.avilib README.glav \ |
43 |
README.lavpipe README.transist TODO |
46 |
README.lavpipe README.transist TODO |
44 |
|
47 |
|
45 |
post-install: |
48 |
INFO= mjpeg-howto |
46 |
.ifndef(NOPORTDOCS) |
|
|
47 |
@${MKDIR} ${DOCSDIR} |
48 |
.for file in ${DOC_FILES} |
49 |
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} |
50 |
.endfor |
51 |
.endif |
52 |
|
49 |
|
53 |
.include <bsd.port.pre.mk> |
50 |
.include <bsd.port.pre.mk> |
54 |
|
51 |
|
55 |
.if ${ARCH} != "i386" |
52 |
.if ${ARCH} == "i386" |
56 |
PLIST_SUB+= DIVX='@comment ' |
53 |
BUILD_DEPEND+= nasm:${PORTSDIR}/devel/nasm |
57 |
.else |
|
|
58 |
PLIST_SUB+= DIVX='' |
59 |
.endif |
54 |
.endif |
60 |
|
55 |
|
61 |
# pre-detection |
56 |
# pre-detection |
Lines 84-145
Link Here
|
84 |
# option activation |
79 |
# option activation |
85 |
.if ${HAVE_GNOME:Mgtk12}!="" |
80 |
.if ${HAVE_GNOME:Mgtk12}!="" |
86 |
USE_GNOME+= gtk12 |
81 |
USE_GNOME+= gtk12 |
87 |
PLIST_SUB+= GTK="" |
82 |
PLIST_FILES+= bin/glav |
88 |
.else |
83 |
.endif |
89 |
PLIST_SUB+= GTK="@comment " |
84 |
# |
|
|
85 |
.if defined(WITH_LIBDV_PAL) |
86 |
CONFIGURE_ARGS+= --with-dv-yv12 |
87 |
WITH_LIBDV= yes |
90 |
.endif |
88 |
.endif |
91 |
# |
89 |
# |
92 |
.ifdef(WITH_LIBDV) |
90 |
.if defined(WITH_LIBDV) |
93 |
LIB_DEPENDS+= dv.3:${PORTSDIR}/multimedia/libdv |
91 |
LIB_DEPENDS+= dv.3:${PORTSDIR}/multimedia/libdv |
94 |
|
92 |
|
95 |
CONFIGURE_ARGS+= --with-dv=${LOCALBASE} |
93 |
CONFIGURE_ARGS+= --with-dv=${LOCALBASE} |
96 |
.endif |
94 |
.endif |
97 |
# |
95 |
# |
98 |
.ifdef(WITH_LIBGNUGETOPT) |
96 |
.if defined(WITH_LIBGNUGETOPT) |
99 |
USE_GETOPT_LONG= yes |
97 |
USE_GETOPT_LONG= yes |
100 |
.endif |
98 |
.endif |
101 |
# |
99 |
# |
102 |
.ifdef(WITH_LIBMOVTAR) |
100 |
.if defined(WITH_LIBMOVTAR) |
103 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmovtar.a:${PORTSDIR}/multimedia/libmovtar |
101 |
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmovtar.a:${PORTSDIR}/multimedia/libmovtar |
104 |
|
102 |
|
105 |
CONFIGURE_ARGS+= --with-movtar-prefix=${LOCALBASE} |
103 |
CONFIGURE_ARGS+= --with-movtar-prefix=${LOCALBASE} |
106 |
.endif |
104 |
.endif |
107 |
# |
105 |
# |
108 |
.ifdef(WITH_SDL) |
106 |
.if defined(WITH_SDL) |
109 |
USE_SDL= sdl |
107 |
USE_SDL= sdl |
110 |
CONFIGURE_ARGS+= --with-sdl |
108 |
CONFIGURE_ARGS+= --with-sdl |
111 |
.endif |
109 |
.endif |
112 |
# |
110 |
# |
113 |
.ifdef(WITH_QUICKTIME) |
111 |
.if defined(WITH_QUICKTIME) |
114 |
LIB_DEPENDS+= openquicktime.0:${PORTSDIR}/multimedia/openquicktime |
112 |
LIB_DEPENDS+= openquicktime.0:${PORTSDIR}/multimedia/openquicktime |
115 |
|
113 |
|
116 |
CONFIGURE_ARGS+= --with-quicktime=${LOCALBASE} |
114 |
CONFIGURE_ARGS+= --with-quicktime |
117 |
.endif |
115 |
.endif |
118 |
|
116 |
|
119 |
pre-everything:: |
117 |
pre-everything:: |
120 |
.if ${HAVE_GNOME:Mgtk12}=="" |
118 |
.if ${HAVE_GNOME:Mgtk12}=="" |
121 |
@${ECHO_MSG} "====> You can enable GTK support by defining WITH_GNOME" |
119 |
@${ECHO_MSG} "====> You can enable GTK support by defining WITH_GNOME" |
122 |
.endif |
120 |
.endif |
123 |
.ifndef(WITH_LIBDV) |
121 |
.if !defined(WITH_LIBDV) |
124 |
@${ECHO_MSG} "====> You can enable DV support by defining WITH_LIBDV" |
122 |
@${ECHO_MSG} "====> You can enable DV support by defining WITH_LIBDV" |
125 |
.endif |
123 |
.endif |
126 |
.ifndef(WITH_LIBMOVTAR) |
124 |
.if !defined(WITH_LIBDV_PAL) |
|
|
125 |
@${ECHO_MSG} "====> You can enable DV PAL support by defining WITH_LIBDV_PAL" |
126 |
.endif |
127 |
.if !defined(WITH_LIBMOVTAR) |
127 |
@${ECHO_MSG} "====> You can enable movtar support by defining WITH_LIBMOVTAR" |
128 |
@${ECHO_MSG} "====> You can enable movtar support by defining WITH_LIBMOVTAR" |
128 |
.endif |
129 |
.endif |
129 |
.ifndef(WITH_QUICKTIME) |
130 |
.if !defined(WITH_QUICKTIME) |
130 |
@${ECHO_MSG} "====> You can enable quicktime support by defining WITH_QUICKTIME" |
131 |
@${ECHO_MSG} "====> You can enable quicktime support by defining WITH_QUICKTIME" |
131 |
.endif |
132 |
.endif |
132 |
.ifndef(WITH_SDL) |
133 |
.if !defined(WITH_SDL) |
133 |
@${ECHO_MSG} "====> You can enable SDL support by defining WITH_SDL" |
134 |
@${ECHO_MSG} "====> You can enable SDL support by defining WITH_SDL" |
134 |
.endif |
135 |
.endif |
135 |
|
136 |
|
136 |
post-patch: |
137 |
post-patch: |
137 |
@${REINPLACE_CMD} -E -e 's|^(pkgconfigdir = )\$$\(libdir\)/(pkgconfig)|\1${PREFIX}/libdata/\2|' \ |
138 |
@${REINPLACE_CMD} -E -e 's|^(pkgconfigdir = )\$$\(libdir\)/(pkgconfig)|\1${PREFIX}/libdata/\2|' \ |
138 |
${WRKSRC}/Makefile.in |
139 |
${WRKSRC}/Makefile.in |
139 |
@${REINPLACE_CMD} -e 's|stdint.h|sys/types.h|' \ |
|
|
140 |
${WRKSRC}/lavtools/lav2divx.cpp \ |
141 |
${WRKSRC}/lavtools/yuv2divx.cpp \ |
142 |
${WRKSRC}/lavtools/divxdec.cpp |
143 |
@${REINPLACE_CMD} -E -e 's@(-l(jpeg|openquicktime|png))@-L${LOCALBASE}/lib \1@; \ |
140 |
@${REINPLACE_CMD} -E -e 's@(-l(jpeg|openquicktime|png))@-L${LOCALBASE}/lib \1@; \ |
144 |
s|(-I) (\$$with_quicktime)|\1\2/include/openquicktime|; \ |
141 |
s|(-I) (\$$with_quicktime)|\1\2/include/openquicktime|; \ |
145 |
s|(-L\$$with_quicktime) |\1/lib |; \ |
142 |
s|(-L\$$with_quicktime) |\1/lib |; \ |
Lines 153-160
Link Here
|
153 |
${WRKSRC}/lavtools/liblavplay.c \ |
150 |
${WRKSRC}/lavtools/liblavplay.c \ |
154 |
${WRKSRC}/lavtools/yuvplay.c |
151 |
${WRKSRC}/lavtools/yuvplay.c |
155 |
@${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \ |
152 |
@${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \ |
156 |
${WRKSRC}/scripts/lav2mpeg ${WRKSRC}/scripts/mpegtranscode |
153 |
${WRKSRC}/scripts/lav2mpeg ${WRKSRC}/scripts/mpegtranscode \ |
157 |
.ifdef(WITH_QUICKTIME) |
154 |
${WRKSRC}/scripts/lav2avi.sh |
|
|
155 |
.if defined(WITH_QUICKTIME) |
158 |
@${REINPLACE_CMD} -E -e 's|^(have_openquicktime=).+$$|\1true|' \ |
156 |
@${REINPLACE_CMD} -E -e 's|^(have_openquicktime=).+$$|\1true|' \ |
159 |
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} |
157 |
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} |
160 |
@${REINPLACE_CMD} -E \ |
158 |
@${REINPLACE_CMD} -E \ |
Lines 170-176
Link Here
|
170 |
@${REINPLACE_CMD} -E -e 's|^(have_pthread=).+$$|\1true|' \ |
168 |
@${REINPLACE_CMD} -E -e 's|^(have_pthread=).+$$|\1true|' \ |
171 |
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} |
169 |
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} |
172 |
.endif |
170 |
.endif |
173 |
.ifdef(WITH_LIBGNUGETOPT) |
171 |
.if defined(WITH_LIBGNUGETOPT) |
174 |
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 -lgnugetopt|' \ |
172 |
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 -lgnugetopt|' \ |
175 |
${WRKSRC}/lavtools/Makefile.in |
173 |
${WRKSRC}/lavtools/Makefile.in |
176 |
.endif |
174 |
.endif |
Lines 178-189
Link Here
|
178 |
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 ${PTHREAD_LIBS}|' \ |
176 |
@${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 ${PTHREAD_LIBS}|' \ |
179 |
${WRKSRC}/lavtools/Makefile.in |
177 |
${WRKSRC}/lavtools/Makefile.in |
180 |
|
178 |
|
181 |
post-configure: |
179 |
post-install: |
182 |
@${CP} -f ${LIBTOOL} ${WRKSRC} |
180 |
.if !defined(NOPORTDOCS) |
183 |
|
181 |
@${MKDIR} ${DOCSDIR} |
184 |
pre-build: |
182 |
.for file in ${PORTDOCS} |
185 |
.ifdef(WITH_QUICKTIME) |
183 |
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} |
186 |
@${ECHO_CMD} "#define HAVE_OPENQUICKTIME 1" >> ${WRKSRC}/config.h |
184 |
.endfor |
187 |
.endif |
185 |
.endif |
|
|
186 |
.for man in ${MAN1_EXTRA} |
187 |
@${INSTALL_MAN} ${WRKSRC}/docs/${man} ${MANPREFIX}/man/man1 |
188 |
.endfor |
189 |
@${INSTALL_MAN} ${WRKSRC}/docs/yuv4mpeg.5 ${MANPREFIX}/man/man5 |
188 |
|
190 |
|
189 |
.include <bsd.port.post.mk> |
191 |
.include <bsd.port.post.mk> |