Re: [dev] about patch xft on FreeBSD

From: Ruben Gonzalez Arnau <rga_AT_sdf.lonestar.org>
Date: Thu, 03 May 2012 16:46:05 +0200

Hi,

Try to change this on config.mk

INCS = -I. -I/usr/include -I${X11INC}

to

INCS = -I. -I/usr/include -I${X11INC} -I/usr/local/include/freetype2

Hope it helps.

On 05/03/2012 15:34, alphachi wrote:
> Hello!
>
> I'm using dwm 6.0 on FreeBSD 9.0 Release amd64. I need font antialias
> and CJK supports for statusbar. When I patch
> http://dwm.suckless.org/patches/dwm-6.0-xft.diff, some errors show:
>
> # cd /usr/ports/x11-wm/dwm/work/dwm-6.0/
> # patch -p1 < ~/dwm-6.0-xft.diff
> Hmm... Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |--- src/dwm-6.0/dwm.c 2011-12-19 10:02:46.000000000 -0500
> |+++ src/dwm-6.0-xft/dwm.c 2012-03-30 10:29:25.156110278 -0400
> --------------------------
> File to patch: dwm.c
> Patching file dwm.c using Plan A...
> Hunk #1 succeeded at 39.
> Hunk #2 succeeded at 109.
> Hunk #3 succeeded at 486.
> Hunk #4 succeeded at 790.
> Hunk #5 succeeded at 819.
> Hunk #6 succeeded at 1070.
> Hunk #7 succeeded at 1634.
> Hunk #8 succeeded at 1704.
> Hmm... The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |--- src/dwm-6.0/config.def.h 2011-12-19 10:02:46.000000000 -0500
> |+++ src/dwm-6.0-xft/config.def.h 2012-03-30 10:22:26.048380780
> -0400
> --------------------------
> File to patch: config.def.h
> Patching file config.def.h using Plan A...
> Hunk #1 succeeded at 1.
> Hunk #2 succeeded at 18.
> Hunk #3 succeeded at 28.
> Hunk #4 succeeded at 46.
> Hmm... The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |--- src/dwm-6.0/config.mk <http://config.mk> 2011-12-19
> 10:02:46.000000000 -0500
> |+++ src/dwm-6.0-xft/config.mk <http://config.mk> 2012-03-30
> 11:32:31.768929769 -0400
> --------------------------
> File to patch: config.mk <http://config.mk>
> Patching file config.mk <http://config.mk> using Plan A...
> Hunk #1 succeeded at 14 with fuzz 1.
> done
> # cd /usr/ports/x11-wm/dwm/
> # make install clean
> ===> Installing for dwm-6.0
> ===> dwm-6.0 depends on file: /usr/local/libdata/pkgconfig/x11.pc -
> found
> ===> dwm-6.0 depends on file:
> /usr/local/libdata/pkgconfig/xinerama.pc - found
> ===> Generating temporary packing list
> ===> Checking if x11-wm/dwm already installed
> dwm build options:
> CFLAGS = -O2 -pipe -fno-strict-aliasing -std=c99 -I. -I/usr/include
> -I/usr/local/include -DVERSION="6.0" -DXINERAMA
> LDFLAGS = -L/usr/lib -lc -L/usr/local/lib -lX11 -L/usr/local/lib
> -lXinerama -D_THREAD_SAFE -I/usr/local/include
> -I/usr/local/include/freetype2 -L/usr/local/lib -lXft -lXrender
> -lfontconfig -lfreetype -lX11
> CC = cc
> CC dwm.c
> In file included from /usr/local/include/X11/Xft/Xft.h:39,
> from dwm.c:42:
> /usr/local/include/ft2build.h:56:38: error:
> freetype/config/ftheader.h: No such file or directory
> In file included from dwm.c:42:
> /usr/local/include/X11/Xft/Xft.h:40:10: error: #include expects
> "FILENAME" or <FILENAME>
> In file included from dwm.c:42:
> /usr/local/include/X11/Xft/Xft.h:60: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before '_XftFTlibrary'
> /usr/local/include/X11/Xft/Xft.h:94: error: expected
> specifier-qualifier-list before 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:101: error: expected
> specifier-qualifier-list before 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:188: warning: type defaults to 'int'
> in declaration of 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:188: error: expected ';', ',' or ')'
> before '*' token
> /usr/local/include/X11/Xft/Xft.h:293: warning: type defaults to 'int'
> in declaration of 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:293: error: expected ';', ',' or ')'
> before '*' token
> /usr/local/include/X11/Xft/Xft.h:352: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before 'XftLockFace'
> /usr/local/include/X11/Xft/Xft.h:391: warning: type defaults to 'int'
> in declaration of 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:391: error: expected ';', ',' or ')'
> before '*' token
> /usr/local/include/X11/Xft/Xft.h:397: warning: type defaults to 'int'
> in declaration of 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:397: error: expected ';', ',' or ')'
> before '*' token
> /usr/local/include/X11/Xft/Xft.h:406: error: expected declaration
> specifiers or '...' before 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:407: error: expected declaration
> specifiers or '...' before 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:416: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before 'XftCharIndex'
> /usr/local/include/X11/Xft/Xft.h:449: warning: type defaults to 'int'
> in declaration of 'FT_UInt'
> /usr/local/include/X11/Xft/Xft.h:449: error: expected ';', ',' or ')'
> before '*' token
> *** Error code 1
>
> Stop in /usr/ports/x11-wm/dwm/work/dwm-6.0.
> *** Error code 1
>
> Stop in /usr/ports/x11-wm/dwm.
> *** Error code 1
>
> Stop in /usr/ports/x11-wm/dwm.
>
> What shall I do? Thanks!


-- 
rga_AT_sdf.lonestar.org
Received on Thu May 03 2012 - 16:46:05 CEST

This archive was generated by hypermail 2.3.0 : Thu May 03 2012 - 16:48:03 CEST