summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelics2018-10-16 15:51:48 +0200
committerfelics2018-10-16 15:51:48 +0200
commit0bb18c13a92e3577fc6a1daae480f446c83a44d5 (patch)
tree5c12ff77049f8fea8e2b4e5c304253fd629b298f
parentd79c16f952025f1cbbdd5ead6e5efcbf7da63df4 (diff)
downloadaur-0bb18c13a92e3577fc6a1daae480f446c83a44d5.tar.gz
Switched source to git://github.com/andram/auto-07p.git#branch=python3fixes (some fixes), and worked around build errors with gfortran-8 (using g95 for now).
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD214
-rwxr-xr-xmakepkg.sh2
3 files changed, 127 insertions, 111 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a8e3d6665bc5..ec0f9ec52a85 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,17 @@
-# Generated by mksrcinfo v8
-# Thu Mar 10 23:40:02 UTC 2016
pkgbase = auto-07p
pkgdesc = Software for continuation and bifurcation problems in ordinary differential equations. Release 07P. Environment variables controlling build (default to 'no', see PKGBUILD): _BUILD_DOC, _WITH_PLAUT04, _PLAUT04_WITH_QT, AUTO_DEBUG, _WITH_OPENMP, _WITH_MPI.
- pkgver = 0.9.1
- pkgrel = 46
+ pkgver = 0.9.1+r1764
+ pkgrel = 1
url = http://cmvl.cs.concordia.ca/auto/
arch = i686
arch = x86_64
license = BSD
license = LGPL2
license = GPL2
- makedepends = gcc-fortran
+ makedepends = g95
makedepends = gcc
depends = bash
- depends = gcc-fortran
+ depends = g95
depends = gcc
depends = python2
optdepends = python2-matplotlib: For python interface.
@@ -30,14 +28,16 @@ pkgbase = auto-07p
optdepends = transfig: For compiling the manual (enable manual compiling in PKGBUILD (enable compilation of documentation by setting the environment variable '_BUILD_DOC' to 'yes')).
options = libtool
options = staticlibs
- source = http://sourceforge.net/projects/auto-07p/files/auto07p/0.9/auto07p-0.9.1.tar.gz
+ source = auto-07p::git+git://github.com/andram/auto-07p.git#branch=python3fixes
+ source = auto-07p_debian.tar.xz::http://http.debian.net/debian/pool/main/a/auto-07p/auto-07p_0.9.1+r1764+dfsg-6.debian.tar.xz
source = auto-07p-session.bash
source = xpdf-dummy
source = makepkg.sh
- sha512sums = 838c5e816778ee9d9c391691d1aa1f940aa4b177f36e7530df202774ce9830ebf47a04a390420bdd43da35580612d683c7a11c99088e6364bc808e4e66b3f289
- sha512sums = 1c4ec2d2487530f407a12a6529d441ebcdf0832b59504bcd370f95162bbaa085475109db3f11f93c891da76dcc57205c4736242512375d81aaa73b56f86103de
- sha512sums = fe1dde2720afe62722a45dd359b67dfabeffe14bfd053efc0d1b8b30ace49a4b634b199c70d4b86ae117b7c69cc009eb600c17680161b1653a7ab9e86e6c6dd9
- sha512sums = 0622ed7124575a450dd292710bed12285551590e5b7f6242dbd87b83062553a86ac7b3af286ade5899a21c739ec17fdf49a94392f93bc185929824db252d5b99
+ sha256sums = SKIP
+ sha256sums = bbc783b88432a482117ab42429e33c590e91d390d6b2cce7bbe4e839be50e98e
+ sha256sums = 14d272315859abb260208cfc0a437ff41d66b22960180cfa9c80161e7dded3f4
+ sha256sums = cc83e032003bd9b79eaaee2bd91f77767caf55741ce02e9556dd49142ee1e911
+ sha256sums = 73bef420fdebb6b86b358bcd0f3d86e86f6963e76c7ae281391ec76a940c7644
pkgname = auto-07p
diff --git a/PKGBUILD b/PKGBUILD
index b32657a4ee26..e8c82addc15a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,20 +20,22 @@
###
pkgname="auto-07p"
-pkgver="0.9.1"
-pkgrel="46"
+pkgver=0.9.1+r1764
+pkgrel=1
pkgdesc="Software for continuation and bifurcation problems in ordinary differential equations. Release 07P. Environment variables controlling build (default to 'no', see PKGBUILD): _BUILD_DOC, _WITH_PLAUT04, _PLAUT04_WITH_QT, AUTO_DEBUG, _WITH_OPENMP, _WITH_MPI."
arch=('i686' 'x86_64')
url='http://cmvl.cs.concordia.ca/auto/'
options=('libtool' 'staticlibs')
depends=(
'bash'
- 'gcc-fortran'
+ # 'gcc-fortran' # Fails to build with gcc8 (see http://sourceforge.net/p/auto-07p/bugs/9/).
+ 'g95' # Use 'g95' (Fortran compiler from GCC 4.0.3) instead of 'gcc-fortran'.
'gcc'
'python2'
- ) # 'gcc-fortran' is needed in the runtime for compilation. 'gcc' is also needed, if the input files are C-files.
+ ) # A fortran compiler is needed during runtime for compilation of input files. 'gcc' is also needed, if the input files are C-files.
makedepends=(
- 'gcc-fortran'
+ # 'gcc-fortran' # Fails to build with gcc8 (see http://sourceforge.net/p/auto-07p/bugs/9/).
+ 'g95' # Use 'g95' (Fortran compiler from GCC 4.0.3) instead of 'gcc-fortran'.
'gcc'
)
optdepends=(
@@ -56,20 +58,21 @@ license=(
'GPL2'
)
source=(
- "http://sourceforge.net/projects/auto-07p/files/auto07p/0.9/auto07p-${pkgver}.tar.gz"
+ "auto-07p::git+git://github.com/andram/auto-07p.git#branch=python3fixes" # "auto-07p.tar.gz::http://sourceforge.net/projects/auto-07p/files/auto07p/0.9/auto07p-${pkgver}.tar.gz" # "auto-07p::git+http://salsa.debian.org/science-team/auto-07p.git" # "auto-07p::http://http.debian.net/debian/pool/main/a/auto-07p/auto-07p_${pkgver}+dfsg.orig.tar.gz"
+ "auto-07p_debian.tar.xz::http://http.debian.net/debian/pool/main/a/auto-07p/auto-07p_${pkgver}+dfsg-6.debian.tar.xz" # Debian patches.
"auto-07p-session.bash"
"xpdf-dummy"
"makepkg.sh" # Just a dummy script for reference purposes. It is _not_ run with this PKGBUILD, but it can be used to build this package with makepkg.
)
-sha512sums=(
- '838c5e816778ee9d9c391691d1aa1f940aa4b177f36e7530df202774ce9830ebf47a04a390420bdd43da35580612d683c7a11c99088e6364bc808e4e66b3f289'
- '1c4ec2d2487530f407a12a6529d441ebcdf0832b59504bcd370f95162bbaa085475109db3f11f93c891da76dcc57205c4736242512375d81aaa73b56f86103de'
- 'fe1dde2720afe62722a45dd359b67dfabeffe14bfd053efc0d1b8b30ace49a4b634b199c70d4b86ae117b7c69cc009eb600c17680161b1653a7ab9e86e6c6dd9'
- '0622ed7124575a450dd292710bed12285551590e5b7f6242dbd87b83062553a86ac7b3af286ade5899a21c739ec17fdf49a94392f93bc185929824db252d5b99'
+sha256sums=(
+ 'SKIP' # '8f306751521a491113f89ffbd8b20b68d72aeac42833fa196f2158f3bef35bca'
+ 'bbc783b88432a482117ab42429e33c590e91d390d6b2cce7bbe4e839be50e98e'
+ '14d272315859abb260208cfc0a437ff41d66b22960180cfa9c80161e7dded3f4'
+ 'cc83e032003bd9b79eaaee2bd91f77767caf55741ce02e9556dd49142ee1e911'
+ '73bef420fdebb6b86b358bcd0f3d86e86f6963e76c7ae281391ec76a940c7644'
)
-
[ -n "${_BUILD_DOC}" ] || { # Building documentation can be controlled by environment variable.
_BUILD_DOC=no # Controls if we want to build the documentation. Set to 'yes' to build it (requires some LaTeX-tools to be installed).
}
@@ -94,31 +97,75 @@ sha512sums=(
_WITH_MPI=no
}
-_FFLAGS=""
-_CFLAGS=""
+# set the fortran compiler to use.
+# FC='gfortran' # Fails to build with gcc8 (see http://sourceforge.net/p/auto-07p/bugs/9/).
+# FC='gfortran-6'
+FC='g95'
+export FC
if [ "${_AUTO_DEBUG}x" == "yesx" ]; then
- _FDEBUG_FLAGS="-ggdb -g -fbacktrace -fcheck=array-temps -fcheck=do -fcheck=mem -fcheck=pointer -fcheck=recursion"
- # -fcheck=bounds does NOT work, since AUTO itself violates bounds ... a bug in AUTO with sideeffects, without sideeffects, or even needed??
+ # _FDEBUG_FLAGS="-ggdb -g -fbacktrace -fcheck=array-temps -fcheck=do -fcheck=mem -fcheck=pointer -fcheck=recursion" # Those are for 'new' gfortran.
+ _FDEBUG_FLAGS="-ggdb -g" # Those are for g95.
+ # -fcheck=bounds does NOT work, since AUTO itself violates bounds ... a bug in AUTO with sideeffects, without sideeffects, or even needed??
_CDEBUG_FLAGS="-ggdb -g"
+ _CXXDEBUG_FLAGS="-ggdb -g"
_OPT_FLAGS="-O0"
options+=('!strip')
else
_FDEBUG_FLAGS="-g0"
_CDEBUG_FLAGS="-g0"
+ _CXXDEBUG_FLAGS="-g0"
_OPT_FLAGS="-O3"
fi
-_FFLAGS="${_FFLAGS} ${_FDEBUG_FLAGS}"
-_CFLAGS="${_CFLAGS} ${_CDEBUG_FLAGS}"
+FFLAGS+=" ${_FDEBUG_FLAGS}"
+CFLAGS+=" ${_CDEBUG_FLAGS}"
+CXXFLAGS+=" ${_CXXDEBUG_FLAGS}"
+
+export FFLAGS
+export CFLAGS
+export CXXFLAGS
+prepare()
+{
+ cd "${srcdir}"
+ mkdir -pv 'auto'
+ mv -v 'auto-07p' 'auto/07p'
+
+ _extractdir="${srcdir}/auto/07p"
+ _debianpatchdir="${srcdir}/debian/patches"
+ cd "${_extractdir}"
+
+ for _deb_patch in '02_env.patch' '04_fix_bashisms.patch'; do
+ msg2 ">> Applying debian patch ${_deb_patch} ..."
+ patch --follow-symlinks -N -p2 -i "${_debianpatchdir}/${_deb_patch}"
+ done
+}
+
+pkgver()
+{
+ _extractdir="${srcdir}/auto/07p"
+ cd "${_extractdir}"
+ _ver="$(grep -E '[^#]+' CHANGELOG | head -n 1 | tr -d '[[:space:]]:')"
+ _hash="$(git log -n 1 --format=%h)"
+ _commit_count="$(git rev-list --count HEAD)"
+
+ if [ -z "${_ver}" ]; then
+ echo "Error: Could not determine version. Aborting." > /dev/stderr
+ return 1
+ fi
+ if [ -z "${_commit_count}" ]; then
+ echo "Error: Could not determine commit count. Aborting." > /dev/stderr
+ return 1
+ fi
+
+ echo "${_ver}+r${_commit_count}"
+}
_build_documentation()
{
- echo ""
- echo ">> Building documentation for '${pkgname}', version '${pkgver}'. >>"
- echo ""
+ msg2 ">> Building documentation for '${pkgname}', version '${pkgver}'. >>"
### Since building the documentation opens the finished pdf with xpdf, we have a dummy xpdf-executable that does nothing. Set it up here to use it.
cd "${srcdir}"
@@ -137,10 +184,7 @@ _build_documentation()
PATH="${_OLDPATH}"
export PATH
-
- echo ""
- echo "<< Finished building documentation for '${pkgname}', version '${pkgver}'. <<"
- echo ""
+ msg2 "<< Finished building documentation for '${pkgname}', version '${pkgver}'. <<"
}
_install_documentation()
@@ -148,24 +192,20 @@ _install_documentation()
### Documentation gets already installed by the normal install procedure, since everything is copied anyway. So, do nothing here. ###
true
-# echo ""
-# echo ">> Packaging documentation for '${pkgname}', version '${pkgver}'. >>"
-# echo ""
+# msg2 ">> Packaging documentation for '${pkgname}', version '${pkgver}'. >>"
#
#
# mkdir -p "${_doc_install_dir}" || exit 301
# mkdir -p "${_plaut04_doc_install_dir}" || exit 302
-#
+#
# if [ -e "${_docdir}/auto.pdf" ]; then
# cp -a "${_docdir}/auto.pdf" "${_doc_install_dir}/" || exit "$?"
# fi
# if [ -e "${_plaut04docdir}/userguide.pdf" ]; then
# cp -a "${_plaut04docdir}/userguide.pdf" "${_plaut04_doc_install_dir}/" || exit "$?"
# fi
-#
-# echo ""
-# echo "<< Finished packaging documentation for '${pkgname}', version '${pkgver}'. <<"
-# echo ""
+#
+# msg2 "<< Finished packaging documentation for '${pkgname}', version '${pkgver}'. <<"
}
build()
@@ -185,9 +225,7 @@ build()
- echo ""
- echo ">>> Building '${pkgname}', version '${pkgver}'. >>>"
- echo ""
+ msg2 ">>> Building '${pkgname}', version '${pkgver}'. >>>"
cd "${_extractdir}" || exit 11
@@ -214,38 +252,28 @@ build()
_mpi_config="--without-mpi"
fi
- echo ""
- echo ">> Running 'configure'-script for '${pkgname}', version '${pkgver}'. >>"
- echo ""
+ msg2 ">> Running 'configure'-script for '${pkgname}', version '${pkgver}'. >>"
- ./configure --enable-plaut ${_plaut04_config} ${_openmp_config} ${_mpi_config} --enable-gui --enable-tek2ps --with-x --with-optimization-flags="${_OPT_FLAGS}" --prefix="${_install_location}" FFLAGS="${_FFLAGS}" CFLAGS="${_CFLAGS}" || exit "$?"
+ ./configure --enable-plaut ${_plaut04_config} ${_openmp_config} ${_mpi_config} --enable-gui --enable-tek2ps --with-x --with-optimization-flags="${_OPT_FLAGS}" --prefix="${_install_location}" FC="${FC}" FFLAGS="${FFLAGS}" CFLAGS="${CFLAGS}" || exit "$?"
### Remakrs for 'copenmotif: For GUI94. ('openmotif' can be used instead of 'lesstif'nfigure'-script: ###
# * '--prefix' seems to be obsolete since there is no 'make install'. Specified anyway, since I do not know if it gets configured somewhere where it is used later.
# * For some reason, enabling plaut04 breaks build (installed packages on my machine: 'coin' and 'soqt' and 'simage', although 'simage' is, according to the AUTO-documentation, not necessary for 'soqt' version >= 1.5.0.)
### /Remarks for 'configure'-script. ###
-
- echo ""
- echo "<< Finished running 'configure'-script for '${pkgname}', version '${pkgver}'. <<"
- echo ""
-
-
- echo ""
- echo ">> Running 'make'-script for '${pkgname}', version '${pkgver}'. >>"
- echo ""
-
+
+ msg2 "<< Finished running 'configure'-script for '${pkgname}', version '${pkgver}'. <<"
+
+
+ msg2 ">> Running 'make'-script for '${pkgname}', version '${pkgver}'. >>"
+
make || exit "$?"
- echo ""
- echo "<< Finished running 'make'-script for '${pkgname}', version '${pkgver}'. <<"
- echo ""
-
+ msg2 "<< Finished running 'make'-script for '${pkgname}', version '${pkgver}'. <<"
+
if [ "y${_BUILD_DOC}" == "yyes" ]; then
_build_documentation || exit "$?" # IMPORTANT!, build documentation _after_ main build, otherwise there will no main build happen.
fi
- echo ""
- echo "<<< Finished building '${pkgname}', version '${pkgver}'. <<<"
- echo ""
+ msg2 "<<< Finished building '${pkgname}', version '${pkgver}'. <<<"
}
package()
@@ -263,61 +291,49 @@ package()
AUTO_DIR="${_extractdir}" # Auto uses this, at least when building the documentation. So we need to set this variable.
export AUTO_DIR
- echo ""
- echo ">>> Installing '${pkgname}', version '${pkgver}', into package dir '${pkgdir}'. >>>"
- echo ""
+ msg2 ">>> Installing '${pkgname}', version '${pkgver}', into package dir '${pkgdir}'. >>>"
cd "${_extractdir}" || exit 101
-
+
mkdir -p "${_install_dir}" || exit "$?"
-
+
ls -A1 "${_extractdir}"/ | while read _content; do # Copy everything, including files starting with ".", but not the special directory entries "." and "..". We do _not_ use an extra argument to "cp" to solve this in order to avoid error messages if there are no dotfiles.
cp -a -t "${_install_dir}" "${_content}" || exit "$?"
done || exit "$?"
-
+
mkdir -p "${pkgdir}/usr/bin" || exit "$?"
cp -aL "${srcdir}/auto-07p-session.bash" "${pkgdir}/usr/bin/" || exit "$?"
if [ "y${_BUILD_DOC}" == y"yes" ]; then
_install_documentation || exit "$?"
fi
-
+
rm -f "${_install_dir}/plaut"/*.o "${_install_dir}/plaut"/*.mod "${_install_dir}/plaut04"/*.mod "${_install_dir}/plaut04"/*.mod "${_install_dir}/gui"/*.o "${_install_dir}/tek2ps"/*.o "${_install_dir}/install-sh" "${_install_dir}/config.status" "${_install_dir}/cmds/auto.env" "${_install_dir}/cmds/auto.env.sh" || exit "$?" # Remove files we don't want to have.
-
+
chown -R root:root "${pkgdir}" || exit "$?"
- echo ""
- echo "<<< Finished installing '${pkgname}', version '${pkgver}', into package dir '${pkgdir}'. <<<"
- echo ""
-
- echo ""
- echo ">>> patching shabeng-lines of python scripts from 'python' to 'python2'. >>>"
- echo ""
-
- cd "${_install_dir}"
- ### The "grep" just filters out the files which _may_ be needed to patch (note, that it also matches non-first lines but we only want to patch the first line).
- ### Then, the "sed"-command takes care of just patching the first line.
- ### We could omit the "grep" and simply run "sed" over all files, but that would be too much (and more prone for programming errors becoming effective).
- grep -rlE '^\#\!.*python\>' "${_install_dir}"/* | while read _file; do
- sed -i '1s|python\(\>\)|python2\1|g' "${_file}"
- done
+ msg2 "<<< Finished installing '${pkgname}', version '${pkgver}', into package dir '${pkgdir}'. <<<"
- echo ""
- echo "<<< Finished patching shabeng-lines of python scripts from 'python' to 'python2'. <<<"
- echo ""
-
- echo ""
- echo ">>> patching 'exec python' to 'exec python2'. >>>"
- echo ""
-
- ### The "grep" just filters out the files which _may_ be needed to patch.
- ### Then, the "sed"-command takes care of patching.
- ### Indeed, the grep could be omitted, but it's another step of security to not mis-patch.
- ### (Actually, bin/autox is the only file which gets patched at all.)
- grep -rwlE 'exec[[:space:]]+python' "${_install_dir}"/* | while read _file; do
- sed -ri 's|\<exec[[:space:]]+python\>|exec python2|g' "${_file}"
- done
-
- echo ""
- echo "Finished patching 'exec python' to 'exec python2'. <<<"
- echo ""
+# msg2 ">>> patching shabeng-lines of python scripts from 'python' to 'python2'. >>>"
+#
+# cd "${_install_dir}"
+# ### The "grep" just filters out the files which _may_ be needed to patch (note, that it also matches non-first lines but we only want to patch the first line).
+# ### Then, the "sed"-command takes care of just patching the first line.
+# ### We could omit the "grep" and simply run "sed" over all files, but that would be too much (and more prone for programming errors becoming effective).
+# grep -rlE '^\#\!.*python\>' "${_install_dir}"/* | while read _file; do
+# sed -i '1s|python\(\>\)|python2\1|g' "${_file}"
+# done
+#
+# msg2 "<<< Finished patching shabeng-lines of python scripts from 'python' to 'python2'. <<<"
+#
+# msg2 ">>> patching 'exec python' to 'exec python2'. >>>"
+#
+# ### The "grep" just filters out the files which _may_ be needed to patch.
+# ### Then, the "sed"-command takes care of patching.
+# ### Indeed, the grep could be omitted, but it's another step of security to not mis-patch.
+# ### (Actually, bin/autox is the only file which gets patched at all.)
+# grep -rwlE 'exec[[:space:]]+python' "${_install_dir}"/* | while read _file; do
+# sed -ri 's|\<exec[[:space:]]+python\>|exec python2|g' "${_file}"
+# done
+#
+# msg2 "Finished patching 'exec python' to 'exec python2'. <<<"
}
diff --git a/makepkg.sh b/makepkg.sh
index 3d54aff8321f..6b33e6a629a9 100755
--- a/makepkg.sh
+++ b/makepkg.sh
@@ -2,4 +2,4 @@
### This script is for reference purposes. It can be used to build the package. It is NOT called by the PKGBUILD. It just lays around here for reference.
-_BUILD_DOC=yes _PLAUT04_WITH_QT=no _WITH_PLAUT04=yes _AUTO_DEBUG=yes _WITH_MPI=no _WITH_OPENMP=no makepkg "$@"
+_BUILD_DOC=yes _PLAUT04_WITH_QT=yes _WITH_PLAUT04=yes _AUTO_DEBUG=no _WITH_MPI=no _WITH_OPENMP=no makepkg "$@"