/[gentoo-x86]/dev-cpp/glog/glog-0.3.3-r1.ebuild
Gentoo

Contents of /dev-cpp/glog/glog-0.3.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Mar 27 02:37:51 2014 UTC (5 years, 11 months ago) by vapier
Branch: MAIN
Add multilib build support.

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-cpp/glog/glog-0.3.3.ebuild,v 1.5 2013/10/19 01:59:01 vapier Exp $
4
5 EAPI="4"
6 inherit eutils multilib-minimal
7
8 DESCRIPTION="Google's C++ logging library"
9 HOMEPAGE="http://code.google.com/p/google-glog/"
10 SRC_URI="http://google-glog.googlecode.com/files/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
15 IUSE="gflags static-libs unwind test"
16
17 RDEPEND="gflags? ( dev-cpp/gflags[${MULTILIB_USEDEP}] )
18 unwind? ( sys-libs/libunwind )"
19 DEPEND="${RDEPEND}
20 test? (
21 dev-cpp/gmock[${MULTILIB_USEDEP}]
22 dev-cpp/gtest[${MULTILIB_USEDEP}]
23 )"
24
25 src_prepare() {
26 epatch "${FILESDIR}"/${PN}-0.3.2-avoid-inline-asm.patch
27 # Fix the --dodcdir flag:
28 # https://code.google.com/p/google-glog/issues/detail?id=193
29 sed -i \
30 -e '/^docdir =/s:=.*:= @docdir@:' \
31 Makefile.in || die
32 }
33
34 multilib_src_configure() {
35 use test || export ac_cv_prog_GTEST_CONFIG=no
36 ECONF_SOURCE=${S} \
37 ac_cv_lib_gflags_main=$(usex gflags) \
38 ac_cv_lib_unwind_backtrace=$(usex unwind) \
39 econf \
40 --docdir="\$(datarootdir)/doc/${PF}" \
41 --htmldir='$(docdir)/html' \
42 $(use_enable static-libs static)
43 }
44
45 _emake() {
46 # The tests always get built ... disable them when unused.
47 emake $(usex test '' noinst_PROGRAMS=) "$@"
48 }
49
50 multilib_src_compile() {
51 _emake
52 }
53
54 multilib_src_install() {
55 _emake install DESTDIR="${D}"
56 }
57
58 multilib_src_install_all() {
59 # Punt docs we don't care about (NEWS is 0 bytes).
60 rm "${ED}"/usr/share/doc/${PF}/{COPYING,NEWS,README.windows} || die
61
62 # --htmldir doesn't work (yet):
63 # https://code.google.com/p/google-glog/issues/detail?id=144
64 dohtml "${ED}"/usr/share/doc/${PF}/*
65 rm "${ED}"/usr/share/doc/${PF}/*.{html,css}
66
67 use static-libs || find "${ED}" -name '*.la' -delete
68 }

  ViewVC Help
Powered by ViewVC 1.1.20