commit:     8b50a13b56cc9ac53dd7c6770432e1b2155bdc79
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 14 18:35:30 2017 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 18:59:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b50a13b

sci-chemistry/threeV: Bump EAPI to 6

fix format-security problems

Package-Manager: Portage-2.3.5, Repoman-2.3.2
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../threeV/files/threeV-1.2-format-security.patch  | 198 +++++++++++++++++++++
 .../{1.2-gentoo.patch => threeV-1.2-gentoo.patch}  |   6 +-
 .../{threeV-1.2.ebuild => threeV-1.2-r1.ebuild}    |  23 ++-
 3 files changed, 216 insertions(+), 11 deletions(-)

diff --git a/sci-chemistry/threeV/files/threeV-1.2-format-security.patch 
b/sci-chemistry/threeV/files/threeV-1.2-format-security.patch
new file mode 100644
index 00000000000..b693559900a
--- /dev/null
+++ b/sci-chemistry/threeV/files/threeV-1.2-format-security.patch
@@ -0,0 +1,198 @@
+ cavities.cpp |  8 ++++----
+ channel.cpp  | 10 +++++-----
+ fsv_calc.cpp |  8 ++++----
+ solvent.cpp  |  8 ++++----
+ tunnel.cpp   |  8 ++++----
+ vdw.cpp      |  8 ++++----
+ volume.cpp   |  8 ++++----
+ 7 files changed, 29 insertions(+), 29 deletions(-)
+
+diff --git a/cavities.cpp b/cavities.cpp
+index 418a1a7..96b6a15 100644
+--- a/cavities.cpp
++++ b/cavities.cpp
+@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 's') {
+@@ -45,11 +45,11 @@ int main(int argc, char *argv[]) {
+     } else if(argv[1][1] == 't') {
+       trim_rad = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+       cerr << "./Cavities.exe -i <file> -g <grid spacing> -s <shell radius> " 
<< endl
+         << "\t-p <probe radius> -t <trim_probe_rad>  " << endl
+diff --git a/channel.cpp b/channel.cpp
+index c5acd20..9040631 100644
+--- a/channel.cpp
++++ b/channel.cpp
+@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'b') {
+       BIGPROBE = atof(&argv[2][0]);
+     } else if(argv[1][1] == 's') {
+@@ -49,13 +49,13 @@ int main(int argc, char *argv[]) {
+     } else if(argv[1][1] == 'z') {
+       z = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+diff --git a/fsv_calc.cpp b/fsv_calc.cpp
+index 9f81347..ef765b8 100644
+--- a/fsv_calc.cpp
++++ b/fsv_calc.cpp
+@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 's') {
+       SMPROBE = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'b') {
+@@ -44,11 +44,11 @@ int main(int argc, char *argv[]) {
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+       cerr << "./FsvCalc.exe -i <file> -b <big_probe> -s <small_probe> " << 
endl
+         << "\t-t <trim probe> -g <gridspace> " << endl
+diff --git a/solvent.cpp b/solvent.cpp
+index d857696..bc9d67f 100644
+--- a/solvent.cpp
++++ b/solvent.cpp
+@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
+  
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);   
++      sprintf(file,"%s",&argv[2][0]);   
+     } else if(argv[1][1] == 's') {
+       SMPROBE = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'b') {
+@@ -42,11 +42,11 @@ int main(int argc, char *argv[]) {
+     } else if(argv[1][1] == 't') {
+       TRIMPROBE = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+diff --git a/tunnel.cpp b/tunnel.cpp
+index 0094d05..7472aaa 100644
+--- a/tunnel.cpp
++++ b/tunnel.cpp
+@@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 's') {
+@@ -50,11 +50,11 @@ int main(int argc, char *argv[]) {
+     } else if(argv[1][1] == 't') {
+       trim_prb = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+       cerr << "./Tunnel.exe -i <file> -g <grid spacing> -p <tunnel probe 
radius>" << endl
+         << "\t-e <EZD outfile> -o <PDB outfile> -m <MRC outfile>" << endl
+diff --git a/vdw.cpp b/vdw.cpp
+index 4df73f5..0e26edc 100644
+--- a/vdw.cpp
++++ b/vdw.cpp
+@@ -32,13 +32,13 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'h') {
+diff --git a/volume.cpp b/volume.cpp
+index a2ca9ad..c304b94 100644
+--- a/volume.cpp
++++ b/volume.cpp
+@@ -32,15 +32,15 @@ int main(int argc, char *argv[]) {
+ 
+   while(argc > 1 && argv[1][0] == '-') {
+     if(argv[1][1] == 'i') {
+-      sprintf(file,&argv[2][0]);
++      sprintf(file,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'p') {
+       PROBE = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'o') {
+-      sprintf(pdbfile,&argv[2][0]);
++      sprintf(pdbfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'e') {
+-      sprintf(ezdfile,&argv[2][0]);
++      sprintf(ezdfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'm') {
+-      sprintf(mrcfile,&argv[2][0]);
++      sprintf(mrcfile,"%s",&argv[2][0]);
+     } else if(argv[1][1] == 'g') {
+       GRID = atof(&argv[2][0]);
+     } else if(argv[1][1] == 'h') {

diff --git a/sci-chemistry/threeV/files/1.2-gentoo.patch 
b/sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
similarity index 97%
rename from sci-chemistry/threeV/files/1.2-gentoo.patch
rename to sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
index 0827551599b..556e928d581 100644
--- a/sci-chemistry/threeV/files/1.2-gentoo.patch
+++ b/sci-chemistry/threeV/files/threeV-1.2-gentoo.patch
@@ -1,7 +1,7 @@
-diff --git a/src/Makefile b/src/Makefile
+diff --git a/Makefile b/Makefile
 index a58462c..616f51a 100644
---- a/src/Makefile
-+++ b/src/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -1,7 +1,7 @@
 -CC = g++
 -EXT=$(shell ./cpuflags.pl --opt )

diff --git a/sci-chemistry/threeV/threeV-1.2.ebuild 
b/sci-chemistry/threeV/threeV-1.2-r1.ebuild
similarity index 58%
rename from sci-chemistry/threeV/threeV-1.2.ebuild
rename to sci-chemistry/threeV/threeV-1.2-r1.ebuild
index 8ed375a4876..1d4a1e1f346 100644
--- a/sci-chemistry/threeV/threeV-1.2.ebuild
+++ b/sci-chemistry/threeV/threeV-1.2-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="3"
+EAPI=6
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="3V: Voss Volume Voxelator"
 HOMEPAGE="http://geometry.molmovdb.org/3v/";
@@ -19,15 +19,22 @@ PDEPEND="sci-chemistry/msms-bin"
 
 S="${WORKDIR}/3v-${PV}/src"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gentoo.patch
+       "${FILESDIR}"/${P}-format-security.patch
+)
+
 src_prepare() {
-       epatch "${FILESDIR}"/${PV}-gentoo.patch
+       default
        tc-export CXX
-       emake distclean || die
+       emake distclean
+
+       export MAKEOPTS+=" V=1"
 }
 
 src_install() {
-       emake DESTDIR="${ED}" install || die
+       emake DESTDIR="${ED}" install
 
-       cd ..
-       dodoc AUTHORS ChangeLog QUICKSTART README TODO VERSION || die
+       cd .. || die
+       dodoc AUTHORS ChangeLog QUICKSTART README TODO VERSION
 }

Reply via email to