commit: 5923310384f4106c3980b94e82fb9e90e96ea3c0
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 10:32:52 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 10:32:52 2015 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=59233103
sci-chemistry/shiftx2: Fix for using glibc internal namings and format-security
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
.../shiftx2-1.07_p20120106-format-security.patch | 16 ++++++++++++++
.../shiftx2-1.07_p20120106-internal-name.patch | 25 ++++++++++++++++++++++
.../shiftx2/shiftx2-1.07_p20120106.ebuild | 6 ++++--
3 files changed, 45 insertions(+), 2 deletions(-)
diff --git
a/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-format-security.patch
b/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-format-security.patch
new file mode 100644
index 0000000..fc4a61e
--- /dev/null
+++ b/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-format-security.patch
@@ -0,0 +1,16 @@
+ modules/resmf/libc/misc.lib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/resmf/libc/misc.lib.c b/modules/resmf/libc/misc.lib.c
+index 0ef12a4..1e22424 100755
+--- a/modules/resmf/libc/misc.lib.c
++++ b/modules/resmf/libc/misc.lib.c
+@@ -71,7 +71,7 @@ void show_msg(msg)
+ char *msg;
+ {
+
+- fprintf(stdout, msg);
++ fprintf(stdout, "%s", msg);
+
+ } /* show_msg */
+
diff --git
a/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-internal-name.patch
b/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-internal-name.patch
new file mode 100644
index 0000000..4fa5447
--- /dev/null
+++ b/sci-chemistry/shiftx2/files/shiftx2-1.07_p20120106-internal-name.patch
@@ -0,0 +1,25 @@
+ modules/resmf/hydropho_cal.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/resmf/hydropho_cal.c b/modules/resmf/hydropho_cal.c
+index 1fde394..a889d08 100755
+--- a/modules/resmf/hydropho_cal.c
++++ b/modules/resmf/hydropho_cal.c
+@@ -184,7 +184,7 @@ float hydroscore(Hydroscale *scale, char residue){
+ }
+
+ /* function for copying string */
+-char * strndup (const char *s, size_t n)
++char * new_strndup (const char *s, size_t n)
+ {
+ char *result;
+ size_t len = strlen (s);
+@@ -206,7 +206,7 @@ char* substring(const char* str, size_t begin, size_t len)
+ {
+ if (str == 0 || strlen(str) == 0 || strlen(str) < begin || strlen(str) <
(begin+len))
+ return 0;
+- return (char *) strndup(str + begin, len);
++ return (char *) new_strndup(str + begin, len);
+ }
+
+ /* calculate the average value from begin to end in the given array */
diff --git a/sci-chemistry/shiftx2/shiftx2-1.07_p20120106.ebuild
b/sci-chemistry/shiftx2/shiftx2-1.07_p20120106.ebuild
index 9baabd4..b56d269 100644
--- a/sci-chemistry/shiftx2/shiftx2-1.07_p20120106.ebuild
+++ b/sci-chemistry/shiftx2/shiftx2-1.07_p20120106.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -41,7 +41,9 @@ QA_PREBUILT="/opt/.*"
src_prepare() {
epatch \
"${FILESDIR}"/${P}-java.patch \
- "${FILESDIR}"/${P}-system.patch
+ "${FILESDIR}"/${P}-system.patch \
+ "${FILESDIR}"/${P}-internal-name.patch \
+ "${FILESDIR}"/${P}-format-security.patch
rm "${S}"/src/FeatureRanges.java || die