/[gentoo-alt]/trunk/prefix/sys-devel/gettext/gettext-0.15.ebuild
Gentoo

Contents of /trunk/prefix/sys-devel/gettext/gettext-0.15.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1579 - (show annotations) (download)
Fri Sep 22 15:04:13 2006 UTC (8 years, 1 month ago) by grobian
File size: 3998 byte(s)
Mark ~x86-macos


1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.15.ebuild,v 1.6 2006/09/13 02:09:37 vapier Exp $
4
5 EAPI="prefix"
6
7 inherit flag-o-matic eutils multilib toolchain-funcs mono libtool elisp-common
8
9 DESCRIPTION="GNU locale utilities"
10 HOMEPAGE="http://www.gnu.org/software/gettext/gettext.html"
11 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc-macos ~x86 ~x86-macos"
16 IUSE="emacs nls doc nocxx"
17
18 DEPEND="virtual/libiconv"
19
20 src_unpack() {
21 unpack ${A}
22 cd "${S}"
23
24 epunt_cxx
25
26 epatch "${FILESDIR}"/${PN}-0.14.1-lib-path-tests.patch #81628
27 # Fix race, bug #85054
28 epatch "${FILESDIR}"/${PN}-0.14.2-fix-race.patch
29
30 # bundled libtool seems to be broken so skip certain rpath tests
31 # http://lists.gnu.org/archive/html/bug-libtool/2005-03/msg00070.html
32 sed -i \
33 -e '2iexit 77' \
34 autoconf-lib-link/tests/rpath-3*[ef] || die "sed tests"
35
36 # use Gentoo std docdir
37 sed -i \
38 -e "/^docdir=/s:=.*:=${EPREFIX}/usr/share/doc/${PF}:" \
39 gettext-runtime/configure \
40 gettext-tools/configure \
41 gettext-tools/examples/installpaths.in \
42 || die "sed docdir"
43
44 # sanity check for Bug 105304
45 if [[ -z ${USERLAND} ]] ; then
46 eerror "You just hit Bug 105304, please post your 'emerge info' here:"
47 eerror "http://bugs.gentoo.org/105304"
48 die "Aborting to prevent screwing your system"
49 fi
50 }
51
52 src_compile() {
53 local myconf=""
54 # Build with --without-included-gettext (on glibc systems)
55 if use elibc_glibc ; then
56 myconf="${myconf} --without-included-gettext $(use_enable nls)"
57 else
58 myconf="${myconf} --with-included-gettext --enable-nls"
59 fi
60 use nocxx && export CXX=$(tc-getCC)
61 econf \
62 $(use_with emacs) \
63 --disable-java \
64 ${myconf} \
65 || die
66 emake || die
67 }
68
69 src_install() {
70 make install DESTDIR="${EDEST}" || die "install failed"
71 use nls || rm -r "${D}"/usr/share/locale
72 dosym msgfmt /usr/bin/gmsgfmt #43435
73 dobin gettext-tools/misc/gettextize || die "gettextize"
74
75 # remove stuff that glibc handles
76 if use elibc_glibc ; then
77 rm -f "${D}"/usr/include/libintl.h
78 rm -f "${D}"/usr/$(get_libdir)/libintl.*
79 fi
80 rm -f "${D}"/usr/share/locale/locale.alias "${D}"/usr/lib/charset.alias
81
82 # older gettext's sometimes installed libintl ...
83 # need to keep the linked version or the system
84 # could die (things like sed link against it :/)
85 local libname="libintl$(get_libname 7)"
86 if [[ -e ${ROOT}/usr/$(get_libdir)/${libname} ]] ; then
87 cp -pPR ${ROOT}/usr/$(get_libdir)/${libname}* "${D}"/usr/$(get_libdir)/
88 touch "${D}"/usr/$(get_libdir)/${libname}*
89 fi
90 if [[ -e ${ROOT}/$(get_libdir)/${libname} ]] ; then
91 dodir /$(get_libdir)
92 cp -pPR ${ROOT}/$(get_libdir)/${libname}* "${D}"/$(get_libdir)/
93 touch "${D}"/$(get_libdir)/${libname}*
94 fi
95
96 if ! use elibc_glibc; then
97 libname="libintl$(get_libname 8)"
98 # Move dynamic libs and creates ldscripts into /usr/lib
99 dodir /$(get_libdir)
100 if [[ ${USERLAND} == "Darwin" ]];
101 then
102 mv "${D}"/usr/$(get_libdir)/${libname/.dylib/}*.dylib "${D}"/$(get_libdir)/
103 else
104 mv "${D}"/usr/$(get_libdir)/${libname}* "${D}"/$(get_libdir)/
105 fi
106 gen_usr_ldscript ${libname}
107 fi
108
109 if ! use doc ; then
110 rm -rf "${D}/${EPREFIX}"/usr/share/doc/${PF}/html
111 rm -rf "${D}/${EPREFIX}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
112 fi
113 dohtml "${D}/${EPREFIX}"/usr/share/doc/${PF}/*.html
114 rm -f "${D}/${EPREFIX}"/usr/share/doc/${PF}/*.html
115
116 # Remove emacs site-lisp stuff if 'emacs' is not in USE
117 if use emacs ; then
118 elisp-site-file-install "${FILESDIR}"/50po-mode-gentoo.el
119 else
120 rm -rf "${D}/${EPREFIX}"/usr/share/emacs
121 fi
122
123 dodoc AUTHORS ChangeLog NEWS README THANKS
124 }
125
126 pkg_postinst() {
127 use emacs && elisp-site-regen
128 ewarn "Any package that linked against the previous version"
129 ewarn "of gettext will have to be rebuilt."
130 ewarn "Please 'emerge gentoolkit' and run:"
131 ewarn "revdep-rebuild --library libintl.so.7"
132 }
133
134 pkg_postrm() {
135 use emacs && elisp-site-regen
136 }

  ViewVC Help
Powered by ViewVC 1.1.20