1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00
freebsd-ports/graphics/cegui/Makefile
2014-06-08 08:48:52 +00:00

137 lines
5.3 KiB
Makefile

# Created by: Oliver Lehmann <oliver@FreeBSD.org>
# $FreeBSD$
PORTNAME= cegui
PORTVERSION= 0.8.3
PORTREVISION= 4
CATEGORIES= graphics devel
MASTER_SITES= SF/crayzedsgui/CEGUI%20Mk-2/0.8
MAINTAINER= oliver@FreeBSD.org
COMMENT= A library providing windowing and widgets for graphics APIs
LICENSE= MIT
LIB_DEPENDS= libexecinfo.so:${PORTSDIR}/devel/libexecinfo
WRKSRC= ${WRKDIR}/${DISTNAME:S/2b/2/}
CMAKE_ENV+= TOLUA_INC="${LUA_INCDIR}"
CMAKE_ARGS= -DCEGUI_SAMPLES_ENABLED:BOOL=OFF \
-DCEGUI_BUILD_TESTS=OFF
USE_LDCONFIG= yes
USES= cmake pathfix pkgconfig compiler:c++11-lib
PORTDOCS= *
OPTIONS_DEFINE= FREETYPE PCRE LUA FRIBIDI DOCS
OPTIONS_GROUP= XMLPARSER IMAGECODEC RENDERER
OPTIONS_GROUP_XMLPARSER= EXPAT XERCES LIBXML2 RAPIDXML TINYXML
OPTIONS_GROUP_IMAGECODEC= DEVIL FREEIMAGE CORONA
OPTIONS_GROUP_RENDERER= OPENGL OPENGL3 OGRE IRRLICHT
OPTIONS_DEFAULT= FREETYPE PCRE LUA FRIBIDI PYTHON
OPTIONS_DEFAULT+= EXPAT LIBXML2 TINYXML # TINYXML needed by games/secretmaryochronicles
OPTIONS_DEFAULT+= DEVIL FREEIMAGE
OPTIONS_DEFAULT+= OPENGL OPENGL3 OGRE
OPTIONS_SUB= yes
FREETYPE_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
FREETYPE_CMAKE_ON= -DCEGUI_HAS_FREETYPE=ON
FREETYPE_CMAKE_OFF= -DCEGUI_HAS_FREETYPE=OFF
PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
PCRE_CMAKE_ON= -DCEGUI_HAS_PCRE_REGEX=ON
PCRE_CMAKE_OFF= -DCEGUI_HAS_PCRE_REGEX=OFF
LUA_USES= lua:51
LUA_LIB_DEPENDS= libtolua++-${LUA_VER}.so:${PORTSDIR}/lang/tolua++
LUA_CMAKE_ON= -DCEGUI_BUILD_LUA_MODULE=ON -DCEGUI_BUILD_LUA_GENERATOR=ON
LUA_CMAKE_OFF= -DCEGUI_BUILD_LUA_MODULE=OFF -DCEGUI_BUILD_LUA_GENERATOR=OFF
# this option is not currently used as it doesn't compile (see also CMAKE_ARGS below)
PYTHON_USE= PYTHON=yes
PYTHON_LIB_DEPENDS= libboost_python.so:${PORTSDIR}/devel/boost-python-libs
PYTHON_CMAKE_ON= -DCEGUI_BUILD_PYTHON_MODULES=ON
PYTHON_CMAKE_OFF= -DCEGUI_BUILD_PYTHON_MODULES=OFF
FRIBIDI_LIB_DEPENDS= libfribidi.so:${PORTSDIR}/converters/fribidi
FRIBIDI_CMAKE_ON= -DCEGUI_USE_FRIBIDI=ON
FRIBIDI_CMAKE_OFF= -DCEGUI_USE_FRIBIDI=OFF
EXPAT_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
EXPAT_CMAKE_ON= -DCEGUI_BUILD_XMLPARSER_EXPAT=ON
EXPAT_CMAKE_OFF= -DCEGUI_BUILD_XMLPARSER_EXPAT=OFF
XERCES_LIB_DEPENDS= libxerces-c.so.3:${PORTSDIR}/textproc/xerces-c3
XERCES_CMAKE_ON= -DCEGUI_BUILD_XMLPARSER_XERCES=ON
XERCES_CMAKE_OFF= -DCEGUI_BUILD_XMLPARSER_XERCES=OFF
LIBXML2_USE= GNOME=libxml2
LIBXML2_CMAKE_ON= -DCEGUI_BUILD_XMLPARSER_LIBXML2=ON
LIBXML2_CMAKE_OFF= -DCEGUI_BUILD_XMLPARSER_LIBXML2=OFF
RAPIDXML_BUILD_DEPENDS= ${LOCALBASE}/include/rapidxml.hpp:${PORTSDIR}/textproc/rapidxml
RAPIDXML_DESC= XML parser support via RapidXML
RAPIDXML_CMAKE_ON= -DCEGUI_BUILD_XMLPARSER_RAPIDXML=ON
RAPIDXML_CMAKE_OFF= -DCEGUI_BUILD_XMLPARSER_RAPIDXML=OFF
TINYXML_LIB_DEPENDS= libtinyxml.so:${PORTSDIR}/textproc/tinyxml
TINYXML_CMAKE_ON= -DCEGUI_BUILD_XMLPARSER_TINYXML=ON
TINYXML_CMAKE_OFF= -DCEGUI_BUILD_XMLPARSER_TINYXML=OFF
DEVIL_DESC= DevIL based ImageCodec module
DEVIL_LIB_DEPENDS= libIL.so:${PORTSDIR}/graphics/devil
DEVIL_CMAKE_ON= -DCEGUI_BUILD_IMAGECODEC_DEVIL=ON
DEVIL_CMAKE_OFF= -DCEGUI_BUILD_IMAGECODEC_DEVIL=OFF
FREEIMAGE_DESC= FreeImage based ImageCodec module
FREEIMAGE_LIB_DEPENDS= libfreeimage.so:${PORTSDIR}/graphics/freeimage
FREEIMAGE_CMAKE_ON= -DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=ON
FREEIMAGE_CMAKE_OFF= -DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=OFF
CORONA_DESC= Corona based ImageCodec module
CORONA_LIB_DEPENDS= libcorona.so:${PORTSDIR}/graphics/corona
CORONA_CMAKE_ON= -DCEGUI_BUILD_IMAGECODEC_CORONA=ON
CORONA_CMAKE_OFF= -DCEGUI_BUILD_IMAGECODEC_CORONA=OFF
OGRE_DESC= Ogre3D support
OGRE_LIB_DEPENDS= libOgreMain.so:${PORTSDIR}/graphics/ogre3d
OGRE_CMAKE_ON= -DCEGUI_BUILD_RENDERER_OGRE=ON
OGRE_CMAKE_OFF= -DCEGUI_BUILD_RENDERER_OGRE=OFF
IRRLICHT_DESC= Irrlicht support
IRRLICHT_LIB_DEPENDS= libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht
IRRLICHT_CMAKE_ON= -DCEGUI_BUILD_RENDERER_IRRLICHT=ON
IRRLICHT_CMAKE_OFF= -DCEGUI_BUILD_RENDERER_IRRLICHT=OFF
OPENGL_BUILD_DEPENDS= ${LOCALBASE}/include/glm/glm.hpp:${PORTSDIR}/math/glm
OPENGL_USE= GL=gl,glew
OPENGL_CMAKE_ON= -DCEGUI_BUILD_RENDERER_OPENGL=ON
OPENGL_CMAKE_OFF= -DCEGUI_BUILD_RENDERER_OPENGL=OFF
OPENGL3_DESC= OpenGL 3+ support (core profile)
OPENGL3_BUILD_DEPENDS= ${OPENGL_BUILD_DEPENDS}
OPENGL3_USE= ${OPENGL_USE}
OPENGL3_CMAKE_ON= -DCEGUI_BUILD_RENDERER_OPENGL3=ON
OPENGL3_CMAKE_OFF= -DCEGUI_BUILD_RENDERER_OPENGL3=OFF
# not present in ports/unsupported, but may appear later
CMAKE_ARGS+= -DCEGUI_HAS_MINIZIP_RESOURCE_PROVIDER=OFF \
-DCEGUI_BUILD_IMAGECODEC_SILLY=OFF \
-DCEGUI_BUILD_IMAGECODEC_PVR=OFF \
-DCEGUI_BUILD_RENDERER_OPENGLES=OFF \
-DCEGUI_BUILD_RENDERER_DIRECTFB=OFF
CMAKE_ARGS+= -DCEGUI_BUILD_PYTHON_MODULES=OFF # python support doesn't build
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MEXPAT} || ${PORT_OPTIONS:MXERCES} || ${PORT_OPTIONS:MLIBXML2} || ${PORT_OPTIONS:MRAPIDXML} || ${PORT_OPTIONS:MTINYXML}
PLIST_SUB+= XMLPARSERS=""
.else
PLIST_SUB+= XMLPARSERS="@comment "
.endif
.if ${PORT_OPTIONS:MOPENGL} || ${PORT_OPTIONS:MOPENGL3}
PLIST_SUB+= ANYOPENGL=""
.else
PLIST_SUB+= ANYOPENGL="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e 's|\$${CEGUI_LIB_INSTALL_DIR}/pkgconfig|libdata/pkgconfig|g' \
${WRKSRC}/CMakeLists.txt
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk>