aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayer/Makefile.common
blob: e45182b92a9d5b4167c9ae785e3f428d7efcdd36 (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
70
71
72
73
74
75
76
77
78
# Contains the build infrastructural definitions for both
# mplayer and mencoder....the variables that we need to set
# before we include bsd.port.pre.mk
#
# $FreeBSD$

MPLAYER_PORT_VERSION=   1.3.0
MPLAYER_SNAPSHOT_DATE=  2016-12-28
PORTREVISION?=  2
MASTER_SITES=   LOCAL/riggs/mplayer
DISTNAME=   mplayer-${MPLAYER_PORT_VERSION}.${MPLAYER_SNAPSHOT_DATE:S/-//g}
WRKSRC=     ${WRKDIR}/mplayer-export-${MPLAYER_SNAPSHOT_DATE}

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/LICENSE

LIB_DEPENDS=    libpng.so:graphics/png \
        libavcodec.so:multimedia/ffmpeg \
        libfreetype.so:print/freetype2

USES=       compiler:c11 gmake iconv ncurses tar:xz
NOPRECIOUSMAKEVARS= yes # ARCH
HAS_CONFIGURE=  yes
CONFIGURE_ENV=  TMPDIR="${WRKSRC}"
CONFIGURE_ARGS= --cc="${CC}" \
        --host-cc="${CC}" \
        --as="${AS}" \
        --mandir="${PREFIX}/man" \
        --extra-cflags="-I${PREFIX}/include -I${LOCALBASE}/include" \
        --extra-libs="-L${PREFIX}/lib" \
        --disable-alsa \
        --disable-ass-internal \
        --disable-bitmap-font \
        --disable-crystalhd \
        --disable-esd \
        --disable-faad \
        --disable-ffmpeg_a \
        --disable-ggi \
        --disable-ggiwmh \
        --disable-liba52 \
        --disable-libbs2b \
        --disable-libdirac-lavc \
        --disable-libilbc \
        --disable-libnut \
        --disable-libvorbis \
        --disable-live \
        --disable-joystick \
        --disable-mad \
        --disable-libmpeg2 \
        --disable-nemesi \
        --disable-real \
        --yasm=''

WANT_GNOME= yes

common-post-patch:
    @${REINPLACE_CMD} \
        -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \
        s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \
        -e 's|/usr/local|${LOCALBASE}|' \
        -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
        -e 's|-lbz2|/usr/lib/libbz2.so|' \
        -e 's|-lncurses|/usr/lib/libncurses.so|' \
        -e 's|-liconv|${ICONV_LIB}|' \
        ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
    @${FIND} -E ${WRKSRC} -type f \
        -iregex ".*(configure|.sh|Makefile)" -print0 | \
        ${XARGS} -x -0 -n 10 \
        ${REINPLACE_CMD} -E \
            -e 's|[[:space:]]gcc[-[:digit:]\.]+| ${CC}|' \
            -e 's|[[:space:]]gcc| ${CC}|' \
            -e 's|\$$\(CC\)|${CC}|' \
            -e 's|/usr/X11R6|${LOCALBASE}|' \
            -e 's|%%LOCALBASE%%|${LOCALBASE}|'
    @${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \
        's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
         s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${DEFAULT_DVD_DEVICE:S/dev\//dev\/\\\:/}|g ; \
         s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${DEFAULT_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'