Skip to content

Commit

Permalink
Merge pull request openscad#157 from openscad/freebsdbuilders
Browse files Browse the repository at this point in the history
Freebsdbuilders
  • Loading branch information
kintel committed Jul 24, 2012
2 parents 54bf1cf + 36d2515 commit 23ad640
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
28 changes: 28 additions & 0 deletions scripts/freebsd-build-dependencies.sh
@@ -0,0 +1,28 @@
#!/usr/local/bin/bash -e

echo "Tested on FreeBSD 9. Please see README.md for info on older systems."

if [ "`pkg_info | grep -i cgal `" ]; then
echo Stopping. Please remove any CGAL packages you have installed and restart
exit
fi

if [ "`pkg_info | grep -i opencsg`" ]; then
echo Stopping. Please remove any OpenCSG packages you have installed and restart
exit
fi

OPENSCADDIR=$PWD
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
echo "Must be run from the OpenSCAD source root directory"
exit 0
fi

. ./scripts/setenv-freebsdbuild.sh

pkg_add -r bison boost-libs cmake git bash eigen2 flex gmake gmp mpfr
pkg_add -r xorg libGLU libXmu libXi xorg-vfbserver glew
pkg_add -r qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic

BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh cgal-use-sys-libs
BASEDIR=/usr/local ./scripts/linux-build-dependencies.sh opencsg
8 changes: 7 additions & 1 deletion scripts/linux-build-dependencies.sh
Expand Up @@ -188,12 +188,18 @@ build_opencsg()
sed -ibak s/"\-lXmu"/"\-L\/usr\/lib64\/libXmu.so.6"/ src/Makefile
fi

if [ `uname | grep FreeBSD` ]; then
sed -ibak s/X11R6/local/g src/Makefile
fi

if [ "`command -v qmake-qt4`" ]; then
qmake-qt4
else
qmake
fi

make

cp -av lib/* $DEPLOYDIR/lib
cp -av include/* $DEPLOYDIR/include
}
Expand Down Expand Up @@ -235,7 +241,7 @@ if [ ! $NUMCPU ]; then
fi

if [ ! -d $BASEDIR/bin ]; then
mkdir --parents $BASEDIR/bin
mkdir -p $BASEDIR/bin
fi

echo "Using basedir:" $BASEDIR
Expand Down
6 changes: 6 additions & 0 deletions scripts/setenv-freebsdbuild.sh
@@ -0,0 +1,6 @@
# run with '. ./scripts/setenv-freebsdbuild.sh'

# use in conjuction with freebsd-build-dependencies.sh

QMAKESPEC=freebsd-g++
QTDIR=/usr/local/share/qt4

0 comments on commit 23ad640

Please sign in to comment.