View | Details | Raw Unified | Return to bug 211201 | Differences between
and this patch

Collapse All | Expand All

(-)freetype2/Makefile (-5 / +36 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/print/freetype2/Makefile 412348 2016-04-01 14:17:44Z mat $
2
# $FreeBSD: head/print/freetype2/Makefile 412348 2016-04-01 14:17:44Z mat $
3
3
4
PORTNAME=	freetype2
4
PORTNAME=	freetype2
5
PORTVERSION=	2.6.3
5
PORTVERSION=	2.6.5
6
CATEGORIES=	print
6
CATEGORIES=	print
7
MASTER_SITES=	http://savannah.nongnu.org/download/freetype/ \
7
MASTER_SITES=	http://savannah.nongnu.org/download/freetype/ \
8
		SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \
8
		SF/freetype/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/}/ \
Lines 15-20 Link Here
15
MAINTAINER=	gnome@FreeBSD.org
15
MAINTAINER=	gnome@FreeBSD.org
16
COMMENT=	Free and portable TrueType font rendering engine
16
COMMENT=	Free and portable TrueType font rendering engine
17
17
18
LICENSE=	FTL GPLv2+
19
LICENSE_COMB=	dual
20
LICENSE_NAME_FTL=	The FreeType Project license
21
LICENSE_FILE_GPLv2+ =	${WRKSRC}/docs/GPLv2.TXT
22
LICENSE_FILE_FTL=	${WRKSRC}/docs/FTL.TXT
23
LICENSE_PERMS_FTL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
24
18
USES=		cpe gmake libtool tar:bzip2
25
USES=		cpe gmake libtool tar:bzip2
19
MAKE_ENV=	TOP=""
26
MAKE_ENV=	TOP=""
20
USE_LDCONFIG=	yes
27
USE_LDCONFIG=	yes
Lines 22-40 Link Here
22
CONFIGURE_ARGS=	--without-harfbuzz
29
CONFIGURE_ARGS=	--without-harfbuzz
23
CONFIGURE_WRKSRC=	${WRKSRC}/builds/unix
30
CONFIGURE_WRKSRC=	${WRKSRC}/builds/unix
24
31
32
PORTDOCS=	reference CHANGES formats.txt LICENSE.TXT raster.txt
33
25
CPE_PRODUCT=	freetype
34
CPE_PRODUCT=	freetype
26
CPE_VENDOR=	freetype
35
CPE_VENDOR=	freetype
27
36
28
OPTIONS_DEFINE=		LCD_FILTERING PNG
37
OPTIONS_DEFINE=		DOCS LCD_FILTERING PNG
38
OPTIONS_GROUP=		SUBPIXEL_HINTING
39
OPTIONS_GROUP_SUBPIXEL_HINTING=	V38 V40 CONFIGURABLE
29
OPTIONS_DEFAULT=	LCD_FILTERING
40
OPTIONS_DEFAULT=	LCD_FILTERING
30
LCD_FILTERING_DESC?=	Sub-pixel rendering (patented)
31
PNG_DESC=		Png compressed OpenType embedded bitmaps support
32
41
42
LCD_FILTERING_DESC?=	Sub-pixel rendering (patented)
33
LCD_FILTERING_CFLAGS=	-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
43
LCD_FILTERING_CFLAGS=	-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
34
44
PNG_DESC=		Png compressed OpenType embedded bitmaps support
35
PNG_LIB_DEPENDS=	libpng.so:graphics/png
45
PNG_LIB_DEPENDS=	libpng.so:graphics/png
36
PNG_CONFIGURE_OFF=	--without-png
46
PNG_CONFIGURE_OFF=	--without-png
37
47
48
SUBPIXEL_HINTING_DESC=	Sub-pixel hinting support
49
V38_DESC=	v38 mode (Infinality code)
50
V38_VARS=	SUBPIXEL_HINTING_MODE=1
51
V40_DESC=	v40 mode (minimal code, a.k.a. ClearType hinting)
52
V40_VARS=	SUBPIXEL_HINTING_MODE=2
53
CONFIGURABLE_DESC=	Make sub-pixel hinting mode configurable
54
CONFIGURABLE_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src_truetype_ttobjs.c
55
CONFIGURABLE_SUB_FILES=	pkg-message
56
57
.include <bsd.port.options.mk>
58
59
.if defined(SUBPIXEL_HINTING_MODE)
60
.if ${PORT_OPTIONS:MV38} && ${PORT_OPTIONS:MV40}
61
SUBPIXEL_HINTING_MODE=3
62
.endif
63
CFLAGS+=	-DTT_CONFIG_OPTION_SUBPIXEL_HINTING=${SUBPIXEL_HINTING_MODE}
64
.endif
65
38
pre-patch:
66
pre-patch:
39
	@${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
67
	@${REINPLACE_CMD} -e 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
40
		${WRKSRC}/builds/unix/install.mk
68
		${WRKSRC}/builds/unix/install.mk
Lines 46-49 Link Here
46
post-install:
74
post-install:
47
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfreetype.so.*
75
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfreetype.so.*
48
76
77
post-install-DOCS-on:
78
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
79
49
.include <bsd.port.mk>
80
.include <bsd.port.mk>
(-)freetype2/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (freetype-2.6.3.tar.bz2) = 371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2
1
TIMESTAMP = 1468301305
2
SIZE (freetype-2.6.3.tar.bz2) = 1753083
2
SHA256 (freetype-2.6.5.tar.bz2) = e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0
3
SIZE (freetype-2.6.5.tar.bz2) = 1779603
(-)freetype2/files/extra-patch-src_truetype_ttobjs.c (+64 lines)
Line 0 Link Here
1
# Origin: https://git.archlinux.org/svntogit/packages.git/tree/trunk/0003-Make-subpixel-hinting-mode-configurable.patch?h=packages/freetype2&id=a86f6a5423659061598b079599970aeb0e13b9a8
2
# Subject: [PATCH 3/4] Make subpixel hinting mode configurable
3
# except changes for include/freetype/config/ftoption.h file.
4
5
--- src/truetype/ttobjs.c.orig	2016-05-17 18:11:44 UTC
6
+++ src/truetype/ttobjs.c
7
@@ -36,6 +36,9 @@
8
 #include "ttgxvar.h"
9
 #endif
10
 
11
+#include <stdlib.h>
12
+#include <errno.h>
13
+
14
   /*************************************************************************/
15
   /*                                                                       */
16
   /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
17
@@ -1286,6 +1289,7 @@
18
 #ifdef TT_USE_BYTECODE_INTERPRETER
19
 
20
     TT_Driver  driver = (TT_Driver)ttdriver;
21
+    const char *envval;
22
 
23
     driver->interpreter_version = TT_INTERPRETER_VERSION_35;
24
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
25
@@ -1295,6 +1299,39 @@
26
     driver->interpreter_version = TT_INTERPRETER_VERSION_40;
27
 #endif
28
 
29
+    errno = 0;
30
+    envval = getenv( "FT2_SUBPIXEL_HINTING" );
31
+    if ( envval )
32
+    {
33
+      char *endptr = NULL;
34
+      unsigned long value = strtoul( envval, &endptr, 10 );
35
+
36
+      if ( !errno && endptr && !*endptr )
37
+      {
38
+        switch( value )
39
+        {
40
+        case 0:
41
+          driver->interpreter_version = TT_INTERPRETER_VERSION_35;
42
+          break;
43
+
44
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
45
+        case 1:
46
+          driver->interpreter_version = TT_INTERPRETER_VERSION_38;
47
+          break;
48
+#endif
49
+
50
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
51
+        case 2:
52
+          driver->interpreter_version = TT_INTERPRETER_VERSION_40;
53
+          break;
54
+#endif
55
+
56
+        default:
57
+          break;
58
+        }
59
+      }
60
+    }
61
+
62
 #else /* !TT_USE_BYTECODE_INTERPRETER */
63
 
64
     FT_UNUSED( ttdriver );
(-)freetype2/files/patch-builds_unix_detect.mk (-4 / +4 lines)
Lines 1-6 Link Here
1
--- builds/unix/detect.mk.orig	2015-09-25 07:58:57.000000000 +0200
1
--- builds/unix/detect.mk.orig	2016-02-03 18:13:58 UTC
2
+++ builds/unix/detect.mk	2015-10-04 12:35:05.733855000 +0200
2
+++ builds/unix/detect.mk
3
@@ -22,6 +22,9 @@
3
@@ -22,6 +22,9 @@ ifeq ($(PLATFORM),ansi)
4
                      $(wildcard /usr/sbin/init) \
4
                      $(wildcard /usr/sbin/init) \
5
                      $(wildcard /dev/null) \
5
                      $(wildcard /dev/null) \
6
                      $(wildcard /hurd/auth))
