freebsd-ports/graphics/code-eli/Makefile
Mathieu Arnold 02415c68f5 Update ports in the games category to not use GH_COMMIT.
With minor cleanups to make things simpler.

With hat:	portmgr
Sponsored by:	Absolight
2015-05-07 15:17:32 +00:00

75 lines
2.1 KiB
Makefile

# Created by: Fernando Apesteguia <fernando.apesteguia@gmail.com>
# $FreeBSD$
PORTNAME= code-eli
PORTVERSION= 0.3.6
CATEGORIES= graphics
MAINTAINER= fernando.apesteguia@gmail.com
COMMENT= Library with functionalities for geometries
LICENSE= EPL
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= eigen>3:${PORTSDIR}/math/eigen3
USE_GITHUB= yes
GH_PROJECT= Code-Eli
GH_ACCOUNT= ddmarshall
USES= cmake:outsource compiler:c++11-lib
PORTEXAMPLES= AirfoilFitExample VSPPodExample test
PORTDOCS= html latex
ALL_TARGET= all
# Some useful variables
AIRFOIL_DIR= airfoil_fit
VSPPOD_DIR= vsp_pod
# Build options
OPTIONS_DEFINE= DOCS EXAMPLES
EXAMPLES_LIB_DEPENDS= libcpptest.so:${PORTSDIR}/devel/cpptest
DOCS_BUILD_DEPENDS= ${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen
DOCS_ALL_TARGET= doc
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
BROKEN= Can not compile if FreeBSD version lower than 10.0-RELEASE
.endif
post-patch:
.if ! ${PORT_OPTIONS:MEXAMPLES}
${REINPLACE_CMD} \
-e 's/add_subdirectory(example)//g' \
-e 's/find_package(CPPTest)//g' \
${WRKSRC}/CMakeLists.txt
.endif
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/include/eli \
${STAGEDIR}${EXAMPLESDIR}${TEST_SUBDIR} \
${STAGEDIR}${EXAMPLESDIR} \
${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${BUILD_WRKSRC}/include/eli/code_eli.hpp \
${STAGEDIR}${PREFIX}/include/eli
(cd ${WRKSRC}/include/eli && \
${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/eli "*")
.if ${PORT_OPTIONS:MEXAMPLES}
${INSTALL_DATA} \
${BUILD_WRKSRC}/example/${VSPPOD_DIR}/VSPPodExample \
${BUILD_WRKSRC}/example/${AIRFOIL_DIR}/AirfoilFitExample \
${STAGEDIR}${EXAMPLESDIR}
${STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/VSPPodExample \
${STAGEDIR}${EXAMPLESDIR}/AirfoilFitExample
(cd ${BUILD_WRKSRC}/${TEST_SUBDIR} && \
${COPYTREE_BIN} . ${STAGEDIR}${EXAMPLESDIR}${TEST_SUBDIR} \
"-name *Test -type f")
${FIND} ${STAGEDIR}${EXAMPLESDIR}${TEST_SUBDIR} -name *Test | \
${XARGS} ${STRIP_CMD}
.endif
.if ${PORT_OPTIONS:MDOCS}
(cd ${BUILD_WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>