File: proj-compile.sh

package info (click to toggle)
python-pyproj 3.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,720 kB
  • sloc: python: 13,468; sh: 273; makefile: 90
file content (34 lines) | stat: -rwxr-xr-x 842 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
pushd .
echo "Building PROJ ($1) from source..."
BUILD_PROJ_DIR=proj-${1:0:5}
# Download PROJ
if [[ $1 == "git" ]]; then
  git clone https://github.com/OSGeo/PROJ.git ${BUILD_PROJ_DIR}
else
  curl https://download.osgeo.org/proj/proj-$1.tar.gz > ${BUILD_PROJ_DIR}.tar.gz
  tar zxf ${BUILD_PROJ_DIR}.tar.gz
  rm ${BUILD_PROJ_DIR}.tar.gz
fi
cd ${BUILD_PROJ_DIR}
mkdir build
cd build
# build using cmake
cmake .. \
    -DCMAKE_INSTALL_PREFIX=$PROJ_DIR \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DENABLE_IPO=ON \
    -DBUILD_CCT:BOOL=OFF \
    -DBUILD_CS2CS:BOOL=OFF \
    -DBUILD_GEOD:BOOL=OFF \
    -DBUILD_GIE:BOOL=OFF \
    -DBUILD_GMOCK:BOOL=OFF \
    -DBUILD_PROJINFO:BOOL=OFF \
    -DBUILD_TESTING:BOOL=OFF
cmake --build . -j$(nproc)
cmake --install .
# cleanup
cd ../..
rm -rf ${BUILD_PROJ_DIR}
popd