summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-02-13 22:58:13 +0000
committerJustin Lecher <jlec@gentoo.org>2010-02-13 22:58:13 +0000
commit616d420febca48c8ad73d1e30ec13d5dc5c125f1 (patch)
tree963101df63cf38987faf6df8f7319a44874c8125 /sci-chemistry
parentRemove RESTRICT=mirror, was only meant for local testing (diff)
downloadgentoo-2-616d420febca48c8ad73d1e30ec13d5dc5c125f1.tar.gz
gentoo-2-616d420febca48c8ad73d1e30ec13d5dc5c125f1.tar.bz2
gentoo-2-616d420febca48c8ad73d1e30ec13d5dc5c125f1.zip
version bump, removed fixed tcl/tk and python version, multilib awareness added, EPREFIX ready, keyworded for ~amd64, bug 267355 299348
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/sparky/ChangeLog14
-rw-r--r--sci-chemistry/sparky/files/3.115-fpic.patch42
-rw-r--r--sci-chemistry/sparky/files/3.115-ldflags.patch61
-rw-r--r--sci-chemistry/sparky/files/3.115-makefile.patch17
-rw-r--r--sci-chemistry/sparky/files/3.115-paths.patch13
-rw-r--r--sci-chemistry/sparky/files/3.115-wrapper.patch41
-rw-r--r--sci-chemistry/sparky/metadata.xml3
-rw-r--r--sci-chemistry/sparky/sparky-3.113.ebuild77
-rw-r--r--sci-chemistry/sparky/sparky-3.115.ebuild117
9 files changed, 306 insertions, 79 deletions
diff --git a/sci-chemistry/sparky/ChangeLog b/sci-chemistry/sparky/ChangeLog
index 02de2df57de1..03cdad534a0d 100644
--- a/sci-chemistry/sparky/ChangeLog
+++ b/sci-chemistry/sparky/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sci-chemistry/sparky
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/ChangeLog,v 1.13 2009/09/18 14:50:12 betelgeuse Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/ChangeLog,v 1.14 2010/02/13 22:58:13 jlec Exp $
+
+*sparky-3.115 (13 Feb 2010)
+
+ 13 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org>
+ +files/3.115-fpic.patch, +files/3.115-ldflags.patch,
+ +files/3.115-makefile.patch, +files/3.115-paths.patch,
+ -sparky-3.113.ebuild, +files/3.115-wrapper.patch, +sparky-3.115.ebuild,
+ metadata.xml:
+ version bump, removed fixed tcl/tk and python version, multilib awareness
+ added, EPREFIX ready, keyworded for ~amd64, bug 267355 299348
18 Sep 2009; Petteri Räty <betelgeuse@gentoo.org> sparky-3.113.ebuild:
Migrate to EAPI 2 in order to remove built_with_use call.
diff --git a/sci-chemistry/sparky/files/3.115-fpic.patch b/sci-chemistry/sparky/files/3.115-fpic.patch
new file mode 100644
index 000000000000..37725aa029e2
--- /dev/null
+++ b/sci-chemistry/sparky/files/3.115-fpic.patch
@@ -0,0 +1,42 @@
+diff --git a/c++/Makefile b/c++/Makefile
+index 421ff77..7442ed3 100644
+--- a/c++/Makefile
++++ b/c++/Makefile
+@@ -158,7 +158,7 @@ winsystem-$(PLATFORM).o: winsystem-$(PLATFORM).cc
+ $(CXX) $(CXXFLAGS) $(TKFLAGS) -c $(SPARKY_SRC)/winsystem-$(PLATFORM).cc
+
+ python.o: python.cc
+- $(CXX) $(CXXFLAGS) $(PYFLAGS) $(TKFLAGS) -c $(SPARKY_SRC)/python.cc
++ $(CXX) $(CXXFLAGS) -fPIC $(PYFLAGS) $(TKFLAGS) -c $(SPARKY_SRC)/python.cc
+
+ _tkinter.so: _tkinter.o
+ $(CXX) $(LDSHARED) $(LDFLAGS) -o $@ _tkinter.o $(TKLIBS)
+diff --git a/c++/Makefile b/c++/Makefile
+index 353122d..84b0c24 100644
+--- a/c++/Makefile
++++ b/c++/Makefile
+@@ -168,7 +168,7 @@ _tkinter.o: _tkinter.c
+
+ Makefile.dep: force
+ cd $(SPARKY_SRC) ; \
+- $(CXX) $(DEPEND) $(CXXFLAGS) $(TKFLAGS) $(PYFLAGS) \
++ $(CXX) $(DEPEND) $(CXXFLAGS) -fPIC $(TKFLAGS) $(PYFLAGS) \
+ $(SPARKY_OBJS:.o=.cc) $(OTHER_OBJS:.o=.cc) > $@
+
+ TAGS: force
+diff --git a/c++/Makefile b/c++/Makefile
+index 84b0c24..933f347 100644
+--- a/c++/Makefile
++++ b/c++/Makefile
+@@ -30,9 +30,9 @@ TCL_LIBNAME = tcl$(TCLTK_VERSION)
+ PLATFORM = unix
+
+ CXX = g++
+-CXXFLAGS =
++CXXFLAGS += -fPIC
+ CC = gcc
+-CFLAGS =
++CFLAGS += -fPIC
+ PYFLAGS = -I$(PYTHON_INC) -I$(PYTHON_LIB)/config
+ TKFLAGS = -I$(TK_PREFIX)/include
+ TKLIBS = -L$(TK_PREFIX)/lib -l$(TK_LIBNAME) -l$(TCL_LIBNAME) -lX11
diff --git a/sci-chemistry/sparky/files/3.115-ldflags.patch b/sci-chemistry/sparky/files/3.115-ldflags.patch
new file mode 100644
index 000000000000..bd4020387682
--- /dev/null
+++ b/sci-chemistry/sparky/files/3.115-ldflags.patch
@@ -0,0 +1,61 @@
+diff --git a/c++/Makefile b/c++/Makefile
+index aeb4daa..5cab356 100644
+--- a/c++/Makefile
++++ b/c++/Makefile
+@@ -131,28 +131,28 @@ $(SPARKY_INSTALL)/python/sparky $(SPARKY_INSTALL)/python/lib-tk:
+ chmod 755 $@
+
+ sparky-no-python$(EXE_SUFFIX): main.o $(SPARKY_OBJS)
+- $(CXX) -o $@ main.o $(SPARKY_OBJS) $(LDFLAGS) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ main.o $(SPARKY_OBJS) $(LDLIBS)
+
+ ucsfdata$(EXE_SUFFIX): ucsfdata.o $(NMR_OBJS)
+- $(CXX) -o $@ ucsfdata.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ ucsfdata.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ pipe2ucsf$(EXE_SUFFIX): pipe2ucsf.o $(NMR_OBJS)
+- $(CXX) -o $@ pipe2ucsf.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ pipe2ucsf.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ vnmr2ucsf$(EXE_SUFFIX): vnmr2ucsf.o $(NMR_OBJS)
+- $(CXX) -o $@ vnmr2ucsf.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ vnmr2ucsf.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ bruk2ucsf$(EXE_SUFFIX): bruk2ucsf.o $(NMR_OBJS)
+- $(CXX) -o $@ bruk2ucsf.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ bruk2ucsf.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ peaks2ucsf$(EXE_SUFFIX): peaks2ucsf.o $(NMR_OBJS)
+- $(CXX) -o $@ peaks2ucsf.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ peaks2ucsf.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ matrix2ucsf$(EXE_SUFFIX): matrix2ucsf.o $(NMR_OBJS)
+- $(CXX) -o $@ matrix2ucsf.o $(NMR_OBJS) $(LDFLAGS) $(SYSLIBS) $(EXTRALIBS)
++ $(CXX) $(LDFLAGS) -o $@ matrix2ucsf.o $(NMR_OBJS) $(SYSLIBS) $(EXTRALIBS)
+
+ spy.so: python.o $(SPARKY_OBJS)
+- $(CXX) $(LDSHARED) -o $@ python.o $(SPARKY_OBJS) $(LDFLAGS) $(LDLIBS)
++ $(CXX) $(LDSHARED) $(LDFLAGS) -o $@ python.o $(SPARKY_OBJS) $(LDLIBS)
+
+ winsystem-$(PLATFORM).o: winsystem-$(PLATFORM).cc
+ $(CXX) $(CXXFLAGS) $(TKFLAGS) -c $(SPARKY_SRC)/winsystem-$(PLATFORM).cc
+@@ -161,7 +161,7 @@ python.o: python.cc
+ $(CXX) $(CXXFLAGS) $(PYFLAGS) $(TKFLAGS) -c $(SPARKY_SRC)/python.cc
+
+ _tkinter.so: _tkinter.o
+- $(CXX) $(LDSHARED) -o $@ _tkinter.o $(LDFLAGS) $(TKLIBS)
++ $(CXX) $(LDSHARED) $(LDFLAGS) -o $@ _tkinter.o $(TKLIBS)
+
+ _tkinter.o: _tkinter.c
+ $(CC) $(CFLAGS) $(TKFLAGS) $(PYFLAGS) -c $(SPARKY_SRC)/_tkinter.c
+@@ -188,8 +188,8 @@ PYLDFLAGS = -L$(PYTHON_LIB)/config -lpython$(PYTHON_VERSION)
+ PYIFLAGS = -I$(PYTHON_INC)
+
+ debug-sparky: main-debug.o python.o _tkinter.o $(SPARKY_OBJS)
+- $(CXX) -o $@ main-debug.o python.o _tkinter.o $(SPARKY_OBJS) \
+- $(LDFLAGS) $(PYLDFLAGS) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ main-debug.o python.o _tkinter.o $(SPARKY_OBJS) \
++ $(PYLDFLAGS) $(LDLIBS)
+
+ main-debug.o: main-debug.cc
+ $(CXX) $(CXXFLAGS) $(PYIFLAGS) -c $(SPARKY_SRC)/main-debug.cc
diff --git a/sci-chemistry/sparky/files/3.115-makefile.patch b/sci-chemistry/sparky/files/3.115-makefile.patch
new file mode 100644
index 000000000000..7c810dcbd8ae
--- /dev/null
+++ b/sci-chemistry/sparky/files/3.115-makefile.patch
@@ -0,0 +1,17 @@
+diff --git a/Makefile b/Makefile
+index bb27034..30979bd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,6 +48,12 @@ TKINTER_PYMOD = _tkinter$(PYMOD_SUFFIX)
+ all nopython $(SPY_PYMOD) $(TKINTER_PYMOD) $(EXECUTABLES) debug-sparky clean: force
+ cd $(SPARKY_OBJ) && $(MAKE) -f $(SPARKY_SRC)/Makefile -e $@
+
++libraries:
++ cd $(SPARKY_OBJ) && $(MAKE) -f $(SPARKY_SRC)/Makefile -e $(SPY_PYMOD) $(TKINTER_PYMOD)
++
++binaries:
++ cd $(SPARKY_OBJ) && $(MAKE) -f $(SPARKY_SRC)/Makefile -e $(EXECUTABLES) debug-sparky
++
+ Makefile.dep TAGS: force
+ cd $(SPARKY_SRC) && $(MAKE) -f Makefile -e $@
+
diff --git a/sci-chemistry/sparky/files/3.115-paths.patch b/sci-chemistry/sparky/files/3.115-paths.patch
new file mode 100644
index 000000000000..20d9a801ecd6
--- /dev/null
+++ b/sci-chemistry/sparky/files/3.115-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/c++/paths.h b/c++/paths.h
+index 2a21366..38aff52 100644
+--- a/c++/paths.h
++++ b/c++/paths.h
+@@ -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 --git a/sci-chemistry/sparky/files/3.115-wrapper.patch b/sci-chemistry/sparky/files/3.115-wrapper.patch
new file mode 100644
index 000000000000..9498c0bec837
--- /dev/null
+++ b/sci-chemistry/sparky/files/3.115-wrapper.patch
@@ -0,0 +1,41 @@
+diff --git a/bin/sparky b/bin/sparky
+index 8b51212..270723a 100644
+--- a/bin/sparky
++++ b/bin/sparky
+@@ -4,18 +4,6 @@
+ #
+
+ # -----------------------------------------------------------------------------
+-# 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.
+ #
+@@ -25,7 +13,7 @@ setenv SPARKY_INSTALL "$sparky_inst"
+ # If Python is available start Sparky as a Python extension.
+ # Otherwise the standalone version of Sparky is started.
+ #
+-set PYTHON = "$SPARKY_INSTALL/python2.5/bin/python2.5"
++set PYTHON = "@GENTOO_PORTAGE_EPREFIX@/usr/bin/python"
+ if (! -e "$PYTHON") then
+ set PYTHON = python2.5
+ endif
+@@ -79,7 +67,7 @@ if ($status == 0) then
+ # ---------------------------------------------------------------------------
+ # Add the Sparky package and Tkinter to the Python path
+ #
+- set SPARKY_PYTHONPATH = "$SPARKY_INSTALL/python:$SPARKY_INSTALL/python/lib-tk"
++ set SPARKY_PYTHONPATH = "$SPARKY_INSTALL/python:$SPARKY_INSTALL/python/sparky"
+ if ($?PYTHONPATH) then
+ setenv PYTHONPATH "${SPARKY_PYTHONPATH}:$PYTHONPATH"
+ else
diff --git a/sci-chemistry/sparky/metadata.xml b/sci-chemistry/sparky/metadata.xml
index 9ac9ffdb3a41..dde7ca88a50f 100644
--- a/sci-chemistry/sparky/metadata.xml
+++ b/sci-chemistry/sparky/metadata.xml
@@ -2,4 +2,7 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>sci-chemistry</herd>
+<maintainer>
+ <email>jlec@gentoo.org</email>
+</maintainer>
</pkgmetadata>
diff --git a/sci-chemistry/sparky/sparky-3.113.ebuild b/sci-chemistry/sparky/sparky-3.113.ebuild
deleted file mode 100644
index 6aeebdd5b18e..000000000000
--- a/sci-chemistry/sparky/sparky-3.113.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/sparky-3.113.ebuild,v 1.4 2009/09/18 14:50:12 betelgeuse Exp $
-
-EAPI="2"
-
-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-${PV}/${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="~ppc ~x86"
-IUSE=""
-RESTRICT="mirror"
-RDEPEND="dev-lang/python:2.4[tk]
- =dev-lang/tk-8.4*
- app-shells/tcsh"
-DEPEND="${RDEPEND}
- >=app-shells/bash-3
- net-misc/rsync"
-S="${WORKDIR}/${PN}"
-
-pkg_setup() {
- # Install for specific pythons instead of whatever's newest.
- python="/usr/bin/python2.4"
- 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_prepare() {
- epatch "${FILESDIR}"/fix-install.patch
-
- sed -i \
- -e "s:^\(set PYTHON[[:space:]]*=\).*:\1 /usr/bin/python${PYVER}:g" \
- -e "s:^\(setenv TCLTK_LIB[[:space:]]*\).*:\1 /usr/$(get_libdir):g" \
- "${S}"/bin/sparky
-}
-
-src_compile() {
- emake "${arguments[@]}" || die "make failed"
-}
-
-src_install() {
- emake "${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
-}
-
-pkg_postrm() {
- python_mod_cleanup /usr/lib/python${PYVER}/site-packages/sparky
-}
diff --git a/sci-chemistry/sparky/sparky-3.115.ebuild b/sci-chemistry/sparky/sparky-3.115.ebuild
new file mode 100644
index 000000000000..937a612f0c00
--- /dev/null
+++ b/sci-chemistry/sparky/sparky-3.115.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/sparky-3.115.ebuild,v 1.1 2010/02/13 22:58:13 jlec Exp $
+
+EAPI="3"
+
+PYTHON_USE_WITH="tk"
+
+inherit eutils flag-o-matic multilib prefix python toolchain-funcs
+
+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-${PV}/${PN}-source-${PV}.tar.gz"
+
+LICENSE="sparky"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="app-shells/tcsh"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+ TKVER=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+ PYVER=$(python_get_version)
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-ldflags.patch
+ epatch "${FILESDIR}"/${PV}-wrapper.patch
+ epatch "${FILESDIR}"/${PV}-paths.patch
+ epatch "${FILESDIR}"/${PV}-makefile.patch
+
+ sed -i \
+ -e "s:^\(set PYTHON =\).*:\1 ${EPREFIX}/usr/bin/python${PYVER}:g" \
+ -e "s:^\(setenv SPARKY_INSTALL[[:space:]]*\).*:\1 ${EPREFIX}/usr/$(get_libdir)/${PN}:g" \
+ -e "s:tcl8.4:tcl${TKVER}:g" \
+ -e "s:tk8.4:tk${TKVER}:g" \
+ -e "s:^\(setenv TCLTK_LIB[[:space:]]*\).*:\1 ${EPREFIX}/usr/$(get_libdir):g" \
+ "${S}"/bin/sparky
+ eprefixify "${S}"/bin/sparky
+}
+
+src_compile() {
+ emake \
+ SPARKY="${S}" \
+ PYTHON_VERSION="${PYVER}" \
+ PYTHON_PREFIX="${EPREFIX}/usr" \
+ PYTHON_LIB="${EPREFIX}$(python_get_libdir)" \
+ PYTHON_INC="${EPREFIX}$(python_get_includedir)" \
+ TK_PREFIX="${EPREFIX}/usr" \
+ TCLTK_VERSION="${TKVER}" \
+ TKLIBS="-L${EPREFIX}/usr/$(get_libdir)/ -ltk${TKVER} -ltcl${TKVER} -lX11" \
+ CXX="$(tc-getCXX)" \
+ CC="$(tc-getCC)" \
+ LDSHARED="-shared" \
+ binaries || die "make failed"
+
+ rm c++/*.o || die
+
+ emake \
+ SPARKY="${S}" \
+ PYTHON_VERSION="${PYVER}" \
+ PYTHON_PREFIX="${EPREFIX}/usr" \
+ PYTHON_LIB="${EPREFIX}$(python_get_libdir)" \
+ PYTHON_INC="${EPREFIX}$(python_get_includedir)" \
+ TK_PREFIX="${EPREFIX}/usr" \
+ TCLTK_VERSION="${TKVER}" \
+ TKLIBS="-L${EPREFIX}/usr/$(get_libdir)/ -ltk${TKVER} -ltcl${TKVER} -lX11" \
+ CXX="$(tc-getCXX)" \
+ CC="$(tc-getCC)" \
+ CXXFLAGS="${CXXFLAGS} -fPIC" \
+ CFLAGS="${CFLAGS} -fPIC" \
+ LDSHARED="-shared -fPIC" \
+ libraries || die "make failed"
+}
+
+src_install() {
+ # The symlinks are needed to avoid hacking the complete code to fix the locations
+
+ dobin c++/{{bruk,matrix,peaks,pipe,vnmr}2ucsf,ucsfdata,sparky-no-python} bin/${PN} || die
+
+ insinto /usr/share/${PN}/
+ doins lib/{print-prolog.ps,Sparky} || die
+ dosym ../../share/${PN}/print-prolog.ps /usr/$(get_libdir)/${PN}/
+ dosym ../../share/${PN}/Sparky /usr/$(get_libdir)/${PN}/
+
+ dohtml -r manual/* || die
+ dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/${PN}/manual
+
+ insinto $(python_get_sitedir)/${PN}
+ doins python/*.py c++/{spy.so,_tkinter.so} || die
+ fperms 755 $(python_get_sitedir)/${PN}/{spy.so,_tkinter.so} || die
+ dosym ../python${PYVER}/site-packages /usr/$(get_libdir)/${PN}/python
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/
+ doins -r example || die
+ dosym ../../share/doc/${PF}/example /usr/$(get_libdir)/${PN}/example
+ fi
+
+ dodoc README || die
+ newdoc python/README README.python || die
+}
+
+pkg_postinst() {
+ python_need_rebuild
+ python_mod_optimize $(python_get_sitedir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup $(python_get_sitedir)/${PN}
+}