aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libmatroska/Makefile
blob: ed59640d8b694646ec6f544a7651b1736cea8482 (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
# New ports collection makefile for:    libmatroska
# Date created:     Mon May 19 08:29:44 UTC 2003
# Whom:                 Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   libmatroska
PORTVERSION=    0.6.3
PORTREVISION=   2
CATEGORIES= multimedia audio
MASTER_SITES=   http://dl.matroska.org/downloads/libmatroska/

MAINTAINER= lioux@FreeBSD.org
COMMENT=    Extensible Multimedia Container Format

BUILD_DEPENDS=  ${LOCALBASE}/lib/libebml.a:${PORTSDIR}/textproc/libebml

USE_GMAKE=  yes
USE_REINPLACE=  yes
USE_SIZE=   yes
BUILD_WRKSRC=   ${WRKSRC}/make/linux
INSTALL_WRKSRC= ${WRKSRC}/make/linux

# Installs dir with proper permissions
INSTALL_DATA_DIR=   ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755

post-patch:
# XXX - revise at every port update
# the tests are botched. do not run them
    @${REINPLACE_CMD} -E \
        -e 's|^(all:.*)test|\1|' \
        ${WRKSRC}/make/linux/Makefile

do-configure:
    @${REINPLACE_CMD} -E \
        -e 's|^(prefix).*$$|\1=${PREFIX}|; \
            s,^(CXX|LD)[[:space:]]*=.*$$,\1=${CXX},; \
            s|^(CXXFLAGS)[[:space:]]*=(.*)$$|\1+=\2|; \
            s|^(LIBEBML_INCLUDE_DIR)[[:space:]]*=.*|\1=${LOCALBASE}/include|; \
            s|^(LIBEBML_LIB_DIR)[[:space:]]*=.*|\1=${LOCALBASE}/lib|; \
            s|^(INSTALL)[[:space:]]*=.*$$|\1=|; \
            s|^(INSTALL_DIR_OPTS)[[:space:]]*=.*$$|\1=${INSTALL_DATA_DIR}|; \
            s,^(INSTALL_OPTS_LIB|INSTALL_OPTS)[[:space:]]*=.*$$,\1=${INSTALL_DATA},' \
        ${WRKSRC}/make/linux/Makefile

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 502105
BROKEN=     "Does not compile on FreeBSD >= 5.x"
.endif

# gcc 3.2 was available on 5.x before this OSVERSION
# do not build gcc 3.3 unless necessary
.if ${OSVERSION} < 501103
# use gcc 3.2
USE_GCC=3.2
.else
# default for 5.x series
USE_GCC=3.3
.endif

.if ${OSVERSION} < 500000
USE_GCC=2.95
# this is gcc 2.x
CFLAGS+= -DNO_WSTRING -I${LOCALBASE}/include
.endif

.include <bsd.port.post.mk>