summaryrefslogtreecommitdiffstats
path: root/multimedia/xine/Makefile
blob: d2acf1bf3f283a86a26a6b942b9a85b80c593c88 (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
103
104
105
106
107
108
109
# New ports collection makefile for:    xine
# Date created:         14 Oct 2000
# Whom:                 alex
#
# $FreeBSD$
#

PORTNAME=	xine
PORTVERSION=	0.99.3
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	${PORTNAME}-ui-${PORTVERSION}

MAINTAINER=	nobutaka@FreeBSD.org
COMMENT=	An X11 multimedia player

LIB_DEPENDS=	xine.12:${PORTSDIR}/multimedia/libxine \
		aa.1:${PORTSDIR}/graphics/aalib \
		png.5:${PORTSDIR}/graphics/png

USE_GETTEXT=	yes
USE_X_PREFIX=	yes
USE_GMAKE=	yes
USE_REINPLACE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib" \
		THREAD_CFLAGS="${PTHREAD_CFLAGS}" \
		THREAD_LIBS="${PTHREAD_LIBS}"
CONFIGURE_ARGS=	--program-transform-name=""

MANLANG=	"" de es fr pl
MAN1=		aaxine.1 xine-bugreport.1 xine-check.1 xine-remote.1 xine.1

.include <bsd.port.pre.mk>

.if ${ARCH} == "i386"
.if !defined(WITHOUT_WIN32_CODECS)
RUN_DEPENDS=	${CODEC_DETECTION_FILE}:${CODEC_PORT}

CODEC_PORT=	${PORTSDIR}/multimedia/win32-codecs
CODEC_DETECTION_FILE!=	${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
.endif
.endif

.if ${OSVERSION} == 500043
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src:xitk:common.h
.endif

# PRIi64 macro is not defined
.if ${OSVERSION} < 500040
EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-src:xitk:common.h-1
.endif

# mbrtowc() is not implemented
.if ${OSVERSION} < 500039
CONFIGURE_ARGS+=	--disable-mbs
# Xft support requires --enable-mbs configure option
WITHOUT_XFT=	yes
.endif

.if ${OSVERSION} < 502000
LIB_DEPENDS+=	readline.5:${PORTSDIR}/devel/readline
CONFIGURE_ARGS+=	--with-readline=${LOCALBASE}
.endif

.if !defined(WITHOUT_XFT)
LIB_DEPENDS+=	Xft.2:${PORTSDIR}/x11-fonts/libXft
.else
CONFIGURE_ARGS+=	--disable-xft
.endif

.if exists(${LOCALBASE}/lib/libcaca.a) || defined(WITH_LIBCACA)
PLIST_SUB+=	WITH_LIBCACA=""
.else
PLIST_SUB+=	WITH_LIBCACA="@comment "
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		's|THREAD_LIBS=.*$$|THREAD_LIBS="\$$THREAD_LIBS"|g ; \
		 s|THREAD_CFLAGS=.*$$|THREAD_CFLAGS="\$$THREAD_CFLAGS"|g ; \
		 s|-L/usr/local/lib||g ; \
		 s|-I/usr/local/include||g' ${WRKSRC}/configure
.if ${OSVERSION} >= 500035
	@${REINPLACE_CMD} -e \
		 's|-malign-loops|-falign-loops|g ; \
		  s|-malign-jumps|-falign-jumps|g ; \
		  s|-malign-functions|-falign-functions|g' ${WRKSRC}/configure
.endif
	@${RM} ${WRKSRC}/src/xitk/xine-remote.c

post-install:
.for l in es fr
	@${CP} ${PREFIX}/man/man1/aaxine.1 ${PREFIX}/man/${l}/man1/aaxine.1
.endfor
.for l in es fr pl
	@${CP} ${PREFIX}/man/man1/xine-bugreport.1 ${PREFIX}/man/${l}/man1/xine-bugreport.1
.endfor
.for l in es fr pl
	@${CP} ${PREFIX}/man/man1/xine-check.1 ${PREFIX}/man/${l}/man1/xine-check.1
.endfor
.for l in es fr
	@${CP} ${PREFIX}/man/man1/xine-remote.1 ${PREFIX}/man/${l}/man1/xine-remote.1
.endfor
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud