From 29583196dfae2565a35c7a8759cc8a5640d6a2b1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 9 Feb 2020 00:53:35 +0100 Subject: Use relative directory to locate PROJ resource files. Fixes #1490 This is an extension of the Window-specific logic added recently to Unix builds. This reuses parts of proposed past commit https://github.com/OSGeo/PROJ/pull/1517/commits/82a07e51c6e24ddb936d131ababe29f1ac36ef14 (credits to @abellgithub) --- travis/install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'travis') diff --git a/travis/install.sh b/travis/install.sh index 953a7f0b..b0c16881 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -82,6 +82,14 @@ if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then cd .. + if [ $TRAVIS_OS_NAME != "osx" ]; then + # Check that we can retrieve the resource directory in a relative way after renaming the installation prefix + mkdir /tmp/proj_autoconf_install_from_dist_all_renamed + mv /tmp/proj_autoconf_install_from_dist_all /tmp/proj_autoconf_install_from_dist_all_renamed/subdir + LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory || /bin/true + LD_LIBRARY_PATH=/tmp/proj_autoconf_install_from_dist_all_renamed/subdir/lib /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory 2>/dev/null | grep "Downloading from https://cdn.proj.org into /tmp/proj_autoconf_install_from_dist_all_renamed/subdir/share/proj" + fi + # cmake build from generated tarball mkdir build_cmake cd build_cmake @@ -92,6 +100,14 @@ if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then find /tmp/proj_cmake_install cd .. + if [ $TRAVIS_OS_NAME != "osx" ]; then + # Check that we can retrieve the resource directory in a relative way after renaming the installation prefix + mkdir /tmp/proj_cmake_install_renamed + mv /tmp/proj_cmake_install /tmp/proj_cmake_install_renamed/subdir + /tmp/proj_cmake_install_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory || /bin/true + /tmp/proj_cmake_install_renamed/subdir/bin/projsync --source-id ? --dry-run --system-directory 2>/dev/null | grep "Downloading from https://cdn.proj.org into /tmp/proj_cmake_install_renamed/subdir/share/proj" + fi + # return to root cd ../.. fi -- cgit v1.2.3