diff options
Diffstat (limited to 'graphics/brlcad')
-rw-r--r-- | graphics/brlcad/README | 3 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.SlackBuild | 33 | ||||
-rw-r--r-- | graphics/brlcad/brlcad.info | 6 | ||||
-rw-r--r-- | graphics/brlcad/fix-step-g-segfault.diff | 70 |
4 files changed, 28 insertions, 84 deletions
diff --git a/graphics/brlcad/README b/graphics/brlcad/README index 6f018ab1a0..bddd1a2309 100644 --- a/graphics/brlcad/README +++ b/graphics/brlcad/README @@ -9,6 +9,9 @@ Optional dependencies: astyle, proj, gdal. BRL-CAD will use them if available; if not it will use bundled versions. gdal is used by BRL-CAD but it does not detect the SBo version and always uses bundled one. +Note: Having assimp installed breaks the build. +There may be other packages which may alter the brlcad build, possibly +making it worthless. It is best to build it on a clean environment. Also there are a few options. Usage: OPTION=ON/OFF sh ./brlcad.SlackBuild diff --git a/graphics/brlcad/brlcad.SlackBuild b/graphics/brlcad/brlcad.SlackBuild index 5a4b598d04..4779562217 100644 --- a/graphics/brlcad/brlcad.SlackBuild +++ b/graphics/brlcad/brlcad.SlackBuild @@ -15,8 +15,9 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=brlcad -VERSION=${VERSION:-7.32.6} -BUILD=${BUILD:-3} +VERSION=${VERSION:-7.38.2} +SRCVER=rel-${VERSION//./-} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,15 +41,23 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" + ENDIAN="LITTLE" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" + ENDIAN="LITTLE" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + ENDIAN="LITTLE" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + ENDIAN="BIG" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" + ENDIAN="BIG" fi set -e @@ -56,9 +65,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -66,15 +75,11 @@ 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 {} \+ -# 20220225 bkw: Fix for null pointer dereference, causes "Error 139" in -# 'Generating ../../share/db/nist/NIST_MBE_PMI_1.g'. Refs: -# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256166 -# https://github.com/BRL-CAD/brlcad/commit/b0dd45620f1ffdd8814069df091b20e8780e1b3e -patch -p1 < $CWD/fix-step-g-segfault.diff - # thanks arch maintainers. # fixes build on i586. patch -p1 < $CWD/brlcad-skip-gstep.patch +sed -i 's%#define OPENNURBS_INC_IN_PROGRESS%#define OPENNURBS_INC_IN_PROGRESS\n\n#define ON_'${ENDIAN}'_ENDIAN%' src/other/openNURBS/opennurbs.h + mkdir -p build cd build @@ -102,11 +107,17 @@ cmake \ -DDATA_DIR=share \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DON_${ENDIAN}_ENDIAN=ON \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" .. make make install/strip 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/opt/$PRGNAM/lib/ -print0 | xargs -0 file | grep -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs chmod 755 2> /dev/null || true + find $PKG/opt/$PRGNAM/man -type f -exec gzip -9 {} \; for i in $( find $PKG/opt/$PRGNAM/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done diff --git a/graphics/brlcad/brlcad.info b/graphics/brlcad/brlcad.info index e55e37ea30..18235da774 100644 --- a/graphics/brlcad/brlcad.info +++ b/graphics/brlcad/brlcad.info @@ -1,8 +1,8 @@ PRGNAM="brlcad" -VERSION="7.32.6" +VERSION="7.38.2" HOMEPAGE="https://brlcad.org" -DOWNLOAD="https://github.com/BRL-CAD/brlcad/releases/download/rel-7-32-6/brlcad-7.32.6.tar.bz2" -MD5SUM="34ef03fa65588169aaac3460f2f25359" +DOWNLOAD="https://github.com/BRL-CAD/brlcad/archive/rel-7-38-2/brlcad-7-38-2.tar.gz" +MD5SUM="658a363c6064532bf17cba5924cab7f1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/graphics/brlcad/fix-step-g-segfault.diff b/graphics/brlcad/fix-step-g-segfault.diff deleted file mode 100644 index 6c5048232d..0000000000 --- a/graphics/brlcad/fix-step-g-segfault.diff +++ /dev/null @@ -1,70 +0,0 @@ -diff -Naur brlcad-7.32.4/src/other/stepcode/src/clstepcore/complexSupport.h brlcad-7.32.4.patched/src/other/stepcode/src/clstepcore/complexSupport.h ---- brlcad-7.32.4/src/other/stepcode/src/clstepcore/complexSupport.h 2021-07-28 23:11:47.000000000 -0400 -+++ brlcad-7.32.4.patched/src/other/stepcode/src/clstepcore/complexSupport.h 2022-02-25 17:42:27.909342186 -0500 -@@ -208,26 +208,26 @@ - // but all we need. - EntList * firstNot( JoinType ); - EntList * nextNot( JoinType j ) { -- return next->firstNot( j ); -+ return (next) ? next->firstNot(j) : NULL; - } - EntList * firstWanted( MatchType ); - EntList * nextWanted( MatchType mat ) { -- return next->firstWanted( mat ); -+ return (next) ? next->firstWanted(mat) : NULL; - } - EntList * lastNot( JoinType ); - EntList * prevNot( JoinType j ) { -- return prev->lastNot( j ); -+ return (prev) ? prev->lastNot(j) : NULL; - } - EntList * lastWanted( MatchType ); - EntList * prevWanted( MatchType mat ) { -- return prev->lastWanted( mat ); -+ return (prev) ? prev->lastWanted(mat) : NULL; - } - - JoinType join; - int multiple() { - return ( join != SIMPLE ); - } -- EntList * next, *prev; -+ EntList * next = NULL, *prev = NULL; - - protected: - MatchType viable; -diff -Naur brlcad-7.32.4/src/other/stepcode/src/exp2cxx/complexSupport.h brlcad-7.32.4.patched/src/other/stepcode/src/exp2cxx/complexSupport.h ---- brlcad-7.32.4/src/other/stepcode/src/exp2cxx/complexSupport.h 2021-07-28 23:11:48.000000000 -0400 -+++ brlcad-7.32.4.patched/src/other/stepcode/src/exp2cxx/complexSupport.h 2022-02-25 17:40:52.465760163 -0500 -@@ -162,26 +162,26 @@ - // but all we need. - EntList * firstNot( JoinType ); - EntList * nextNot( JoinType j ) { -- return next->firstNot( j ); -+ return (next) ? next->firstNot(j) : NULL; - } - EntList * firstWanted( MatchType ); - EntList * nextWanted( MatchType mat ) { -- return next->firstWanted( mat ); -+ return (next) ? next->firstWanted(mat) : NULL; - } - EntList * lastNot( JoinType ); - EntList * prevNot( JoinType j ) { -- return prev->lastNot( j ); -+ return (prev) ? prev->lastNot(j) : NULL; - } - EntList * lastWanted( MatchType ); - EntList * prevWanted( MatchType mat ) { -- return prev->lastWanted( mat ); -+ return (prev) ? prev->lastWanted(mat) : NULL; - } - - JoinType join; - int multiple() { - return ( join != SIMPLE ); - } -- EntList * next, *prev; -+ EntList * next = NULL, *prev = NULL; - - protected: - MatchType viable; |