[FUG-BR] Fwd: infinality patches for freetype

Otacílio otacilio.neto em bsd.com.br
Quinta Junho 6 14:12:03 BRT 2013


Fiz esse patch por causa do e-mail abaixo.
Como ninguém na lista do gnome diz se está bom, se esta ruim ou
qualquer outra coisa posto aqui pedindo para que outras pessoas testem.

O patch melhora a renderização das fontes do freetype2.
Para funcionar você aplica o patch, reinstala o port e segue as
instruções que aparecem no fim do processo de instalação.
Por favor, alguém teste e me diga se teve algum problema.

[]'s
-Otacílio

-------- Original Message --------
Subject: infinality patches for freetype
Date: Wed, 29 May 2013 11:11:45 +0300
From: Andriy Gapon <avg em FreeBSD.org>
To: gnome em FreeBSD.org


I wonder if any of people here would be interested in optionally
augmenting
print/freetype2 with the patchset from here:
http://www.infinality.net/blog/

-- 
Andriy Gapon



===================================================PATCH=======================================

===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/print/freetype2/Makefile ./Makefile
--- /usr/ports/print/freetype2/Makefile	2013-05-22 14:57:15.000000000
-0300
+++ ./Makefile	2013-06-06 12:02:55.000000000 -0300
@@ -4,7 +4,7 @@

 PORTNAME=	freetype2
 PORTVERSION=	2.4.12
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	print
 MASTER_SITES=	SF/freetype/${PORTNAME}/${PORTVERSION} \
 		http://sunsite.cnlab-switch.ch/ftp/mirror/freetype/freetype2/ \
@@ -13,6 +13,7 @@
 		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,graphics/freetype/&,} \
 		ftp://ftp.freetype.org/freetype/freetype2/
 DISTNAME=	${PORTNAME:S/2//}-${PORTVERSION}
+DISTFILES=	${DISTNAME}.tar.bz2

 MAINTAINER=	gnome em FreeBSD.org
 COMMENT=	A free and portable TrueType font rendering engine
@@ -28,9 +29,10 @@
 LIBTOOLFILES=	builds/unix/configure
 CONFIGURE_WRKSRC=	${WRKSRC}/builds/unix

-OPTIONS_DEFINE=		LCD_FILTERING CFF_HINTING_ADOBE
+OPTIONS_DEFINE=		LCD_FILTERING CFF_HINTING_ADOBE INFINALITY
 LCD_FILTERING_DESC?=	Sub-pixel rendering (patented)
 CFF_HINTING_ADOBE_DESC=	CFF parsing and hinting engine by Adobe and
Google
+INFINALITY_DESC=	Apply Infinality patch set to get a best rendering

 .include <bsd.port.options.mk>

@@ -38,6 +40,14 @@
 CFLAGS+=	-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
 .endif

+.if ${PORT_OPTIONS:MINFINALITY}
+MASTER_SITES+=http://www.infinality.net/fedora/linux/zips/:infinality
+DISTFILES+=freetype-infinality-2.4.12-20130514_01-x86_64.tar.bz2:infinality
+PLIST_SUB+=	INF=""
+.else
+PLIST_SUB+=	INF="@comment "
+.endif
+
 pre-patch:
 	@${REINPLACE_CMD} -e
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
 		${WRKSRC}/builds/unix/install.mk
@@ -46,6 +56,35 @@
 		${WRKSRC}/src/cff/cffobjs.c
 .endif

+post-patch:
+.if ${PORT_OPTIONS:MINFINALITY}
+	${PATCH} -p1 -d ${WRKSRC}/ <
${WRKDIR}/freetype-entire-infinality-patchset-20130514-01.patch
+.endif
+
+post-install:
+.if ${PORT_OPTIONS:MINFINALITY}
+	@${MKDIR} ${ETCDIR}
+	@${INSTALL_DATA} ${WRKDIR}/infinality-settings.sh
${ETCDIR}/infinality-settings.sh
+
+	@${ECHO_MSG}  "#"	
+	@${ECHO_MSG}  "# WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING"
+	@${ECHO_MSG}  "# WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING"
+	@${ECHO_MSG}  "#"
+	@${ECHO_MSG}  "# The file ${ETCDIR}/infinality-settings.sh should be
copied to "
+	@${ECHO_MSG}  "# ${PREFIX}/etc/profile.d/ and included in ~/.bashrc
or ~/.bash_profile for"
+	@${ECHO_MSG}  "# each user"
+	@${ECHO_MSG}  "#"
+	@${ECHO_MSG}  "#   . ${PREFIX}/etc/profile.d/infinality-settings.sh"
+	@${ECHO_MSG}  "#"
+	@${ECHO_MSG}  "# AFTER THEN EDIT THE FILE
${PREFIX}/etc/profile.d/infinality-settings.sh"
+	@${ECHO_MSG}  "# AND SET THE VARIABLE USE_STYLE PRIOR IFs TO A
OPTION FROM EXAMPLES"
+	@${ECHO_MSG}  "#"
+	@${ECHO_MSG}  "# WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING"
+	@${ECHO_MSG}  "# WARNING WARNING WARNING WARNING WARNING WARNING
WARNING WARNING WARNING"
+	@${ECHO_MSG}  "#"
+
+.endif
+
 pre-configure:
 	@${REINPLACE_CMD} -e '/^LIBTOOL/s|LIBTOOL :=
$$(FT_LIBTOOL_DIR)/libtool|LIBTOOL := ${WRKDIR}/gnome-libtool|' \
 	    	${WRKSRC}/builds/unix/unix-cc.in
diff -ruN --exclude=CVS /usr/ports/print/freetype2/distinfo ./distinfo
--- /usr/ports/print/freetype2/distinfo	2013-05-22 14:57:15.000000000
-0300
+++ ./distinfo	2013-06-06 08:11:45.000000000 -0300
@@ -1,2 +1,4 @@
 SHA256 (freetype-2.4.12.tar.bz2) =
a78a17486689ab6852a9e1a759b179827ac9dfd7e2f237ddf169c73398c85381
 SIZE (freetype-2.4.12.tar.bz2) = 1597205
+SHA256 (freetype-infinality-2.4.12-20130514_01-x86_64.tar.bz2) =
151973c65d9de980df9d39849b38132743ea7c44dcaadca16bfcf3daf7b7e2d1
+SIZE (freetype-infinality-2.4.12-20130514_01-x86_64.tar.bz2) = 38460
diff -ruN --exclude=CVS /usr/ports/print/freetype2/pkg-plist ./pkg-plist
--- /usr/ports/print/freetype2/pkg-plist	2013-05-22 14:57:15.000000000
-0300
+++ ./pkg-plist	2013-06-06 08:15:53.000000000 -0300
@@ -48,6 +48,7 @@
 include/freetype2/freetype/tttables.h
 include/freetype2/freetype/tttags.h
 include/freetype2/freetype/ttunpat.h
+%%INF%%%%ETCDIR%%/infinality-settings.sh
 include/ft2build.h
 lib/libfreetype.a
 lib/libfreetype.la
@@ -58,3 +59,4 @@
 @dirrm include/freetype2/freetype/config
 @dirrm include/freetype2/freetype
 @dirrm include/freetype2
+%%INF%%@dirrm %%ETCDIR%%
===> Done
-------------- Próxima Parte ----------
_______________________________________________
freebsd-gnome em freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "freebsd-gnome-unsubscribe em freebsd.org"


Mais detalhes sobre a lista de discussão freebsd