6
                      $(wildcard /hurd/auth))
Lines 10-16 Link Here
10
   ifneq ($(is_unix),)
10
   ifneq ($(is_unix),)
11
 
11
 
12
     PLATFORM := unix
12
     PLATFORM := unix
13
@@ -80,10 +83,10 @@
13
@@ -80,10 +83,10 @@ ifeq ($(PLATFORM),unix)
14
   ifdef must_configure
14
   ifdef must_configure
15
     ifneq ($(have_Makefile),)
15
     ifneq ($(have_Makefile),)
16
       # we are building FT2 not in the src tree
16
       # we are building FT2 not in the src tree
(-)freetype2/files/pkg-message.in (+7 lines)
Line 0 Link Here
1
Subpixel rendering effectively triples the horizontal (or vertical) resolution
2
for fonts by making use of subpixels. The default autohinter and subpixel
3
rendering are not designed to work together, hence you will want to enable the
4
subpixel autohinter.
5
The freetype2 package is compiled with a patch to make the subpixel hinting mode
6
configurable by the FT2_SUBPIXEL_HINTING environment variable. Possible values
7
are 0 (disabled), 1 (Infinality) and 2 (minimal).
(-)freetype2/pkg-plist (-1 / +1 lines)
Lines 53-59 Link Here
53
lib/libfreetype.a
53
lib/libfreetype.a
54
lib/libfreetype.so
54
lib/libfreetype.so
55
lib/libfreetype.so.6
55
lib/libfreetype.so.6
56
lib/libfreetype.so.6.12.3
56
lib/libfreetype.so.6.12.5
57
libdata/pkgconfig/freetype2.pc
57
libdata/pkgconfig/freetype2.pc
58
man/man1/freetype-config.1.gz
58
man/man1/freetype-config.1.gz
59
share/aclocal/freetype2.m4
59
share/aclocal/freetype2.m4

Return to bug 211201