diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-07-18 11:22:38 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-07-18 11:22:38 +0000 |
commit | 6310918d2a7a8838953c67e1d5afc7a0e984dd7e (patch) | |
tree | 8af1fe30373cd91cf2bd7eee9ff0d29214e721be /sci-chemistry | |
parent | Add a patch to replace AM_CONFIG_HEADER #467818 (diff) | |
download | gentoo-2-6310918d2a7a8838953c67e1d5afc7a0e984dd7e.tar.gz gentoo-2-6310918d2a7a8838953c67e1d5afc7a0e984dd7e.tar.bz2 gentoo-2-6310918d2a7a8838953c67e1d5afc7a0e984dd7e.zip |
sci-chemistry/sparky: Bump to new python eclass
(Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/sparky/ChangeLog | 10 | ||||
-rw-r--r-- | sci-chemistry/sparky/files/3.115-wrapper-r1.patch | 41 | ||||
-rw-r--r-- | sci-chemistry/sparky/files/fix-install.patch | 2 | ||||
-rw-r--r-- | sci-chemistry/sparky/metadata.xml | 8 | ||||
-rw-r--r-- | sci-chemistry/sparky/sparky-3.115-r1.ebuild | 119 |
5 files changed, 173 insertions, 7 deletions
diff --git a/sci-chemistry/sparky/ChangeLog b/sci-chemistry/sparky/ChangeLog index 5b083cbfdfca..e3f4b9fcd283 100644 --- a/sci-chemistry/sparky/ChangeLog +++ b/sci-chemistry/sparky/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-chemistry/sparky -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/ChangeLog,v 1.17 2012/05/29 17:55:43 jlec Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/ChangeLog,v 1.18 2013/07/18 11:22:37 jlec Exp $ + +*sparky-3.115-r1 (18 Jul 2013) + + 18 Jul 2013; Justin Lecher <jlec@gentoo.org> +sparky-3.115-r1.ebuild, + +files/3.115-wrapper-r1.patch, files/fix-install.patch, metadata.xml: + Bump to new python eclass 29 May 2012; Justin Lecher <jlec@gentoo.org> sparky-3.115.ebuild, metadata.xml: diff --git a/sci-chemistry/sparky/files/3.115-wrapper-r1.patch b/sci-chemistry/sparky/files/3.115-wrapper-r1.patch new file mode 100644 index 000000000000..d83b5b8510cc --- /dev/null +++ b/sci-chemistry/sparky/files/3.115-wrapper-r1.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_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/files/fix-install.patch b/sci-chemistry/sparky/files/fix-install.patch index 869064a33a0b..4eefaa891f99 100644 --- a/sci-chemistry/sparky/files/fix-install.patch +++ b/sci-chemistry/sparky/files/fix-install.patch @@ -253,7 +253,7 @@ diff -ur -x make-sparky sparky.orig/python/spingraph.py sparky/python/spingraph. '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' + ++ '\n\t/usr/lib/python*/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 index 1837bbc07a6e..ae9ec7c5f6a4 100644 --- a/sci-chemistry/sparky/metadata.xml +++ b/sci-chemistry/sparky/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>sci-chemistry</herd> - <maintainer> - <email>jlec@gentoo.org</email> - </maintainer> + <herd>sci-chemistry</herd> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> </pkgmetadata> diff --git a/sci-chemistry/sparky/sparky-3.115-r1.ebuild b/sci-chemistry/sparky/sparky-3.115-r1.ebuild new file mode 100644 index 000000000000..155d4eaebdc0 --- /dev/null +++ b/sci-chemistry/sparky/sparky-3.115-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/sparky/sparky-3.115-r1.ebuild,v 1.1 2013/07/18 11:22:37 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_REQ_USE="tk" + +inherit eutils flag-o-matic multilib prefix python-single-r1 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 ~amd64-linux ~x86-linux" +IUSE="examples" + +RDEPEND=" + app-shells/tcsh + dev-lang/tcl + dev-lang/tk" +DEPEND="${RDEPEND}" + +RESTRICT="mirror" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${FILESDIR}"/${PV}-ldflags.patch + "${FILESDIR}"/${PV}-wrapper-r1.patch + "${FILESDIR}"/${PV}-paths.patch + "${FILESDIR}"/${PV}-makefile.patch + ) + +pkg_setup() { + python-single-r1_pkg_setup + TKVER=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2) + PYVER=${EPYTHON#python} +} + +src_prepare() { + epatch ${PATCHES[@]} + + sed -i \ + -e "s:^\(set PYTHON =\).*:\1 ${EPREFIX}/usr/bin/${EPYTHON}: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 || die + eprefixify "${S}"/bin/sparky +} + +src_compile() { + emake \ + SPARKY="${S}" \ + PYTHON_VERSION="${PYVER}" \ + PYTHON_PREFIX="${EPREFIX}/usr" \ + PYTHON_LIB="${EPREFIX}/usr/$(get_libdir)" \ + PYTHON_INC="${EPREFIX}/usr/include/${EPYTHON}" \ + TK_PREFIX="${EPREFIX}/usr" \ + TCLTK_VERSION="${TKVER}" \ + TKLIBS="-L${EPREFIX}/usr/$(get_libdir)/ -ltk -ltcl -lX11" \ + CXX="$(tc-getCXX)" \ + CC="$(tc-getCC)" \ + LDSHARED="-shared" \ + binaries + + rm c++/*.o || die + + emake \ + SPARKY="${S}" \ + PYTHON_VERSION="${PYVER}" \ + PYTHON_PREFIX="${EPREFIX}/usr" \ + PYTHON_LIB="${EPREFIX}/usr/$(get_libdir)" \ + PYTHON_INC="${EPREFIX}/usr/include/${EPYTHON}" \ + TK_PREFIX="${EPREFIX}/usr" \ + TCLTK_VERSION="${TKVER}" \ + TKLIBS="-L${EPREFIX}/usr/$(get_libdir)/ -ltk -ltcl -lX11" \ + CXX="$(tc-getCXX)" \ + CC="$(tc-getCC)" \ + CXXFLAGS="${CXXFLAGS} -fPIC" \ + CFLAGS="${CFLAGS} -fPIC" \ + LDSHARED="-shared -fPIC" \ + libraries +} + +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} + + insinto /usr/share/${PN}/ + doins lib/{print-prolog.ps,Sparky} + dosym ../../share/${PN}/print-prolog.ps /usr/$(get_libdir)/${PN}/print-prolog.ps + dosym ../../share/${PN}/Sparky /usr/$(get_libdir)/${PN}/Sparky + + dohtml -r manual/* + dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/${PN}/manual + + python_moduleinto ${PN} + python_domodule python/*.py c++/{spy.so,_tkinter.so} + + python_optimize + + dosym ../${EPYTHON}/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 + newdoc python/README README.python +} |