summaryrefslogtreecommitdiff
path: root/devel/sfml/Makefile
blob: 8c9f1f15ca7fcf4b4be2a29bcd8b7226740f4f90 (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
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$

PORTNAME=	sfml
PORTVERSION=	2.5.1
PORTREVISION=	1
CATEGORIES=	devel

MAINTAINER=	amdmi3@FreeBSD.org
COMMENT=	Simple and Fast Multimedia Library

LICENSE=	ZLIB
LICENSE_FILE=	${WRKSRC}/license.md

USE_GITHUB=	yes
GH_ACCOUNT=	SFML
GH_PROJECT=	SFML

USES=		cmake compiler:c++11-lang
CMAKE_ARGS=	-DSFML_INSTALL_PKGCONFIG_FILES=ON \
		-DSFML_USE_SYSTEM_DEPS=ON
USE_LDCONFIG=	yes

DATADIR=	${PREFIX}/share/SFML
PORTDATA=	*
PORTDOCS=	*
PORTEXAMPLES=	*

OPTIONS_DEFINE=	DOCS EXAMPLES DOXYGEN
OPTIONS_GROUP=	MODULES
OPTIONS_GROUP_MODULES=	WINDOW GRAPHICS AUDIO NETWORK
OPTIONS_DEFAULT=${OPTIONS_GROUP_MODULES}
OPTIONS_SUB=	yes

MODULES_DESC=	SFML modules

WINDOW_DESC=		SFML Window module
WINDOW_CMAKE_BOOL=	SFML_BUILD_WINDOW
WINDOW_USES=		gl
WINDOW_USE=		XORG=x11,xrandr GL=gl

GRAPHICS_DESC=		SFML Graphics module
GRAPHICS_CMAKE_BOOL=	SFML_BUILD_GRAPHICS
GRAPHICS_LIB_DEPENDS=	libfreetype.so:print/freetype2
GRAPHICS_IMPLIES=	WINDOW

AUDIO_DESC=		SFML Audio module
AUDIO_CMAKE_BOOL=	SFML_BUILD_AUDIO
AUDIO_USES=		openal:al
AUDIO_LIB_DEPENDS=	libFLAC.so:audio/flac \
			libogg.so:audio/libogg \
			libvorbis.so:audio/libvorbis

NETWORK_DESC=		SFML Network module
NETWORK_CMAKE_BOOL=	SFML_BUILD_NETWORK

DOXYGEN_CMAKE_BOOL=	SFML_BUILD_DOC
DOXYGEN_BUILD_DEPENDS=	doxygen:devel/doxygen
DOXYGEN_IMPLIES=	DOCS

EXAMPLES_CMAKE_BOOL=	SFML_BUILD_EXAMPLES

post-install:
	@${RM} ${STAGEDIR}${PREFIX}/*.pc

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/changelog.md ${WRKSRC}/readme.md \
		${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>