Skip to content

Commit

Permalink
Merge pull request #89 from minhanghuang/dev-script
Browse files Browse the repository at this point in the history
feat(third_party): Added PROJ-7.1.0 patch file
  • Loading branch information
minhanghuang authored Jan 19, 2025
2 parents 5146eb9 + 782d6fa commit ea79e53
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-latest-arrch64-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-latest-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
cd /workspace/${{ github.repository }} && python3 install.py
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu18-arrch64-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu20-arrch64-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu20-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
cd /workspace/${{ github.repository }} && python3 install.py
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu22-arrch64-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

install: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
run: |
echo "-----------------------"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu22-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
cd /workspace/${{ github.repository }} && python3 install.py
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu24-v10.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
apt install -y sudo lsb-release git wget libcurl4-openssl-dev pkg-config g++ cmake uuid-dev libncurses5-dev python3-dev autoconf automake libtool libeigen3-dev libtiff-dev libsqlite3-dev sqlite3
cd /workspace/${{ github.repository }} && python3 install.py
- name: Build
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ python3 -m pip install protobuf==3.14.0
| protobuf | v3.14.0 | v3.14.0 |
| bvar | | new |
| gperftools | | gperftools-2.8 |
| PROJ | | 7.1.0 |

## #2 Build

Expand Down
20 changes: 13 additions & 7 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,19 @@ def _clone_cmake(self):
except Exception as e:
print("cmake error: {}".format(e))

print("CMake version is less than 3.20, start installation")
self._cmd("wget -t 10 {} -P {}".format("https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz",self._dowload_path))
cmake_name = "cmake-3.22.0-linux-x86_64"
if "x86_64" == self._machine:
pass
else:
cmake_name = "cmake-3.22.0-linux-aarch64"
print("CMake version is less than 3.20, start installation ({})".format(cmake_name))
self._cmd("wget -t 10 {} -P {}".format("https://cmake.org/files/v3.22/{}.tar.gz".format(cmake_name), self._dowload_path))
os.chdir(self._dowload_path)
self._cmd("tar -zxvf cmake-3.22.0-linux-x86_64.tar.gz")
self._cmd("cp -r cmake-3.22.0-linux-x86_64/bin/* /usr/local/bin")
self._cmd("cp -r cmake-3.22.0-linux-x86_64/doc/* /usr/local/doc")
self._cmd("cp -r cmake-3.22.0-linux-x86_64/share/* /usr/local/share")
self._cmd("rm -rf cmake-3.22.0-linux-x86_64*")
self._cmd("tar -zxvf {}.tar.gz".format(cmake_name))
self._cmd("cp -r {}/bin/* /usr/local/bin".format(cmake_name))
self._cmd("cp -r {}/doc/* /usr/local/doc".format(cmake_name))
self._cmd("cp -r {}/share/* /usr/local/share".format(cmake_name))
self._cmd("rm -rf {}*".format(cmake_name))
self._cmd("sudo ldconfig")
self._cmd("cmake --version")
os.chdir(self._current_path)
Expand Down Expand Up @@ -198,6 +203,7 @@ def _clone_proj(self):
"--depth=1"
)
os.chdir(os.path.join(self._dowload_path, "PROJ"))
self._cmd("patch -p1 < {}".format(os.path.join(self._current_path,"scripts/PROJ-7.1.0.patch")))
self._cmd("mkdir -p build")
os.chdir("build")
self._cmd(
Expand Down
12 changes: 12 additions & 0 deletions scripts/PROJ-7.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/proj_json_streaming_writer.hpp b/src/proj_json_streaming_writer.hpp
index 6267684..163da43 100644
--- a/src/proj_json_streaming_writer.hpp
+++ b/src/proj_json_streaming_writer.hpp
@@ -33,6 +33,7 @@

#include <vector>
#include <string>
+#include <cstdint>

#define CPL_DLL

160 changes: 0 additions & 160 deletions scripts/install.sh

This file was deleted.

0 comments on commit ea79e53

Please sign in to comment.