aboutsummaryrefslogtreecommitdiff
path: root/graphics/libprojectm/Makefile
blob: 0ee21c4225cb879c8cba77d87e0575c0aca179cf (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
# New ports collection Makefile for:	libprojectM
# Date created:	 	8 December 2010
# Whom:			utisoft@gmail.com
#
# $FreeBSD$
#

PORTNAME=	libprojectM
PORTVERSION=	2.0.1
PORTREVISION=	1
CATEGORIES=	graphics audio
MASTER_SITES=	SF/${PORTNAME:L:S/lib//}/${PORTVERSION}/
DISTNAME=	${PORTNAME:S/lib//}-${DISTVERSION}-Source

MAINTAINER=	crees@FreeBSD.org
COMMENT=	An awesome music visualiser

LICENSE=	LGPL21

LIB_DEPENDS=	ftgl:${PORTSDIR}/graphics/ftgl \
		GLEW:${PORTSDIR}/graphics/glew \
		freetype:${PORTSDIR}/print/freetype2

USES=		cmake
CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
USE_LDCONFIG=	yes

post-patch:
# Install config.inp.sample instead of overwriting user's file.
# Needs to be specific enough not to rename config.inp.in too!
# Also correct pkgconfig destination dir -- fiddly
	@${REINPLACE_CMD} -e 's/config.inp\([\" ]\)/config.inp.sample\1/' \
			-e 's#\(/lib\)[^}]*}\(/pkgconfig\)#\1data\2#' \
		${WRKSRC}/CMakeLists.txt
	@${REINPLACE_CMD} -e 's#/usr/X11R6#${LOCALBASE}#' \
		${WRKSRC}/cmake/FindFreetype2.cmake
# Fix empty libdir in pkgconfig file to stop vlc complaining
	@${REINPLACE_CMD} -e 's#^\(libdir=\).*#\1${PREFIX}/lib#' \
		${WRKSRC}/${PORTNAME}.pc.in

post-install:
	@if [ ! -f ${PREFIX}/share/projectM/config.inp ]; then \
		${CP} -p ${PREFIX}/share/projectM/config.inp.sample \
			${PREFIX}/share/projectM/config.inp ; \
	fi

.include <bsd.port.mk>