/[gentoo-x86]/app-office/abiword/abiword-0.99.5.ebuild
Gentoo

Contents of /app-office/abiword/abiword-0.99.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Apr 29 00:10:22 2002 UTC (16 years, 6 months ago) by karltk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fixes #2111.

1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # Author: Karl Trygve Kalleberg <karltk@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/app-office/abiword/abiword-0.99.5.ebuild,v 1.1 2002/04/15 02:53:43 azarah Exp $
5
6 S=${WORKDIR}/${P}/abi
7 DESCRIPTION="Text processor"
8 SRC_URI="http://download.sourceforge.net/abiword/abiword-${PV}.tar.gz"
9 HOMEPAGE="http://www.abisource.com"
10 SLOT="0"
11 DEPEND="virtual/x11
12 media-libs/libpng
13 >=dev-libs/libunicode-0.4-r1
14 >=gnome-base/bonobo-1.0.9-r1
15 >=x11-libs/gtk+-1.2.10-r4
16 jpeg? ( >=media-libs/jpeg-6b-r2 )
17 perl? ( >=sys-devel/perl-5.6 )
18 xml2? ( >=dev-libs/libxml2-2.4.10 )
19 spell? ( >=app-text/pspell-ispell-0.12-r1 )
20 gnome? ( >=gnome-base/gnome-libs-1.4.1.2-r1
21 >=gnome-extra/gal-0.13-r1 )"
22
23
24 fix_perl_env() {
25 # new configure scripts is a bit broken
26 export PERL_ARCHLIB="`(perl -V:installarchlib | sed -e "s/\(.*=\|'\|;\)//g\")`"
27 export PERL_LIB="`(perl -V:installprivlib | sed -e "s/\(.*=\|'\|;\)//g\")`"
28 export POD2MAN_EXE="`which pod2man`"
29 export SITE_LIB="`(perl -V:sitelib | sed -e "s/\(.*=\|'\|;\)//g\")`"
30 export SITE_ARCHLIB="`(perl -V:sitearch | sed -e "s/\(.*=\|'\|;\)//g\")`"
31 }
32
33 src_unpack() {
34
35 unpack ${A}
36
37 use perl && ( \
38 fix_perl_env
39
40 # Fix perl stuff install outside sandbox, as well as a bug in
41 # Abiword's build system (Abiword.3pm did not install, and
42 # the '.packlist' was not generated properly) -- Azarah (25/02/2002).
43 cd ${S}/src/bindings/perl
44 cp GNUmakefile.am GNUmakefile.am.orig
45 sed -e "s:PERL_ARCHLIB = @PERL_ARCHLIB@:PERL_ARCHLIB = ${PERL_ARCHLIB}:" \
46 -e "s:PERL_LIB = @PERL_LIB@:PERL_LIB = ${PERL_LIB}:" \
47 -e "s:POD2MAN_EXE = @POD2MAN_EXE@:POD2MAN_EXE = ${POD2MAN_EXE}:" \
48 -e "s:SITE_LIB = @SITE_LIB@:SITE_LIB = ${SITE_LIB}:" \
49 -e "s:SITE_ARCHLIB = @SITE_ARCHLIB@:SITE_ARCHLIB = ${SITE_ARCHLIB}:" \
50 -e 's:write $(SITE_ARCHLIB)/auto:write $(PERLDEST)/$(SITE_ARCHLIB)/auto:g' \
51 -e 's:blib/lib $(SITE_LIB):blib/lib $(PERLDEST)/$(SITE_LIB):g' \
52 -e 's:blib/arch $(SITE_ARCHLIB):blib/arch $(PERLDEST)/$(SITE_ARCHLIB):g' \
53 -e 's:blib/bin /usr/bin:blib/bin $(PERLDEST)/usr/bin:g' \
54 -e 's:blib/script /usr/bin:blib/script $(PERLDEST)/usr/bin:g' \
55 -e 's:blib/man1 /usr/share/man/man1:blib/man1 $(PERLDEST)/usr/share/man/man1:g' \
56 -e 's:blib/man3 /usr/share/man/man3:blib/man3 $(PERLDEST)/usr/share/man/man3:g' \
57 -e 's:mkpath $(PERL_ARCHLIB):mkpath $(PERLDEST)/$(PERL_ARCHLIB):g' \
58 -e 's:$(PERL_ARCHLIB)/perllocal.pod:$(PERLDEST)/$(PERL_ARCHLIB)/perllocal.pod.new:' \
59 GNUmakefile.am.orig >GNUmakefile.am || die
60 mkdir -p blib/{arch,bin,lib,man1,man3,script}
61 cd ${S}
62 )
63
64 # clear invalid symlinks
65 rm -f ac-helpers/{install-sh,mkinstalldirs,missing}
66 }
67
68 src_compile() {
69
70 local myconf
71
72 use gnome \
73 && myconf="${myconf} --with-gnome --enable-gnome" \
74 && export ABI_OPT_BONOBO=1
75
76 use perl \
77 && myconf="${myconf} --enable-scripting"
78
79 use spell \
80 && myconf="${myconf} --with-pspell"
81
82 use xml2 \
83 && myconf="${myconf} --with-libxml2"
84
85 use jpeg \
86 && myconf="${myconf} --with-libjpeg"
87
88 use nls \
89 && myconf="${myconf} --enable-bidi"
90
91 ./autogen.sh
92
93 echo
94 echo "*************************************************"
95 echo "* Ignore above ERROR as it does not cause build *"
96 echo "* to fail. *"
97 echo "*************************************************"
98 echo
99
100 CFLAGS="${CFLAGS} `gdk-pixbuf-config --cflags`"
101
102 ./configure \
103 --prefix=/usr \
104 --mandir=/usr/share/man \
105 --infodir=/usr/share/info \
106 --sysconfdir=/etc \
107 --localstatedir=/var/lib \
108 --enable-extra-optimization \
109 ${myconf} || die
110
111 # Doesn't work with -j 4 (hallski)
112 make UNIX_CAN_BUILD_STATIC=0 \
113 OPTIMIZER="${CFLAGS}" || die
114 }
115
116 src_install() {
117
118 dodir /usr/{bin,lib}
119
120 make prefix=${D}/usr \
121 mandir=${D}/usr/share/man \
122 infodir=${D}/usr/share/info \
123 sysconfdir=${D}/etc \
124 localstatedir=${D}/var/lib \
125 PERLDEST=${D} \
126 install || die
127
128 dosed "s:${D}::g" /usr/bin/AbiWord
129
130 rm -f ${D}/usr/bin/abiword
131 dosym /usr/bin/AbiWord /usr/bin/abiword
132
133 dodoc BUILD COPYING *.txt, *.TXT
134
135 # Install icon and .desktop for menu entry
136 use gnome && ( \
137 insinto /usr/share/pixmaps
138 newins ${WORKDIR}/${P}/abidistfiles/icons/abiword_48.png AbiWord.png
139 insinto /usr/share/gnome/apps/Applications
140 doins ${FILESDIR}/AbiWord.desktop
141 )
142 }
143
144 pkg_postinst() {
145
146 # Appending installation info
147 local perlver="`perl -v | grep -e "This is perl" | cut -d ' ' -f 4`"
148 perlver=${perlver/v/}
149 local perlarch="`perl -V | grep -e " archname" | cut -d '=' -f 4`"
150 if [ -f /usr/lib/perl5/${perlver}/${perlarch}/perllocal.pod.new ] ; then
151 sed -e "s:5.6.0:${perlver}:g" \
152 /usr/lib/perl5/${perlver}/${perlarch}/perllocal.pod.new \
153 >> /usr/lib/perl5/${perlver}/${perlarch}/perllocal.pod
154 rm -rf /usr/lib/perl5/${perlver}/${perlarch}/perllocal.pod.new
155 fi
156 }
157

  ViewVC Help
Powered by ViewVC 1.1.20