-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A solid modeling system. More info: - http://brlcad.org/ - https://en.wikipedia.org/wiki/BRL-CAD
Showing
1 changed file
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#! /bin/bash | ||
|
||
set -xe | ||
|
||
PKG=brlcad | ||
VERSION=7.28.0 | ||
SRCURL=https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/$VERSION/$PKG-$VERSION.tar.gz | ||
SRC=$PKG-$VERSION.tar.gz | ||
|
||
BUILD=0 | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD | ||
|
||
mkdir -p $PREFIX | ||
cat >$PREFIX/profile <<-EOF | ||
PATH=$PREFIX/bin:\$PATH | ||
EOF | ||
|
||
source $PREFIX/profile | ||
|
||
mkdir -p $PREFIX/build | ||
cd $PREFIX/build | ||
|
||
test -e $PKG-$VERSION.tar.gz || wget --no-verbose $SRCURL | ||
test -n "$XWIPE" && rm -rf $PKG-$VERSION | ||
test -d $PKG-$VERSION || tar -xf $PKG-$VERSION.tar.gz | ||
|
||
|
||
mkdir -p $PKG-$VERSION/build | ||
cd $PKG-$VERSION/build | ||
|
||
|
||
# The slackbuild was again a valuable source to get this thing build | ||
# https://slackbuilds.org/slackbuilds/14.2/graphics/brlcad/brlcad.SlackBuild | ||
# | ||
# lessons learned: | ||
# - Warnings need to be turened off (at least for gcc5 builds). | ||
# - gcc7 will throw weird errors from the depths of the cstdlib (include_next, OMG!): | ||
# | ||
# In file included from /dev/shm/brlcad-7.28.0/build/include/clipper.hpp:40:0, | ||
# from /dev/shm/brlcad-7.28.0/src/libged/polyclip.cpp:31: | ||
# /usr/include/c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory | ||
# #include_next <stdlib.h> | ||
# ^~~~~~~~~~ | ||
# | ||
# - BRLCAD_ENABLE_RUNTIME_DEBUG is strongly encouraged | ||
# | ||
|
||
source /pkg/gcc-5.5.0-1/profile | ||
MXCFLAGS="-O2 -fPIC" | ||
|
||
cmake \ | ||
-DCMAKE_COLOR_MAKEFILE=OFF \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DCMAKE_INSTALL_PREFIX=$PREFIX \ | ||
-DCMAKE_C_FLAGS:STRING="$MXCFLAGS" \ | ||
-DCMAKE_CXX_FLAGS:STRING="$MXCFLAGS" \ | ||
-DBRLCAD_BUNDLED_LIBS=AUTO \ | ||
-DBRLCAD_ENABLE_RUNTIME_DEBUG=ON \ | ||
-DBRLCAD_FLAGS_DEBUG=OFF \ | ||
-DBRLCAD_ENABLE_STRICT=OFF \ | ||
-DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF\ | ||
-DBRLCAD_FLAGS_OPTIMIZATION=ON \ | ||
-DBRLCAD_ENABLE_OPENGL=ON \ | ||
-DBRLCAD_TCL=BUNDLED \ | ||
-DBRLCAD_TK=BUNDLED \ | ||
-DBRLCAD_ITCL=BUNDLED \ | ||
-DBRLCAD_ITK=BUNDLED \ | ||
-DBRLCAD_ENABLE_QT=OFF \ | ||
-DBRLCAD_ENABLE_OSG=OFF \ | ||
-DBRLCAD_ENABLE_RTGL=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBRLCAD_ENABLE_EXTRADOCS=ON \ | ||
-DBRLCAD_INSTALL_EXAMPLE_GEOMETRY=ON \ | ||
.. | ||
|
||
NUMJOBS=$(nproc) | ||
if test $NUMJOBS -gt 96 ; then NUMJOBS=96; fi | ||
|
||
nice -12 make -j $NUMJOBS | ||
make install | ||
|
||
exit | ||
|