aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libkate/Makefile
blob: 08e23f3a6b58bf651677f2e4abc2e34bca9b57e9 (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
# Created by: Anders Nordby <anders@FreeBSD.org>
# $FreeBSD$

PORTNAME=	libkate
PORTVERSION=	0.4.1
PORTREVISION=	6
CATEGORIES=	multimedia
MASTER_SITES=	GOOGLE_CODE

MAINTAINER=	bar@FreeBSD.org
COMMENT=	Codec for karaoke and text encapsulation for Ogg

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libogg.so:audio/libogg \
		libpng.so:graphics/png

GNU_CONFIGURE=	yes
USES=		pkgconfig gmake libtool
USE_LDCONFIG=	yes

CFLAGS+=	"-I${LOCALBASE}/include"

MANPAGE=	katalyzer.1 kateenc.1 katedec.1
OPTIONS_DEFINE=	DOXYGEN HTMLDOCS KATEDJ DOCS

HTMLDOCS_DESC=	Install bundled html documentation
KATEDJ_DESC=	Install KateDJ (Huge dependencies list)

PORTDOCS=	*

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOXYGEN} && ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+=	doxygen:devel/doxygen
.else
CONFIGURE_ARGS+=	--disable-doc
.endif

.if ${PORT_OPTIONS:MKATEDJ}
RUN_DEPENDS=	${LOCALBASE}/bin/oggz:audio/liboggz
USES+=		python
USE_WX=		2.8
WX_UNICODE=	yes
WX_COMPS=	wx contrib python:lib
MANPAGE+=	KateDJ.1
PLIST_SUB+=	KATEDJ=""
.else
PLIST_SUB+=	KATEDJ="@comment "
.endif

post-patch:
	@${REINPLACE_CMD} -E -e \
		"s|^(katepcdir =).*|\1 ${PREFIX}/libdata/pkgconfig|" \
		${WRKSRC}/Makefile.in

.if ! ${PORT_OPTIONS:MKATEDJ}
	@${REINPLACE_CMD} -e \
		"s|  HAVE_PYTHON_TRUE=$$|  HAVE_PYTHON_TRUE='#'|; \
			s|  HAVE_PYTHON_FALSE=\'#\'$$|  HAVE_PYTHON_FALSE=|" \
		${WRKSRC}/configure
.endif

	@${REINPLACE_CMD} -E -e \
		"s|^(install-data-am: ).*|\1|" \
		${WRKSRC}/doc/Makefile.in

.if ! ${PORT_OPTIONS:MDOXYGEN} || ! ${PORT_OPTIONS:MDOCS}
	@${TOUCH} ${WRKSRC}/doc/.doc-dummy-target
.endif

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
.for f in ${MANPAGE}
	${INSTALL_MAN} ${WRKSRC}/doc/man/${f} ${STAGEDIR}${PREFIX}/man/man1
.endfor
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for FILE in README AUTHORS COPYING THANKS ChangeLog
	${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
.endfor
.if ${PORT_OPTIONS:MHTMLDOCS} || ${PORT_OPTIONS:MDOXYGEN}
	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
. endif

.include <bsd.port.mk>