diff options
author | 2015-03-11 14:54:19 +0000 | |
---|---|---|
committer | 2015-03-11 14:54:19 +0000 | |
commit | f9a4d9f936b8aa026c219fff1d793971bb647969 (patch) | |
tree | 05661941a76ed740e09b56419aeb7760446a8cb1 /sci-chemistry | |
parent | Regenerating Manifest file due to checksum mismatch. Fix bug 542898. (diff) | |
download | gentoo-2-f9a4d9f936b8aa026c219fff1d793971bb647969.tar.gz gentoo-2-f9a4d9f936b8aa026c219fff1d793971bb647969.tar.bz2 gentoo-2-f9a4d9f936b8aa026c219fff1d793971bb647969.zip |
Fix for format-security, bug #542276; move to new python eclasses and EAPI=5
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/eden/ChangeLog | 11 | ||||
-rw-r--r-- | sci-chemistry/eden/eden-5.3-r2.ebuild | 87 | ||||
-rw-r--r-- | sci-chemistry/eden/eden-5.3.ebuild | 81 | ||||
-rw-r--r-- | sci-chemistry/eden/files/eden-5.3-format-security.patch | 96 |
4 files changed, 191 insertions, 84 deletions
diff --git a/sci-chemistry/eden/ChangeLog b/sci-chemistry/eden/ChangeLog index d6e99d1e80b6..247e5b642412 100644 --- a/sci-chemistry/eden/ChangeLog +++ b/sci-chemistry/eden/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-chemistry/eden -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/eden/ChangeLog,v 1.19 2013/02/19 15:43:19 jlec Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/eden/ChangeLog,v 1.20 2015/03/11 14:54:19 jlec Exp $ + +*eden-5.3-r2 (11 Mar 2015) + + 11 Mar 2015; Justin Lecher <jlec@gentoo.org> +eden-5.3-r2.ebuild, + +files/eden-5.3-format-security.patch, -eden-5.3.ebuild: + Fix for format-security, bug #542276; move to new python eclasses and EAPI=5 19 Feb 2013; Justin Lecher <jlec@gentoo.org> eden-5.3-r1.ebuild, metadata.xml: @@ -70,4 +76,3 @@ +files/makefile-fixes.patch, +metadata.xml, +eden-5.3.ebuild: A crystallographic real-space electron-density refinement and optimization program. - diff --git a/sci-chemistry/eden/eden-5.3-r2.ebuild b/sci-chemistry/eden/eden-5.3-r2.ebuild new file mode 100644 index 000000000000..93a1594a4519 --- /dev/null +++ b/sci-chemistry/eden/eden-5.3-r2.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/eden/eden-5.3-r2.ebuild,v 1.1 2015/03/11 14:54:19 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils multilib python-r1 toolchain-funcs + +MY_P="${PN}_V${PV}" + +DESCRIPTION="A crystallographic real-space electron-density refinement and optimization program" +HOMEPAGE="http://www.gromacs.org/pipermail/eden-users/" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="double-precision" + +RDEPEND=" + sci-libs/fftw:2.1 + sci-libs/gsl" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${PN}" + +SRC="${S}/source" + +pkg_setup() { + export EDENHOME="${EPREFIX}/usr/$(get_libdir)/${PN}" +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PV}-makefile-fixes.patch \ + "${FILESDIR}"/${P}-impl-dec.patch \ + "${FILESDIR}"/${P}-format-security.patch + + sed -i \ + -e "s:^\(FFTW.*=\).*:\1 ${EPREFIX}/usr:g" \ + -e "s:^\(LIB.*=.*\$(FFTW)/\).*:\1$(get_libdir):g" \ + -e "s:^\(BIN.*=\).*:\1 ${D}usr/bin:g" \ + -e "s:^\(CFLAGS.*=\).*:\1 ${CFLAGS}:g" \ + -e "s:-lgsl -lgslcblas:$($(tc-getPKG_CONFIG) --libs gsl):g" \ + ${SRC}/Makefile || die + + if ! use double-precision; then + sed -i -e "s:^\(DOUBLESWITCH.*=\).*:\1 OFF:g" ${SRC}/Makefile || die + EDEN_EXE="s${PN}" + else + EDEN_EXE="d${PN}" + fi +} + +src_compile() { + emake CC=$(tc-getCC) -C ${SRC} +} + +src_install() { + emake -C ${SRC} install + + python_foreach_impl python_newscript python/${PN}.py i${PN} + python_foreach_impl python_domodule python/FileListDialog.py + + rm python/*py || die + insinto ${EDENHOME}/python + doins python/* + + insinto ${EDENHOME}/help + doins help/* + + insinto ${EDENHOME}/tools + doins tools/* + + dodoc manual/UserManual.pdf + + cat >> "${T}"/60${PN} <<- EOF + EDENHOME="${EDENHOME}" + EOF + + doenvd "${T}"/60${PN} + + dosym ${EDEN_EXE} /usr/bin/${PN} +} diff --git a/sci-chemistry/eden/eden-5.3.ebuild b/sci-chemistry/eden/eden-5.3.ebuild deleted file mode 100644 index bfa7ea368940..000000000000 --- a/sci-chemistry/eden/eden-5.3.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/eden/eden-5.3.ebuild,v 1.8 2010/06/23 21:00:32 mr_bones_ Exp $ - -inherit eutils multilib toolchain-funcs - -MY_P="${PN}_V${PV}" -DESCRIPTION="A crystallographic real-space electron-density refinement and optimization program" -HOMEPAGE="http://www.gromacs.org/pipermail/eden-users" -SRC_URI="mirror://gentoo/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86" -IUSE="double-precision" -RDEPEND="=sci-libs/fftw-2* - sci-libs/gsl" - -DEPEND="${RDEPEND}" -S="${WORKDIR}/${PN}" -SRC="${S}/source" - -src_unpack() { - unpack ${A} - - epatch "${FILESDIR}"/makefile-fixes.patch - - sed -i \ - -e "s:^\(FFTW.*=\).*:\1 /usr:g" \ - -e "s:^\(LIB.*=.*\$(FFTW)/\).*:\1$(get_libdir):g" \ - -e "s:^\(BIN.*=\).*:\1 ${D}usr/bin:g" \ - -e "s:^\(CFLAGS.*=\).*:\1 ${CFLAGS}:g" \ - ${SRC}/Makefile - - if ! use double-precision; then - sed -i -e "s:^\(DOUBLESWITCH.*=\).*:\1 OFF:g" ${SRC}/Makefile - EXE="seden" - else - EXE="deden" - fi -} - -src_compile() { - cd ${SRC} - emake CC=$(tc-getCC) || die "emake failed" -} - -src_install() { - local EDENHOME="/usr/lib/eden" - - cd ${SRC} - dodir /usr/bin - make install || die "install failed" - - cd "${S}" - exeinto ${EDENHOME}/python - doexe python/* - - insinto ${EDENHOME}/help - doins help/* - - insinto ${EDENHOME}/tools - doins tools/* - - dodoc manual/UserManual.pdf - -cat << EOF > "${T}"/eden -#!/bin/bash -export EDENHOME="${EDENHOME}" -${EXE} \$* -EOF - - dobin "${T}"/eden - -cat << EOF > "${T}"/ieden -#!/bin/bash -export EDENHOME="${EDENHOME}" -\${EDENHOME}/python/eden.py -EOF - - dobin "${T}"/ieden -} diff --git a/sci-chemistry/eden/files/eden-5.3-format-security.patch b/sci-chemistry/eden/files/eden-5.3-format-security.patch new file mode 100644 index 000000000000..04b5ecfddebb --- /dev/null +++ b/sci-chemistry/eden/files/eden-5.3-format-security.patch @@ -0,0 +1,96 @@ + source/back.c | 2 +- + source/concosts.c | 4 ++-- + source/count.c | 4 ++-- + source/eden.c | 2 +- + source/util.c | 4 ++-- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/source/back.c b/source/back.c +index fd517b9..185a02b 100644 +--- a/source/back.c ++++ b/source/back.c +@@ -112,7 +112,7 @@ void back_main(int argc, char *argv[]) + ballpark(caller) ; + + if (argc > optind+2) +- sprintf(sf_filename, argv[optind+2]) ; ++ sprintf(sf_filename, "%s", argv[optind+2]) ; + + /********************************************* + Pull off prefix defining whereabouts of input +diff --git a/source/concosts.c b/source/concosts.c +index d62d2e3..590f073 100644 +--- a/source/concosts.c ++++ b/source/concosts.c +@@ -452,7 +452,7 @@ void prepare_singlets(char *filename) + sprintf(message, + "s=%d, p=%d, n=%d, phase=%g, old phase=%g, delta=%g\n", + s, p, n, phase, *(checks+n), phase-*(checks+n)) ; +- fprintf(fp_log, message) ; ++ fprintf(fp_log, "%s", message) ; + } + } + /*********************************************** +@@ -556,7 +556,7 @@ void prepare_triplets(char *filename) + sprintf(message, + "Triplet (%d %d %d) from input (%d %d %d) corresponds to point w/o fobs info!\n", + newh, newk, newl, t_h[q], t_k[q], t_l[q]) ; +- fprintf(fp_log, message) ; ++ fprintf(fp_log, "%s", message) ; + legal_triplet = FALSE ; + } + } +diff --git a/source/count.c b/source/count.c +index c3bc390..ca13008 100644 +--- a/source/count.c ++++ b/source/count.c +@@ -460,12 +460,12 @@ void print_el_count(char *filename, + } + + sprintf(message, "\nTotal no. of electrons is %g\n", totnump*volvox) ; +- fprintf(fp, message) ; ++ fprintf(fp, "%s", message) ; + printTwice(message) ; + + sprintf(message, "Count of all remaining electrons: %g %g %g\n", + remainder0*volvox, remainder1*volvox, remainder2*volvox) ; +- fprintf(fp, message) ; ++ fprintf(fp, "%s", message) ; + printTwice(message) ; + + fclose(fp) ; +diff --git a/source/eden.c b/source/eden.c +index dea3246..5a9b389 100644 +--- a/source/eden.c ++++ b/source/eden.c +@@ -319,7 +319,7 @@ int main(int argc, char *argv[]) + + get_unique_logname() ; + +- sprintf(command_line, argv[0]) ; ++ sprintf(command_line, "%s", argv[0]) ; + + for (k = 1; k < argc; k++) { + strcat(command_line, " ") ; +diff --git a/source/util.c b/source/util.c +index 6fff179..41c624c 100644 +--- a/source/util.c ++++ b/source/util.c +@@ -266,7 +266,7 @@ void printTwice(char *mess) /* send info to terminal (stdout) and to log */ + + void prompt(char *mess) /* Send message to user, await reply */ + { +- fprintf(stdout, mess) ; ++ fprintf(stdout, "%s", mess) ; + + while (fgets(terminp, MAXSTRING, stdin) != NULL) { + if ((int)strlen(terminp) > 0) +@@ -722,7 +722,7 @@ void start_record() + int k ; + + rec_length = k = sprintf(record, "\n") ; +- rec_length += sprintf(record+k, timestamp()) ; ++ rec_length += sprintf(record+k, "%s", timestamp()) ; + k = rec_length ; + + if ((cwd = getcwd(NULL, 120)) == NULL) |