aboutsummaryrefslogtreecommitdiff
path: root/print/freetype2
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2017-03-08 15:26:28 +0000
committerKoop Mast <kwm@FreeBSD.org>2017-03-08 15:26:28 +0000
commita25c66e9e7d59446798e5b841f0215e12df655b8 (patch)
treee9b3a95219638a4d5d97785b446f4f55d0c5b742 /print/freetype2
parent7f7b553ad92dd6adb700616c72b80f7ace843c22 (diff)
downloadports-a25c66e9e7d59446798e5b841f0215e12df655b8.tar.gz
ports-a25c66e9e7d59446798e5b841f0215e12df655b8.zip
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 <pkubaj@anongoth.pl> Discussed with: jbeigh@, lightside@gmx.com Exp-run: antoine@ (earlier version)
Notes
Notes: svn path=/head/; revision=435690
Diffstat (limited to 'print/freetype2')
-rw-r--r--print/freetype2/Makefile72
-rw-r--r--print/freetype2/distinfo5
-rw-r--r--print/freetype2/files/patch-builds_unix_detect.mk8
-rw-r--r--print/freetype2/files/pkg-message.in19
-rw-r--r--print/freetype2/pkg-descr15
-rw-r--r--print/freetype2/pkg-plist2
6 files changed, 107 insertions, 14 deletions
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 <bsd.port.pre.mk>
+
+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 <bsd.port.mk>
+post-install-DOCS-on:
+ (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
+
+.include <bsd.port.post.mk>
diff --git a/print/freetype2/distinfo b/print/freetype2/distinfo
index 0282a76fad2f..edc53f7af1a4 100644
--- a/print/freetype2/distinfo
+++ b/print/freetype2/distinfo
@@ -1,2 +1,3 @@
-SHA256 (freetype-2.6.3.tar.bz2) = 371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2
-SIZE (freetype-2.6.3.tar.bz2) = 1753083
+TIMESTAMP = 1483129043
+SHA256 (freetype-2.7.1.tar.bz2) = 3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
+SIZE (freetype-2.7.1.tar.bz2) = 1825107
diff --git a/print/freetype2/files/patch-builds_unix_detect.mk b/print/freetype2/files/patch-builds_unix_detect.mk
index 65f286dcee0e..7655792f7938 100644
--- a/print/freetype2/files/patch-builds_unix_detect.mk
+++ b/print/freetype2/files/patch-builds_unix_detect.mk
@@ -1,6 +1,6 @@
---- builds/unix/detect.mk.orig 2015-09-25 07:58:57.000000000 +0200
-+++ builds/unix/detect.mk 2015-10-04 12:35:05.733855000 +0200
-@@ -22,6 +22,9 @@
+--- builds/unix/detect.mk.orig 2016-02-03 18:13:58 UTC
++++ builds/unix/detect.mk
+@@ -22,6 +22,9 @@ ifeq ($(PLATFORM),ansi)
$(wildcard /usr/sbin/init) \
$(wildcard /dev/null) \
$(wildcard /hurd/auth))
@@ -10,7 +10,7 @@
ifneq ($(is_unix),)
PLATFORM := unix
-@@ -80,10 +83,10 @@
+@@ -80,10 +83,10 @@ ifeq ($(PLATFORM),unix)
ifdef must_configure
ifneq ($(have_Makefile),)
# we are building FT2 not in the src tree
diff --git a/print/freetype2/files/pkg-message.in b/print/freetype2/files/pkg-message.in
new file mode 100644
index 000000000000..e4d907799c40
--- /dev/null
+++ b/print/freetype2/files/pkg-message.in
@@ -0,0 +1,19 @@
+The 2.7.x series now uses the new subpixel hinting mode (V40 port's option) as
+the default, emulating a modern version of ClearType. This change inevitably
+leads to different rendering results, and you might change port's options to
+adapt it to your taste (or use the new "FREETYPE_PROPERTIES" environment
+variable).
+
+The environment variable "FREETYPE_PROPERTIES" can be used to control the
+driver properties. Example:
+
+FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+ cff:no-stem-darkening=1 \
+ autofitter:warping=1
+
+This allows to select, say, the subpixel hinting mode at runtime for a given
+application.
+
+The controllable properties are listed in the section "Controlling FreeType
+Modules" in the reference's table of contents
+(%%DOCSDIR%%/reference/ft2-toc.html, if documentation was installed).
diff --git a/print/freetype2/pkg-descr b/print/freetype2/pkg-descr
index d047091d3845..fece4e3c93aa 100644
--- a/print/freetype2/pkg-descr
+++ b/print/freetype2/pkg-descr
@@ -1,3 +1,18 @@
+FreeType is a freely available software library to render fonts.
+
+It is written in C, designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images) of most vector and bitmap font formats.
+
+Some products that use FreeType for rendering fonts on screen or on paper, either exclusively or partially:
+
+---
+The FreeType engine is a free and portable font rendering
+engine, developed to provide advanced font support for a variety of
+platforms and environments. FreeType is a library which can open and
+manages font files as well as efficiently load, hint and render
+individual glyphs. FreeType is not a font server or a complete
+text-rendering library.
+
+----
This includes some tools that are in FreeType 1's contrib directory.
ttf2pfb: Converting TrueType fonts to the Postscript Type 1 format.
diff --git a/print/freetype2/pkg-plist b/print/freetype2/pkg-plist
index 184fa3c440e3..eed3d91d67c1 100644
--- a/print/freetype2/pkg-plist
+++ b/print/freetype2/pkg-plist
@@ -53,7 +53,7 @@ include/freetype2/ft2build.h
lib/libfreetype.a
lib/libfreetype.so
lib/libfreetype.so.6
-lib/libfreetype.so.6.12.3
+lib/libfreetype.so.6.13.0
libdata/pkgconfig/freetype2.pc
man/man1/freetype-config.1.gz
share/aclocal/freetype2.m4