Browse Source

xap/compucell3d: Added compucell3d-20180916.

slackware-14.2
Damien Goutte-Gattat 3 years ago
parent
commit
68f048f386
  1. 28
      xap/compucell3d/CompuCell3D-20180916-fix-vtk7-gettuplevalue.patch
  2. 144
      xap/compucell3d/compucell3d.SlackBuild
  3. 7
      xap/compucell3d/compucell3d.desktop
  4. 2
      xap/compucell3d/compucell3d.sh
  5. 4
      xap/compucell3d/doinst.sh
  6. 12
      xap/compucell3d/slack-desc
  7. 7
      xap/compucell3d/twedit++.desktop
  8. 2
      xap/compucell3d/twedit++.sh

28
xap/compucell3d/CompuCell3D-20180916-fix-vtk7-gettuplevalue.patch

@ -0,0 +1,28 @@
diff -Naur CompuCell3D-20180916.orig/CompuCell3D/core/pyinterface/SerializerDE/SerializerDE.cpp CompuCell3D-20180916/CompuCell3D/core/pyinterface/SerializerDE/SerializerDE.cpp
--- CompuCell3D-20180916.orig/CompuCell3D/core/pyinterface/SerializerDE/SerializerDE.cpp 2018-07-23 01:30:09.000000000 +0100
+++ CompuCell3D-20180916/CompuCell3D/core/pyinterface/SerializerDE/SerializerDE.cpp 2018-09-16 17:02:36.870316092 +0100
@@ -655,7 +655,7 @@
for(pt.y =0 ; pt.y<fieldDim.y ; ++pt.y)
for(pt.x =0 ; pt.x<fieldDim.x ; ++pt.x){
- fieldArray->GetTupleValue(offset,tuple);
+ fieldArray->GetTypedTuple(offset,tuple);
// (*fieldPtr)[pt.x][pt.y][pt.z]=Coordinates3D<float>(tuple[0],tuple[1],tuple[2]) ;
@@ -789,7 +789,7 @@
if(mitr!=fieldPtr->end()){
;
}else{
- fieldArray->GetTupleValue(offset,tuple);
+ fieldArray->GetTypedTuple(offset,tuple);
cerr<<"inserting "<<Coordinates3D<float>(tuple[0],tuple[1],tuple[2])<<endl;
fieldPtr->insert(make_pair(cell,Coordinates3D<float>(tuple[0],tuple[1],tuple[2])));
@@ -801,4 +801,4 @@
fieldDataReader->Delete();
return true;
-}
\ No newline at end of file
+}

144
xap/compucell3d/compucell3d.SlackBuild

@ -0,0 +1,144 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest CompuCell3D sourcecode is available at:
# <http://www.compucell3d.org/>.
#
# Depends: l/PyQt5, l/vtk, l/pyqtgraph, l/qscintilla
# Source package infos
NAMESRC=${NAMESRC:-CompuCell3D}
VERSION=${VERSION:-20180916}
REPOSITORY=${REPOSITORY:-https://github.com/CompuCell3D/CompuCell3D.git}
COMMIT=${COMMIT:-48c9ca56be7ad07cebcfd5a4048fa25bd0ae8854}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
# Build infos
NAMEPKG=${NAMEPKG:-compucell3d}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
NAME=$NAMESRC-$VERSION
if [ ! -r $ARCHIVE ]; then
git clone $REPOSITORY CompuCell3D
cd CompuCell3D
git archive --prefix=$NAME/ $COMMIT | gzip -c > ../$ARCHIVE
cd ..
rm -rf CompuCell3D
fi
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Allow compile with VTK >= 7
patch -p 1 < $CWD/CompuCell3D-20180916-fix-vtk7-gettuplevalue.patch
mkdir CompuCell3D/build && cd CompuCell3D/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/compucell3d \
-DBUILD_PYINTERFACE=ON \
-DBUILD_QT_WRAPPERS=ON \
-DCMAKE_CXX_FLAGS="$CPUOPT -std=c++11 -DVTK6" \
..
make -j $JOBS
make install/strip DESTDIR=$PKG
cd ..
# Install launchers
install -D -m 755 $CWD/compucell3d.sh $PKG/usr/bin/compucell3d
install -m 755 $CWD/twedit++.sh $PKG/usr/bin/twedit++
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 ChangeLog.txt README-Linux.txt ReleaseNotes.rst \
docs/CompuCell3D_release_notes.pdf $PKG/usr/doc/$NAME
# Install desktop files
install -D -m 644 $CWD/compucell3d.desktop $PKG/usr/share/applications/compucell3d.desktop
install -m 644 $CWD/twedit++.desktop $PKG/usr/share/applications/twedit++.desktop
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
PyQt5
vtk
pyqtgraph
qscintilla
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

7
xap/compucell3d/compucell3d.desktop

@ -0,0 +1,7 @@
[Desktop Entry]
Name=CompuCell3D
Comment=Cell modeling environment
Type=Application
Categories=Education;Science;
Exec=/usr/bin/compucell3d
Terminal=false

2
xap/compucell3d/compucell3d.sh

@ -0,0 +1,2 @@
#!/bin/sh
exec /opt/compucell3d/compucell3d.sh $@

4
xap/compucell3d/doinst.sh

@ -0,0 +1,4 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi

12
xap/compucell3d/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler-----------------------------------------------------|
compucell3d: compucell3d (cell modeling environment)
compucell3d:
compucell3d: CompuCell3D is a flexible scriptable modeling environment, which
compucell3d: allows the rapid construction of sharable Virtal Tissue in-silico
compucell3d: simulations of a wide variety of multi-scale, multi-cellular
compucell3d: problems including angiogenesis, bacterial colonies, cancer,
compucell3d: developmental biology, evolution, the immune system, tissue
compucell3d: engineering, toxicology and even non-cellular soft materials.
compucell3d:
compucell3d:
compucell3d:

7
xap/compucell3d/twedit++.desktop

@ -0,0 +1,7 @@
[Desktop Entry]
Name=Twedit++
Comment=Cell modeling environment editor
Type=Application
Categories=Education;Science;
Exec=/usr/bin/twedit++
Terminal=false

2
xap/compucell3d/twedit++.sh

@ -0,0 +1,2 @@
#!/bin/sh
exec /opt/compucell3d/twedit++.sh $@
Loading…
Cancel
Save