Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix jpeg install instruction for Mac OS #254

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions ci-utils/install_prereq_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ if [[ $BUILD_Z5_DEP -eq 1 ]]; then
fi


if [[ $BULD_DCMTK_DEP -eq 1 ]]; then
JPEG_INSTALL_PATH=$PWD
curl -L http://www.ijg.org/files/jpegsrc.v9e.tar.gz -o jpegsrc.v9e.tar.gz
tar -xzf jpegsrc.v9e.tar.gz
cd jpeg-9e
./configure --prefix=
make DESTDIR="$JPEG_INSTALL_PATH"/"$LOCAL_INSTALL_DIR" install
./libtool --finish "$JPEG_INSTALL_PATH"/"$LOCAL_INSTALL_DIR"/lib
cd ..
curl -L https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.1.0.zip -o 3.1.0.zip
unzip 3.1.0.zip
cd libjpeg-turbo-3.1.0
mkdir build_man
cd build_man
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ ..
make install -j4
cd ../../

if [[ $BULD_DCMTK_DEP -eq 1 ]]; then
curl -L https://github.com/glennrp/libpng/archive/refs/tags/v1.6.39.zip -o v1.6.39.zip
unzip v1.6.39.zip
cd libpng-1.6.39
Expand Down Expand Up @@ -184,17 +184,21 @@ cd ../../

for i in {1..5}
do
curl -L https://download.osgeo.org/libtiff/tiff-4.6.0.zip -o tiff-4.6.0.zip
if [ -f "tiff-4.6.0.zip" ] ; then
curl -L https://download.osgeo.org/libtiff/tiff-4.7.0.zip -o tiff-4.7.0.zip
if [ -f "tiff-4.7.0.zip" ] ; then
break
fi
done

unzip tiff-4.6.0.zip
cd tiff-4.6.0
unzip tiff-4.7.0.zip
cd tiff-4.7.0
mkdir build_man
cd build_man
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ ..
if [[ "$OSTYPE" == "darwin"* ]]; then
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ -DJPEG_LIBRARY_RELEASE=../../"$LOCAL_INSTALL_DIR"/lib/libjpeg.dylib -DJPEG_INCLUDE_DIRS=../../"$LOCAL_INSTALL_DIR"/include ..
else
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ ..
fi
make install -j4
cd ../../

Expand All @@ -212,7 +216,11 @@ if [[ $BULD_DCMTK_DEP -eq 1 ]]; then
cd ..
mkdir build_man
cd build_man
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ -DDCMTK_WITH_ICONV=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_APPS=OFF ..
if [[ "$OSTYPE" == "darwin"* ]]; then
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ -DDCMTK_WITH_ICONV=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_APPS=OFF -DJPEG_LIBRARY_RELEASE=../../"$LOCAL_INSTALL_DIR"/lib/libjpeg.dylib -DJPEG_INCLUDE_DIRS=../../"$LOCAL_INSTALL_DIR"/include ..
else
cmake -DCMAKE_INSTALL_PREFIX=../../"$LOCAL_INSTALL_DIR"/ -DCMAKE_PREFIX_PATH=../../"$LOCAL_INSTALL_DIR"/ -DDCMTK_WITH_ICONV=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_APPS=OFF ..
fi
make install -j4
cd ../../

Expand Down
18 changes: 14 additions & 4 deletions ci-utils/install_prereq_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,25 @@ cmake --build . --config Release --target install --parallel 4
popd
popd

curl -L https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.1.0.zip -o 3.1.0.zip
tar -xf 3.1.0.zip
pushd libjpeg-turbo-3.1.0
mkdir build_man
pushd build_man
cmake -DCMAKE_INSTALL_PREFIX=../../local_install/ -DCMAKE_PREFIX_PATH=../../local_install/ ..
cmake --build . --config Release --target install --parallel 4
popd
popd

for /l %%x in (1, 1, 5) do (
curl -L https://download.osgeo.org/libtiff/tiff-4.6.0.zip -o tiff-4.6.0.zip
if exist tiff-4.6.0.zip (
curl -L https://download.osgeo.org/libtiff/tiff-4.7.0.zip -o tiff-4.7.0.zip
if exist tiff-4.7.0.zip (
goto :continue_tiff
)
)
:continue_tiff
tar -xf tiff-4.6.0.zip
pushd tiff-4.6.0
tar -xf tiff-4.7.0.zip
pushd tiff-4.7.0
mkdir build_man
pushd build_man
cmake -DCMAKE_INSTALL_PREFIX=../../local_install/ -DCMAKE_PREFIX_PATH=../../local_install/ ..
Expand Down
Loading