summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/sparky/ChangeLog12
-rw-r--r--sci-chemistry/sparky/Manifest6
-rw-r--r--sci-chemistry/sparky/files/digest-sparky-3.1111
-rw-r--r--sci-chemistry/sparky/files/fix-install.patch259
-rw-r--r--sci-chemistry/sparky/metadata.xml9
-rw-r--r--sci-chemistry/sparky/sparky-3.111.ebuild85
6 files changed, 372 insertions, 0 deletions
diff --git a/sci-chemistry/sparky/ChangeLog b/sci-chemistry/sparky/ChangeLog
new file mode 100644
index 000000000000..467e2cb5bfc3
--- /dev/null
+++ b/sci-chemistry/sparky/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for sci-chemistry/sparky
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/ChangeLog,v 1.1 2005/12/18 18:59:48 spyderous Exp $
+
+*sparky-3.111 (18 Dec 2005)
+
+ 18 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>;
+ +files/fix-install.patch, +metadata.xml, +sparky-3.111.ebuild:
+ A new graphical NMR assignment and integration program for proteins, nucleic
+ acids, and other polymers. Very strange build system; takes lots of hacking
+ and tweaking to get working. Doesn't work with python-2.4, only 2.3.
+
diff --git a/sci-chemistry/sparky/Manifest b/sci-chemistry/sparky/Manifest
new file mode 100644
index 000000000000..7912fad3f37b
--- /dev/null
+++ b/sci-chemistry/sparky/Manifest
@@ -0,0 +1,6 @@
+MD5 58d459eacbeaa84c039bad48bb30baf5 files/digest-sparky-3.111 72
+MD5 4be84fed797386cc8986d1b3e4b579d8 files/fix-install-working.patch 7992
+MD5 53c15336a39923c3345a2f7dd841db27 files/fix-install-working2.patch 9131
+MD5 edd4cafd319052b6792fe4918f0bfaa4 files/fix-install.patch 10206
+MD5 d380a123f668307505d6e516408ad685 files/sparky.patch 10038
+MD5 0d9ee98ebeefaa098fe9adb383eeb5e9 sparky-3.111.ebuild 2846
diff --git a/sci-chemistry/sparky/files/digest-sparky-3.111 b/sci-chemistry/sparky/files/digest-sparky-3.111
new file mode 100644
index 000000000000..7e9c6af4ea3b
--- /dev/null
+++ b/sci-chemistry/sparky/files/digest-sparky-3.111
@@ -0,0 +1 @@
+MD5 f437420748bcb86dbfd1ca33a948ebc7 sparky-source-3.111.tar.gz 3820709
diff --git a/sci-chemistry/sparky/files/fix-install.patch b/sci-chemistry/sparky/files/fix-install.patch
new file mode 100644
index 000000000000..a9d10a3f5aeb
--- /dev/null
+++ b/sci-chemistry/sparky/files/fix-install.patch
@@ -0,0 +1,259 @@
+diff -ur -x make-sparky sparky.orig/bin/sparky sparky/bin/sparky
+--- sparky.orig/bin/sparky 2004-03-05 11:32:10.000000000 -0800
++++ sparky/bin/sparky 2005-12-17 17:36:51.000000000 -0800
+@@ -4,22 +4,10 @@
+ #
+
+ # -----------------------------------------------------------------------------
+-# Figure out Sparky installation directory from $0.
+-#
+-set sparky_exe = $0
+-while (-l $sparky_exe)
+- set ls_sparky_exe = `ls -l "$sparky_exe"`
+- set sparky_exe = `echo "$ls_sparky_exe" | sed 's/.* -> //'`
+-end
+-set sparky_bin = `dirname "$sparky_exe"`
+-set sparky_bin = `cd "$sparky_bin"; pwd`
+-set sparky_inst = `dirname "$sparky_bin"`
+-
+-# -----------------------------------------------------------------------------
+ # Sparky uses the SPARKY_INSTALL environment variable to find its
+ # application resource file and print prolog file.
+ #
+-setenv SPARKY_INSTALL $sparky_inst
++setenv SPARKY_INSTALL /usr/lib/sparky
+
+ # -----------------------------------------------------------------------------
+ # If Python is available start Sparky as a Python extension.
+diff -ur -x make-sparky sparky.orig/c++/Makefile sparky/c++/Makefile
+--- sparky.orig/c++/Makefile 2004-02-03 15:56:24.000000000 -0800
++++ sparky/c++/Makefile 2005-12-18 10:49:08.000000000 -0800
+@@ -22,6 +22,7 @@
+ PYTHON_PREFIX = /usr/local
+ PYTHON_LIB = $(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)
+ PYTHON_INC = $(PYTHON_PREFIX)/include/python$(PYTHON_VERSION)
++PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
+ TCLTK_VERSION = 8.4
+ TCLTK_VER_WIN32 = 84
+ TK_PREFIX = /usr/local
+@@ -113,21 +114,20 @@
+
+ nopython: $(EXECUTABLES)
+
+-install-python: $(SPY_PYMOD) $(TKINTER_PYMOD) $(SPARKY_INSTALL)/python \
+- $(SPARKY_INSTALL)/python/sparky $(SPARKY_INSTALL)/python/lib-tk
+- $(INSTALL) $(SPY_PYMOD) $(SPARKY_INSTALL)/python/sparky
+- chmod 755 $(SPARKY_INSTALL)/python/sparky/$(SPY_PYMOD)
+- $(INSTALL) $(TKINTER_PYMOD) $(SPARKY_INSTALL)/python/lib-tk
+- chmod 755 $(SPARKY_INSTALL)/python/lib-tk/$(TKINTER_PYMOD)
++install-python: $(SPY_PYMOD) $(TKINTER_PYMOD) $(PYDIR) \
++ $(PYDIR)/sparky $(PYDIR)/lib-tk
++ $(INSTALL) $(SPY_PYMOD) $(PYDIR)/sparky
++ chmod 755 $(PYDIR)/sparky/$(SPY_PYMOD)
++ $(INSTALL) $(TKINTER_PYMOD) $(PYDIR)/lib-tk
++ chmod 755 $(PYDIR)/lib-tk/$(TKINTER_PYMOD)
+
+ install-nopython: $(EXECUTABLES) $(SPARKY_INSTALL)/bin
+ $(INSTALL) $(EXECUTABLES) $(SPARKY_INSTALL)/bin
+ cd $(SPARKY_INSTALL)/bin ; \
+ chmod 755 $(EXECUTABLES)
+
+-$(SPARKY_INSTALL)/bin $(SPARKY_INSTALL)/python \
+-$(SPARKY_INSTALL)/python/sparky $(SPARKY_INSTALL)/python/lib-tk:
+- mkdir $@
++$(SPARKY_INSTALL)/bin $(PYDIR) $(PYDIR)/sparky $(PYDIR)/lib-tk:
++ mkdir -p $@
+ chmod 755 $@
+
+ sparky-no-python$(EXE_SUFFIX): main.o $(SPARKY_OBJS)
+diff -ur -x make-sparky sparky.orig/c++/paths.h sparky/c++/paths.h
+--- sparky.orig/c++/paths.h 2002-01-17 19:15:06.000000000 -0800
++++ sparky/c++/paths.h 2005-12-17 20:57:15.000000000 -0800
+@@ -19,7 +19,7 @@
+ // Installation subdirectories and files
+ //
+ #define SPARKY_MANUAL "manual"
+-#define SPARKY_LIB "lib"
++#define SPARKY_LIB ""
+ #define SPARKY_PRINT "print-prolog.ps" // under lib directory
+ #define SPARKY_RESOURCE "Sparky" // under lib directory
+ #define SPARKY_SAMPLE_DATA "example"
+diff -ur -x make-sparky sparky.orig/c++/system-unix.cc sparky/c++/system-unix.cc
+--- sparky.orig/c++/system-unix.cc 2004-02-26 10:57:54.000000000 -0800
++++ sparky/c++/system-unix.cc 2005-12-17 20:56:58.000000000 -0800
+@@ -95,7 +95,7 @@
+ //
+ Stringy default_sparky_install_path()
+ {
+- return file_path(file_path(file_path("", "usr"), "local"), "sparky");
++ return file_path(file_path(file_path("", "usr"), "lib"), "sparky");
+ }
+
+ // ----------------------------------------------------------------------------
+diff -ur -x make-sparky sparky.orig/lib/Makefile sparky/lib/Makefile
+--- sparky.orig/lib/Makefile 2004-02-18 10:53:29.000000000 -0800
++++ sparky/lib/Makefile 2005-12-17 16:03:21.000000000 -0800
+@@ -18,9 +18,9 @@
+ TCL_SHLIB = lib$(TCL_VERSION)$(TCLTK_SHLIB_SUFFIX)
+ TK_SHLIB = lib$(TK_VERSION)$(TCLTK_SHLIB_SUFFIX)
+
+-install: $(SPARKY_INSTALL)/lib install-tcl-tk
+- $(INSTALL) Sparky print-prolog.ps $(SPARKY_INSTALL)/lib
+- cd $(SPARKY_INSTALL)/lib ; \
++install: $(SPARKY_INSTALL)/lib
++ $(INSTALL) Sparky print-prolog.ps $(SPARKY_INSTALL)/lib/sparky
++ cd $(SPARKY_INSTALL)/lib/sparky ; \
+ chmod 644 Sparky print-prolog.ps
+
+ install-tcl-tk: $(SPARKY_INSTALL)/lib
+diff -ur -x make-sparky sparky.orig/Makefile sparky/Makefile
+--- sparky.orig/Makefile 2004-02-18 10:40:04.000000000 -0800
++++ sparky/Makefile 2005-12-17 19:40:48.000000000 -0800
+@@ -40,18 +40,22 @@
+
+ PYTHON_VERSION = 2.3
+ PYTHON_DIR =
++PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
+
+ PYMOD_SUFFIX = .so
+ SPY_PYMOD = spy$(PYMOD_SUFFIX)
+ TKINTER_PYMOD = _tkinter$(PYMOD_SUFFIX)
+
++PYDIR = $(SPARKY_INSTALL)/lib/sparky/python
++DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
++
+ all nopython $(SPY_PYMOD) $(TKINTER_PYMOD) $(EXECUTABLES) debug-sparky clean: force
+ cd $(SPARKY_OBJ) && $(MAKE) -f $(SPARKY_SRC)/Makefile -e $@
+
+ Makefile.dep TAGS: force
+ cd $(SPARKY_SRC) && $(MAKE) -f Makefile -e $@
+
+-install: install-nopython $(SPARKY_INSTALL) install-python
++install: install-nopython $(SPARKY_INSTALL)
+ cd $(SPARKY_OBJ) && \
+ $(MAKE) -f $(SPARKY_SRC)/Makefile -e install-python
+ cd $(SPARKY)/python && $(MAKE) -f Makefile -e install
+@@ -67,7 +71,8 @@
+ chmod 755 sparky$(SCRIPT_SUFFIX)
+
+ install-example: $(SPARKY_INSTALL)
+- cd $(SPARKY) ; $(INSTALLDIR) example $(SPARKY_INSTALL)
++ mkdir -p $(DOCDIR)/example
++ cd $(SPARKY) ; $(INSTALLDIR) example $(DOCDIR)
+
+ install-lib: $(SPARKY_INSTALL)
+ cd $(SPARKY)/lib && $(MAKE) -f Makefile -e install
+@@ -76,21 +81,14 @@
+ cd $(SPARKY)/manual && $(MAKE) -f Makefile -e install
+
+ install-misc: $(SPARKY_INSTALL)
+- cd $(SPARKY) ; $(INSTALL) LICENSE README $(SPARKY_INSTALL)
+- cd $(SPARKY_INSTALL) ; chmod 644 LICENSE README
+-
+-install-python: $(SPARKY_INSTALL) $(SPARKY_INSTALL)/python$(PYTHON_VERSION)
+-ifdef PYTHON_DIR
+- $(INSTALLDIR) $(PYTHON_DIR)/* $(SPARKY_INSTALL)/python$(PYTHON_VERSION)
+-else
+- echo "Not packaging Python with Sparky."
+-endif
++ cd $(SPARKY) ; $(INSTALL) LICENSE README $(DOCDIR)
++ cd $(DOCDIR) ; chmod 644 LICENSE README
+
+ install-mac:
+ cd $(SPARKY)/mac && $(MAKE) -f Makefile -e install
+
+-$(SPARKY_INSTALL) $(SPARKY_INSTALL)/bin $(SPARKY_INSTALL)/python$(PYTHON_VERSION):
+- mkdir $@
++$(SPARKY_INSTALL) $(SPARKY_INSTALL)/bin $(PYDIR):
++ mkdir -p $@
+ chmod 755 $@
+
+ force:
+diff -ur -x make-sparky sparky.orig/manual/Makefile sparky/manual/Makefile
+--- sparky.orig/manual/Makefile 2004-03-08 15:40:06.000000000 -0800
++++ sparky/manual/Makefile 2005-12-17 19:37:45.000000000 -0800
+@@ -13,6 +13,8 @@
+
+ SPARKY_INSTALL = /usr/local/sparky
+ MANUAL_WWW = /usr/local/html/cgl/sparky/manual
++DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
++MANUAL_LOC = $(DOCDIR)/manual
+
+ MANUAL_SECTIONS = overview.html intro.html views.html peaks.html \
+ extensions.html autoassign.html misc.html \
+@@ -45,17 +47,17 @@
+
+ all: $(MANUAL_FILES)
+
+-install: $(MANUAL_FILES) $(SPARKY_INSTALL)/manual \
+- $(SPARKY_INSTALL)/manual/images
+- $(INSTALL) $(MANUAL_FILES) $(SPARKY_INSTALL)/manual
+- cd $(SPARKY_INSTALL)/manual ; \
++install: $(MANUAL_FILES) $(MANUAL_LOC) \
++ $(MANUAL_LOC)/images
++ $(INSTALL) $(MANUAL_FILES) $(MANUAL_LOC)
++ cd $(MANUAL_LOC) ; \
+ chmod 644 $(MANUAL_FILES)
+ cd images ; \
+- $(INSTALL) $(IMAGE_FILES) $(SPARKY_INSTALL)/manual/images
+- cd $(SPARKY_INSTALL)/manual/images ; \
++ $(INSTALL) $(IMAGE_FILES) $(MANUAL_LOC)/images
++ cd $(MANUAL_LOC)/images ; \
+ chmod 644 $(IMAGE_FILES)
+
+-$(SPARKY_INSTALL)/manual $(SPARKY_INSTALL)/manual/images:
++$(MANUAL_LOC) $(MANUAL_LOC)/images:
+ mkdir $@
+ chmod 755 $@
+
+Only in sparky/manual: manual-postscript.gz
+diff -ur -x make-sparky sparky.orig/python/Makefile sparky/python/Makefile
+--- sparky.orig/python/Makefile 2004-02-18 10:51:06.000000000 -0800
++++ sparky/python/Makefile 2005-12-17 19:43:06.000000000 -0800
+@@ -9,6 +9,8 @@
+ PYTHON_VERSION = 2.3
+ PYTHON = $(PYTHON_PREFIX)/bin/python$(PYTHON_VERSION)
+ PYTHON_LIB = $(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)
++PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
++DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
+
+ PYTHON_CODE = __init__.py align.py assigngraph.py atomnames.py \
+ atoms.py autoassign.py axes.py \
+@@ -27,18 +29,13 @@
+ sputil.py start_in_chimera.py strips.py subprocess.py \
+ tkutil.py volumeerror.py xeasy.py xplor.py
+
+-install: $(SPARKY_INSTALL)/python $(SPARKY_INSTALL)/python/sparky \
+- $(SPARKY_INSTALL)/python/lib-tk
+- $(INSTALL) README $(SPARKY_INSTALL)/python
+- $(INSTALL) $(PYTHON_CODE) $(SPARKY_INSTALL)/python/sparky
+- $(INSTALL) lib-tk/*.py $(SPARKY_INSTALL)/python/lib-tk
+- chmod 644 $(SPARKY_INSTALL)/python/README
+- cd $(SPARKY_INSTALL)/python/sparky ; chmod 644 $(PYTHON_CODE)
+- chmod 644 $(SPARKY_INSTALL)/python/lib-tk/*.py
+- $(PYTHON) $(PYTHON_LIB)/compileall.py $(SPARKY_INSTALL)/python/sparky
+- $(PYTHON) $(PYTHON_LIB)/compileall.py $(SPARKY_INSTALL)/python/lib-tk
++install: $(PYDIR) $(PYDIR)/sparky $(DOCDIR)/python
++ $(INSTALL) README $(DOCDIR)/python
++ $(INSTALL) $(PYTHON_CODE) $(PYDIR)/sparky
++ chmod 644 $(DOCDIR)/python/README
++ cd $(PYDIR)/sparky ; chmod 644 $(PYTHON_CODE)
+
+-$(SPARKY_INSTALL)/python $(SPARKY_INSTALL)/python/sparky \
+- $(SPARKY_INSTALL)/python/lib-tk:
++$(PYDIR) $(PYDIR)/sparky \
++ $(PYDIR)/lib-tk $(DOCDIR)/python:
+ mkdir $@
+ chmod 755 $@
+diff -ur -x make-sparky sparky.orig/python/spingraph.py sparky/python/spingraph.py
+--- sparky.orig/python/spingraph.py 2001-12-17 10:51:10.000000000 -0800
++++ sparky/python/spingraph.py 2005-12-17 22:09:17.000000000 -0800
+@@ -831,7 +831,7 @@
+ 'by creating a file specifying atom positions, colors,\n' +
+ 'sizes, and text label positions. Sparky provides a\n' +
+ 'default layout file\n' +
+- '\n\t/usr/local/sparky/python/spinlayout.py\n\n' +
++ '\n\t/usr/lib/python2.4/site-packages/sparky/python/spinlayout.py\n\n' +
+ 'You override this file by making your own copy\n' +
+ '\n\t~/Sparky/Python/spinlayout.py\n\n' +
+ 'You can create the desired template on the screen\n'
diff --git a/sci-chemistry/sparky/metadata.xml b/sci-chemistry/sparky/metadata.xml
new file mode 100644
index 000000000000..211b8bd0f0a4
--- /dev/null
+++ b/sci-chemistry/sparky/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+<email>spyderous@gentoo.org</email>
+<name>Donnie Berkholz</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/sparky/sparky-3.111.ebuild b/sci-chemistry/sparky/sparky-3.111.ebuild
new file mode 100644
index 000000000000..7220f4f657c6
--- /dev/null
+++ b/sci-chemistry/sparky/sparky-3.111.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/sparky-3.111.ebuild,v 1.1 2005/12/18 18:59:48 spyderous Exp $
+
+inherit eutils toolchain-funcs multilib python
+
+DESCRIPTION="Graphical NMR assignment and integration program for proteins, nucleic acids, and other polymers"
+HOMEPAGE="http://www.cgl.ucsf.edu/home/sparky/"
+SRC_URI="http://www.cgl.ucsf.edu/home/sparky/distrib/${PN}-source-${PV}.tar.gz"
+LICENSE="sparky"
+SLOT="0"
+# Note: this package will probably require significant work for lib{32,64},
+# including parts of the patch.
+KEYWORDS="~x86"
+IUSE=""
+RDEPEND="=dev-lang/python-2.3*
+ =dev-lang/tk-8.4*
+ || ( app-shells/tcsh app-shells/csh )"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-3
+ net-misc/rsync"
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+# Install for specific pythons instead of whatever's newest.
+# We build against 2.3, because sparky binary builds include 2.3.
+# 2.4 returns an error message:
+#Traceback (most recent call last):
+# File "<string>", line 1, in ?
+# File "/usr/lib/python2.4/site-packages/sparky/__init__.py", line 44, in start_session
+# tk = tkutil.initialize_tk(argv)
+# File "/usr/lib/python2.4/site-packages/sparky/tkutil.py", line 919, in initialize_tk
+# tk = Tkinter.Tk(display, program_name, program_class)
+# File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1569, in __init__
+# self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
+#TypeError: create() takes at most 5 arguments (8 given)
+
+ python="/usr/bin/python2.3"
+ python_version
+
+ arguments=( SPARKY="${S}" \
+ SPARKY_INSTALL_MAC="" \
+ SPARKY_INSTALL="${D}/usr" \
+ PYTHON_PREFIX="${ROOT}usr" \
+ PYTHON_VERSION="${PYVER}" \
+ TK_PREFIX="${ROOT}usr" \
+ TCLTK_VERSION="8.4" \
+ CXX="$(tc-getCXX)" \
+ CC="$(tc-getCC)" \
+ INSTALL="rsync -avz" \
+ INSTALLDIR="rsync -avz" )
+
+ # It would be nice to get the docs versioned, but not critical
+ # DOCDIR="\$(SPARKY_INSTALL)/share/doc/${PN}" \
+ # To get libdir working properly, we need to get makefiles respecting this
+ # PYDIR="\$(SPARKY_INSTALL)/$(get_libdir)/python\$(PYTHON_VERSION)/site-packages" \
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/fix-install.patch
+
+ sed -i \
+ -e "s:^\(set PYTHON[[:space:]]*=\).*:\1 ${ROOT}usr/bin/python${PYVER}:g" \
+ -e "s:^\(setenv TCLTK_LIB[[:space:]]*\).*:\1 ${ROOT}usr/$(get_libdir):g" \
+ ${S}/bin/sparky
+}
+
+src_compile() {
+ emake "${arguments[@]}" || die "make failed"
+}
+
+src_install() {
+ make "${arguments[@]}" install || die "install failed"
+ # Make internal help work
+ dosym ../../share/doc/sparky/manual /usr/lib/sparky/manual
+ # It returns a weird threading error message without this
+ dosym ../python${PYVER}/site-packages /usr/lib/sparky/python
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/lib/python${PYVER}/site-packages/sparky
+}