Created
January 9, 2019 15:36
-
-
Save emxsys/20828338c291c4b5e7d4cacb69393324 to your computer and use it in GitHub Desktop.
Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# =============================================================================== | |
# Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3 | |
# =============================================================================== | |
# Unzip the ECW library to the current folder | |
# - ftp://ftp.ii.net/pub/gentoo/distfiles/libecwj2-3.3-2006-09-06.zip | |
unzip libecwj2-3.3-2006-09-06.zip | |
# Unzip the ECW cummulative patches from GDAL | |
# - https://trac.osgeo.org/gdal/attachment/wiki/ECW/libecwj2-3.3.patch | |
unzip libecwj2-3.3-patch.zip | |
### Build the library and install in specified folder (e.g. /usr/local/libecwj2-3.3) | |
libpath="/usr/local/lib/libecwj2-3.3" | |
cd libecwj2-3.3 | |
echo Applying cumulative patch | |
patch -b -p1 < ../libecwj2-3.3.patch | |
# The include folder must preexist in the target folder (e.g. /usr/local/libecwj2-3.3) | |
if [ ! -d ${libpath}"/include" ]; then | |
echo Creating include folder at $libpath | |
sudo mkdir -p ${libpath}"/include" | |
fi | |
echo Configuring the build | |
./configure --prefix=${libpath} | |
echo Running make | |
make | |
echo Running make install | |
sudo make install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment