Skip to content

Commit ea79e53

Browse files
authored
Merge pull request #89 from minhanghuang/dev-script
feat(third_party): Added PROJ-7.1.0 patch file
2 parents 5146eb9 + 782d6fa commit ea79e53

13 files changed

+35
-176
lines changed

.github/workflows/manually-ubuntu20.04-arrch64-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
install: |
2929
apt update
30-
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
30+
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
3131
3232
run: |
3333
echo "-----------------------"

.github/workflows/ubuntu-latest-arrch64-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
install: |
2424
apt update
25-
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
25+
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
2626
2727
run: |
2828
echo "-----------------------"

.github/workflows/ubuntu-latest-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
DEBIAN_FRONTEND: noninteractive
2222
run: |
2323
apt update
24-
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
24+
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
2525
cd /workspace/${{ github.repository }} && python3 install.py
2626
2727
- name: Build

.github/workflows/ubuntu18-arrch64-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
install: |
2828
apt update
29-
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
29+
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
3030
3131
run: |
3232
echo "-----------------------"

.github/workflows/ubuntu20-arrch64-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
install: |
2424
apt update
25-
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
25+
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
2626
2727
run: |
2828
echo "-----------------------"

.github/workflows/ubuntu20-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
DEBIAN_FRONTEND: noninteractive
2222
run: |
2323
apt update
24-
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
24+
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
2525
cd /workspace/${{ github.repository }} && python3 install.py
2626
2727
- name: Build

.github/workflows/ubuntu22-arrch64-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
install: |
2424
apt update
25-
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
25+
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
2626
2727
run: |
2828
echo "-----------------------"

.github/workflows/ubuntu22-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
DEBIAN_FRONTEND: noninteractive
2222
run: |
2323
apt update
24-
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
24+
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
2525
cd /workspace/${{ github.repository }} && python3 install.py
2626
2727
- name: Build

.github/workflows/ubuntu24-v10.0.0-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
DEBIAN_FRONTEND: noninteractive
2222
run: |
2323
apt update
24-
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
24+
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
2525
cd /workspace/${{ github.repository }} && python3 install.py
2626
2727
- name: Build

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ python3 -m pip install protobuf==3.14.0
3232
| protobuf | v3.14.0 | v3.14.0 |
3333
| bvar | | new |
3434
| gperftools | | gperftools-2.8 |
35+
| PROJ | | 7.1.0 |
3536

3637
## #2 Build
3738

install.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,19 @@ def _clone_cmake(self):
126126
except Exception as e:
127127
print("cmake error: {}".format(e))
128128

129-
print("CMake version is less than 3.20, start installation")
130-
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))
129+
cmake_name = "cmake-3.22.0-linux-x86_64"
130+
if "x86_64" == self._machine:
131+
pass
132+
else:
133+
cmake_name = "cmake-3.22.0-linux-aarch64"
134+
print("CMake version is less than 3.20, start installation ({})".format(cmake_name))
135+
self._cmd("wget -t 10 {} -P {}".format("https://cmake.org/files/v3.22/{}.tar.gz".format(cmake_name), self._dowload_path))
131136
os.chdir(self._dowload_path)
132-
self._cmd("tar -zxvf cmake-3.22.0-linux-x86_64.tar.gz")
133-
self._cmd("cp -r cmake-3.22.0-linux-x86_64/bin/* /usr/local/bin")
134-
self._cmd("cp -r cmake-3.22.0-linux-x86_64/doc/* /usr/local/doc")
135-
self._cmd("cp -r cmake-3.22.0-linux-x86_64/share/* /usr/local/share")
136-
self._cmd("rm -rf cmake-3.22.0-linux-x86_64*")
137+
self._cmd("tar -zxvf {}.tar.gz".format(cmake_name))
138+
self._cmd("cp -r {}/bin/* /usr/local/bin".format(cmake_name))
139+
self._cmd("cp -r {}/doc/* /usr/local/doc".format(cmake_name))
140+
self._cmd("cp -r {}/share/* /usr/local/share".format(cmake_name))
141+
self._cmd("rm -rf {}*".format(cmake_name))
137142
self._cmd("sudo ldconfig")
138143
self._cmd("cmake --version")
139144
os.chdir(self._current_path)
@@ -198,6 +203,7 @@ def _clone_proj(self):
198203
"--depth=1"
199204
)
200205
os.chdir(os.path.join(self._dowload_path, "PROJ"))
206+
self._cmd("patch -p1 < {}".format(os.path.join(self._current_path,"scripts/PROJ-7.1.0.patch")))
201207
self._cmd("mkdir -p build")
202208
os.chdir("build")
203209
self._cmd(

scripts/PROJ-7.1.0.patch

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/proj_json_streaming_writer.hpp b/src/proj_json_streaming_writer.hpp
2+
index 6267684..163da43 100644
3+
--- a/src/proj_json_streaming_writer.hpp
4+
+++ b/src/proj_json_streaming_writer.hpp
5+
@@ -33,6 +33,7 @@
6+
7+
#include <vector>
8+
#include <string>
9+
+#include <cstdint>
10+
11+
#define CPL_DLL
12+

scripts/install.sh

-160
This file was deleted.

0 commit comments

Comments
 (0)