summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-06-19 21:32:43 +0000
committerPacho Ramos <pacho@gentoo.org>2011-06-19 21:32:43 +0000
commit99d849824bca9479127aa1d3bae1f2ba2302db97 (patch)
treeca0936b741cb887d09fbd40bb128bd503fcc76fb /gnome-extra
parentFix hang from KDE bug 274940; find blas using PkgConfig (diff)
downloadgentoo-2-99d849824bca9479127aa1d3bae1f2ba2302db97.tar.gz
gentoo-2-99d849824bca9479127aa1d3bae1f2ba2302db97.tar.bz2
gentoo-2-99d849824bca9479127aa1d3bae1f2ba2302db97.zip
Version bump, also fix bug #349782 (linking problems) with tetromino's solution.
(Portage version: 2.1.9.50/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra')
-rw-r--r--gnome-extra/evolution-data-server/ChangeLog9
-rw-r--r--gnome-extra/evolution-data-server/evolution-data-server-2.32.3.ebuild155
-rw-r--r--gnome-extra/evolution-data-server/files/fix_relink_command.pl108
3 files changed, 271 insertions, 1 deletions
diff --git a/gnome-extra/evolution-data-server/ChangeLog b/gnome-extra/evolution-data-server/ChangeLog
index 52096cbe48cc..1c1bd7e2f22b 100644
--- a/gnome-extra/evolution-data-server/ChangeLog
+++ b/gnome-extra/evolution-data-server/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-extra/evolution-data-server
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/ChangeLog,v 1.301 2011/04/13 16:38:53 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/ChangeLog,v 1.302 2011/06/19 21:32:43 pacho Exp $
+
+*evolution-data-server-2.32.3 (19 Jun 2011)
+
+ 19 Jun 2011; Pacho Ramos <pacho@gentoo.org>
+ +evolution-data-server-2.32.3.ebuild, +files/fix_relink_command.pl:
+ Version bump, also fix bug #349782 (linking problems) with tetromino's
+ solution.
13 Apr 2011; Pacho Ramos <pacho@gentoo.org>
evolution-data-server-2.32.2-r1.ebuild:
diff --git a/gnome-extra/evolution-data-server/evolution-data-server-2.32.3.ebuild b/gnome-extra/evolution-data-server/evolution-data-server-2.32.3.ebuild
new file mode 100644
index 000000000000..739e9dcc39f8
--- /dev/null
+++ b/gnome-extra/evolution-data-server/evolution-data-server-2.32.3.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/evolution-data-server-2.32.3.ebuild,v 1.1 2011/06/19 21:32:43 pacho Exp $
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+GNOME_TARBALL_SUFFIX="bz2"
+
+inherit autotools db-use eutils flag-o-matic gnome2 versionator virtualx
+
+DESCRIPTION="Evolution groupware backend"
+HOMEPAGE="http://projects.gnome.org/evolution/"
+
+SRC_URI="${SRC_URI} http://dev.gentoo.org/~pacho/gnome/${P}-patches.tar.xz"
+
+LICENSE="LGPL-2 BSD DB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-solaris"
+
+IUSE="doc ipv6 kerberos gnome-keyring ldap +weather"
+
+RDEPEND=">=dev-libs/glib-2.25.12:2
+ >=x11-libs/gtk+-2.24:2
+ >=gnome-base/gconf-2
+ >=dev-db/sqlite-3.5
+ >=dev-libs/libgdata-0.6.3
+ >=dev-libs/libical-0.43
+ >=net-libs/libsoup-2.4:2.4
+ >=dev-libs/libxml2-2
+ >=sys-libs/db-4
+ sys-libs/zlib
+ virtual/libiconv
+ >=dev-libs/nspr-4.4
+ >=dev-libs/nss-3.9
+ gnome-keyring? ( >=gnome-base/gnome-keyring-2.20.1 )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-2 )
+ weather? ( >=dev-libs/libgweather-2.25.4:2 )
+"
+DEPEND="${RDEPEND}
+ dev-util/gperf
+ >=dev-util/pkgconfig-0.9
+ >=dev-util/intltool-0.35.5
+ sys-devel/bison
+ >=gnome-base/gnome-common-2
+ >=dev-util/gtk-doc-am-1.9
+ doc? ( >=dev-util/gtk-doc-1.9 )"
+# eautoreconf needs:
+# >=gnome-base/gnome-common-2
+# >=dev-util/gtk-doc-am-1.9
+
+pkg_setup() {
+ DOCS="ChangeLog MAINTAINERS NEWS TODO"
+
+ # ssl stuff always enabled as recommended in upstream bug #642984
+ G2CONF="${G2CONF}
+ $(use_enable gnome-keyring)
+ $(use_enable ipv6)
+ $(use_with kerberos krb5 /usr)
+ $(use_with ldap openldap)
+ $(use_with weather)
+ --disable-gtk3
+ --enable-largefile
+ --with-libdb=/usr
+ --enable-ssl
+ --enable-smime"
+
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Adjust to gentoo's /etc/service
+ epatch "${FILESDIR}/${PN}-2.31-gentoo_etc_services.patch"
+
+ # GNOME bug 611353 (skips failing test atm)
+ epatch "${FILESDIR}/e-d-s-camel-skip-failing-test.patch"
+
+ # GNOME bug 621763 (skip failing test-ebook-stress-factory--fifo)
+ sed -e 's/\(SUBDIRS =.*\)ebook/\1/' \
+ -i addressbook/tests/Makefile.{am,in} \
+ || die "failing test sed 1 failed"
+
+ # Apply multiple backports and fixed from master and 2.32 branches
+ epatch "${WORKDIR}/${P}-patches"/*.patch
+
+ # /usr/include/db.h is always db-1 on FreeBSD
+ # so include the right dir in CPPFLAGS
+ append-cppflags "-I$(db_includedir)"
+
+ # FIXME: Fix compilation flags crazyness
+ sed 's/^\(AM_CPPFLAGS="\)$WARNING_FLAGS/\1/' \
+ -i configure.ac configure || die "sed 3 failed"
+
+ intltoolize --force --copy --automake || die "intltoolize failed"
+ eautoreconf
+}
+
+src_install() {
+ # Prevent this evolution-data-server from linking to libs in the installed
+ # evolution-data-server libraries by adding -L arguments for build dirs to
+ # every .la file's relink_command field, forcing libtool to look there
+ # first during relinking. This will mangle the .la files installed by
+ # make install, but we don't care because we will be punting them anyway.
+ perl "${FILESDIR}/fix_relink_command.pl" . \
+ || die "fix_relink_command.pl failed"
+
+ gnome2_src_install
+
+ if use ldap; then
+ MY_MAJORV=$(get_version_component_range 1-2)
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/calentry.schema || die "doins failed"
+ dosym /usr/share/${PN}-${MY_MAJORV}/evolutionperson.schema /etc/openldap/schema/evolutionperson.schema
+ fi
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ unset ORBIT_SOCKETDIR
+ unset SESSION_MANAGER
+ export XDG_DATA_HOME="${T}"
+ unset DISPLAY
+ Xemake check || die "Tests failed."
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+
+ for lib in libcamel-provider-1.2.so.14 libedata-cal-1.2.so.7 \
+ libgdata-1.2.so libgdata-google-1.2.so libcamel-1.2.so.14 \
+ libedata-book-1.2.so.2 libebook-1.2.so.9 \
+ libedataserver-1.2.so.13 libecal-1.2.so.7 libedataserverui-1.2.so.8
+ do
+ preserve_old_lib /usr/$(get_libdir)/$lib
+ done
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ for lib in libcamel-provider-1.2.so.14 libedata-cal-1.2.so.7 \
+ libgdata-1.2.so libgdata-google-1.2.so libcamel-1.2.so.14 \
+ libedata-book-1.2.so.2 libebook-1.2.so.9 \
+ libedataserver-1.2.so.13 libecal-1.2.so.7 libedataserverui-1.2.so.8
+ do
+ preserve_old_lib_notify /usr/$(get_libdir)/$lib
+ done
+
+ if use ldap; then
+ elog ""
+ elog "LDAP schemas needed by evolution are installed in /etc/openldap/schema"
+ fi
+}
diff --git a/gnome-extra/evolution-data-server/files/fix_relink_command.pl b/gnome-extra/evolution-data-server/files/fix_relink_command.pl
new file mode 100644
index 000000000000..12106c3856d6
--- /dev/null
+++ b/gnome-extra/evolution-data-server/files/fix_relink_command.pl
@@ -0,0 +1,108 @@
+#!/usr/bin/perl
+# Fix the relink_command field of .la files in the specified directory tree
+# to add "-L$dir/.libs" for every .la file that is specified in a relative
+# $dir; place these new -L directives before the first relative .la file.
+#
+# E.g. :
+# relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"
+# will become
+# relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo -Lbar/.libs -L../baz/.libs bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"
+#
+# Such a procedure should ensure that during relinking, libraries in the
+# local build tree will be looked at before libraries installed systemwide.
+#
+# Limitations: it is assumed that relink_command is one line. It is assumed
+# that any spaces in paths are escaped using '\'.
+#
+# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the same terms as Perl itself.
+use strict;
+use warnings;
+
+use Cwd qw(realpath);
+use File::Basename;
+use File::Find;
+
+my %processed = ();
+sub process_la_file {
+ my $filename = $_; # relative to cwd
+ my $pretty_filename = $File::Find::name; # relative to initial cwd
+ if (-d $filename) { return; }
+
+ # don't process a single .la file multiple times (e.g. if symlinked)
+ my $realpath = realpath($filename);
+ if ($processed{$realpath}) {
+ print "$pretty_filename ($realpath) was already processed\n";
+ return;
+ } else {
+ $processed{$realpath}++;
+ }
+
+ # preserve the .la file's mtime in order to avoid triggering make rules
+ my $mtime = (stat $filename)[9];
+ open(my $fh, '<', $filename) or die $!;
+ my $text;
+ my $changes; # whether the file has been changed
+ while (<$fh>) {
+ if (/relink_command=/) {
+ my ($start, $added, $end);
+ my $ignore = 0; # number of words to not check for similariy to
+ # an .la filename, following and including the
+ # current word
+ # split by unescaped spaces
+ for my $word (split /(?<!\\) /) {
+ if ($word =~ /^-/) {
+ # ignore command-line options; ignore filename after -o
+ $ignore++;
+ $ignore++ if $word eq '-o' ;
+ }
+ if ($word =~ m:^[^/].*\.la\W*$: and not $ignore) {
+ $added .= "-L" . dirname($word) . "/.libs ";
+ $end .= "$word ";
+ $changes++;
+ } else {
+ if ($end) {
+ $end .= "$word ";
+ } else {
+ $start .= "$word ";
+ }
+ }
+ $ignore-- if $ignore > 0;
+ }
+ $_ = "$start$added$end";
+ print "Added '$added' to relink_command in $pretty_filename\n" if $changes;
+ }
+ $text .= $_;
+ }
+ close $fh;
+ if ($changes) {
+ open($fh, '>', $filename) or die $!;
+ print $fh $text;
+ close $fh;
+ # Perl's utime does not support sub-second time :/
+ # And Time::HiRes doesn't help. As a workaround, round up the number of
+ # seconds in order to avoid triggering make rules.
+ utime $mtime + 1, $mtime + 1, $filename;
+ }
+}
+
+if (not @ARGV or $ARGV[0] eq '-h' or $ARGV[0] eq '--help') {
+ warn <<endhelp;
+Usage: fix_relink_command.pl [LAFILENAMES or DIRECTORIES]
+
+Adds extra -L\$dir/.libs arguments to the relink_command field of .la files
+in order to ensure that during relinking, libraries in the local build tree
+will be looked at before ones installed systemwide.
+
+If a filename is given, will process that .la file. If a directory is given,
+will recursively process all .la files in it (but will not recurse into
+symlinked or hidden directories).
+endhelp
+ exit;
+}
+
+find({ wanted => \&process_la_file,
+ preprocess => sub {grep { if (-d $_) { /^[^.]/ } else { /\.la$/ } } sort @_}
+ }, @ARGV);