diff options
Diffstat (limited to 'academic/meep')
-rw-r--r-- | academic/meep/README | 48 | ||||
-rw-r--r-- | academic/meep/i386-fix.patch.gz | bin | 0 -> 607 bytes | |||
-rw-r--r-- | academic/meep/meep.SlackBuild | 63 | ||||
-rw-r--r-- | academic/meep/meep.info | 8 | ||||
-rw-r--r-- | academic/meep/slack-desc | 2 |
5 files changed, 86 insertions, 35 deletions
diff --git a/academic/meep/README b/academic/meep/README index 9baddd56dd..4bfc8b293b 100644 --- a/academic/meep/README +++ b/academic/meep/README @@ -1,14 +1,46 @@ meep (electromagnetic FDTD solver) -Meep is a free and open-source software package for -electromagnetics simulation via the finite-difference -time-domain (FDTD) method spanning a broad range of -applications. +Meep is a free and open-source software package for electromagnetics +simulation via the finite-difference time-domain (FDTD) method +spanning a broad range of applications. It saves results in hdf5 +format. -You may wish to preinstall: harminv, mpb +This package requires: hdf5, libctl, lapack, mpb + +You probably will also want to preinstall: harminv, openmpi You may wish to also install: h5utils -If the build script can find the ATLAS libraries, it will -adapt the configure options to use them rather than the -default lapack. +You very probably want to build a multi-processor version of this +code by adding the "--with-openmp" configure option. Here, mpb is +specified as a prerequisite since at the present time the python +interface will not build without it. + + + +Configuration: + +If the build script can find the ATLAS libraries, it will adapt the +configure options to use them, rather than the the default choice of +lapack. + +You can add additional options to the command line using the +environment variable SBOPTIONS_MEEP; e.g. to enable MPI (multi- +processor calculation) using openmp, use: + +SBOPTIONS_MEEP="--with-openmp" ./meep.Slackbuild + +Alternatively, if building non-interactively (e.g. if using slpkg), +use/create the file /etc/sbo_pkg_options.conf since this slackbuild +script will search it for options. Simply include a line starting +"meep:" followed by options, e.g.: + +meep: --with-openmp + +Currently, building the python support for meep can be problematic +unless the mpb package is also installed; if you do so, and (e.g.) +use openmp, it is best to build mpb with the same option. You may +also need to install mpi4py using pip. If you do not want python +support, specify "--without-python", and in this case installing mpb +is not necessary. + diff --git a/academic/meep/i386-fix.patch.gz b/academic/meep/i386-fix.patch.gz Binary files differnew file mode 100644 index 0000000000..c5572c316c --- /dev/null +++ b/academic/meep/i386-fix.patch.gz diff --git a/academic/meep/meep.SlackBuild b/academic/meep/meep.SlackBuild index 347fb3f9ae..629d20e14d 100644 --- a/academic/meep/meep.SlackBuild +++ b/academic/meep/meep.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for meep @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=meep -VERSION=${VERSION:-1.12.0} -BUILD=${BUILD:-1} +VERSION=${VERSION:-1.25.0} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -54,19 +64,23 @@ else LIBDIRSUFFIX="" fi +set -e + # change annoying underscores into hyphens SVERSION=$(echo $VERSION | tr '_' '-') # make a custom list of doc files in advance DOCFILES="AUTHORS COPYRIGHT LICENSE TODO NEWS.md" -set -e - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$SVERSION tar xvf $CWD/$PRGNAM-$SVERSION.tar.gz cd $PRGNAM-$SVERSION +# patch 32bit build - thanks debian devs +case "$ARCH" in + i?86) zcat $CWD/i386-fix.patch.gz | patch -p1 ;; +esac chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -74,13 +88,27 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -LOCALCONFIGS=" --without-python --with-mpi " +# if there is no configure script, try to build one! +if [ ! -f ./configure ] ; then + ./autogen.sh +fi + +LOCALCONFIGS= +XDBFILE=/etc/sbo_pkg_options.conf +if [ -f ${XDBFILE} ] ; then + LOCALCONFIGS=${LOCALCONFIGS}" "$(grep "^${PRGNAM}:" ${XDBFILE} | grep -v '^#' | awk -F: '{print$2}') + echo Build options selected by file: LOCALCONFIGS=${LOCALCONFIGS} +fi +if [ -n "${SBOPTIONS_MEEP}" ] ; then + LOCALCONFIGS=${LOCALCONFIGS}" "${SBOPTIONS_MEEP} + echo Build options selected by environment: LOCALCONFIGS=${LOCALCONFIGS} +fi # check for the Atlas replacement for blas; if the libraries are found, # add the configure option accordingly -if [ -f /usr/lib${LIBDIRSUFFIX}/libatlas.a ] ; then - if [ -f /usr/lib${LIBIRSUFFIX}/libatlas.so ] ; then +if [ -f /usr/lib/libatlas.a ] ; then + if [ -f /usr/lib/libatlas.so ] ; then echo "NOTICE: libatlas was found, configure --with-blas=atlas" LOCALCONFIGS=${LOCALCONFIGS}" --with-blas=atlas" fi @@ -88,38 +116,29 @@ fi CFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ +PYTHON=/usr/bin/python3 \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux \ - --disable-static \ $LOCALCONFIGS make make install DESTDIR=$PKG - find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -#find $PKG/usr/man -type f -exec gzip -9 {} \; -#for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION install -m 0644 $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +rm -f $PKG/usr/lib*/*.la + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -###sbolint off -if [ -f $CWD/doinst.sh ] ; then - cat $CWD/doinst.sh > $PKG/install/doinst.sh -fi -###sbolint on - cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/meep/meep.info b/academic/meep/meep.info index 4c77d9c392..e999eb6ae0 100644 --- a/academic/meep/meep.info +++ b/academic/meep/meep.info @@ -1,10 +1,10 @@ PRGNAM="meep" -VERSION="1.12.0" +VERSION="1.25.0" HOMEPAGE="https://github.com/NanoComp/meep" -DOWNLOAD="https://github.com/NanoComp/meep/releases/download/v1.12.0/meep-1.12.0.tar.gz" -MD5SUM="ce2064167a540036f315b5b7b4b8253e" +DOWNLOAD="https://github.com/NanoComp/meep/releases/download/v1.25.0/meep-1.25.0.tar.gz" +MD5SUM="968b8da6c25aae3757457520d1520eb2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="lapack openmpi hdf5 libctl" +REQUIRES="mpb" MAINTAINER="PaulKinsler" EMAIL="dr.paul@kinsler.org" diff --git a/academic/meep/slack-desc b/academic/meep/slack-desc index aa2462124c..8187e87c47 100644 --- a/academic/meep/slack-desc +++ b/academic/meep/slack-desc @@ -8,7 +8,7 @@ |-----handy-ruler------------------------------------------------------| meep: meep (electromagnetics simulation using FDTD) meep: -meep: Meep is a free and open-source software package for +meep: Meep is a free and open-source software package for meep: electromagnetics simulation via the finite-difference meep: time-domain (FDTD) method spanning a broad range of meep: applications. |