126 Star 46 Fork 158

openGauss/openGauss-third_party

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
PostGIS_build_install.sh 2.62 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxubo 提交于 2021-09-19 14:24 +08:00 . update 3rd version
postgis_dir=`cd $(dirname $0); pwd`;
gplsrc_dir=$postgis_dir/gplsrc
bundle_file="${postgis_dir}/postgis-bundle.tar.bz2"
test -d ${gplsrc_dir} || mkdir ${gplsrc_dir}
if [ -f $bundle_file ]; then
rm -fr ${gplsrc_dir}/*
tar -C ${gplsrc_dir} -xjf $bundle_file
fi
if [ $(uname -m) = "aarch64" ]; then
build_type="--build=aarch64-unknown-linux-gnu"
fi
#(1)
cd $gplsrc_dir/geos-3.6.2
chmod +x ./configure
./configure ${build_type} --prefix=$GAUSSHOME/install/geos
make -sj
if [ $? != 0 ]; then
echo "ERROR: Failed to build geos."
exit 1
fi
make install
#(2)
cd $gplsrc_dir/proj-4.9.2
chmod +x ./configure
./configure --prefix=$GAUSSHOME/install/proj
make -sj
if [ $? != 0 ]; then
echo "ERROR: Failed to build proj."
exit 1
fi
make install
#(3)
cd $gplsrc_dir/json-c-json-c-0.12.1-20160607
chmod +x ./configure
./configure --prefix=$GAUSSHOME/install/json
touch aclocal.m4
touch Makefile.in
touch config.h.in
touch configure
touch Makefile
make -sj
if [ $? != 0 ]; then
echo "ERROR: Failed to build json-c."
exit 1
fi
make install
#(4)
cd $gplsrc_dir/libxml2-2.7.1
chmod +x ./configure
./configure ${build_type} --prefix=$GAUSSHOME/install/libxml2
make -sj
if [ $? != 0 ]; then
echo "ERROR: Failed to build libxml2."
exit 1
fi
make install
#(5)
cd $gplsrc_dir/gdal-1.11.0
chmod +x ./configure
chmod +x ./install-sh
./configure ${build_type} --prefix=$GAUSSHOME/install/gdal --with-xml2=$GAUSSHOME/install/libxml2/bin/xml2-config --with-geos=$GAUSSHOME/install/geos/bin/geos-config --with-static_proj4=$GAUSSHOME/install/proj CFLAGS='-O2 -fpermissive -pthread'
make -sj
make || make
if [ $? != 0 ]; then
echo "ERROR: Failed to build gdal."
exit 1
fi
make install
#(-1)
cd $gplsrc_dir/postgis-2.4.2
cp $postgis_dir/../extension_dependency.h $GAUSSHOME/include/postgresql/server/extension_dependency.h
cp $GAUSSHOME/lib/postgresql/pgxs/src/Makefile.global $GAUSSHOME/lib/postgresql/pgxs/src/Makefile.global.$(date +%Y%m%d%H%M)
sed -i -e 's/-Werror//g' $GAUSSHOME/lib/postgresql/pgxs/src/Makefile.global
patch -p5 < $postgis_dir/postgis_2.4.2-1.patch
chmod +x ./configure
./configure --prefix=$GAUSSHOME/install/pggis2.4.2 --with-pgconfig=$GAUSSHOME/bin/pg_config --with-projdir=$GAUSSHOME/install/proj --with-geosconfig=$GAUSSHOME/install/geos/bin/geos-config --with-jsondir=$GAUSSHOME/install/json --with-xml2config=$GAUSSHOME/install/libxml2/bin/xml2-config --with-raster --with-gdalconfig=$GAUSSHOME/install/gdal/bin/gdal-config --with-topology --without-address-standardizer CFLAGS='-O2 -fpermissive -DPGXC -pthread -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -DMEMORY_CONTEXT_CHECKING -w' CC=g++
make -sj
make install -sj
sh $postgis_dir/PostGIS_install_local.sh
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opengauss/openGauss-third_party.git
git@gitee.com:opengauss/openGauss-third_party.git
opengauss
openGauss-third_party
openGauss-third_party
master

搜索帮助