/[gentoo-x86]/media-libs/freetype/freetype-1.4_pre20080316-r2.ebuild
Gentoo

Contents of /media-libs/freetype/freetype-1.4_pre20080316-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun May 20 12:45:25 2012 UTC (2 years, 3 months ago) by vapier
Branch: MAIN
Changes since 1.10: +2 -6 lines
Use new _elibtoolize behavior for automatically eliding --install.

(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/freetype/freetype-1.4_pre20080316-r2.ebuild,v 1.10 2012/05/09 16:36:02 aballier Exp $
4
5 inherit autotools eutils libtool multilib
6
7 DESCRIPTION="Freetype font rendering engine"
8 HOMEPAGE="http://www.freetype.org/"
9 SRC_URI="mirror://gentoo/${P}.tar.bz2"
10
11 LICENSE="FTL"
12 SLOT="1"
13 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
14 IUSE="doc nls kpathsea"
15
16 COMMON_DEPEND="kpathsea? ( virtual/tex-base )"
17 RDEPEND="${COMMON_DEPEND}
18 nls? ( sys-devel/gettext )"
19 DEPEND="${COMMON_DEPEND}
20 >=sys-devel/autoconf-2.59"
21
22 S="${WORKDIR}"/${PN}
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27
28 # remove unneeded include for BSD (#104016)
29 epatch "${FILESDIR}"/freetype-1.4_pre-malloc.patch
30
31 # fix ttf2pk to work with tetex 3.0
32 epatch "${FILESDIR}"/freetype-1.4_pre-ttf2pk-tetex-3.patch
33
34 # fix segfault due to undefined behaviour of non-static structs
35 epatch "${FILESDIR}"/freetype-1.4_pre-ttf2tfm-segfault.patch
36
37 # silence strict-aliasing warnings
38 epatch "${FILESDIR}"/freetype-1.4_pre-silence-strict-aliasing.patch
39
40 # add DESTDIR support to contrib Makefiles
41 epatch "${FILESDIR}"/freetype-1.4_pre-contrib-destdir.patch
42
43 epatch "${FILESDIR}"/${P}-CVE-2008-1808.patch #225851
44 epatch "${FILESDIR}"/${P}-LDLFAGS.patch #263131
45 epatch "${FILESDIR}"/${PN}-1.4-glibc-2.10.patch #270460
46
47 epatch "${FILESDIR}"/${P}-CVE-2006-1861.patch #271234
48 epatch "${FILESDIR}"/${P}-CVE-2007-2754.patch #271234
49
50 epatch "${FILESDIR}"/${P}-kpathsea_version.patch #Fix build with TL2010
51
52 # disable tests (they don't compile)
53 sed -i -e "/^all:/ s:tttest ::" Makefile.in
54
55 rm aclocal.m4 # Force recreation
56 # Copying this code from autotools.eclass but avoid autoheader call...
57 eaclocal
58 _elibtoolize --install --copy --force
59 eautoconf
60 elibtoolize
61
62 # contrib isn't compatible with autoconf-2.13
63 unset WANT_AUTOCONF
64
65 for x in ttf2bdf ttf2pfb ttf2pk ttfbanner; do
66 cd "${S}"/freetype1-contrib/${x}
67 eautoconf
68 done
69 }
70
71 src_compile() {
72 use prefix || EPREFIX=
73 use kpathsea && kpathseaconf="--with-kpathsea-lib=${EPREFIX}/usr/$(get_libdir) --with-kpathsea-include=${EPREFIX}/usr/include"
74
75 # core
76 einfo "Building core library..."
77 econf $(use_enable nls) || die "econf failed"
78 emake || die "emake failed"
79
80 # contrib
81 cd "${S}"/freetype1-contrib/ttf2pk
82 einfo "Building ttf2pk..."
83 econf ${kpathseaconf} || die "econf ttf2pk failed"
84 emake || die "emake ttf2pk failed"
85 for x in ttf2bdf ttf2pfb ttfbanner; do
86 cd "${S}"/freetype1-contrib/${x}
87 einfo "Building ${x}..."
88 econf || die "econf ${x} failed"
89 emake || die "emake ${x} failed"
90 done
91 }
92
93 src_install() {
94 use prefix || ED=${D}
95 dodoc announce PATENTS README docs/*.txt docs/FAQ
96 use doc && dohtml -r docs
97
98 # core
99 # Seems to require a shared libintl (getetxt comes only with a static one
100 # But it seems to work without problems
101 einfo "Installing core library..."
102 cd "${S}"/lib
103 emake -f arch/unix/Makefile \
104 prefix="${ED}"/usr libdir="${ED}"/usr/$(get_libdir) install \
105 || die "lib install failed"
106
107 # install po files
108 einfo "Installing po files..."
109 cd "${S}"/po
110 emake prefix="${ED}"/usr libdir="${ED}"/usr/$(get_libdir) install \
111 || die "po install failed"
112
113 # contrib (DESTDIR now works here)
114 einfo "Installing contrib..."
115 for x in ttf2bdf ttf2pfb ttf2pk ttfbanner; do
116 cd "${S}"/freetype1-contrib/${x}
117 emake DESTDIR="${D}" install || die "${x} install failed"
118 done
119
120 # tex stuff
121 if use kpathsea; then
122 cd "${S}"/freetype1-contrib
123 insinto /usr/share/texmf/ttf2pk
124 doins ttf2pk/data/* || die "kpathsea ttf2pk install failed"
125 insinto /usr/share/texmf/ttf2pfb
126 doins ttf2pfb/Uni-T1.enc || die "kpathsea ttf2pfb install failed"
127 fi
128 }

  ViewVC Help
Powered by ViewVC 1.1.20