summaryrefslogtreecommitdiff
path: root/sci-chemistry/eden
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-chemistry/eden
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/eden')
-rw-r--r--sci-chemistry/eden/Manifest9
-rw-r--r--sci-chemistry/eden/eden-5.3-r2.ebuild88
-rw-r--r--sci-chemistry/eden/files/5.3-makefile-fixes.patch60
-rw-r--r--sci-chemistry/eden/files/eden-5.3-format-security.patch96
-rw-r--r--sci-chemistry/eden/files/eden-5.3-impl-dec.patch28
-rw-r--r--sci-chemistry/eden/files/makefile-fixes.patch25
-rw-r--r--sci-chemistry/eden/metadata.xml12
7 files changed, 318 insertions, 0 deletions
diff --git a/sci-chemistry/eden/Manifest b/sci-chemistry/eden/Manifest
new file mode 100644
index 000000000000..6bd4d732fd44
--- /dev/null
+++ b/sci-chemistry/eden/Manifest
@@ -0,0 +1,9 @@
+AUX 5.3-makefile-fixes.patch 1647 SHA256 63af22242c70e5b3b9890d3e6214aa4b41346b1a91b0e4f1c692749f0715bda5 SHA512 3ec4f8ba8d3b600b729bfb32cef3fb1f82a1f51a485ebab143e01052ea1487a78c3395c902079fe0e5d5c3df8a2a83b2ce4d37d823e1d89426087874ec47391d WHIRLPOOL 916baab24c34f94bd03b5a647161cd1b17f86b122847b192b85879c15ed362a15390316da6790452f1d6e745bb6503eab471e703065e6b45487845b0b1c0c29d
+AUX eden-5.3-format-security.patch 3202 SHA256 098c6fdd0dc433a2a2f3c18df7f9e8307e9a2d1bf21366e75a14343e38fcbff6 SHA512 01e100fe5481a73de2efa6652fe38c19337eae0dc13557ef0ad3e3a4f186becbfb8831aece0a619c08541e1a667e999c47b28438ec431f056c44f12849662c12 WHIRLPOOL 89eaad2e0025c7552642cc6441ad6a3ae9f6563f2f5f00dd5a06756d02a3aa961d622b1b4bc7439947b1f15b836d64781f9ed7057faffb207fe7f87d4ee08bc7
+AUX eden-5.3-impl-dec.patch 899 SHA256 b1760b8deab3bc01661a586a0a8c536449ea6f1f201e9c40fccccfdce07be10e SHA512 e89f1e0c028099e305a79befa558a86bc47d050c1e30394178999c7a1568bae9c3e525953bf152888690e0e1607dd72c522d2995f45b1eccfb9f7bf75e7866c2 WHIRLPOOL 0a2a50d0819346861e899ae17e65746936caf23454cd4e7fe0477b0d1aff0e958ce2c8f6f3179f676ab7a94d1c446d32c7acd0182f3cc2f5103c3485829b9dd0
+AUX makefile-fixes.patch 837 SHA256 6f7612404cccd9e40de19df3f86eb86be9a17fa105eac21e615c0d464f92cc31 SHA512 818fe1d23fa940cb533afcb9e84bdc5c719651005136304ca66d368fc21cf4d7a1facb0a383c9689ab1658632cec30969322fdffccadae941a754900542237e7 WHIRLPOOL adf204b3f1a361dfa426249b6e1ab89b1565d8c9852b03fbe770c429e098ece80b5528464d6c4c1a680960f1cb2d3dc6c7826799b41688dfffd33ebd1e4a96c4
+DIST eden_V5.3.tar.gz 1139981 SHA256 249447f507ace3e188ce0d76796c6e307c043592405db1f6c24f3e90917ec524 SHA512 c59d08004bdb72ef39fe205aef546fbcff9c57ee42942c0391052de9c501c7793ed3bd280569020c2b9ec6133a87362d184a2012b61c6be18b5f6ba9b59716c5 WHIRLPOOL f0329805ab1d3b75febcc07c87583ee30f2ca44d5b5ae5c3512d4891a8763bf45ab7dc94abed831c0326cdbc35502f4bc3904ccb7447b090100b2f7d52b1156b
+EBUILD eden-5.3-r2.ebuild 1845 SHA256 4130ee8fb2d23b7d951da8bccd3fd8cf4585d79dd678c0a1a925cc6d17a63cef SHA512 5de7c7da62d7819ee74c8983ba5f222853995d9fae865a7a0802c7ee583f3406d6dbbdc335b3ad60c138d5642d6eb3df683c7a6f26ab91afd39707b63b1579a0 WHIRLPOOL 9184db6ede5b2c9526e68b8ee3aa0becf740b09723566ef7d89b3682a4ab71cda33c096555671e2ef9f9730d28cf278bc3d3286a5002846e7634abb73a4a15d4
+MISC ChangeLog 2560 SHA256 dab00a887a063445f2c835898509daca160d4f860c90da595b3504eb5ae49511 SHA512 bc4969b2ef58a9c65a138b9ee5daa19da922fd2b58f2d2885fb066b73808789f98ee6f8ab56d4de69fdecba13eda03503a10ae2db277761fa91a00f99647880b WHIRLPOOL 03ec9a20119fccb452b2986f96db1695cdd4c035dbbf4b8d93f2652b906f46d8cec556b01cf34b7932ce16b29a8ddaca136f7419b6a7bb199413a47ff48d2e45
+MISC ChangeLog-2015 3378 SHA256 c631c4ccbbcad0726cfb6dbbb20904680f8d8e1dd42d88a4f2bb62abf29031a6 SHA512 693e40d0be56df97e081bcb2bb1532f69b8cfa5efdfd7a805a5bb9e6973dad3fb3bf87e4e17f53da405ea579941bf800652c8ea0b086025a106cb7008649170b WHIRLPOOL b60b0e6df65dc091c5fafb25c3fee62d93baa1bfdcf50b87b1c2501e508105ca66b512f22b28a33d1d94e757181ef4f1df337f787054c706d958085b3efa5b49
+MISC metadata.xml 383 SHA256 d05b3ed09ac4e1d1ec83875570e0090f7bbec36a6fcd678baa9dfb58365734f3 SHA512 e23cc36f53622230ac9c70cb886cd9812e4bfefba8c0912059b3f072e063c235ba52cce893ea3b49ba05dda047097ba505c4ce5c53248d5acf720f16e123be84 WHIRLPOOL 86b3e99bea59d1846041b82b80283eb5e9156209495a0c081d7403a21dd8589cfd4e7b885ad6723ff2bbfcfa1d197850265126223a987b048d35fe98642af65f
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..8bf667224ba8
--- /dev/null
+++ b/sci-chemistry/eden/eden-5.3-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 & 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"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ sci-libs/fftw:2.1
+ sci-libs/gsl
+ ${PYTHON_DEPS}"
+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/files/5.3-makefile-fixes.patch b/sci-chemistry/eden/files/5.3-makefile-fixes.patch
new file mode 100644
index 000000000000..632358341784
--- /dev/null
+++ b/sci-chemistry/eden/files/5.3-makefile-fixes.patch
@@ -0,0 +1,60 @@
+ source/Makefile | 17 ++++++++++-------
+ 1 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/source/Makefile b/source/Makefile
+index 46d89cc..aa751c7 100644
+--- a/source/Makefile
++++ b/source/Makefile
+@@ -78,8 +78,10 @@ CFLAGS = -Wall -pipe -g3
+ #CFLAGS = -Wall -pipe -marchi686 -pedantic -gdwarf-2 -g3
+ #CFLAGS = -Wall -O3 -march=i686
+ ifneq ($(FFTW),/usr/local)
++ifneq ($(FFTW),/usr)
+ CFLAGS += -I$(INC)
+ endif
++endif
+
+ # NOTE:
+ # DOUBLESWITCH = ON for double precision;
+@@ -91,15 +93,15 @@ endif
+ DOUBLESWITCH = ON
+
+ ifeq ($(DOUBLESWITCH),ON)
+-LDFLAGS = -L$(LIB) -ldfftw -lm
++LIBS = -L$(LIB) -ldfftw -lm
+ CFLAGS += -DDOUBLE
+ TARGET = deden
+ else
+-LDFLAGS = -L$(LIB) -lsfftw -lm
++LIBS = -L$(LIB) -lsfftw -lm
+ TARGET = seden
+ endif
+
+-LDFLAGS += -g -lgsl -lgslcblas
++LIBS += -lgsl -lgslcblas
+
+ # GSL_PREFIX:= /sw/lib
+ # LDFLAGS += -l$(GSL_PREFIX)/libgsl.a -l$(GSL_PREFIX)/libgslcblas.a
+@@ -120,17 +122,18 @@ OBJ = addmaps.o apodfc.o apodfo.o back.o cadhkl.o \
+ all: eden fbyteswap
+
+ eden: eden.o $(OBJ)
+- $(CC) $^ $(LDFLAGS) -o $@
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ fbyteswap: fbyteswap.c
+- $(CC) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ install: all
++ mkdir -p $(BIN)
+ mv fbyteswap $(BIN)
+ mv eden $(BIN)/$(TARGET)
+ chmod 751 $(BIN)/$(TARGET)
+- chmod +x mkeden.csh
+- ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
++# chmod +x mkeden.csh
++# ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
+
+ dist: clean
+ cd ../..; tar -cvf eden_$(VERSION).tar --exclude CVS --exclude \#\*\# --exclude \*~ --exclude Misc --exclude .\* eden; gzip -f eden_$(VERSION).tar
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)
diff --git a/sci-chemistry/eden/files/eden-5.3-impl-dec.patch b/sci-chemistry/eden/files/eden-5.3-impl-dec.patch
new file mode 100644
index 000000000000..af67508d090e
--- /dev/null
+++ b/sci-chemistry/eden/files/eden-5.3-impl-dec.patch
@@ -0,0 +1,28 @@
+ source/fbyteswap.c | 1 +
+ source/util.c | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/source/fbyteswap.c b/source/fbyteswap.c
+index 83015b9..c9033c3 100644
+--- a/source/fbyteswap.c
++++ b/source/fbyteswap.c
+@@ -39,6 +39,7 @@ and shall not be used for advertising or product endorsement purposes.
+
+ #include <stdio.h>
+ #include <fcntl.h>
++#include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ void byteswap();
+diff --git a/source/util.c b/source/util.c
+index 6fff179..ca7a957 100644
+--- a/source/util.c
++++ b/source/util.c
+@@ -89,6 +89,7 @@ and shall not be used for advertising or product endorsement purposes.
+
+ *******************************************************************************/
+ #include <sys/time.h> /* ... for picking up date & time */
++#include <time.h>
+ #include <signal.h> /* ... for capturing kill */
+ #include "util.h"
+
diff --git a/sci-chemistry/eden/files/makefile-fixes.patch b/sci-chemistry/eden/files/makefile-fixes.patch
new file mode 100644
index 000000000000..4cfff3f515df
--- /dev/null
+++ b/sci-chemistry/eden/files/makefile-fixes.patch
@@ -0,0 +1,25 @@
+diff -ur eden.orig/source/Makefile eden/source/Makefile
+--- eden.orig/source/Makefile 2004-10-18 10:40:03.000000000 -0700
++++ eden/source/Makefile 2005-12-15 22:32:45.000000000 -0800
+@@ -78,8 +78,10 @@
+ #CFLAGS = -Wall -pipe -marchi686 -pedantic -gdwarf-2 -g3
+ #CFLAGS = -Wall -O3 -march=i686
+ ifneq ($(FFTW),/usr/local)
++ifneq ($(FFTW),/usr)
+ CFLAGS += -I$(INC)
+ endif
++endif
+
+ # NOTE:
+ # DOUBLESWITCH = ON for double precision;
+@@ -129,8 +131,8 @@
+ mv fbyteswap $(BIN)
+ mv eden $(BIN)/$(TARGET)
+ chmod 751 $(BIN)/$(TARGET)
+- chmod +x mkeden.csh
+- ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
++# chmod +x mkeden.csh
++# ./mkeden.csh $(BIN) $(BIN)/$(TARGET)
+
+ dist: clean
+ cd ../..; tar -cvf eden_$(VERSION).tar --exclude CVS --exclude \#\*\# --exclude \*~ --exclude Misc --exclude .\* eden; gzip -f eden_$(VERSION).tar
diff --git a/sci-chemistry/eden/metadata.xml b/sci-chemistry/eden/metadata.xml
new file mode 100644
index 000000000000..6113635247f3
--- /dev/null
+++ b/sci-chemistry/eden/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <use>
+ <flag name="double-precision">More precise calculations at the expense of
+ speed</flag>
+ </use>
+</pkgmetadata>