summaryrefslogtreecommitdiffstats
path: root/multimedia/avifile/Makefile
blob: defce24ec8922e8d7ef622a40f27b29201ef1111 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# New ports collection makefile for:   avifile
# Date created: 	16 September 2000
# Whom: 		Holger Lamm
#
# $FreeBSD$
#

PORTNAME=	avifile
PORTVERSION=	0.60.20010429
PORTREVISION=	1
CATEGORIES=	graphics
MASTER_SITES=	http://ernie.eit.uni-kl.de/avifile/ \
		http://divx.euro.ru/ \
		http://www.toon.eu.org/divx/
DISTFILES=	avifile-${PORTVERSION}.tar.gz \

MAINTAINER=	holger@eit.uni-kl.de

LIB_DEPENDS=	SDL-1.1.3:${PORTSDIR}/devel/sdl12
RUN_DEPENDS=	${CODEC_DETECTION_FILE}:${CODEC_PORT}

ONLY_FOR_ARCHS=	i386
USE_QT_VER=	2
USE_XLIB=	yes
USE_GMAKE=	yes
INSTALLS_SHLIB=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}-0.6
LDCONFIG_DIRS=	%%PREFIX%%/lib/avifile

USE_AUTOMAKE=	yes
USE_LIBTOOL=	yes
LIBTOOLFILES=	acinclude.m4
# GNU_CONFIGURE=	yes
CONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}" \
		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
CONFIGURE_ARGS=	--with-win32-path=${LOCALBASE}/lib/win32 \
		--enable-release --with-gnu-ld

PLIST_SUB=	LIB_VERSION="${LIB_VERSION}"

FMT=	/usr/bin/fmt

#CODEC_PORT=	${PORTSDIR}/graphics/win32-codecs
CODEC_PORT=	${.CURDIR}/../win32-codecs
CODEC_DETECTION_FILE!=	${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE

LIB_VERSION=	0
# Adhoc fix. First part.
# qt is there but configure is not finding it
# Therefore, it is avoiding this directories
# At least, on lioux's homesystem with qt 2.2.3
EXTRA_BUILD_DIR=	player samples/misc samples/qtrecompress

SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
DIFF?=		/usr/bin/diff

.include <bsd.port.pre.mk>

pre-extract:
	@if [ -f ${LOCALBASE}/lib/libpth.so ]; then \
	  ${ECHO_MSG} "Error: This packet does not compile when the \
packet 'pth' is installed.";\
	  ${FALSE};\
	fi
do-configure:
	(cd ${WRKSRC} && aclocal && ./autogen.sh &&\
	${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS})
# Libtool fix code kindly provided by Mr. Maxim Sobolev <sobomax@FreeBSD.org>
post-configure:
	@${PERL} -pi -e \
		's|^deplibs_check_method=.*|deplibs_check_method=pass_all|' \
			${WRKSRC}/libtool

post-build:
.for dir in ${EXTRA_BUILD_DIR}
	(cd ${WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${GMAKE})
.endfor

post-install:
	@${FMT} < ${PKGMESSAGE}
	@${INSTALL_DATA} ${WRKSRC}/lib/libaviplay.la ${PREFIX}/lib
	@${INSTALL_DATA} ${WRKSRC}/plugins/libaudiodec/libaudiodec.la ${PREFIX}/lib/avifile
	@${INSTALL_DATA} ${WRKSRC}/plugins/libmp3lame_audioenc/libmp3lame_audioenc.la ${PREFIX}/lib/avifile
	@${INSTALL_DATA} ${WRKSRC}/plugins/libmpeg_audiodec/libmpeg_audiodec.la ${PREFIX}/lib/avifile
	@${INSTALL_DATA} ${WRKSRC}/plugins/libwin32/libwin32.la ${PREFIX}/lib/avifile
#	@${LN} -sf libaviplay.so.${LIB_VERSION} ${PREFIX}/lib/libaviplay.so
# Adhoc fix. Second part.
# Install the missed applications.
.if exists(${PREFIX}/bin/aviplay)
	${DIFF} ${WRKSRC}/player/.libs/aviplay ${PREFIX}/bin > /dev/null || \
			${INSTALL_PROGRAM} ${WRKSRC}/player/.libs/aviplay \
				${PREFIX}/bin
.else
	${INSTALL_PROGRAM} ${WRKSRC}/player/.libs/aviplay ${PREFIX}/bin
.endif
.if exists(${PREFIX}/bin/benchmark)
	${DIFF} ${WRKSRC}/samples/misc/.libs/benchmark \
		${PREFIX}/bin > /dev/null || \
			${INSTALL_PROGRAM} \
				${WRKSRC}/samples/misc/.libs/benchmark \
					${PREFIX}/bin
.else
	${INSTALL_PROGRAM} ${WRKSRC}/samples/misc/.libs/benchmark \
		${PREFIX}/bin
.endif
.if exists(${PREFIX}/bin/qtrecompress)
	${DIFF} ${WRKSRC}/samples/qtrecompress/.libs/qtrecompress \
		${PREFIX}/bin > /dev/null || \
			${INSTALL_PROGRAM} ${WRKSRC}/samples/qtrecompress/.libs/qtrecompress ${PREFIX}/bin
.else
	${INSTALL_PROGRAM} ${WRKSRC}/samples/qtrecompress/.libs/qtrecompress \
		${PREFIX}/bin
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud