summaryrefslogtreecommitdiffstats
path: root/multimedia/libmpeg2/Makefile
blob: 6fd24c42947899cbb63a8b8c6f73d4a0c59d85c3 (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
# 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.2.1
PORTREVISION=	1
CATEGORIES=	graphics
MASTER_SITES=	http://libmpeg2.sourceforge.net/files/
DISTNAME=	mpeg2dec-${PORTVERSION}

MAINTAINER=	lioux@FreeBSD.org

USE_XLIB=	yes
USE_LIBTOOL=	yes
USE_REINPLACE=	yes

CONFIGURE_ARGS= --enable-shared

.ifdef(WITH_MGA)
CONFIGURE_ARGS+=	--enable-mga
.endif

.ifdef(WITH_SDL)
LIB_DEPENDS+=	SDL-1.1.4:${PORTSDIR}/devel/sdl12

EXTRA_PATCHES+=	${FILESDIR}/extra-patch-libvo::configure.incl
SDL_CONFIG?=    ${LOCALBASE}/bin/sdl11-config

CONFIGURE_ENV+=  SDL_CONFIG="${SDL_CONFIG}"
CONFIGURE_ARGS+=	--enable-sdl
.else
CONFIGURE_ARGS+=	--disable-sdl
.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

post-configure:
	@${CP} -f ${LOCALBASE}/bin/libtool ${WRKSRC}
	@${CHMOD} u+w ${WRKSRC}/libtool
# Libtool fix code kindly provided by Mr. Maxim Sobolev <sobomax@FreeBSD.org>
	@${REINPLACE_CMD} -E \
		-e 's|^deplibs_check_method=.*|deplibs_check_method=pass_all|; \
		s|(install_ltlibs=)yes|\1no|' \
		${WRKSRC}/libtool

post-install:
.ifndef(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/doc/libvo.txt ${DOCSDIR}
.endif
	@${INSTALL_DATA} ${WRKSRC}/libvo/libvo.a ${PREFIX}/lib

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