# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # Author nagatoro@gmail.com inherit eutils cvs toolchain-funcs DESCRIPTION="A gtk port of DC++, using the unmodified DC++ core" HOMEPAGE="linuxdcpp.berlios.de" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" RDEPEND="virtual/x11 >=x11-libs/gtk+-2.4.0 >=gnome-base/libglade-2.4.0 sys-libs/zlib app-arch/bzip2 sys-libs/glibc" DEPEND="${RDEPEND} dev-util/scons >=sys-devel/gcc-3.4.0" ECVS_SERVER="cvs.linuxdcpp.berlios.de:/cvsroot/linuxdcpp" ECVS_MODULE="linuxdcpp" S="${WORKDIR}/linuxdcpp" INTO="/usr" src_unpack() { ok="false" if [ "$(gcc-major-version)" -eq "3" ]; then if [ "$(gcc-minor-version)" -ge "4" ]; then ok="true" fi else if [ "$(gcc-major-version)" -gt "3" ]; then ok="true" fi fi if [ ${ok} == "true" ]; then cvs_src_unpack cd "${S}" EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \ EPATCH_FORCE="yes" epatch else eerror "${PN} _needs_ gcc version 3.4 or later!" eerror "Use man gcc-config to see how you change" eerror "to the right gcc version" eerror "If you use distcc don't forget to change" eerror "compiler on all systems or temporarily" eerror "disable distcc before you try to reemerge ${PN}" die "Wrong gcc version" fi } # This is a hack to be able to dynamically determine which directories # scons will try to create .scons* files in. get_config() { for lib in `grep "ParseConfig('pkg-config" SConstruct | tr "'" ' ' | cut -d" " -f 5- | tr ')' ' '`; do echo `pkg-config --libs --cflags ${lib} | tr ' ' '\n' | grep -E -- '-L|-I' | cut -c 3-` done } addpredict_from_config() { for i in $(get_config); do addpredict "${i}" done; } src_compile() { # Waring message "borrowed" from the enlightenment.eclass # by vapier@gentoo.org eerror "This is a LIVE CVS ebuild." eerror "That means there are NO promises it will work." eerror "If it fails to build, FIX THE CODE YOURSELF" eerror "before reporting any issues." addpredict_from_config scons release=1 FAKE_ROOT="${D}" PREFIX="${INTO}" || die "scons failed" } src_install() { ewarn "INSTALLING" einfo "Current path is $(pwd)" addpredict_from_config scons install release=1 FAKE_ROOT="${D}" PREFIX="${INTO}" || die "Install failed" }