summaryrefslogtreecommitdiff
path: root/multimedia/mplayer-share/Makefile.common
blob: feb63e8df04bb5b2fd31f659ed3a5e99a77bd103 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# $NetBSD: Makefile.common,v 1.18 2005/01/05 15:39:15 drochner Exp $

MPLAYER_DIST_VERSION=	1.0pre6a

# This variable is used in all packages which depend on this package
MPLAYER_PKG_VERSION=	1.0rc6

DISTNAME=		MPlayer-${MPLAYER_DIST_VERSION}
CATEGORIES?=		multimedia
MASTER_SITES=		http://www.mplayerhq.hu/MPlayer/releases/ \
			http://www2.mplayerhq.hu/MPlayer/releases/ \
			ftp://ftp.mplayerhq.hu/MPlayer/releases/ \
			ftp://ftp2.mplayerhq.hu/MPlayer/releases/
EXTRACT_SUFX=		.tar.bz2
DIST_SUBDIR=		mplayer-${MPLAYER_PKG_VERSION}

MAINTAINER?=		tech-pkg@NetBSD.org
HOMEPAGE?=		http://www.mplayerhq.hu/

#
# NOTE: gmplayer has its own distinfo file. if you are also updating
# gmplayer, you must ensure that *both* distinfo files contain the
# correct, up-to-date files and checksums.
#
# NOTE: patches are shared between mplayer and gmplayer!
#

PATCHDIR=		${.CURDIR}/../../multimedia/mplayer-share/patches
DISTINFO_FILE=		${.CURDIR}/../../multimedia/mplayer-share/distinfo

NO_BIN_ON_CD=		"a dependency is restricted"
NO_BIN_ON_FTP=		"a dependency is restricted"
NO_SRC_ON_FTP=		"prohibited by USAs DMCA"

USE_BUILDLINK3=		YES
USE_GNU_TOOLS+=		make
HAS_CONFIGURE=		YES

PTHREAD_OPTS+=		require

CONFIGURE_ARGS+=	--prefix="${PREFIX}" \
			--with-extraincdir="${LOCALBASE}/include" \
			--with-extralibdir="${LOCALBASE}/lib" \
			--with-x11incdir="${X11BASE}/include" \
			--with-x11libdir="${X11BASE}/lib" \
			--disable-mpdvdkit

ONLY_FOR_COMPILER=	gcc

# The configure script attempts to test-execute compiled programs in /tmp,
# but that directory may be mounted as noexec; work this around by setting
# TMPDIR to ${WRKDIR}
CONFIGURE_ENV+=		TMPDIR=${WRKDIR}

.include "../../mk/bsd.prefs.mk"

.if ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+=	--with-win32libdir="${LOCALBASE}/lib/win32"
.  if ${MPLAYER_ENABLE_RUNTIME_CPU_DETECTION} == YES
CONFIGURE_ARGS+=	--enable-runtime-cpudetection
.  endif
BUILD_DEFS+=		MPLAYER_ENABLE_RUNTIME_CPU_DETECTION
.endif

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "alpha"
CONFIGURE_ARGS+=	--with-reallibdir="${LOCALBASE}/lib/RealPlayer8-Codecs"
.endif

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
CONFIGURE_ARGS+=	--with-cdparanoiaincdir="${LOCALBASE}/include/cdparanoia"
.endif

.if ${OPSYS} == "SunOS" && !empty(MPLAYER_USE_MEDIALIB:M[Yy][Ee][Ss])
CONFIGURE_ARGS+=	--enable-mlib
.else
CONFIGURE_ARGS+=	--disable-mlib
.endif

# Keep this list in sync with the one in bsd.pkg.defaults.mk, where
# MPLAYER_DISABLE_DRIVERS is explained.
MPLAYER_DRIVERS=	arts		audio/arts 		arts \
			esd		audio/esound 		esd \
			nas		audio/nas		nas \
			sdl		devel/SDL		sdl

# arts is currently broken on Solaris.
.if ${OPSYS} == "SunOS"
MPLAYER_DISABLE_DRIVERS+=	arts
.endif

.if defined(PKGNAME) && !empty(PKGNAME:M*encoder*)
MPLAYER_DISABLE_DRIVERS=arts esd nas sdl
.else
BUILD_DEFS+=		MPLAYER_DISABLE_DRIVERS
.endif
.for drv pkg val in ${MPLAYER_DRIVERS}
.  if empty(MPLAYER_DISABLE_DRIVERS:M${drv})
CONFIGURE_ARGS+=	--enable-${val}
.  else
CONFIGURE_ARGS+=	--disable-${val}
.  endif
.endfor