blob: a5fe25b52ccee13f6c9c1396996d2c617c5881dc (
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
|
# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
# $FreeBSD$
PORTNAME= libdv
PORTVERSION= 1.0.0
PORTREVISION= 3
CATEGORIES= multimedia
MASTER_SITES= SF
MAINTAINER= bapt@FreeBSD.org
COMMENT= Quasar DV codec (libdv): software codec for DV video encoding format
LICENSE= LGPL21
LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
popt.0:${PORTSDIR}/devel/popt
USES= pkgconfig pathfix
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-gtk
CONFIGURE_ENV= PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${LOCALBASE}/libdata/pkgconfig
CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
USE_LDCONFIG= yes
MAN1= dubdv.1 dvconnect.1 encodedv.1
PORTDOCS= AUTHORS COPYING COPYRIGHT ChangeLog NEWS README \
README.dvconnect README.encoder TODO
OPTIONS_DEFINE= SDL DOCS
.include <bsd.port.options.mk>
# XXX - work around compiler bug
# Optimizations -O{1,s,2,3} work
# However, lack of -O{1,s,2,3} or -O0 BREAK the build
# Therefore, make sure we have AT LEAST -O and avoid -O0
CFLAGS:= -O ${CFLAGS:N-O0}
.if ${PORT_OPTIONS:MSDL}
USE_SDL= sdl
CONFIGURE_ARGS+= --enable-sdl
.endif
post-patch:
@${REINPLACE_CMD} -e 's|stdint.h|sys/types.h|' \
${WRKSRC}/libdv/dv.h \
${WRKSRC}/libdv/dv_types.h \
${WRKSRC}/libdv/headers.c \
${WRKSRC}/libdv/encode.c
@${REINPLACE_CMD} -E -e 's|^void swab.+$$||' ${WRKSRC}/libdv/encode.c
@${REINPLACE_CMD} -e 's|SDL/||' ${WRKSRC}/playdv/display.h
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/encodedv/dvavi.c \
${WRKSRC}/encodedv/dvconnect.c
# XXX - revise at every port update
# protect popt from prefix changes
@${REINPLACE_CMD} -E -e 's|(@REQUIRES_NOPKGCONFIG@)|-L${LOCALBASE}/include \1|' \
${WRKSRC}/libdv.pc.in
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
.for doc in ${PORTDOCS}
@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>
|