aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libmatroska/Makefile
blob: b3d9b14fe5804fb3598e35b9ce43ecd8c7e76e2f (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
# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
# $FreeBSD$

PORTNAME=   libmatroska
PORTVERSION=    1.4.0
CATEGORIES= multimedia audio
MASTER_SITES=   http://dl.matroska.org/downloads/libmatroska/ \
        http://www.bunkus.org/videotools/mkvtoolnix/sources/

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

LICENSE=    LGPL21

BUILD_DEPENDS=  libebml>=1.3.0:${PORTSDIR}/textproc/libebml
LIB_DEPENDS=    ebml.4:${PORTSDIR}/textproc/libebml

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_DOS2UNIX=   make/linux/Makefile
BUILD_WRKSRC=   ${WRKSRC}/make/linux
INSTALL_WRKSRC= ${WRKSRC}/make/linux
USE_LDCONFIG=   yes

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

NO_STAGE=   yes
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},; \
            /install:/s|install_staticlib||;/all:/s|staticlib||; \
            s,(-lebml)$$,-L${LOCALBASE}/lib \1,' \
        ${WRKSRC}/make/linux/Makefile

.include <bsd.port.mk>