summaryrefslogtreecommitdiff
path: root/science/v_sim/files
diff options
context:
space:
mode:
Diffstat (limited to 'science/v_sim/files')
-rw-r--r--science/v_sim/files/patch-Documentation_reference_Makefile.am34
-rw-r--r--science/v_sim/files/patch-configure.ac61
-rw-r--r--science/v_sim/files/patch-lib_plug-ins_Makefile.in10
-rw-r--r--science/v_sim/files/patch-lib_plug-ins_abinit_ab__symmetry.c59
-rw-r--r--science/v_sim/files/patch-m4_libxc.m422
-rw-r--r--science/v_sim/files/patch-src_coreTools_atoms__yaml.c22
6 files changed, 198 insertions, 10 deletions
diff --git a/science/v_sim/files/patch-Documentation_reference_Makefile.am b/science/v_sim/files/patch-Documentation_reference_Makefile.am
new file mode 100644
index 000000000000..97c32ef21f78
--- /dev/null
+++ b/science/v_sim/files/patch-Documentation_reference_Makefile.am
@@ -0,0 +1,34 @@
+--- Documentation/reference/Makefile.am.orig 2020-07-07 14:26:13 UTC
++++ Documentation/reference/Makefile.am
+@@ -81,11 +81,11 @@ GTKDOC_LIBS= \
+ @GTKS_LIBS@ @GLU_LIBS@ @EXTRA_LDFLAGS@ @EXTRA_LIBS@
+
+ # This includes the standard gtk-doc make rules, copied by gtkdocize.
+-include $(srcdir)/gtk-doc.make
++#include $(srcdir)/gtk-doc.make
+
+ # Other files to distribute
+ # e.g. EXTRA_DIST += version.xml.in
+-EXTRA_DIST += version.in
++EXTRA_DIST = version.in
+
+ # Files not to distribute
+ # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
+@@ -93,11 +93,11 @@ EXTRA_DIST += version.in
+ DISTCLEANFILES = $(DOC_MODULE).types $(DOC_MODULE)-sections.txt
+
+ # Comment this out if you want your docs-status tested during 'make check'
+-if ENABLE_GTK_DOC
+-TESTS_ENVIRONMENT = \
+- DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+- SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+-TESTS = $(GTKDOC_CHECK)
+-endif
++#if ENABLE_GTK_DOC
++#TESTS_ENVIRONMENT = \
++# DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
++# SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
++#TESTS = $(GTKDOC_CHECK)
++#endif
+
+ #-include $(top_srcdir)/git.mk
diff --git a/science/v_sim/files/patch-configure.ac b/science/v_sim/files/patch-configure.ac
new file mode 100644
index 000000000000..b7899d16d948
--- /dev/null
+++ b/science/v_sim/files/patch-configure.ac
@@ -0,0 +1,61 @@
+--- configure.ac.orig 2020-07-07 14:26:13 UTC
++++ configure.ac
+@@ -244,7 +244,7 @@ AC_ARG_ENABLE(python-module, AS_HELP_STRING([--enable-
+ if test -n "$enable_python" -a "$enable_python" != "no" ; then
+ AM_PATH_PYTHON(2.3.5)
+ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+- py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
++ py_prefix=`$PYTHON -c "import sys; print (sys.prefix)"`
+ PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+
+ PKG_CHECK_MODULES(PYGTK, pygobject-2.0 pygtk-2.0, [have_pygtk=yes], [have_pygtk=no])
+@@ -269,7 +269,6 @@ if test "$with_debug_messages" = "yes" ; then
+ fi
+
+ dnl Building the doc
+-GTK_DOC_CHECK([1.3])
+
+
+ dnl Test for plug-ins compilation
+@@ -423,9 +422,9 @@ if test "x$enable_introspection" = "xyes" ; then
+ dnl Add Python support for the PythonGI plug-in.
+ AM_PATH_PYTHON(2.3)
+ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+- PYTHON_INCLUDES="`python-config --cflags`"
++ PYTHON_INCLUDES="`${PYTHON}-config --cflags`"
+ AC_SUBST(PYTHON_INCLUDES)
+- PYTHON_LIBS="`python-config --libs`"
++ PYTHON_LIBS="`${PYTHON}-config --libs`"
+ AC_SUBST(PYTHON_LIBS)
+
+ AC_MSG_CHECKING(for pygobject overrides directory)
+@@ -434,9 +433,10 @@ if test "x$enable_introspection" = "xyes" ; then
+ if test "x$overrides_dir" = "x" ; then
+ overrides_dir="${pyexecdir}/gi/overrides"
+ fi
+- if ! test -w $overrides_dir ; then
+- overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
+- fi
++ # Do not test -w $overrides_dir to allow build as non-root
++ #if ! test -w $overrides_dir ; then
++ # overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
++ #fi
+ AC_MSG_RESULT($overrides_dir)
+ else
+ overrides_dir=${libdir}/python$PYTHON_VERSION/dist-packages/gi/overrides
+@@ -446,12 +446,12 @@ AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTION], [test "x$
+ dnl AC_PROG_CC set the CC variable and detect if we use the GNU compiler
+ dnl We now append some various CFLAGS depending on platform and choice
+ dnl of the user.
+-AC_ARG_WITH(strict-cflags, AS_HELP_STRING([--with-strict-cflags], [if set or absent some correctness cflags are appended to the CFLAGS variable. Appended values dependent on the platform and code branch (default on Unix for development is Wall Wno-unused W Werror ansi pedantic-errors).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="no"])
++AC_ARG_WITH(strict-cflags, AS_HELP_STRING([--with-strict-cflags], [if set or absent some correctness cflags are appended to the CFLAGS variable. Appended values dependent on the platform and code branch (default on Unix for development is Wall Wno-unused W ansi ).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="no"])
+ flags='Wall W ansi'
+ flags_cpp='Wall W ansi'
+ if test "$GCC" = "yes" -a "$STRICT_CFLAGS" = "yes"; then
+- flags=$flags' Werror Wpedantic std=c99'
+- flags_cpp=$flags_cpp' Werror Wpedantic'
++ flags=$flags' std=c99'
++ flags_cpp=$flags_cpp' '
+ fi
+ for fl in $flags ; do
+ case " $CFLAGS " in
diff --git a/science/v_sim/files/patch-lib_plug-ins_Makefile.in b/science/v_sim/files/patch-lib_plug-ins_Makefile.in
deleted file mode 100644
index 98de8b3394bb..000000000000
--- a/science/v_sim/files/patch-lib_plug-ins_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/plug-ins/Makefile.in.orig 2014-04-09 09:37:31.000000000 +0200
-+++ lib/plug-ins/Makefile.in 2014-04-24 23:23:33.000000000 +0200
-@@ -341,7 +341,6 @@
- xsf \
- cube \
- abinit \
-- python-gi \
- archives \
- bigdft
-
diff --git a/science/v_sim/files/patch-lib_plug-ins_abinit_ab__symmetry.c b/science/v_sim/files/patch-lib_plug-ins_abinit_ab__symmetry.c
new file mode 100644
index 000000000000..c467eb2e70db
--- /dev/null
+++ b/science/v_sim/files/patch-lib_plug-ins_abinit_ab__symmetry.c
@@ -0,0 +1,59 @@
+--- lib/plug-ins/abinit/ab_symmetry.c.orig 2020-07-07 14:26:13 UTC
++++ lib/plug-ins/abinit/ab_symmetry.c
+@@ -458,7 +458,7 @@ gpointer startThreadSymmetry(gpointer data _U_)
+ char *spGrp;
+ double box[3][3], genAfm[3], *xred;
+ int i, *typat, grpId, grpMagnId;
+- AbError errno;
++ AbError error;
+ VisuNodeArrayIter iter;
+
+ AbinitData *dt;
+@@ -492,13 +492,13 @@ gpointer startThreadSymmetry(gpointer data _U_)
+ /* Ask for the calculation of the symmetries. */
+ DBG_fprintf(stderr, "AB symmetry(%p): Ready to get symmetries from ABINIT.\n",
+ (gpointer)g_thread_self());
+- errno = ab_symmetry_get_group(dt->sym, &spGrp, &grpId,
++ error = ab_symmetry_get_group(dt->sym, &spGrp, &grpId,
+ &grpMagnId, genAfm);
+ DBG_fprintf(stderr, "AB symmetry(%p): return from ABINIT (%d).\n",
+- (gpointer)g_thread_self(), errno);
+- if (errno == AB_NO_ERROR || errno == AB_ERROR_SYM_BRAVAIS_XRED)
++ (gpointer)g_thread_self(), error);
++ if (error == AB_NO_ERROR || errno == AB_ERROR_SYM_BRAVAIS_XRED)
+ g_free(spGrp);
+- else if (errno != AB_ERROR_SYM_NOT_PRIMITIVE)
++ else if (error != AB_ERROR_SYM_NOT_PRIMITIVE)
+ dt->error = g_error_new(TOOL_FILE_FORMAT_ERROR, TOOL_FILE_FORMAT_ERROR_METHOD,
+ "An error occured in ABINIT plug-in.");
+ abinit_mutexUnlock();
+@@ -517,7 +517,7 @@ static void updateSymmetries(VisuData *dataObj, gdoubl
+ gchar *bravais[7] = {"triclinic", "monoclinic", "orthorhombic",
+ "tetragonal", "trigonal", "hexagonal", "cubic"};
+ gchar *center[7] = {"F", "F", "I", "P", "A", "B", "C"};
+- AbError errno;
++ AbError error;
+ #ifdef G_THREADS_ENABLED
+ GThread *ld_thread;
+ #endif
+@@ -571,9 +571,9 @@ static void updateSymmetries(VisuData *dataObj, gdoubl
+
+ /* We get then the space group. */
+ DBG_fprintf(stderr, "AB symmetry: get group.\n");
+- errno = ab_symmetry_get_group(sym, &spGrp, &grpId,
++ error = ab_symmetry_get_group(sym, &spGrp, &grpId,
+ &grpMagnId, genAfm);
+- if (errno == AB_NO_ERROR || errno == AB_ERROR_SYM_BRAVAIS_XRED)
++ if (error == AB_NO_ERROR || errno == AB_ERROR_SYM_BRAVAIS_XRED)
+ {
+ str = g_strdup_printf("%s (#%d)", spGrp, grpId);
+ gtk_label_set_text(GTK_LABEL(lblSymId), str);
+@@ -629,7 +629,7 @@ static void updateSymmetries(VisuData *dataObj, gdoubl
+
+ /* If the bravais lattice doesn't match with the xred bravais
+ lattice, we print a message. */
+- if (errno == AB_ERROR_SYM_BRAVAIS_XRED)
++ if (error == AB_ERROR_SYM_BRAVAIS_XRED)
+ gtk_widget_show(lblSymWarning);
+ else
+ gtk_widget_hide(lblSymWarning);
diff --git a/science/v_sim/files/patch-m4_libxc.m4 b/science/v_sim/files/patch-m4_libxc.m4
new file mode 100644
index 000000000000..135c6456b8c6
--- /dev/null
+++ b/science/v_sim/files/patch-m4_libxc.m4
@@ -0,0 +1,22 @@
+--- m4/libxc.m4.orig 2020-07-07 14:26:13 UTC
++++ m4/libxc.m4
+@@ -57,17 +57,13 @@ AC_DEFUN([AC_CHECK_LIBXC],
+
+ LIBS="$LIBS -lxc"
+ AC_MSG_CHECKING([for LIBXC library])
+- AC_LINK_IFELSE([[
+-program main
+-
+- call xc_f90_family_from_id()
+-end]], ac_libxc_ok=yes, ac_libxc_ok=no)
++ ac_libxc_ok=yes
+ AC_MSG_RESULT([$ac_libxc_ok])
+ LIBS="$LIBS_SVG"
+ LDFLAGS="$LDFLAGS_SVG"
+ FCFLAGS="$FCFLAGS_SVG"
+ if test "$ac_libxc_ok" = "yes"; then
+- LIBXC_LIBS="-lxc"
++ LIBXC_LIBS="-lxc -lxcf90"
+ AS_IF([test -n "$LIBXC_PATH_LIBDIR"], [LIBXC_LIBS="-L$LIBXC_PATH_LIBDIR $LIBXC_LIBS"])
+ AC_SUBST([LIBXC_LIBS])
+ fi
diff --git a/science/v_sim/files/patch-src_coreTools_atoms__yaml.c b/science/v_sim/files/patch-src_coreTools_atoms__yaml.c
new file mode 100644
index 000000000000..f4e6b8d281ae
--- /dev/null
+++ b/science/v_sim/files/patch-src_coreTools_atoms__yaml.c
@@ -0,0 +1,22 @@
+--- src/coreTools/atoms_yaml.c.orig 2020-07-07 14:26:13 UTC
++++ src/coreTools/atoms_yaml.c
+@@ -1270,19 +1270,7 @@ static int posinp_yaml_forces(yaml_parser_t *parser, P
+
+ return done;
+ }
+-#if SYSTEM_X11 == 1
+-static char* strdup(const char *src)
+-{
+- char *dest;
+- size_t ln;
+
+- ln = strlen(src);
+- dest = malloc(sizeof(char) * (ln + 1));
+- memcpy(dest, src, sizeof(char) * ln);
+- dest[ln] = '\0';
+- return dest;
+-}
+-#endif
+ static int posinp_yaml_external_potential(const PosinpDict *dict, PosinpAtoms *atoms, char **message)
+ {
+ int done;