]> https://gitweb.dealii.org/ - candi.git/commitdiff
Update assimp package 241/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 7 Jun 2021 13:32:26 +0000 (15:32 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Mon, 30 Aug 2021 11:29:26 +0000 (13:29 +0200)
deal.II-toolchain/packages/assimp.package
deal.II-toolchain/packages/dealii.package
deal.II-toolchain/patches/assimp-D3MFImporter.patch [deleted file]

index d98555618f33e0201d9e4e508a9b63f57b74f84f..40c2d0cdf6a14d35ae51464561f2c50f1fdd093b 100644 (file)
@@ -1,37 +1,59 @@
-VERSION=4.1.0
-CHECKSUM=83b53a10c38d964bd1e69da0606e2727
-#VERSION=3.3.1
-#CHECKSUM=fc57b024e80ebb13301bd0983826cad3
-NAME=v${VERSION}
-EXTRACTSTO=assimp-${VERSION}
-SOURCE=https://github.com/assimp/assimp/archive/
-PACKING=.tar.gz
+################################################################################
+## ASSIMP                                                                     ##
+################################################################################
+
+# In general, we recommend version 4.1.0 or higher.
+# On Ubuntu the latest sucessfully tested version is 5.0.1.
+
+# By default load the tarball.
+# To load the git repository define a variable CANDI_ASSIMP_LOAD_TARBALL=OFF.
+if [ -z ${CANDI_ASSIMP_LOAD_TARBALL} ]; then
+    CANDI_ASSIMP_LOAD_TARBALL=ON
+fi
+
+if [ ${CANDI_ASSIMP_LOAD_TARBALL} = ON ]; then
+    # VERSION=5.0.1
+    # CHECKSUM=11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc
+    # CHECKSUM="${CHECKSUM} f148ba31dc1e7e00e59cc09b25535af997dc1998"
+    # CHECKSUM="${CHECKSUM} eb7b7385a5c3194ab46d7f869d7ac6cf"
+
+    VERSION=4.1.0
+    CHECKSUM=3520b1e9793b93a2ca3b797199e16f40d61762617e072f2d525fad70f9678a71
+    CHECKSUM="${CHECKSUM} ce3589f9455c743e993fd802bdaaed72838cd3f4"
+    CHECKSUM="${CHECKSUM} 83b53a10c38d964bd1e69da0606e2727"
+
+    NAME=v${VERSION}
+    PACKING=.tar.gz
+    EXTRACTSTO=assimp-${VERSION}
+    SOURCE=https://github.com/assimp/assimp/archive/
+else
+
+    # VERSION=v5.0.1
+    VERSION=v4.1.0
+
+    NAME=assimp
+    PACKING=git
+    SOURCE=https://github.com/assimp/
+    EXTRACTSTO=${NAME}-${VERSION}
+fi
+unset CANDI_ASSIMP_LOAD_TARBALL
+
 BUILDCHAIN=cmake
 
 BUILDDIR=${BUILD_PATH}/assimp-${VERSION}
 INSTALL_PATH=${INSTALL_PATH}/assimp-${VERSION}
 
-CONFOPTS="-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
- -D BUILD_SHARED_LIBS=ON"
+CONFOPTS="-D BUILD_SHARED_LIBS:BOOL=ON"
 
-package_specific_patch () {
-    if [ "${VERSION}" == "3.3.1" ]; then
-        cd ${UNPACK_PATH}/${EXTRACTSTO}
-        cecho ${WARN} "applying patch for assimp D3MFImporter problem"
-        patch -p0 --forward < ${ORIG_DIR}/${PROJECT}/patches/assimp-D3MFImporter.patch || true
-    fi
-}
-
-package_specific_register () {
+package_specific_register() {
     export ASSIMP_DIR=${INSTALL_PATH}
 }
 
-package_specific_conf () {
+package_specific_conf() {
     # Generate configuration file
     CONFIG_FILE=${CONFIGURATION_PATH}/assimp-${NAME}
     rm -f $CONFIG_FILE
     echo "
 export ASSIMP_DIR=${INSTALL_PATH}
-" >> $CONFIG_FILE
+" >>$CONFIG_FILE
 }
-
index a68cb65f9eddd20ed7ab5123804a3fc4010c56f5..58d399bf41d666e7fef86d89ab62b7e1492ca2cb 100644 (file)
@@ -313,6 +313,22 @@ if [ ! -z "${SUNDIALS_DIR}" ]; then
       -D SUNDIALS_DIR=${SUNDIALS_DIR}"
 fi
 
+########################################
+# ASSIMP
+if [[ ${PACKAGES_OFF} =~ 'assimp' ]]; then
+    if [ ! -z "${ASSIMP_DIR}" ]; then
+        cecho ${INFO} "deal.II: unset ASSIMP_DIR due to forced DEAL_II_WITH_ASSIMP:BOOL=OFF option"
+        unset ASSIMP_DIR
+    fi
+fi
+
+if [ ! -z "${ASSIMP_DIR}" ]; then
+    cecho ${INFO} "deal.II: configuration with ASSIMP"
+    CONFOPTS="${CONFOPTS} \
+      -D DEAL_II_WITH_ASSIMP:BOOL=ON \
+      -D ASSIMP_DIR=${ASSIMP_DIR}"
+fi
+
 ################################################################################
 package_specific_install() {
     if [ ${RUN_DEAL_II_TESTS} = ON ]; then
diff --git a/deal.II-toolchain/patches/assimp-D3MFImporter.patch b/deal.II-toolchain/patches/assimp-D3MFImporter.patch
deleted file mode 100644 (file)
index 0c55a03..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/D3MFImporter.cpp      2018-05-13 23:05:48.421253063 +0200
-+++ code/D3MFImporter.cpp      2018-05-13 23:03:57.314014344 +0200
-@@ -227,7 +227,7 @@
-         aiVector3D vertex;
-         vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
-         vertex.y = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::y.c_str()), nullptr);
--        vertex.z = ai_strtof>(xmlReader->getAttributeValue(D3MF::XmlTag::z.c_str()), nullptr);
-+        vertex.z = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::z.c_str()), nullptr);
-         return vertex;
-     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.