summaryrefslogtreecommitdiff
path: root/graphics/meshlab/meshlab.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2017-04-19 22:52:08 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-22 08:10:47 +0700
commit655aa63537a29467c4a0bb55644034fcd6829906 (patch)
treefb2f2506b7ceea8f126a1ab576e1c15d6f77d05e /graphics/meshlab/meshlab.SlackBuild
parentb1944c22f3c850c38f9fea264d06075a000ce472 (diff)
downloadslackbuilds-655aa63537a29467c4a0bb55644034fcd6829906.tar.gz
graphics/meshlab: Updated for version 2016.12.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'graphics/meshlab/meshlab.SlackBuild')
-rw-r--r--graphics/meshlab/meshlab.SlackBuild93
1 files changed, 55 insertions, 38 deletions
diff --git a/graphics/meshlab/meshlab.SlackBuild b/graphics/meshlab/meshlab.SlackBuild
index 309d2aa3e4..9348471b81 100644
--- a/graphics/meshlab/meshlab.SlackBuild
+++ b/graphics/meshlab/meshlab.SlackBuild
@@ -23,16 +23,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=meshlab
-VERSION=${VERSION:-1.3.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2016.12}
+VCGLIBVER=${VCGLIBVER:-1.0.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCNAM=MeshLabSrc_AllInc
-SRCVER=$(echo $VERSION | sed 's/\.//g')
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -43,8 +41,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,38 +60,57 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-tar xvf $CWD/${SRCNAM}_v${SRCVER}.tgz
-chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# see http://sourceforge.net/p/meshlab/bugs/342/
-patch -p1 < $CWD/plystuff.diff
-# fix silly lapack error in ancient levmar (thanks to net147 over at Arch)
-patch -p1 -d meshlab < $CWD/lapack.patch
-# use external mpir -- meshlab ships x86_64 static libs, but no src or libs for i486
-sed -i -e '/mpir/d' meshlab/src/meshlabplugins/filter_csg/filter_csg.pro
-
-# Build all the dependencies. These will be statically linked into meshlab.
-# (Horrible duplication and many out of date, but avoids version clashes)
-cd meshlab/src/external
-qmake -recursive external.pro
-make \
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS"
-# Build meshlab
+rm -rf meshlab
+tar xvf $CWD/meshlab-$VERSION.tar.gz --transform="s#^meshlab-$VERSION/#meshlab/#"
+
+rm -rf vcglib
+tar xvf $CWD/vcglib-$VCGLIBVER.tar.gz --transform="s#^vcglib-$VCGLIBVER/#vcglib/#"
+
+chown -R root:root meshlab vcglib
+find -L meshlab vcglib \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+cd meshlab
+
+# patches from or via Arch
+patch -p1 < $CWD/patches/mpir.patch # use external library, see also below
+patch -p1 < $CWD/patches/bzip2.patch # use external library, see also below
+patch -p1 < $CWD/patches/muparser.patch # use external library, see also below
+patch -p1 < $CWD/patches/levmar.patch # use external library, see also below
+patch -p1 < $CWD/patches/lapack.patch # enable lapack
+# fix derpy filename
+mv src/plugins_experimental/io_TXT/io_txt.pro src/plugins_experimental/io_TXT/io_TXT.pro
+# fix from git: https://github.com/cnr-isti-vclab/meshlab/commit/1e2a54c
+patch -p1 < $CWD/patches/1e2a54cee2fcb2f0fc15fd83c1014e1813eb75df.patch
+# fix from git: https://github.com/cnr-isti-vclab/meshlab/commit/612388c
+patch -p1 < $CWD/patches/612388c42d00ab8eba1d9626a7da33a18c724d76.patch
+
+# Build the supplied dependencies (they will be statically linked into meshlab)
+cd src/external
+
+ # don't use meshlab's ancient mpir
+ rm -rf inc/ lib/ # <-- mpir in these dirs
+ # and don't use meshlab's ancient bzip2, muParser, levmar
+ sed -i \
+ -e 's/bzip2.*pro//' -e '/muparser/d' -e '/levmar/d' \
+ external.pro
+
+ qmake-qt5 -recursive external.pro \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS -std=c++11"
+ make
+
cd ..
-qmake -recursive meshlab_full.pro
-make \
+
+# Build meshlab itself
+qmake-qt5 -recursive meshlab_mini.pro \
CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS -fpermissive"
+ CXXFLAGS="$SLKCFLAGS -std=c++11"
+make
mkdir -p $PKG/opt
cp -a distrib/ $PKG/opt/meshlab
@@ -118,7 +135,7 @@ cp \
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- README.txt \
+ $TMP/$PRGNAM/LICENSE.txt $TMP/$PRGNAM/README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild