Skip to content

Commit

Permalink
Build Boost for C++
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Jun 14, 2014
1 parent 9922bf5 commit 0eafec0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
5 changes: 4 additions & 1 deletion defaults.sh
Expand Up @@ -72,7 +72,7 @@ set_default MSYS_PATCH_VERSION "2.6.1-1"
set_default MSYS_PERL_VERSION "5.8.8-1"
set_default MSYS_UNZIP_VERSION "6.0-1"

set_default SF_MIRROR "http://heanet.dl.sourceforge.net/sourceforge"
set_default SF_MIRROR "http://heanet.sourceforge.net/sourceforge"
set_default GTK_MIRROR "ftp.gtk.org/pub"
set_default GNOME_MIRROR "ftp.gnome.org/pub/gnome"
set_default GNOME_WIN32_URL "$GNOME_MIRROR/binaries/win32"
Expand Down Expand Up @@ -383,6 +383,9 @@ set_default XSLTPROCFLAGS ""
set_default ISOCODES_URL "http://pkg-isocodes.alioth.debian.org/downloads/iso-codes-3.49.tar.xz"
set_default ISOCODES_DIR $GLOBAL_DIR\\isocodes

set_default BOOST_URL "http://downloads.sf.net/boost/boost/boost_1_55_0.tar.bz2"
set_default BOOST_DIR $GLOBAL_DIR\\boost

### Local Variables: ***
### sh-basic-offset: 4 ***
### indent-tabs-mode: nil ***
Expand Down
33 changes: 32 additions & 1 deletion install-impl.sh
Expand Up @@ -1139,7 +1139,7 @@ function inst_hh() {
echo "!!! Attention !!!"
echo "!!! This is the only installation step that requires your direct input !!!"
echo "!!! When asked for an installation path, specify $HH_DIR !!!"
$LAST_FILE
# $LAST_FILE
qpushd $HH_DIR
_HHCTRL_OCX=$(which hhctrl.ocx || true)
[ "$_HHCTRL_OCX" ] || die "Did not find hhctrl.ocx"
Expand All @@ -1153,6 +1153,35 @@ function inst_hh() {
fi
}

function inst_boost() {
setup Boost
_BOOST_UDIR=`unix_path ${BOOST_DIR}`
set_env ${_BOOST_UDIR} BOOST_ROOT
add_to_env ${_BOOST_UDIR}/lib PATH
if test -f ${_BOOST_UDIR}/lib/libboost_date_time.dll
then
echo "Boost already installed in $_BOOST_UDIR. skipping."
else
wget_unpacked $BOOST_URL $DOWNLOAD_DIR $TMP_DIR
assert_one_dir $TMP_UDIR/boost_*
qpushd $TMP_UDIR/boost_*
if test ! -f ${_BOOST_UDIR}/bin/b2
then
qpushd tools/build/v2
./bootstrap.sh --with-toolset=mingw
./b2 install toolset=gcc --prefix=${_BOOST_UDIR}
qpopd
fi
# Limit the built libraries to what we think we'll need. Note
# that the python and context libraries depend on Python and
# Visual Studio respectively to build, so don't add them.
${_BOOST_UDIR}/bin/b2 install-proper --prefix=${_BOOST_UDIR} --with-atomic --with-chrono --with-date_time --with-filesystem --with-log --with-program_options --with-regex --with-signals --with-system --with-test link=shared variant=release toolset=gcc --layout=tagged
qpopd
test -f ${_BOOST_UDIR}/lib/libboost_date_time.dll || die "Boost not installed correctly"
rm -rf $TMP_UDIR/boost_*
fi
}

function inst_cutecash() {
setup Cutecash
_BUILD_UDIR=`unix_path $CUTECASH_BUILD_DIR`
Expand Down Expand Up @@ -1185,6 +1214,7 @@ function inst_cutecash() {

function inst_gnucash() {
setup GnuCash
echo $BOOST_ROOT
_INSTALL_WFSDIR=`win_fs_path $INSTALL_DIR`
_INSTALL_UDIR=`unix_path $INSTALL_DIR`
_BUILD_UDIR=`unix_path $BUILD_DIR`
Expand Down Expand Up @@ -1212,6 +1242,7 @@ function inst_gnucash() {
${AQBANKING_OPTIONS} \
--enable-binreloc \
--enable-locale-specific-tax \
--with-boost=${BOOST_ROOT} \
CPPFLAGS="${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} ${LIBDBI_CPPFLAGS} ${KTOBLZCHECK_CPPFLAGS} ${HH_CPPFLAGS} ${LIBSOUP_CPPFLAGS} -D_WIN32 ${EXTRA_CFLAGS}" \
LDFLAGS="${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GUILE_LDFLAGS} ${LIBDBI_LDFLAGS} ${KTOBLZCHECK_LDFLAGS} ${HH_LDFLAGS} -L${_SQLITE3_UDIR}/lib -L${_ENCHANT_UDIR}/lib -L${_LIBXSLT_UDIR}/lib -L${_MINGW_UDIR}/lib" \
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Expand Up @@ -99,6 +99,8 @@ add_step inst_libdbi
add_step inst_libsoup
add_step inst_enchant
add_step inst_webkit
#boost now needed for C++
add_step inst_boost

##
if [ "$WITH_CUTECASH" = "yes" ]; then
Expand Down

0 comments on commit 0eafec0

Please sign in to comment.