freebsd-ports/multimedia/win32-codecs/Makefile
Mario Sergio Fujikawa Ferreira 73e30486a1 1) Add audio/lame as a LIB_DEPENDS
2) Have this port use the port's system shared version of the lame
library instead of building its own static version. Add both some
detection code and necessary hooks to avifile's configure system
(defensive programming) using some patches
3) Add a simple stale port's tree defensive check. After the library
dependency phase, if one gets a lame library but no shared library
... bogus. The avifile depending on the new version of lame port
was added after the aforementioned. Warn the user about it. A
side effect (of LIB_DEPENDS) is that the new lame dependency is
always built even if there is an old version of lame installed.
4) PORTREVISION bump

Approved by:	maintainer
2001-01-07 14:36:04 +00:00

126 lines
3.6 KiB
Makefile

# New ports collection makefile for: avifile
# Date created: 16 September 2000
# Whom: Holger Lamm
#
# $FreeBSD$
#
PORTNAME= avifile
PORTVERSION= 0.53.1
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 \
binaries-${CODEC_VERSION}.zip \
wmvds32.ax.gz
EXTRACT_ONLY= avifile-${PORTVERSION}.tar.gz
MAINTAINER= holger@eit.uni-kl.de
LIB_DEPENDS= SDL-1.1.2:${PORTSDIR}/devel/sdl-devel \
mp3lame.1:${PORTSDIR}/audio/lame
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
WRKSRC= ${WRKDIR}/${PORTNAME}-0.53
RESTRICTED= Unsure of codec\'s license
RESTRICTED_FILES= binaries-${CODEC_VERSION}.zip \
wmvds32.ax.gz
ONLY_FOR_ARCHS= i386
USE_QT2= yes
USE_XLIB= yes
USE_GMAKE= yes
INSTALLS_SHLIB= yes
USE_AUTOCONF= yes
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
MOC="${MOC}" \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-qt-includes=${X11BASE}/include/qt2 \
--with-qt-libraries=${X11BASE}/lib \
--with-win32-path=${LOCALBASE}/lib/win32 \
--with-mp3-lame \
--enable-release
PLIST_SUB= LIB_VERSION="${LIB_VERSION}"
CODEC_VERSION= 001222
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/benchmark samples/qtrecompress
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
MOC?= ${X11BASE}/bin/moc2
DIFF?= /usr/bin/diff
.include <bsd.port.pre.mk>
.if make(lib-depends)
.if !exists(${LOCALBASE}/lib/libmp3lame.so) && exists(${LOCALBASE}/bin/lame)
lib-depends:
@${ECHO_MSG} ====>
@${ECHO_MSG} ====> Error: You have an old version of lame installed.
@${ECHO_MSG} ====> You need at least port version 3.70_1!
@${ECHO_MSG} ====> Please deinstall lame first, then build avifile.
@${ECHO_MSG} ====>
@${FALSE}
.endif
.endif
post-extract:
@${LOCALBASE}/bin/unzip ${DISTDIR}/binaries-${CODEC_VERSION}.zip \
-d ${WRKDIR}/codecs
@${GZCAT} ${DISTDIR}/wmvds32.ax.gz > ${WRKDIR}/codecs/wmvds32.ax
# 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:
@${MKDIR} ${PREFIX}/lib/win32
@${INSTALL_DATA} ${WRKDIR}/codecs/* ${PREFIX}/lib/win32
@/usr/bin/fmt < ${PKGMESSAGE}
@${INSTALL_DATA} ${WRKSRC}/lib/libaviplay.la ${PREFIX}/lib
@${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/benchmark/.libs/benchmark \
${PREFIX}/bin > /dev/null || \
${INSTALL_PROGRAM} \
${WRKSRC}/samples/benchmark/.libs/benchmark \
${PREFIX}/bin
.else
${INSTALL_PROGRAM} ${WRKSRC}/samples/benchmark/.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>