# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils toolchain-funcs DESCRIPTION="Tsync is a user-level daemon that provides transparent synchronization for one or more volumes between N machines." HOMEPAGE="http://tsyncd.sourceforge.net/" SRC_URI="mirror://sourceforge/tsyncd/${P}.tar.gz" SLOT="0" LICENSE="GPL-2" KEYWORDS="~ppc ~x86" IUSE="static" DEPEND=">=dev-lang/perl-5.6.0 dev-libs/boost sys-devel/flex sys-devel/bison dev-libs/openssl" RDEPEND="${DEPEND} net-misc/openssh dev-perl/frontier-rpc" RESTRICT="nostrip" src_unpack() { unpack ${A} if [ $(gcc-major-version) -eq 4 ] || [ $(gcc-minor-version) -lt 4 ]; then echo ewarn "This only builds with gcc 3.4x (nothing older or newer)." ewarn "If you want to try patching, uncomment below to see the" ewarn "errors, and remove this die." die "The C++ code in tsync must be built with gcc 3.4" fi # fix the incompatible types error # epatch ${FILESDIR}/${P}-STL.patch || die "epatch failed" # hack around older code that only builds against glibc 2.3.x # sed -i -e "s/-Wall -Werror/-Wall -fpermissive/" mace/lib/Makefile \ # mace/compiler/Makefile mace/compiler/XmlRpc/Makefile \ # mace/services/Makefile.lib mace/application/Makefile.common \ # || die "1st sed failed" # change from lex to flex sed -i -e "s/-ll/-lfl/" ${S}/mace/compiler/Makefile || die "sed failed" # fix up Makefiles cd ${WORKDIR} epatch ${FILESDIR}/${P}-Makefile.patch || die "epatch failed" if use static ; then epatch ${FILESDIR}/${P}-static.patch || die "epatch static failed" fi } src_compile() { ./configure --mace-path=${S}/mace || die "configure failed" make || die "make failed - check for a yacc error" } src_install() { dobin tsync tsyncd mace/application/gencert dodoc COPYING README dohtml tsync_HOWTO.html } pkg_postinst() { einfo einfo "This package makes heavy use of the underlying mace code" einfo "and C++ (formerly STL) library functions. You must build" einfo "this version with gcc 3.4, as well as pthread support in" einfo "both boost and glibc. It also doesn't like yacc, but the" einfo "yacc version in bison is fine; amd64 is also b0rked." einfo einfo "There is no configuration file yet. See the HOWTO doc." einfo }