aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayer/Makefile.options
blob: 966620acb86dcb9bd62db65cd93c402a2e8baccd (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
79
80
81
82
83
84
85
86
# $FreeBSD$
#
# Non-helper handling of option variables and build environment.
# Include after bsd.port.pre.mk
#
# Almost all of mplayer's build-time configuration is controlled via the
# OPTIONS framework. Exceptions are listed below. These variables must be
# set via make.conf or by passing the variable to make during build, e.g.
# make WITH_DVD_DEVICE=/dev/cd0
#
# WITH_DVD_DEVICE=/path/to/desired/device
# default: /dev/cd0
# This option changes the default device where mplayer looks by default
# for a DVD medium
#
# WITH_CDROM_DEVICE=/path/to/desired/device
# default: /dev/cd0
# This option changes the default cdrom device, maybe useful for VCDs

# Non-OPTIONS knob handling
# =========================

.if defined(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
DEFAULT_DVD_DEVICE=/dev/cd0
.endif

.if defined(WITH_CDROM_DEVICE)
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE}
.else
DEFAULT_CDROM_DEVICE=/dev/cd0
.endif

.if defined(WITH_KERN_HZ)
DEFAULT_KERN_HZ=${WITH_KERN_HZ}
.else
DEFAULT_KERN_HZ=1024
.endif

# Build system handling (including OPTIONS)
# =========================================

.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif

# Support for aligned_alloc
.if ${OSVERSION} >= 1000000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-aligned_alloc
.endif

.if ${CHOSEN_COMPILER_TYPE} == clang
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang-version
# Require 16 byte stack realignment on i386 to interface
# properly with hand crafted assembler code in ffmpeg
CFLAGS_i386+=   -mstack-alignment=16 -mstackrealign
.endif # ${CHOSEN_COMPILER_TYPE} == clang

.if ${ARCH} == "amd64" || ${ARCH} == "i386"
BUILD_DEPENDS+= ${LOCALBASE}/bin/yasm:${PORTSDIR}/devel/yasm
.endif

CFLAGS_armv6+=  -no-integrated-as

# Extra build options for debugging and optimised CFLAGS
# ======================================================

.if ${PORT_OPTIONS:MDEBUG}
WITH_DEBUG= yes
CONFIGURE_ARGS+=    --enable-debug=3
.else
.if ${PORT_OPTIONS:MOCFLAGS}
CFLAGS+=    -O3 -fomit-frame-pointer -ffast-math
.endif #OCFLAGS
.endif #DEBUG

# Win32 DLL codecs support on i386, mostly superseded by internal ffmpeg
# ======================================================================

.if ${ARCH} == "i386"
CONFIGURE_ARGS+=    --codecsdir=${LOCALBASE}/lib/win32
.else
CONFIGURE_ARGS+=    --disable-win32dll \
            --disable-qtx
.endif