Skip to content
Snippets Groups Projects
Commit ea8cb1b8 authored by Oliver Bock's avatar Oliver Bock
Browse files

Preparations for libxml2 integration

* Download and build (incl. MinGW)
* Also: added a few chmods
parent 34c278c9
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,7 @@ prepare_build_tree() ...@@ -86,6 +86,7 @@ prepare_build_tree()
echo "Preparing build tree..." | tee -a $LOGFILE echo "Preparing build tree..." | tee -a $LOGFILE
mkdir -p build/sdl >> $LOGFILE || failure mkdir -p build/sdl >> $LOGFILE || failure
mkdir -p build/freetype2 >> $LOGFILE || failure mkdir -p build/freetype2 >> $LOGFILE || failure
mkdir -p build/libxml2 >> $LOGFILE || failure
mkdir -p build/oglft >> $LOGFILE || failure mkdir -p build/oglft >> $LOGFILE || failure
mkdir -p build/boinc >> $LOGFILE || failure mkdir -p build/boinc >> $LOGFILE || failure
mkdir -p build/framework >> $LOGFILE || failure mkdir -p build/framework >> $LOGFILE || failure
...@@ -137,6 +138,15 @@ prepare_generic() ...@@ -137,6 +138,15 @@ prepare_generic()
rm -rf freetype2 >> $LOGFILE 2>&1 || failure rm -rf freetype2 >> $LOGFILE 2>&1 || failure
mv freetype-2.3.5 freetype2 >> $LOGFILE 2>&1 || failure mv freetype-2.3.5 freetype2 >> $LOGFILE 2>&1 || failure
echo "Retrieving libxml2 (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty || failure
wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.32.tar.gz >> $LOGFILE 2>&1 || failure
tar -xzf libxml2-sources-2.6.32.tar.gz >> $LOGFILE 2>&1 || failure
rm libxml2-sources-2.6.32.tar.gz >> $LOGFILE 2>&1 || failure
# substitute old source tree
rm -rf libxml2 >> $LOGFILE 2>&1 || failure
mv libxml2-2.6.32 libxml2 >> $LOGFILE 2>&1 || failure
cd $ROOT/3rdparty/oglft || failure cd $ROOT/3rdparty/oglft || failure
if [ -d .svn ]; then if [ -d .svn ]; then
echo "Updating OGLFT..." | tee -a $LOGFILE echo "Updating OGLFT..." | tee -a $LOGFILE
...@@ -194,7 +204,9 @@ build_generic() ...@@ -194,7 +204,9 @@ build_generic()
{ {
echo "Building SDL (this may take a while)..." | tee -a $LOGFILE echo "Building SDL (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/sdl || failure cd $ROOT/3rdparty/sdl || failure
chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
./autogen.sh >> $LOGFILE 2>&1 || failure ./autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/sdl || failure cd $ROOT/build/sdl || failure
if [ "$1" == "$TARGET_MAC" ]; then if [ "$1" == "$TARGET_MAC" ]; then
$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-video-x11=no >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-video-x11=no >> $LOGFILE 2>&1 || failure
...@@ -208,8 +220,8 @@ build_generic() ...@@ -208,8 +220,8 @@ build_generic()
echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/freetype2 || failure cd $ROOT/3rdparty/freetype2 || failure
chmod +x autogen.sh >> $LOGFILE 2>&1 || failure chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
./autogen.sh >> $LOGFILE 2>&1 || failure ./autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/freetype2 || failure cd $ROOT/build/freetype2 || failure
# note: freetype (or sdl?) probably doesn't need *no* configure when static -> ansi build, see readme! # note: freetype (or sdl?) probably doesn't need *no* configure when static -> ansi build, see readme!
$ROOT/3rdparty/freetype2/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/freetype2/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
...@@ -217,6 +229,15 @@ build_generic() ...@@ -217,6 +229,15 @@ build_generic()
make install >> $LOGFILE 2>&1 || failure make install >> $LOGFILE 2>&1 || failure
echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE
echo "Building libxml2 (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/libxml2 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/libxml2 || failure
$ROOT/3rdparty/libxml2/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
make >> $LOGFILE 2>&1 || failure
make install >> $LOGFILE 2>&1 || failure
echo "Successfully built and installed libxml2!" | tee -a $LOGFILE
echo "Patching OGLFT..." | tee -a $LOGFILE echo "Patching OGLFT..." | tee -a $LOGFILE
cd $ROOT/3rdparty/oglft || failure cd $ROOT/3rdparty/oglft || failure
# note: svn has no force/overwrite switch. patched files might not be updated # note: svn has no force/overwrite switch. patched files might not be updated
...@@ -239,7 +260,9 @@ build_generic() ...@@ -239,7 +260,9 @@ build_generic()
echo "Building BOINC (this may take a while)..." | tee -a $LOGFILE echo "Building BOINC (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/boinc || failure cd $ROOT/3rdparty/boinc || failure
chmod +x _autosetup >> $LOGFILE 2>&1 || failure
./_autosetup >> $LOGFILE 2>&1 || failure ./_autosetup >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/boinc || failure cd $ROOT/build/boinc || failure
$ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure
make >> $LOGFILE 2>&1 || failure make >> $LOGFILE 2>&1 || failure
...@@ -262,7 +285,9 @@ build_generic_win32() ...@@ -262,7 +285,9 @@ build_generic_win32()
echo "Building SDL (this may take a while)..." | tee -a $LOGFILE echo "Building SDL (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/sdl || failure cd $ROOT/3rdparty/sdl || failure
chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
./autogen.sh >> $LOGFILE 2>&1 || failure ./autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-sdl-config" ]; then if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-sdl-config" ]; then
SDL_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-sdl-config" SDL_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-sdl-config"
export SDL_CONFIG export SDL_CONFIG
...@@ -281,8 +306,8 @@ build_generic_win32() ...@@ -281,8 +306,8 @@ build_generic_win32()
echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/freetype2 || failure cd $ROOT/3rdparty/freetype2 || failure
chmod +x autogen.sh >> $LOGFILE 2>&1 || failure chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
./autogen.sh >> $LOGFILE 2>&1 || failure ./autogen.sh >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config" ]; then if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config" ]; then
FT_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config" FT_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config"
export FT_CONFIG export FT_CONFIG
...@@ -295,6 +320,20 @@ build_generic_win32() ...@@ -295,6 +320,20 @@ build_generic_win32()
make install >> $LOGFILE 2>&1 || failure make install >> $LOGFILE 2>&1 || failure
echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE
echo "Building libxml2 (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/libxml2 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-libxml-2.0-config" ]; then
LIBXML2_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-libxml-2.0-config"
export LIBXML2_CONFIG
echo "Cross-compile LIBXML2_CONFIG: $LIBXML2_CONFIG" >> $LOGFILE
fi
cd $ROOT/build/libxml2 || failure
$ROOT/3rdparty/libxml2/configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$PREFIX --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
make >> $LOGFILE 2>&1 || failure
make install >> $LOGFILE 2>&1 || failure
echo "Successfully built and installed libxml2!" | tee -a $LOGFILE
echo "Patching OGLFT..." | tee -a $LOGFILE echo "Patching OGLFT..." | tee -a $LOGFILE
cd $ROOT/3rdparty/oglft || failure cd $ROOT/3rdparty/oglft || failure
# note: svn has no force/overwrite switch. patched files might not be updated # note: svn has no force/overwrite switch. patched files might not be updated
...@@ -324,7 +363,9 @@ build_generic_win32() ...@@ -324,7 +363,9 @@ build_generic_win32()
# patch: add graphics2 and customize build path (see below) # patch: add graphics2 and customize build path (see below)
echo "Building BOINC (this may take a while)..." | tee -a $LOGFILE echo "Building BOINC (this may take a while)..." | tee -a $LOGFILE
cd $ROOT/3rdparty/boinc || failure cd $ROOT/3rdparty/boinc || failure
chmod +x _autosetup >> $LOGFILE 2>&1 || failure
./_autosetup >> $LOGFILE 2>&1 || failure ./_autosetup >> $LOGFILE 2>&1 || failure
chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/boinc || failure cd $ROOT/build/boinc || failure
# note: configure is still required but we don't use the generated Makefile # note: configure is still required but we don't use the generated Makefile
$ROOT/3rdparty/boinc/configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$ROOT/install --includedir=$ROOT/install/include --oldincludedir=$ROOT/install/include --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/boinc/configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$ROOT/install --includedir=$ROOT/install/include --oldincludedir=$ROOT/install/include --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment