Skip to content

Instantly share code, notes, and snippets.

@robe2
Last active Dec 19, 2015
Embed
What would you like to do?
Building pointcloud under mingw64gcc48 (http://www.bostongis.com/postgisstuff/ming64gcc48.7z)
export OS_BUILD=64
export GCC_TYPE=gcc48
PROJECTS=/projects
if [[ "${OS_BUILD}" == "" && "$1" == "" ]] ; then
echo "Usage: makedependencies OS_BUILD"
echo " OS_BUILD = 32|64"
echo " or export OS_BUILD=xx"
exit 1
fi
if [[ "${OS_BUILD}" == "64" ]] ; then
export MINGHOST=x86_64-w64-mingw32
export PG_BITS=
else
export MINGHOST=i686-w64-mingw32
export PG_BITS=w32
fi
CMAKE_PATH=/cmake
cd ${PROJECTS}
export PATH="/mingw/bin:/mingw/include:/c/Windows/system32:/cmake/bin:/bin"
export PATHOLD="/mingw/bin:/mingw/include:/c/Windows/system32:/cmake/bin:/bin"
export PG_VER=9.3
export PGPATH=${PROJECTS}/postgresql/rel/pg${PG_VER}w${OS_BUILD}${GCC_TYPE}
export PGPATHEDB=${PROJECTS}/postgresql/rel/pg${PG_VER}edbw${OS_BUILD}${GCC_TYPE}
export PATH="${PGPATH}:${PATH}"
cd ${PROJECTS}/postgis
mkdir pointcloud
ZLIB_VER=1.2.8
#-- build zlib --
if true; then
mkdir ${PROJECTS}/zlib
cd ${PROJECTS}/zlib
wget http://zlib.net/zlib-${ZLIB_VER}.tar.gz
rm -rf zlib-${ZLIB_VER}
tar xvf zlib-${ZLIB_VER}.tar.gz
cd zlib-${ZLIB_VER}
make clean -f win32/Makefile.gcc
make -f win32/Makefile.gcc
rm -rf ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}
mkdir ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}
mkdir ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin
mkdir ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/include
mkdir ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib
cp *.dll ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin
cp *.exe ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin
cp *.h ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/include
cp *.a ${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib
fi
#-- build pointcloud extension --
if true; then
export LIBXML_VER=2.7.8
cd ${PROJECTS}/postgis/pointcloud
export PATH="${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/include:${PGPATH}/include:${PGPATH}/bin:${PATH}"
rm -rf pointcloud
#export PATH="${PGPATH}:${PATHOLD}:${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin" #${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin:
git clone -b master https://github.com/pramsey/pointcloud.git
cd pointcloud
git pull
make clean
sh autogen.sh
export CPPFLAGS="-I${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/include -I${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/include"
export LDFLAGS="-L${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib -L${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/lib"
export LIBS="-L${PROJECTS}/zlib/rel-${ZLIB_VER}w${OS_BUILD}${GCC_TYPE}/lib -L${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/lib"
./configure --host=${MINGHOST} --build=${MINGHOST} --target=${MINGHOST} --with-xml2config=${PROJECTS}/libxml/rel-libxml2-${LIBXML_VER}w${OS_BUILD}${GCC_TYPE}/bin/xml2-config \
--with-pgconfig=${PGPATH}/bin/pg_config
make | tee > /c/pointcloud.log
make install
make check
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment