Merge pull request #1782 from openscad/ppc64buildfix2016

Ppc64buildfix2016
This commit is contained in:
Marius Kintel 2016-09-01 22:33:57 -04:00 committed by GitHub
commit 4272a97d76
3 changed files with 52 additions and 21 deletions

View file

@ -189,10 +189,12 @@ build_harfbuzz()
fi
tar xzf "harfbuzz-$version.tar.gz"
cd "harfbuzz-$version"
# we do not need gtkdocize
sed -e "s/gtkdocize/echo/g" autogen.sh > autogen.sh.bak && mv autogen.sh.bak autogen.sh
# disable doc directories as they make problems on Mac OS Build
sed -e "s/SUBDIRS = src util test docs/SUBDIRS = src util test/g" Makefile.am > Makefile.am.bak && mv Makefile.am.bak Makefile.am
sed -e "s/^docs.*$//" configure.ac > configure.ac.bak && mv configure.ac.bak configure.ac
./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
sh ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
make -j$NUMCPU
make install
}

View file

@ -183,7 +183,7 @@ build_qt5scintilla2()
echo "Building Qt5Scintilla2" $version "..."
cd $BASEDIR/src
#rm -rf QScintilla-gpl-$version.tar.gz
rm -rf ./QScintilla-gpl-$version.tar.gz
if [ ! -f QScintilla-gpl-$version.tar.gz ]; then
curl -L -o "QScintilla-gpl-$version.tar.gz" "http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla-gpl-$version.tar.gz?use_mirror=switch"
fi
@ -192,9 +192,28 @@ build_qt5scintilla2()
qmake CONFIG+=staticlib
tmpinstalldir=$DEPLOYDIR/tmp/qsci$version
INSTALL_ROOT=$tmpinstalldir make -j"$NUMCPU" install
cp -av $tmpinstalldir/usr/share $DEPLOYDIR/
cp -av $tmpinstalldir/usr/include $DEPLOYDIR/
cp -av $tmpinstalldir/usr/lib $DEPLOYDIR/
if [ -d $tmpinstalldir/usr/share ]; then
cp -av $tmpinstalldir/usr/share $DEPLOYDIR/
cp -av $tmpinstalldir/usr/include $DEPLOYDIR/
cp -av $tmpinstalldir/usr/lib $DEPLOYDIR/
fi
if [ ! -e $DEPLOYDIR/include/Qsci ]; then
# workaround numerous bugs in qscintilla build system, see
# ../qscintilla2.prf and ../scintilla.pri for more info
qsci_staticlib=`find $tmpinstalldir -name libqscintilla2.a`
qsci_include=`find $tmpinstalldir -name Qsci`
if [ -e $qsci_staticlib ]; then
cp -av $qsci_include $DEPLOYDIR/include/
cp -av $qsci_staticlib $DEPLOYDIR/lib/
else
echo problems finding built qscintilla libraries and include headers
fi
if [ -e $DEPLOYDIR/lib/libqscintilla2.a ]; then
cp $DEPLOYDIR/lib/libqscintilla2.a $DEPLOYDIR/lib/libqt5scintilla2.a
fi
fi
}
build_bison()
@ -757,7 +776,8 @@ mkdir -p $SRCDIR $DEPLOYDIR
# they are installed under $BASEDIR/bin which we have added to our PATH
if [ ! "`command -v curl`" ]; then
build_curl 7.26.0
# to prevent "end of file" NSS error -5938 (ssl) use a newer version of curl
build_curl 7.49.0
fi
if [ ! "`command -v bison`" ]; then
@ -792,6 +812,10 @@ if [ $1 ]; then
build_qt4 4.8.4
exit $?
fi
if [ $1 = "qt5scintilla2" ]; then
build_qt5scintilla2 2.8.3
exit $?
fi
if [ $1 = "qt5" ]; then
build_qt5 5.3.1
build_qt5scintilla2 2.8.3
@ -809,7 +833,7 @@ if [ $1 ]; then
fi
if [ $1 = "harfbuzz" ]; then
# debian 7 lacks only harfbuzz
build_harfbuzz 0.9.23 --with-glib=yes
build_harfbuzz 0.9.35 --with-glib=yes
exit $?
fi
if [ $1 = "glib2" ]; then
@ -846,10 +870,10 @@ build_gettext 0.18.3.1
build_glib2 2.38.2
# the following are only needed for text()
build_freetype 2.5.0.1 --without-png
build_freetype 2.6.1 --without-png
build_libxml2 2.9.1
build_fontconfig 2.11.0 --with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts
build_ragel 6.9
build_harfbuzz 0.9.23 --with-glib=yes
build_harfbuzz 0.9.35 --with-glib=yes
echo "OpenSCAD dependencies built and installed to " $BASEDIR

View file

@ -548,27 +548,21 @@ if (HARFBUZZ_VERSION)
message(STATUS "harfbuzz ${HARFBUZZ_VERSION} found: ${HARFBUZZ_INCLUDE_DIRS}")
endif()
# FindLibXml2.cmake uses pkgconfig so keep this inside our own pkgconfig section
# in case we had to build libxml2 ourselves under $OPENSACD_LIBRARIES builddir
find_package(LibXml2 2.9 REQUIRED)
add_definitions(${LIBXML2_DEFINITIONS})
inclusion(LIBXML2_DIR LIBXML2_INCLUDE_DIR)
restore_pkg_config_env()
add_definitions(${FONTCONFIG_CFLAGS})
add_definitions(${FREETYPE_CFLAGS})
add_definitions(${HARFBUZZ_CFLAGS})
find_package(LibXml2 2.9 REQUIRED)
add_definitions(${LIBXML2_DEFINITIONS})
inclusion(LIBXML2_DIR LIBXML2_INCLUDE_DIR)
# Image comparison - expected test image vs actual generated image
if (DIFFPNG)
# How to set cflags to optimize the executable?
set(IMAGE_COMPARE_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/diffpng)
set(COMPARATOR "diffpng")
add_executable(diffpng diffpng.cpp ../src/lodepng.cpp)
set(SKIP_IMAGEMAGICK 1)
message(STATUS "using diffpng for image comparison")
endif()
# Imagemagick
if (SKIP_IMAGEMAGICK)
@ -583,8 +577,12 @@ else()
set(IMAGE_COMPARE_EXECUTABLE ${ImageMagick_convert_EXECUTABLE})
else()
message(STATUS "Couldn't find imagemagick 'convert' program")
set(IMAGEMAGICK_NOBINARY 1)
set(DIFFPNG 1)
endif()
endif()
if ( not ${IMAGEMACIK_NOBINARY} )
if ( "${ImageMagick_VERSION_STRING}" VERSION_LESS "6.5.9.4" )
message(STATUS "ImageMagick version less than 6.5.9.4, cannot use -morphology comparison")
message(STATUS "ImageMagick Using older image comparison method")
@ -612,6 +610,13 @@ else()
endif()
endif()
if ( ${DIFFPNG} )
set(IMAGE_COMPARE_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/diffpng)
set(COMPARATOR "diffpng")
add_executable(diffpng diffpng.cpp ../src/lodepng.cpp)
message(STATUS "using diffpng for image comparison")
endif()
# Internal includes
include_directories(../src ../src/libtess2/Include)