blob: 2fc7df691c6315c7e4e6a9078ca0d7831e70b4b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# $NetBSD: Makefile,v 1.110 2018/03/24 17:33:04 joerg Exp $
DISTNAME= fontconfig-2.13.0
PKGREVISION= 1
CATEGORIES= fonts
MASTER_SITES= https://www.fontconfig.org/release/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://www.fontconfig.org/
COMMENT= Library for configuring and customizing font access
#LICENSE= x11?
# https://bugs.freedesktop.org/show_bug.cgi?id=101280
BUILD_DEPENDS+= gperf-[0-9]*:../../devel/gperf
USE_LIBTOOL= yes
USE_TOOLS+= gmake pkg-config msgfmt
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-default-fonts=${LOCALBASE}/share/fonts/X11
CONFIGURE_ARGS+= --with-expat-includes=${BUILDLINK_PREFIX.expat}/include
CONFIGURE_ARGS+= --with-expat-lib=${BUILDLINK_PREFIX.expat}/lib
CONFIGURE_ARGS+= --with-baseconfigdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-cache-dir=${VARBASE}/cache/fontconfig
CONFIGURE_ARGS+= --enable-docs
CONFIGURE_ENV+= HASDOCBOOK=no
PKGCONFIG_OVERRIDE= fontconfig.pc.in
PKG_SYSCONFSUBDIR= fontconfig
.include "../../mk/compiler.mk"
# Workaround for GCC 4.2 bug, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861
# GCC 4.2 and -fPIC with visibility
.if !empty(CC_VERSION:Mgcc-4.2.*)
SUBST_CLASSES+= visibility
SUBST_STAGE.visibility= pre-configure
SUBST_MESSAGE.visibility= Removing visibility
SUBST_FILES.visibility= src/makealias
SUBST_SED.visibility= -e 's/__attribute((visibility("hidden")))//g'
SUBST_SED.visibility+= -e 's/, visibility("default")//g'
.endif
.include "../../mk/bsd.prefs.mk"
ADDFONTS= ${PREFIX}/share/fonts/urw,${PREFIX}/share/ghostscript/fonts,${PREFIX}/share/fonts/X11
.if ${X11BASE} != ${LOCALBASE}
ADDFONTS:= ${X11BASE}/lib/X11/fonts,${ADDFONTS}
.else
ADDFONTS:= ${LOCALBASE}/share/fonts/X11,${ADDFONTS}
.endif
.if ${OPSYS} == "Darwin"
ADDFONTS:= ~/Library/Fonts,/Library/Fonts,/System/Library/Fonts,${ADDFONTS}
CONFIGURE_ARGS+= --with-arch=${MACHINE_ARCH}
.endif
CONFIGURE_ARGS+= --with-add-fonts=${ADDFONTS}
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= post-build
SUBST_FILES.prefix= conf.d/README
SUBST_VARS.prefix= PREFIX
EGDIR= ${PREFIX}/share/examples/fontconfig
CONF_FILES= ${EGDIR}/fonts.conf ${PKG_SYSCONFDIR}/fonts.conf
CONF_FILES+= ${EGDIR}/conf.d/README ${PKG_SYSCONFDIR}/conf.d/README
TMPLDIR= ${PREFIX}/share/fontconfig/conf.avail
MAKE_DIRS+= ${PKG_SYSCONFDIR}/conf.d
# following list from ${WRKSRC}/conf.d/Makefile.am
FC_STDCONF= 10-scale-bitmap-fonts.conf 10-hinting-full.conf \
10-hinting-medium.conf 10-hinting-none.conf 10-hinting-slight.conf \
20-unhint-small-vera.conf \
30-metric-aliases.conf 40-nonlatin.conf \
45-latin.conf 49-sansserif.conf 50-user.conf 51-local.conf \
60-latin.conf 65-fonts-persian.conf 65-nonlatin.conf 69-unifont.conf \
80-delicious.conf 90-synthetic.conf
# pkgsrc addition
FC_STDCONF+= 30-pkgsrc-aliases.conf
.for f in ${FC_STDCONF}
CONF_FILES+= ${TMPLDIR}/${f} ${PKG_SYSCONFDIR}/conf.d/${f}
.endfor
MAKE_DIRS+= ${VARBASE}/cache
BUILD_DEFS+= VARBASE
TEST_TARGET= check
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
.endif
.if ${X11_TYPE} != "modular" && exists(${X11BASE}/lib/libfontconfig.so)
LDFLAGS+= -L../src/.libs
.endif
post-install:
${INSTALL_DATA} ${FILESDIR}/30-pkgsrc-aliases.conf ${DESTDIR}${TMPLDIR}
.include "../../devel/gettext-lib/buildlink3.mk"
.if ${OPSYS} != "Darwin"
.include "../../devel/libuuid/buildlink3.mk"
.endif
.include "../../devel/zlib/buildlink3.mk"
BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.8.1
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|