blob: 783baac87dc5db47dc52dea58ff6844cc9235d92 (
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
|
# New ports collection makefile for: libmpeg2
# Date created: Tue Oct 16 17:14:20 BRST 2001
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= libmpeg2
PORTVERSION= 0.4.0b
PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://libmpeg2.sourceforge.net/files/
DISTNAME= mpeg2dec-${PORTVERSION}
MAINTAINER= lioux@FreeBSD.org
COMMENT= A free library for decoding mpeg-2 and mpeg-1 video streams
USE_GNOME= lthack
USE_XLIB= yes
USE_INC_LIBTOOL_VER=13
USE_REINPLACE= yes
INSTALLS_SHLIB= yes
CONFIGURE_ARGS= --enable-shared \
--with-x
WRKSRC= ${WRKDIR}/mpeg2dec-0.4.0
MAN1= extract_mpeg2.1 mpeg2dec.1
PORTDOCS= libmpeg2.txt
.ifdef(WITH_MGA)
CONFIGURE_ARGS+= --enable-mga
.endif
.ifdef(WITH_SDL)
USE_SDL= yes
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libvo::configure.incl
CONFIGURE_ARGS+= --enable-sdl
.else
CONFIGURE_ARGS+= --disable-sdl
.endif
# allow build with more warnings enabled
.if defined(NO_WERROR)
CONFIGURE_ARGS+= --disable-warnings
.endif
# We must be able to build EV6 code; actual CPU-type optimizations
# are chosen at runtime.
.if ${ARCH:L} == "alpha"
CFLAGS:= ${CFLAGS:N-mcpu=*}
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha" && ${OSVERSION} >= 502102
BROKEN= "Does not compile on alpha 5.x"
.endif
pre-everything::
@${ECHO_MSG} "====>"
.ifndef(WITH_SDL)
@${ECHO_MSG} "====> You can enable SDL support by defining WITH_SDL"
.endif
.ifndef(WITH_MGA)
@${ECHO_MSG} "====> You can enable MGA support by defining WITH_MGA"
.endif
@${ECHO_MSG} "====>"
post-patch:
@${REINPLACE_CMD} -e 's|<SDL/|<SDL11/|' ${WRKSRC}/libvo/*
@${REINPLACE_CMD} -e 's|-O3||;s|<termio.h>|<termios.h>|' ${WRKSRC}/configure
# AMD64 prefers position independent code
.if ${ARCH:L} == "amd64"
@${REINPLACE_CMD} -e 's|-prefer-non-pic||' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.endif
@${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/libmpeg2/Makefile.in
@${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/libmpeg2/convert/Makefile.in
post-install:
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/libmpeg2.txt ${DOCSDIR}
.endif
@${INSTALL_DATA} ${WRKSRC}/libvo/libvo.a ${PREFIX}/lib
@${INSTALL_DATA} ${WRKSRC}/include/video_out.h \
${PREFIX}/include/mpeg2dec
.include <bsd.port.post.mk>
|