From a25c66e9e7d59446798e5b841f0215e12df655b8 Mon Sep 17 00:00:00 2001 From: Koop Mast Date: Wed, 8 Mar 2017 15:26:28 +0000 Subject: Update freetype2 to 2.7.1. * List licenses * Add DEBUG, DOCS, TABLE_VALIDATION and SUBPIXEL_HINTING options. * Sort options lines by name. * Add pkg-message describing how certain options can be overwritten at run time, like the subpixel hinting engine. * Fix the build of graphics/inventor. PR: ports/211201 Submitted by: Piotr Kubaj Discussed with: jbeigh@, lightside@gmx.com Exp-run: antoine@ (earlier version) --- print/freetype2/Makefile | 72 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 7 deletions(-) (limited to 'print/freetype2/Makefile') diff --git a/print/freetype2/Makefile b/print/freetype2/Makefile index 96586c93e932..e99a8c7a0515 100644 --- a/print/freetype2/Makefile +++ b/print/freetype2/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= freetype2 -PORTVERSION= 2.6.3 +PORTVERSION= 2.7.1 CATEGORIES= print MASTER_SITES= http://savannah.nongnu.org/download/freetype/ \ SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \ @@ -15,6 +15,13 @@ DISTNAME= ${PORTNAME:S/2//}-${PORTVERSION} MAINTAINER= gnome@FreeBSD.org COMMENT= Free and portable TrueType font rendering engine +LICENSE= FTL GPLv2+ +LICENSE_COMB= dual +LICENSE_NAME_FTL= The FreeType Project license +LICENSE_FILE_FTL= ${WRKSRC}/docs/FTL.TXT +LICENSE_FILE_GPLv2+ = ${WRKSRC}/docs/GPLv2.TXT +LICENSE_PERMS_FTL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + USES= cpe gmake libtool tar:bzip2 MAKE_ENV= TOP="" USE_LDCONFIG= yes @@ -22,23 +29,71 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS= --without-harfbuzz CONFIGURE_WRKSRC= ${WRKSRC}/builds/unix +SUB_FILES= pkg-message + +PORTDOCS= reference CHANGES formats.txt LICENSE.TXT raster.txt + CPE_PRODUCT= freetype CPE_VENDOR= freetype -OPTIONS_DEFINE= LCD_FILTERING PNG -OPTIONS_DEFAULT= LCD_FILTERING -LCD_FILTERING_DESC?= Sub-pixel rendering (patented) +OPTIONS_DEFINE= DEBUG DOCS LCD_FILTERING PNG TABLE_VALIDATION +OPTIONS_GROUP= SUBPIXEL_HINTING +OPTIONS_GROUP_SUBPIXEL_HINTING= V38 V40 +OPTIONS_DEFAULT= LCD_FILTERING V40 + PNG_DESC= Png compressed OpenType embedded bitmaps support +PNG_LIB_DEPENDS= libpng.so:graphics/png +PNG_CONFIGURE_WITH= png +TABLE_VALIDATION_DESC= TrueType GX/AAT and OpenType table validation + +LCD_FILTERING_DESC?= Sub-pixel rendering (patented) LCD_FILTERING_CFLAGS= -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING -PNG_LIB_DEPENDS= libpng.so:graphics/png -PNG_CONFIGURE_OFF= --without-png +SUBPIXEL_HINTING_DESC= Sub-pixel hinting support +V38_DESC= v38 mode (Infinality code) +V38_VARS= SUBPIXEL_HINTING_MODE+=1 +V40_DESC= v40 mode (minimal code, a.k.a. ClearType hinting, faster) +V40_VARS= SUBPIXEL_HINTING_MODE+=2 + +.include + +SELECTED_MODE= \ + r=0; \ + for m in ${SUBPIXEL_HINTING_MODE}; \ + do r=$$(($$r | $$m)); \ + done; \ + ${ECHO_CMD} $$r pre-patch: @${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \ ${WRKSRC}/builds/unix/install.mk +post-patch: +# Check defined TT_CONFIG_OPTION_SUBPIXEL_HINTING + @${REINPLACE_CMD} -e 's|^#if \(TT_CONFIG_OPTION_SUBPIXEL_HINTING\)\(.*\)|#if defined(\1) \&\& (\1\2)|' \ + ${WRKSRC}/include/freetype/config/ftoption.h +.if defined(SUBPIXEL_HINTING_MODE) + @${REINPLACE_CMD} -i '.hinting.bak' \ + -e 's|^\(#define TT_CONFIG_OPTION_SUBPIXEL_HINTING\).*|\1 \ + ${SELECTED_MODE:sh}|' \ + ${WRKSRC}/include/freetype/config/ftoption.h +.else + @${REINPLACE_CMD} -i '.hinting.bak' \ + -e 's|^\(#define TT_CONFIG_OPTION_SUBPIXEL_HINTING.*\)|/* \1 */|' \ + ${WRKSRC}/include/freetype/config/ftoption.h +.endif + +post-patch-DEBUG-on: + @${REINPLACE_CMD} -i '.debug.bak' \ + -e 's|.*\(#define FT_DEBUG_LEVEL_TRACE\).*|\1|' \ + -e 's|.*\(#define FT_DEBUG_MEMORY\).*|\1|' \ + ${WRKSRC}/include/freetype/config/ftoption.h + +post-patch-TABLE_VALIDATION-on: + @${REINPLACE_CMD} -e '/valid$$/s|#.*\(AUX_MODULES\)|\1|' \ + ${WRKSRC}/modules.cfg + post-configure: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} setup) @@ -46,4 +101,7 @@ post-configure: post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfreetype.so.* -.include +post-install-DOCS-on: + (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) + +.include -- cgit v1.2.3