Index: head/graphics/freetype-gl/Makefile =================================================================== --- head/graphics/freetype-gl/Makefile (revision 568762) +++ head/graphics/freetype-gl/Makefile (revision 568763) @@ -1,40 +1,59 @@ # $FreeBSD$ PORTNAME= freetype-gl DISTVERSION= g20210208 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ PATCHFILES= a38359cdcd97bfcf5d02dd65c66f516eac8208ad.patch:-p1 # https://github.com/rougier/freetype-gl/pull/233: Remove the STATIC requirement from the library PATCHFILES+= 00a13d4c9e31f9c4e68e8ab30e2f7ec5b0e4bf60.patch:-p1 # https://github.com/rougier/freetype-gl/pull/235: Fix Fontconfig dependency name in demos MAINTAINER= yuri@FreeBSD.org COMMENT= C OpenGL Freetype engine library LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libfreetype.so:print/freetype2 TEST_DEPENDS= ImageMagick${IMAGEMAGICK_DEFAULT}-nox11>0:graphics/ImageMagick${IMAGEMAGICK_DEFAULT}-nox11 USES= cmake:noninja gl USE_GL= glew USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= rougier GH_TAGNAME= 647b062 CMAKE_ON= BUILD_SHARED_LIBS -CMAKE_OFF= freetype-gl_BUILD_DEMOS freetype-gl_BUILD_APIDOC freetype-gl_BUILD_TESTS # DEMOS depend on graphics/anttweakbar, glfw3 +CMAKE_OFF= freetype-gl_BUILD_APIDOC freetype-gl_BUILD_TESTS LDFLAGS+= -L${LOCALBASE}/lib -lGLEW -lfreetype # https://github.com/rougier/freetype-gl/issues/236 +OPTIONS_DEFINE= DEMOS +OPTIONS_SUB= yes + +DEMOS_DESC= Build and install demo programs +DEMOS_USE= GL=gl,glu +DEMOS_CMAKE_BOOL= freetype-gl_BUILD_DEMOS +DEMOS_LIB_DEPENDS= libAntTweakBar.so:graphics/anttweakbar \ + libfontconfig.so:x11-fonts/fontconfig \ + libglfw.so:graphics/glfw + +post-patch-DEMOS-on: + @${REINPLACE_CMD} -i '' 's|"data/|"${DATADIR}/data/|g ; s|"fonts/|"${DATADIR}/fonts/|g ; s|"shaders/|"${DATADIR}/shaders/|g' ${WRKSRC}/demos/*.c + do-test: # build breaks: https://github.com/rougier/freetype-gl/issues/234 @cd ${BUILD_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -Dfreetype-gl_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test + +do-install-DEMOS-on: +.for e in ansi atb-agg benchmark cartoon console cube distance-field distance-field-2 distance-field-3 embedded-font font gamma glyph lcd markup outline subpixel texture + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/demos/${e} ${STAGEDIR}${PREFIX}/bin/ftgl-demo-${e} +.endfor + cd ${BUILD_WRKSRC}/demos && ${COPYTREE_SHARE} "data fonts shaders" ${STAGEDIR}${DATADIR} .include Index: head/graphics/freetype-gl/pkg-plist =================================================================== --- head/graphics/freetype-gl/pkg-plist (revision 568762) +++ head/graphics/freetype-gl/pkg-plist (revision 568763) @@ -1,16 +1,68 @@ +%%DEMOS%%bin/ftgl-demo-ansi +%%DEMOS%%bin/ftgl-demo-atb-agg +%%DEMOS%%bin/ftgl-demo-benchmark +%%DEMOS%%bin/ftgl-demo-cartoon +%%DEMOS%%bin/ftgl-demo-console +%%DEMOS%%bin/ftgl-demo-cube +%%DEMOS%%bin/ftgl-demo-distance-field +%%DEMOS%%bin/ftgl-demo-distance-field-2 +%%DEMOS%%bin/ftgl-demo-distance-field-3 +%%DEMOS%%bin/ftgl-demo-embedded-font +%%DEMOS%%bin/ftgl-demo-font +%%DEMOS%%bin/ftgl-demo-gamma +%%DEMOS%%bin/ftgl-demo-glyph +%%DEMOS%%bin/ftgl-demo-lcd +%%DEMOS%%bin/ftgl-demo-markup +%%DEMOS%%bin/ftgl-demo-outline +%%DEMOS%%bin/ftgl-demo-subpixel +%%DEMOS%%bin/ftgl-demo-texture include/freetype-gl/distance-field.h include/freetype-gl/edtaa3func.h include/freetype-gl/font-manager.h include/freetype-gl/freetype-gl.h include/freetype-gl/markup.h include/freetype-gl/opengl.h include/freetype-gl/platform.h include/freetype-gl/text-buffer.h include/freetype-gl/texture-atlas.h include/freetype-gl/texture-font.h include/freetype-gl/utf8-utils.h include/freetype-gl/vec234.h include/freetype-gl/vector.h include/freetype-gl/vertex-attribute.h include/freetype-gl/vertex-buffer.h lib/libfreetype-gl.so +%%DEMOS%%%%DATADIR%%/data/256colors.txt +%%DEMOS%%%%DATADIR%%/fonts/Liberastika-Regular-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/Liberastika-Regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/Lobster-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/Lobster-Regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/LuckiestGuy-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/LuckiestGuy.ttf +%%DEMOS%%%%DATADIR%%/fonts/OldStandard-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/OldStandard-Regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/SourceCodePro-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/SourceCodePro-Regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/SourceSansPro-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/SourceSansPro-Regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/VERA-COPYRIGHT +%%DEMOS%%%%DATADIR%%/fonts/Vera.ttf +%%DEMOS%%%%DATADIR%%/fonts/VeraMoBI.ttf +%%DEMOS%%%%DATADIR%%/fonts/VeraMoBd.ttf +%%DEMOS%%%%DATADIR%%/fonts/VeraMoIt.ttf +%%DEMOS%%%%DATADIR%%/fonts/VeraMono.ttf +%%DEMOS%%%%DATADIR%%/fonts/amiri-regular.ttf +%%DEMOS%%%%DATADIR%%/fonts/amiri-regular_LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/fireflysung-LICENSE.txt +%%DEMOS%%%%DATADIR%%/fonts/fireflysung.ttf +%%DEMOS%%%%DATADIR%%/shaders/cube.frag +%%DEMOS%%%%DATADIR%%/shaders/cube.vert +%%DEMOS%%%%DATADIR%%/shaders/distance-field-2.frag +%%DEMOS%%%%DATADIR%%/shaders/distance-field.frag +%%DEMOS%%%%DATADIR%%/shaders/distance-field.vert +%%DEMOS%%%%DATADIR%%/shaders/text.frag +%%DEMOS%%%%DATADIR%%/shaders/text.vert +%%DEMOS%%%%DATADIR%%/shaders/v3f-c4f.frag +%%DEMOS%%%%DATADIR%%/shaders/v3f-c4f.vert +%%DEMOS%%%%DATADIR%%/shaders/v3f-t2f-c4f.frag +%%DEMOS%%%%DATADIR%%/shaders/v3f-t2f-c4f.vert