summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2005-02-22 05:58:46 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2005-02-22 05:58:46 +0000
commitde29c1b3b152af033ec0d2a7d64d77a1f29d6e05 (patch)
treea66f6e87fae11b75ec172444222033579febeee7 /sci-chemistry/chemtool/chemtool-1.6.6.ebuild
parent(Portage version: 2.0.51-r15) (Manifest recommit) (diff)
downloadgentoo-2-de29c1b3b152af033ec0d2a7d64d77a1f29d6e05.tar.gz
gentoo-2-de29c1b3b152af033ec0d2a7d64d77a1f29d6e05.tar.bz2
gentoo-2-de29c1b3b152af033ec0d2a7d64d77a1f29d6e05.zip
Version bump
(Portage version: 2.0.51-r15)
Diffstat (limited to 'sci-chemistry/chemtool/chemtool-1.6.6.ebuild')
-rw-r--r--sci-chemistry/chemtool/chemtool-1.6.6.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/sci-chemistry/chemtool/chemtool-1.6.6.ebuild b/sci-chemistry/chemtool/chemtool-1.6.6.ebuild
new file mode 100644
index 000000000000..2931ad1364b6
--- /dev/null
+++ b/sci-chemistry/chemtool/chemtool-1.6.6.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/chemtool/chemtool-1.6.6.ebuild,v 1.1 2005/02/22 05:58:46 phosphan Exp $
+
+inherit eutils kde-functions
+
+DESCRIPTION="program for drawing organic molecules"
+HOMEPAGE="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/"
+SRC_URI="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="gtk2 gnome kde nls"
+
+DEPEND=">=media-gfx/transfig-3.2.3d
+ || (
+ gtk2? ( =x11-libs/gtk+-2* )
+ =x11-libs/gtk+-1*
+ )
+ x86? ( >=media-libs/libemf-1.0 )"
+
+src_compile() {
+ local config_opts
+ local mycppflags
+ local mykdedir
+ if [ -z "${KDEDIR}" ]; then
+ mykdedir="bogus_kde"
+ else
+ mykdedir="${KDEDIR}"
+ fi
+ if [ ${ARCH} = "x86" ]; then
+ config_opts="--enable-emf"
+ mycppflags="${mycppflags} -I /usr/include/libEMF"
+ fi
+
+ if ! use gtk2; then
+ config_opts="${config_opts} --enable-gtk1"
+ fi
+
+ sed -e "s:\(^CPPFLAGS.*\):\1 ${mycppflags}:" -i Makefile.in || \
+ die "could not append cppflags"
+
+ if use kde; then
+ config_opts="${config_opts} --with-kdedir=${mykdedir}" ;
+ fi
+
+ if use gnome ; then
+ config_opts="${config_opts} --with-gnomedir=/usr" ;
+ else
+ config_opts="${config_opts} --without-gnomedir" ;
+ fi
+
+ econf ${config_opts} \
+ || die "./configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+
+ local mykdedir="${KDEDIR}"
+ if [ -z "${mykdedir}" ]; then mykdedir="bogus_kde"; fi
+ local sharedirs="applnk/Graphics mimelnk/application icons/hicolor/32x32/mimetypes"
+ for dir in ${sharedirs}; do
+ dodir ${mykdedir}/share/${dir}
+ done
+ dodir /usr/share/mime-types
+ dodir /usr/share/pixmaps/mc
+
+ make DESTDIR="${D}" install || die "make install failed"
+
+ if ! use kde; then
+ rm -rf ${D}/${mykdedir}
+ fi
+
+ if ! use gnome; then
+ rm -rf ${D}/usr/share/pixmaps ${D}/usr/share/mime-types
+ fi
+
+ dodoc ChangeLog INSTALL README TODO
+ insinto /usr/share/${PN}/examples
+ doins ${S}/examples/*
+ if ! use nls; then rm -rf ${D}/usr/share/locale; fi
+}