mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-25 15:04:30 +00:00
Backport various CI & documentation changes to v0.7.x
(#443)
* Support for Mapnik >= 4 no longer using boost:optional * Backport Address macOS build errors in src/render_submit_queue.c * Backport GitHub Actions workflows and actions * Backport cmake, docker & docs/build directories * Backport changes to CMakeLists.txt
This commit is contained in:
4
.github/actions/autotools/install/action.yml
vendored
4
.github/actions/autotools/install/action.yml
vendored
@ -3,9 +3,9 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Run `make install`
|
||||
run: make install
|
||||
run: ${{ !matrix.image && 'sudo -E' || '' }} make install
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Run `make install-mod_tile`
|
||||
run: make install-mod_tile
|
||||
run: ${{ !matrix.image && 'sudo -E' || '' }} make install-mod_tile
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
12
.github/actions/cmake/build/action.yml
vendored
12
.github/actions/cmake/build/action.yml
vendored
@ -2,19 +2,15 @@
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Create `cmake` symbolic link
|
||||
run: |
|
||||
if ! command -v cmake &> /dev/null && command -v cmake3 &> /dev/null; then
|
||||
ln --symbolic cmake3 /usr/bin/cmake
|
||||
fi
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Prepare `build` directory
|
||||
run: |
|
||||
cmake -B build -S . \
|
||||
-LA \
|
||||
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE:-Release} \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX:-/usr/local} \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${INSTALL_LOCALSTATEDIR:-/var} \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX:-/usr} \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=${INSTALL_RUNSTATEDIR:-/run} \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${INSTALL_SYSCONFDIR:-/etc} \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
|
42
.github/actions/cmake/package/action.yml
vendored
Normal file
42
.github/actions/cmake/package/action.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Set `CPACK_PACKAGE_FILE_NAME`
|
||||
run: |
|
||||
echo "CPACK_PACKAGE_FILE_NAME=mod_tile-${GITHUB_SHA}-$(echo ${{ matrix.image || matrix.os || matrix.box_generic || github.job }}-${{ matrix.build_system }}-${{ matrix.compiler }} | sed 's/[^0-9a-zA-Z-]/_/g')" >> ${GITHUB_ENV}
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Set `CPACK_OPTIONS`
|
||||
run: |
|
||||
if command -v dpkg; then
|
||||
echo "CPACK_OPTIONS= -G DEB" >> ${GITHUB_ENV}
|
||||
elif command -v rpm; then
|
||||
echo "CPACK_OPTIONS=-G RPM" >> ${GITHUB_ENV}
|
||||
elif [ -f /etc/os-release ]; then
|
||||
source /etc/os-release
|
||||
if [ "$ID" = "freebsd" ]; then
|
||||
echo "CPACK_OPTIONS=-D CPACK_SET_DESTDIR=1 -G FREEBSD" >> ${GITHUB_ENV}
|
||||
fi
|
||||
elif [[ ${OSTYPE} == 'darwin'* ]]; then
|
||||
echo "CPACK_OPTIONS=-D CPACK_SET_DESTDIR=1 -G DragNDrop" >> ${GITHUB_ENV}
|
||||
else
|
||||
echo "CPACK_OPTIONS=-D CPACK_SET_DESTDIR=1 -G TGZ" >> ${GITHUB_ENV}
|
||||
fi
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Package `mod_tile`
|
||||
run: |
|
||||
${{ !matrix.image && 'sudo' || '' }} cpack ${CPACK_OPTIONS} \
|
||||
-D CPACK_PACKAGE_FILE_NAME="${CPACK_PACKAGE_FILE_NAME}" || true
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
working-directory: build
|
||||
|
||||
- name: Upload `mod_tile` package artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: ignore
|
||||
name: Package Artifacts - ${{ env.CPACK_PACKAGE_FILE_NAME }}${{ matrix.mapnik_latest && ' (Latest Mapnik)' || '' }}
|
||||
path: |
|
||||
build/${{ env.CPACK_PACKAGE_FILE_NAME }}.*
|
||||
retention-days: 14
|
36
.github/actions/cmake/test/action.yml
vendored
36
.github/actions/cmake/test/action.yml
vendored
@ -1,31 +1,27 @@
|
||||
---
|
||||
inputs:
|
||||
options:
|
||||
default: --exclude-regex 'clear_dirs_.+|remove_tile_.+' --output-on-failure
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Create `ctest` symbolic link
|
||||
run: |
|
||||
if ! command -v ctest &> /dev/null && command -v ctest3 &> /dev/null; then
|
||||
ln --symbolic ctest3 /usr/bin/ctest
|
||||
fi
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Test `mod_tile`
|
||||
run: ctest --exclude-regex 'clear_dirs|remove_tiles' --output-on-failure
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
working-directory: build
|
||||
|
||||
- name: Archive test artifacts on failure
|
||||
if: failure()
|
||||
run: |
|
||||
TAR_FILENAME=${{ matrix.image || matrix.os || github.job }}-${{ matrix.compiler }}.tar.gz
|
||||
TAR_FILENAME=$(echo "${TAR_FILENAME}" | sed 's/:/-/g')
|
||||
tar -zcf ${TAR_FILENAME} tests
|
||||
export CTEST_PARALLEL_LEVEL=${TEST_PARALLEL_LEVEL:-$(nproc)}
|
||||
ctest ${{ inputs.options }}
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
working-directory: build
|
||||
|
||||
- name: Upload test artifacts on failure
|
||||
- name: Set `TEST_ARTIFACT_NAME`
|
||||
run: |
|
||||
echo "TEST_ARTIFACT_NAME=$(echo ${{ matrix.image || matrix.os || matrix.box_generic || github.job }}-${{ matrix.build_system }}-${{ matrix.compiler }} | sed 's/[^0-9a-zA-Z-]/_/g')" >> ${GITHUB_ENV}
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
- name: Upload `mod_tile` test artifacts on failure
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Test Artifacts
|
||||
path: build/*.tar.gz
|
||||
name: Test Artifacts - ${{ env.TEST_ARTIFACT_NAME }}
|
||||
path: build/tests
|
||||
if: failure()
|
||||
|
65
.github/actions/coverage/action.yml
vendored
Normal file
65
.github/actions/coverage/action.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
inputs:
|
||||
genhtml-extra-options:
|
||||
default: ""
|
||||
lcov-extra-options:
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Process `mod_tile` coverage results with CTest
|
||||
run: |
|
||||
ctest -T coverage || true
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
working-directory: build
|
||||
if: matrix.build_system == 'CMake'
|
||||
|
||||
- name: Process `mod_tile` coverage results
|
||||
run: |
|
||||
lcov ${{ inputs.lcov-extra-options }} \
|
||||
--base-directory . \
|
||||
--capture \
|
||||
--directory ${{ matrix.build_system == 'CMake' && 'build' || '.' }} \
|
||||
--output-file coverage.info \
|
||||
--rc geninfo_unexecuted_blocks=1
|
||||
lcov ${{ inputs.lcov-extra-options }} \
|
||||
--ignore-errors unused \
|
||||
--output-file coverage.info \
|
||||
--remove coverage.info \
|
||||
"${GITHUB_WORKSPACE}/includes/*" \
|
||||
"${GITHUB_WORKSPACE}/tests/*" \
|
||||
"/usr/*"
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Report `mod_tile` coverage results to `codecov.io`
|
||||
uses: codecov/codecov-action@v3.1.5
|
||||
with:
|
||||
files: coverage.info
|
||||
|
||||
- name: Write `mod_tile` coverage summary to `$GITHUB_STEP_SUMMARY`
|
||||
run: |
|
||||
lcov ${{ inputs.lcov-extra-options }} \
|
||||
--summary \
|
||||
coverage.info | sed 's/^ /* /g' >> ${GITHUB_STEP_SUMMARY}
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Generate `mod_tile` coverage artifacts
|
||||
run: |
|
||||
genhtml ${{ inputs.genhtml-extra-options }} \
|
||||
--output-directory coverage \
|
||||
coverage.info
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Set `COVERAGE_ARTIFACT_NAME`
|
||||
run: |
|
||||
echo "COVERAGE_ARTIFACT_NAME=$(echo ${{ matrix.image || matrix.os || matrix.box_generic || github.job }}-${{ matrix.build_system }}-${{ matrix.compiler }} | sed 's/[^0-9a-zA-Z-]/_/g')" >> ${GITHUB_ENV}
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
||||
- name: Upload `mod_tile` coverage artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Coverage Artifacts - ${{ env.COVERAGE_ARTIFACT_NAME }}${{ matrix.mapnik_latest && ' (Latest Mapnik)' || '' }}
|
||||
path: |
|
||||
coverage
|
||||
coverage.info
|
@ -14,7 +14,7 @@ runs:
|
||||
|
||||
- name: Cache "Download `Mapnik`" & "Build `Mapnik`"
|
||||
id: cache-mapnik-src
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: mapnik-src
|
||||
key: ${{ matrix.image }}-${{ matrix.compiler }}-mapnik-${{ inputs.version }}
|
||||
|
@ -4,12 +4,12 @@ runs:
|
||||
steps:
|
||||
- name: Cache "Checkout `Mapnik`" & "Build `Mapnik`"
|
||||
id: cache-mapnik
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
mapnik-build
|
||||
mapnik-src
|
||||
key: ${{ matrix.image }}-${{ matrix.compiler }}-mapnik-latest
|
||||
key: ${{ matrix.image || matrix.os || matrix.box_generic || github.job }}-${{ matrix.compiler }}-mapnik-latest
|
||||
|
||||
- name: Checkout `Mapnik`
|
||||
uses: actions/checkout@v4
|
||||
@ -23,14 +23,24 @@ runs:
|
||||
run: |
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=${BUILD_PARALLEL_LEVEL:-$(nproc)}
|
||||
cmake -B mapnik-build -S mapnik-src \
|
||||
-DBUILD_BENCHMARK:BOOL=OFF \
|
||||
-DBUILD_DEMO_CPP:BOOL=OFF \
|
||||
-DBUILD_DEMO_VIEWER:BOOL=OFF \
|
||||
-DBUILD_TESTING:BOOL=OFF \
|
||||
-DBUILD_UTILITY_GEOMETRY_TO_WKB:BOOL=OFF \
|
||||
-DBUILD_UTILITY_MAPNIK_INDEX:BOOL=OFF \
|
||||
-DBUILD_UTILITY_MAPNIK_RENDER:BOOL=OFF \
|
||||
-DBUILD_UTILITY_OGRINDEX:BOOL=OFF \
|
||||
-DBUILD_UTILITY_PGSQL2SQLITE:BOOL=OFF \
|
||||
-DBUILD_UTILITY_SHAPEINDEX:BOOL=OFF \
|
||||
-DBUILD_UTILITY_SVG2PNG:BOOL=OFF \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_CXX_STANDARD:STRING=17 \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr
|
||||
cmake --build mapnik-build
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: steps.cache-mapnik.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Install `Mapnik`
|
||||
run: cmake --install mapnik-build
|
||||
run: ${{ !matrix.image && 'sudo' || '' }} cmake --install mapnik-build
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
|
41
.github/actions/dependencies/install/action.yml
vendored
41
.github/actions/dependencies/install/action.yml
vendored
@ -13,7 +13,6 @@ inputs:
|
||||
default: >-
|
||||
cmake
|
||||
git
|
||||
libboost-filesystem-dev
|
||||
libboost-program-options-dev
|
||||
libboost-regex-dev
|
||||
libfreetype6-dev
|
||||
@ -32,6 +31,8 @@ inputs:
|
||||
default: >-
|
||||
apache2
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
fedora-build-dependencies:
|
||||
default: >-
|
||||
cairo-devel
|
||||
@ -47,6 +48,9 @@ inputs:
|
||||
default: >-
|
||||
httpd
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
procps
|
||||
freebsd-build-dependencies:
|
||||
default: >-
|
||||
apache24
|
||||
@ -61,6 +65,8 @@ inputs:
|
||||
freebsd-test-dependencies:
|
||||
default: >-
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
macos-build-dependencies:
|
||||
default: >-
|
||||
apr
|
||||
@ -76,6 +82,8 @@ inputs:
|
||||
default: >-
|
||||
coreutils
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
opensuse-build-dependencies:
|
||||
default: >-
|
||||
apache2-devel
|
||||
@ -92,6 +100,8 @@ inputs:
|
||||
apache2-event
|
||||
apache2-prefork
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
opensuse-mapnik-build-dependencies:
|
||||
default: >-
|
||||
bzip2
|
||||
@ -129,6 +139,9 @@ inputs:
|
||||
default: >-
|
||||
httpd
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
procps
|
||||
rhel-mapnik-build-dependencies:
|
||||
default: >-
|
||||
boost-devel
|
||||
@ -162,7 +175,6 @@ inputs:
|
||||
default: >-
|
||||
cmake
|
||||
git
|
||||
libboost-filesystem-dev
|
||||
libboost-program-options-dev
|
||||
libboost-regex-dev
|
||||
libfreetype6-dev
|
||||
@ -181,17 +193,17 @@ inputs:
|
||||
default: >-
|
||||
apache2
|
||||
jq
|
||||
lcov
|
||||
memcached
|
||||
mapnik-build-version-centos-stream:
|
||||
default: 3.1.0
|
||||
mapnik-build-version-amazonlinux2-centos7:
|
||||
default: 3.0.17
|
||||
mapnik-build-version-opensuse:
|
||||
default: 3.1.0
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install Dependencies (Amazon Linux/CentOS/CentOS Stream)
|
||||
- name: Install Dependencies (CentOS Stream)
|
||||
uses: ./.github/actions/dependencies/install/yum
|
||||
with:
|
||||
dependencies: epel-release
|
||||
@ -199,13 +211,10 @@ runs:
|
||||
${{ inputs.rhel-build-dependencies }}
|
||||
${{ inputs.rhel-mapnik-build-dependencies }}
|
||||
${{ inputs.rhel-test-dependencies }}
|
||||
${{ matrix.build_system == 'CMake' && 'cmake3' || 'autoconf automake redhat-rpm-config' }}
|
||||
${{ matrix.build_system == 'CMake' && 'cmake' || 'autoconf automake redhat-rpm-config' }}
|
||||
${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc gcc-c++' }}
|
||||
${{ matrix.image == 'centos:7' && matrix.compiler == 'LLVM' && 'gcc-c++' || '' }}
|
||||
if: |
|
||||
startsWith(matrix.image, 'amazonlinux:') ||
|
||||
startsWith(matrix.image, 'centos:') ||
|
||||
startsWith(matrix.image, 'quay.io/centos/centos:stream')
|
||||
rpm-build
|
||||
if: startsWith(matrix.image, 'quay.io/centos/centos:stream')
|
||||
|
||||
- name: Install Dependencies (Debian)
|
||||
uses: ./.github/actions/dependencies/install/apt-get
|
||||
@ -226,6 +235,7 @@ runs:
|
||||
${{ inputs.fedora-test-dependencies }}
|
||||
${{ matrix.build_system == 'CMake' && 'cmake' || 'autoconf automake redhat-rpm-config' }}
|
||||
${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc gcc-c++' }}
|
||||
rpm-build
|
||||
if: startsWith(matrix.image, 'fedora:')
|
||||
|
||||
- name: Install Dependencies (FreeBSD)
|
||||
@ -257,6 +267,7 @@ runs:
|
||||
${{ inputs.opensuse-test-dependencies }}
|
||||
${{ matrix.build_system == 'CMake' && 'cmake' || 'automake' }}
|
||||
${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc12 gcc12-c++' }}
|
||||
rpm-build
|
||||
if: startsWith(matrix.image, 'opensuse/')
|
||||
|
||||
- name: Install Dependencies (Ubuntu)
|
||||
@ -285,12 +296,6 @@ runs:
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: startsWith(matrix.image, 'opensuse/')
|
||||
|
||||
- name: Build & Install `mapnik` (Amazon Linux 2/CentOS 7)
|
||||
uses: ./.github/actions/dependencies/build-and-install/mapnik
|
||||
with:
|
||||
version: ${{ inputs.mapnik-build-version-amazonlinux2-centos7 }}
|
||||
if: matrix.image == 'amazonlinux:2' || matrix.image == 'centos:7'
|
||||
|
||||
- name: Build & Install `mapnik` (CentOS Stream)
|
||||
uses: ./.github/actions/dependencies/build-and-install/mapnik
|
||||
with:
|
||||
@ -307,7 +312,7 @@ runs:
|
||||
uses: ./.github/actions/dependencies/build-and-install/mapnik/latest
|
||||
if: |
|
||||
matrix.mapnik_latest &&
|
||||
(startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:'))
|
||||
(startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:') || runner.os == 'Linux')
|
||||
|
||||
- name: Build & Install latest `mapnik` (openSUSE)
|
||||
uses: ./.github/actions/dependencies/build-and-install/mapnik/latest
|
||||
|
@ -18,20 +18,10 @@ runs:
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: startsWith(matrix.image, 'quay.io/centos/centos:stream')
|
||||
|
||||
- name: Enable PowerTools repository (CentOS Stream 8)
|
||||
run: dnf config-manager --set-enabled powertools
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: matrix.image == 'quay.io/centos/centos:stream8'
|
||||
|
||||
- name: Enable CRB repository (CentOS Stream 9)
|
||||
- name: Enable CRB repository (CentOS Stream)
|
||||
run: dnf config-manager --set-enabled crb
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: matrix.image == 'quay.io/centos/centos:stream9'
|
||||
|
||||
- name: Enable EPEL repository (Amazon Linux 2)
|
||||
run: amazon-linux-extras install epel -y
|
||||
shell: bash --noprofile --norc -euxo pipefail {0}
|
||||
if: matrix.image == 'amazonlinux:2' && contains(inputs.dependencies, 'epel-release')
|
||||
if: startsWith(matrix.image, 'quay.io/centos/centos:stream')
|
||||
|
||||
- name: Install dependency package(s)
|
||||
run: |
|
||||
|
127
.github/workflows/build-and-test.yml
vendored
127
.github/workflows/build-and-test.yml
vendored
@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Linux:
|
||||
continue-on-error: ${{ matrix.experimental || false }}
|
||||
name: >-
|
||||
${{ matrix.image }}
|
||||
(${{ matrix.build_system }})
|
||||
@ -14,34 +15,43 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
image:
|
||||
- "centos:7"
|
||||
- "debian:11"
|
||||
- "debian:12"
|
||||
- "debian:testing"
|
||||
- "fedora:38"
|
||||
- "fedora:39"
|
||||
- "fedora:rawhide"
|
||||
- "opensuse/leap:15"
|
||||
- "ubuntu:20.04"
|
||||
- "ubuntu:rolling"
|
||||
build_system:
|
||||
- CMake
|
||||
compiler:
|
||||
- GNU
|
||||
image:
|
||||
- "debian:11"
|
||||
- "debian:12"
|
||||
- "fedora:39"
|
||||
- "fedora:40"
|
||||
- "opensuse/leap:15"
|
||||
- "quay.io/centos/centos:stream9"
|
||||
- "ubuntu:22.04"
|
||||
on_default_branch:
|
||||
- ${{ contains(github.ref, 'master') || contains(github.ref, 'develop') || contains(github.ref, 'CI') }}
|
||||
include:
|
||||
- image: "ubuntu:22.04"
|
||||
build_system: Autotools
|
||||
compiler: GNU
|
||||
- image: "ubuntu:22.04"
|
||||
build_system: Autotools
|
||||
compiler: LLVM
|
||||
- image: "ubuntu:22.04"
|
||||
- image: "debian:unstable"
|
||||
build_system: CMake
|
||||
compiler: GNU
|
||||
- image: "ubuntu:22.04"
|
||||
experimental: true
|
||||
- image: "fedora:rawhide"
|
||||
build_system: CMake
|
||||
compiler: GNU
|
||||
experimental: true
|
||||
- image: "ubuntu:devel"
|
||||
build_system: CMake
|
||||
compiler: GNU
|
||||
experimental: true
|
||||
- image: "ubuntu:24.04"
|
||||
build_system: Autotools
|
||||
compiler: GNU
|
||||
- image: "ubuntu:24.04"
|
||||
build_system: Autotools
|
||||
compiler: LLVM
|
||||
- image: "ubuntu:24.04"
|
||||
build_system: CMake
|
||||
compiler: GNU
|
||||
- image: "ubuntu:24.04"
|
||||
build_system: CMake
|
||||
compiler: LLVM
|
||||
exclude:
|
||||
@ -50,24 +60,17 @@ jobs:
|
||||
container:
|
||||
env:
|
||||
CC: ${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc' }}
|
||||
CFLAGS: --coverage
|
||||
CXX: ${{ matrix.compiler == 'LLVM' && 'clang++' || 'g++' }}
|
||||
CXXFLAGS: --coverage
|
||||
image: ${{ matrix.image }}
|
||||
steps:
|
||||
- name: Install `git` (Amazon Linux 2)
|
||||
run: yum --assumeyes install git
|
||||
if: matrix.image == 'amazonlinux:2'
|
||||
|
||||
- name: Install `git` (openSUSE)
|
||||
run: zypper --non-interactive install git
|
||||
if: startsWith(matrix.image, 'opensuse/')
|
||||
|
||||
- name: Checkout code (CentOS 7)
|
||||
uses: actions/checkout@v3
|
||||
if: matrix.image == 'centos:7'
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
if: matrix.image != 'centos:7'
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/dependencies/install
|
||||
@ -78,6 +81,17 @@ jobs:
|
||||
- name: Test `mod_tile`
|
||||
uses: ./.github/actions/test
|
||||
|
||||
- name: Process & Report `mod_tile` coverage results
|
||||
uses: ./.github/actions/coverage
|
||||
if: |
|
||||
matrix.compiler != 'LLVM' &&
|
||||
!startsWith(matrix.image, 'opensuse/') &&
|
||||
!matrix.experimental
|
||||
|
||||
- name: Package `mod_tile`
|
||||
uses: ./.github/actions/cmake/package
|
||||
if: matrix.build_system == 'CMake'
|
||||
|
||||
- name: Install `mod_tile`
|
||||
uses: ./.github/actions/install
|
||||
|
||||
@ -93,7 +107,7 @@ jobs:
|
||||
matrix:
|
||||
image:
|
||||
- "debian:12"
|
||||
- "ubuntu:22.04"
|
||||
- "ubuntu:24.04"
|
||||
build_system:
|
||||
- CMake
|
||||
compiler:
|
||||
@ -104,7 +118,9 @@ jobs:
|
||||
container:
|
||||
env:
|
||||
CC: ${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc' }}
|
||||
CFLAGS: --coverage
|
||||
CXX: ${{ matrix.compiler == 'LLVM' && 'clang++' || 'g++' }}
|
||||
CXXFLAGS: --coverage
|
||||
image: ${{ matrix.image }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -119,14 +135,24 @@ jobs:
|
||||
- name: Test `mod_tile`
|
||||
uses: ./.github/actions/test
|
||||
|
||||
- name: Process & Report `mod_tile` coverage results
|
||||
uses: ./.github/actions/coverage
|
||||
|
||||
- name: Package `mod_tile`
|
||||
uses: ./.github/actions/cmake/package
|
||||
if: matrix.build_system == 'CMake'
|
||||
|
||||
- name: Install `mod_tile`
|
||||
uses: ./.github/actions/install
|
||||
|
||||
macOS:
|
||||
env:
|
||||
CFLAGS: -Wno-implicit-function-declaration
|
||||
CFLAGS: --coverage
|
||||
CXXFLAGS: --coverage
|
||||
INSTALL_PREFIX: /usr/local
|
||||
INSTALL_RUNSTATEDIR: /var/run
|
||||
LDFLAGS: -undefined dynamic_lookup
|
||||
LIBRARY_PATH: /usr/local/lib
|
||||
TEST_PARALLEL_LEVEL: 1
|
||||
name: >-
|
||||
${{ matrix.os }}
|
||||
(${{ matrix.build_system }})
|
||||
@ -137,6 +163,7 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- macos-12
|
||||
- macos-13
|
||||
build_system:
|
||||
- CMake
|
||||
compiler:
|
||||
@ -144,10 +171,10 @@ jobs:
|
||||
on_default_branch:
|
||||
- ${{ contains(github.ref, 'master') || contains(github.ref, 'develop') || contains(github.ref, 'CI') }}
|
||||
include:
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
build_system: Autotools
|
||||
compiler: LLVM
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
build_system: CMake
|
||||
compiler: LLVM
|
||||
exclude:
|
||||
@ -159,9 +186,11 @@ jobs:
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/dependencies/install
|
||||
|
||||
- name: Set ICU_ROOT
|
||||
- name: Set CPATH, ICU_ROOT & LIBRARY_PATH
|
||||
run: |
|
||||
echo "CPATH=$(brew --prefix)/include" >> ${GITHUB_ENV}
|
||||
echo "ICU_ROOT=$(brew --prefix icu4c)" >> ${GITHUB_ENV}
|
||||
echo "LIBRARY_PATH=$(brew --prefix)/lib" >> ${GITHUB_ENV}
|
||||
|
||||
- name: Build `mod_tile`
|
||||
uses: ./.github/actions/build
|
||||
@ -169,13 +198,27 @@ jobs:
|
||||
- name: Test `mod_tile`
|
||||
uses: ./.github/actions/test
|
||||
|
||||
- name: Process & Report `mod_tile` coverage results
|
||||
uses: ./.github/actions/coverage
|
||||
with:
|
||||
genhtml-extra-options: --keep-going --ignore-errors count,inconsistent,range
|
||||
lcov-extra-options: --keep-going --ignore-errors count,inconsistent,range
|
||||
if: matrix.os != 'macos-12'
|
||||
|
||||
- name: Package `mod_tile`
|
||||
uses: ./.github/actions/cmake/package
|
||||
if: matrix.build_system == 'CMake'
|
||||
|
||||
- name: Install `mod_tile`
|
||||
uses: ./.github/actions/install
|
||||
|
||||
FreeBSD:
|
||||
continue-on-error: true
|
||||
env:
|
||||
BUILD_PARALLEL_LEVEL: 2
|
||||
CFLAGS: --coverage
|
||||
CTEST_CLIENT_HOST: ::1
|
||||
CTEST_SERVER_HOST: localhost
|
||||
CXXFLAGS: --coverage
|
||||
INSTALL_PREFIX: /usr/local
|
||||
LIBRARY_PATH: /usr/local/lib
|
||||
TMPDIR: /tmp
|
||||
name: >-
|
||||
@ -186,7 +229,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
box_generic:
|
||||
- freebsd12
|
||||
- freebsd13
|
||||
build_system:
|
||||
- CMake
|
||||
@ -205,6 +247,11 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set `BUILD_PARALLEL_LEVEL` & `TEST_PARALLEL_LEVEL`
|
||||
run: |
|
||||
echo "BUILD_PARALLEL_LEVEL=$(nproc)" >> ${GITHUB_ENV}
|
||||
echo "TEST_PARALLEL_LEVEL=$(nproc)" >> ${GITHUB_ENV}
|
||||
|
||||
- name: Provision VM
|
||||
uses: hummeltech/freebsd-vagrant-action@v1.4
|
||||
with:
|
||||
@ -228,5 +275,11 @@ jobs:
|
||||
- name: Test `mod_tile`
|
||||
uses: ./.github/actions/test
|
||||
|
||||
- name: Process & Report `mod_tile` coverage results
|
||||
uses: ./.github/actions/coverage
|
||||
|
||||
- name: Package `mod_tile`
|
||||
uses: ./.github/actions/cmake/package
|
||||
|
||||
- name: Install `mod_tile`
|
||||
uses: ./.github/actions/install
|
||||
|
68
.github/workflows/coverage.yml
vendored
68
.github/workflows/coverage.yml
vendored
@ -1,68 +0,0 @@
|
||||
---
|
||||
name: Coverage
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- master
|
||||
- "*CI"
|
||||
|
||||
jobs:
|
||||
Coverage:
|
||||
name: Build, Test & Report Coverage
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BUILD_TYPE: Debug
|
||||
CFLAGS: --coverage
|
||||
CXXFLAGS: --coverage
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/dependencies/install
|
||||
with:
|
||||
ubuntu-test-dependencies: >-
|
||||
apache2
|
||||
lcov
|
||||
|
||||
- name: Build `mod_tile`
|
||||
uses: ./.github/actions/cmake/build
|
||||
|
||||
- name: Test `mod_tile`
|
||||
uses: ./.github/actions/cmake/test
|
||||
|
||||
- name: Test `mod_tile` again (to gather more coverage data)
|
||||
uses: ./.github/actions/cmake/test
|
||||
|
||||
- name: Process `mod_tile` coverage results
|
||||
run: |
|
||||
ctest -T coverage
|
||||
lcov \
|
||||
--capture \
|
||||
--directory . \
|
||||
--output-file coverage.info
|
||||
lcov \
|
||||
--output-file coverage.info \
|
||||
--remove coverage.info \
|
||||
"${GITHUB_WORKSPACE}/includes/catch/catch.hpp" \
|
||||
"${GITHUB_WORKSPACE}/src/gen_tile_test.cpp" \
|
||||
"/usr/*"
|
||||
genhtml coverage.info --output-directory coverage
|
||||
working-directory: build
|
||||
|
||||
- name: Write coverage summary to `$GITHUB_STEP_SUMMARY`
|
||||
run: lcov --summary build/coverage.info | sed 's/^ /* /g' >> ${GITHUB_STEP_SUMMARY}
|
||||
|
||||
- name: Upload `mod_tile` coverage results artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Coverage Results
|
||||
path: build/coverage
|
||||
|
||||
- name: Report `mod_tile` coverage results to `codecov.io`
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: build/coverage.info
|
26
.github/workflows/docker-image-build.yml
vendored
26
.github/workflows/docker-image-build.yml
vendored
@ -10,28 +10,34 @@ on:
|
||||
|
||||
jobs:
|
||||
docker-image-build:
|
||||
continue-on-error: ${{ matrix.experimental || false }}
|
||||
name: Build & Test (${{ matrix.service-name }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
service-name:
|
||||
- archlinux
|
||||
- centos-7
|
||||
- centos-stream-8
|
||||
- centos-stream-9
|
||||
- debian-11
|
||||
- debian-12
|
||||
- debian-testing
|
||||
- debian-testing-autotools
|
||||
- fedora-38
|
||||
- fedora-39
|
||||
- fedora-rawhide
|
||||
- fedora-40
|
||||
- opensuse-leap-15
|
||||
- opensuse-tumbleweed
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
- ubuntu-devel
|
||||
- ubuntu-devel-autotools
|
||||
- ubuntu-24.04
|
||||
include:
|
||||
- service-name: debian-unstable
|
||||
experimental: true
|
||||
- service-name: debian-unstable-autotools
|
||||
experimental: true
|
||||
- service-name: fedora-rawhide
|
||||
experimental: true
|
||||
- service-name: opensuse-tumbleweed
|
||||
experimental: true
|
||||
- service-name: ubuntu-devel
|
||||
experimental: true
|
||||
- service-name: ubuntu-devel-autotools
|
||||
experimental: true
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -18,7 +18,10 @@ jobs:
|
||||
image:
|
||||
- "debian:11"
|
||||
- "debian:12"
|
||||
- "debian:unstable"
|
||||
- "ubuntu:22.04"
|
||||
- "ubuntu:24.04"
|
||||
- "ubuntu:devel"
|
||||
fail-fast: false
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
|
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
@ -42,24 +42,24 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- name: Write `$ASTYLE_OUTPUT` to `$GITHUB_STEP_SUMMARY`
|
||||
if: failure()
|
||||
run: |
|
||||
ASTYLE_OUTPUT=$(${ASTYLE_CMD} --dry-run)
|
||||
echo "### The following files are in need of formatting:" >> ${GITHUB_STEP_SUMMARY}
|
||||
echo "${ASTYLE_OUTPUT}" | grep -v "Unchanged" | awk '{print "- `"$2"`"}' >> ${GITHUB_STEP_SUMMARY}
|
||||
echo "### Run the following command before submitting a pull request:" >> ${GITHUB_STEP_SUMMARY}
|
||||
echo -e '```shell\n'"${ASTYLE_CMD}"'\n```' >> ${GITHUB_STEP_SUMMARY}
|
||||
- name: Generate `ArtisticStyleFormattingFixes.patch` file
|
||||
if: failure()
|
||||
- name: Generate `ArtisticStyleFormattingFixes.patch` file
|
||||
run: |
|
||||
${ASTYLE_CMD}
|
||||
git diff --patch > ArtisticStyleFormattingFixes.patch
|
||||
- name: Upload `ArtisticStyleFormattingFixes.patch` file
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Upload `ArtisticStyleFormattingFixes.patch` file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ArtisticStyleFormattingFixes.patch
|
||||
path: ArtisticStyleFormattingFixes.patch
|
||||
if: failure()
|
||||
|
||||
cmakelint:
|
||||
name: Lint with `CMakeLint`
|
||||
|
@ -13,11 +13,15 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
project(mod_tile VERSION 0.7.1)
|
||||
project(mod_tile
|
||||
DESCRIPTION "Renders map tiles with Mapnik and serves them using Apache HTTP Server"
|
||||
HOMEPAGE_URL "https://github.com/openstreetmap/mod_tile"
|
||||
VERSION 0.7.1
|
||||
)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "Sets the C++ standard.")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
@ -47,8 +51,8 @@ find_package(LIBMAPNIK REQUIRED)
|
||||
find_package(LIBMEMCACHED)
|
||||
find_package(LIBRADOS)
|
||||
|
||||
if(LIBMAPNIK_VERSION STRGREATER_EQUAL "4")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
if(LIBMAPNIK_VERSION VERSION_GREATER_EQUAL 4)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# Programs
|
||||
@ -56,44 +60,14 @@ find_program(APXS_EXECUTABLE apxs REQUIRED)
|
||||
|
||||
# Functions
|
||||
include(CheckFunctionExists)
|
||||
# check_function_exists(bzero HAVE_BZERO)
|
||||
check_function_exists(daemon HAVE_DAEMON)
|
||||
# check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
check_function_exists(getloadavg HAVE_GETLOADAVG)
|
||||
# check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
# check_function_exists(inet_ntoa HAVE_INET_NTOA)
|
||||
# check_function_exists(memset HAVE_MEMSET)
|
||||
# check_function_exists(mkdir HAVE_MKDIR)
|
||||
# check_function_exists(pow HAVE_POW)
|
||||
# check_function_exists(select HAVE_SELECT)
|
||||
# check_function_exists(socket HAVE_SOCKET)
|
||||
# check_function_exists(strchr HAVE_STRCHR)
|
||||
# check_function_exists(strdup HAVE_STRDUP)
|
||||
# check_function_exists(strerror HAVE_STRERROR)
|
||||
# check_function_exists(strrchr HAVE_STRRCHR)
|
||||
# check_function_exists(strstr HAVE_STRSTR)
|
||||
# check_function_exists(strtol HAVE_STRTOL)
|
||||
# check_function_exists(strtoul HAVE_STRTOUL)
|
||||
# check_function_exists(utime HAVE_UTIME)
|
||||
|
||||
# Include files
|
||||
include(CheckIncludeFile)
|
||||
# check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
# check_include_file(fcntl.h HAVE_FCNTL_H)
|
||||
# check_include_file(limits.h HAVE_LIMITS_H)
|
||||
# check_include_file(netdb.h HAVE_NETDB_H)
|
||||
# check_include_file(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_file(paths.h HAVE_PATHS_H)
|
||||
# check_include_file(stdint.h HAVE_STDINT_H)
|
||||
# check_include_file(stdlib.h HAVE_STDLIB_H)
|
||||
# check_include_file(string.h HAVE_STRING_H)
|
||||
check_include_file(sys/cdefs.h HAVE_SYS_CDEFS_H)
|
||||
check_include_file(sys/loadavg.h HAVE_SYS_LOADAVG_H)
|
||||
# check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
# check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
# check_include_file(syslog.h HAVE_SYSLOG_H)
|
||||
# check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
# check_include_file(utime.h HAVE_UTIME_H)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
@ -111,7 +85,7 @@ execute_process(COMMAND ${APXS_EXECUTABLE} -q sysconfdir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(LIBMAPNIK_VERSION STRLESS "4")
|
||||
if(LIBMAPNIK_VERSION VERSION_LESS 4)
|
||||
find_program(MAPNIK_CONFIG_EXECUTABLE NAMES mapnik-config REQUIRED)
|
||||
execute_process(COMMAND ${MAPNIK_CONFIG_EXECUTABLE} --fonts
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@ -121,7 +95,7 @@ if(LIBMAPNIK_VERSION STRLESS "4")
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE MAPNIK_PLUGINS_DIR
|
||||
)
|
||||
elseif(LIBMAPNIK_VERSION STRGREATER_EQUAL "4")
|
||||
elseif(LIBMAPNIK_VERSION VERSION_GREATER_EQUAL 4)
|
||||
pkg_get_variable(MAPNIK_FONTS_DIR libmapnik fonts_dir)
|
||||
pkg_get_variable(MAPNIK_PLUGINS_DIR libmapnik plugins_dir)
|
||||
endif()
|
||||
@ -286,6 +260,19 @@ if(ENABLE_MAN)
|
||||
)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Package
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_PACKAGE_CONTACT "OpenStreetMap")
|
||||
set(CPACK_PACKAGE_VENDOR "OpenStreetMap")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
|
||||
include(CPack)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Test
|
||||
|
@ -40,10 +40,16 @@ if((NOT APR_FOUND) AND (APR_INCLUDE_DIRS) AND (APR_LIBRARIES))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(APR
|
||||
FOUND_VAR APR_FOUND
|
||||
REQUIRED_VARS APR_FOUND APR_INCLUDE_DIRS APR_LIBRARIES
|
||||
VERSION_VAR APR_VERSION
|
||||
)
|
||||
|
||||
if(APR_FOUND)
|
||||
find_package_handle_standard_args(APR
|
||||
REQUIRED_VARS APR_FOUND APR_INCLUDE_DIRS APR_LIBRARIES
|
||||
VERSION_VAR APR_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(APR
|
||||
REQUIRED_VARS APR_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(APR_INCLUDE_DIR APR_LIBRARY)
|
||||
|
@ -40,10 +40,16 @@ if((NOT CAIRO_FOUND) AND (CAIRO_INCLUDE_DIRS) AND (CAIRO_LIBRARIES))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CAIRO
|
||||
FOUND_VAR CAIRO_FOUND
|
||||
REQUIRED_VARS CAIRO_FOUND CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES
|
||||
VERSION_VAR CAIRO_VERSION
|
||||
)
|
||||
|
||||
if(CAIRO_FOUND)
|
||||
find_package_handle_standard_args(CAIRO
|
||||
REQUIRED_VARS CAIRO_FOUND CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES
|
||||
VERSION_VAR CAIRO_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(CAIRO
|
||||
REQUIRED_VARS CAIRO_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CAIRO_INCLUDE_DIR CAIRO_LIBRARY)
|
||||
|
@ -40,10 +40,16 @@ if((NOT GLIB_FOUND) AND (GLIB_INCLUDE_DIRS) AND (GLIB_LIBRARIES))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLIB
|
||||
FOUND_VAR GLIB_FOUND
|
||||
REQUIRED_VARS GLIB_FOUND GLIB_INCLUDE_DIRS GLIB_LIBRARIES
|
||||
VERSION_VAR GLIB_VERSION
|
||||
)
|
||||
|
||||
if(GLIB_FOUND)
|
||||
find_package_handle_standard_args(GLIB
|
||||
REQUIRED_VARS GLIB_FOUND GLIB_INCLUDE_DIRS GLIB_LIBRARIES
|
||||
VERSION_VAR GLIB_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(GLIB
|
||||
REQUIRED_VARS GLIB_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GLIB_INCLUDE_DIR GLIB_LIBRARY)
|
||||
|
@ -38,10 +38,16 @@ if((NOT HTTPD_VERSION) AND (HTTPD_FOUND))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(HTTPD
|
||||
FOUND_VAR HTTPD_FOUND
|
||||
REQUIRED_VARS HTTPD_FOUND HTTPD_INCLUDE_DIRS
|
||||
VERSION_VAR HTTPD_VERSION
|
||||
)
|
||||
|
||||
if(HTTPD_FOUND)
|
||||
find_package_handle_standard_args(HTTPD
|
||||
REQUIRED_VARS HTTPD_FOUND HTTPD_INCLUDE_DIRS
|
||||
VERSION_VAR HTTPD_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(HTTPD
|
||||
REQUIRED_VARS HTTPD_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(HTTPD_INCLUDE_DIR)
|
||||
|
@ -40,9 +40,15 @@ if((NOT INIPARSER_FOUND) AND (INIPARSER_INCLUDE_DIRS) AND (INIPARSER_LIBRARIES))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(INIPARSER
|
||||
FOUND_VAR INIPARSER_FOUND
|
||||
REQUIRED_VARS INIPARSER_FOUND INIPARSER_INCLUDE_DIRS INIPARSER_LIBRARIES
|
||||
)
|
||||
|
||||
if(INIPARSER_FOUND)
|
||||
find_package_handle_standard_args(INIPARSER
|
||||
REQUIRED_VARS INIPARSER_FOUND INIPARSER_INCLUDE_DIRS INIPARSER_LIBRARIES
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(INIPARSER
|
||||
REQUIRED_VARS INIPARSER_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(INIPARSER_INCLUDE_DIR INIPARSER_LIBRARY)
|
||||
|
@ -51,10 +51,16 @@ if((NOT LIBMAPNIK_VERSION) AND (LIBMAPNIK_FOUND))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBMAPNIK
|
||||
FOUND_VAR LIBMAPNIK_FOUND
|
||||
REQUIRED_VARS LIBMAPNIK_FOUND LIBMAPNIK_INCLUDE_DIRS LIBMAPNIK_LIBRARIES
|
||||
VERSION_VAR LIBMAPNIK_VERSION
|
||||
)
|
||||
|
||||
if(LIBMAPNIK_FOUND)
|
||||
find_package_handle_standard_args(LIBMAPNIK
|
||||
REQUIRED_VARS LIBMAPNIK_FOUND LIBMAPNIK_INCLUDE_DIRS LIBMAPNIK_LIBRARIES
|
||||
VERSION_VAR LIBMAPNIK_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(LIBMAPNIK
|
||||
REQUIRED_VARS LIBMAPNIK_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBMAPNIK_INCLUDE_DIR LIBMAPNIK_LIBRARY)
|
||||
|
@ -40,10 +40,16 @@ if((NOT LIBMEMCACHED_FOUND) AND (LIBMEMCACHED_INCLUDE_DIRS) AND (LIBMEMCACHED_LI
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBMEMCACHED
|
||||
FOUND_VAR LIBMEMCACHED_FOUND
|
||||
REQUIRED_VARS LIBMEMCACHED_FOUND LIBMEMCACHED_INCLUDE_DIRS LIBMEMCACHED_LIBRARIES
|
||||
VERSION_VAR LIBMEMCACHED_VERSION
|
||||
)
|
||||
|
||||
if(LIBMEMCACHED_FOUND)
|
||||
find_package_handle_standard_args(LIBMEMCACHED
|
||||
REQUIRED_VARS LIBMEMCACHED_FOUND LIBMEMCACHED_INCLUDE_DIRS LIBMEMCACHED_LIBRARIES
|
||||
VERSION_VAR LIBMEMCACHED_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(LIBMEMCACHED
|
||||
REQUIRED_VARS LIBMEMCACHED_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBMEMCACHED_INCLUDE_DIR LIBMEMCACHED_LIBRARY)
|
||||
|
@ -51,10 +51,16 @@ if((NOT LIBRADOS_VERSION) AND (LIBRADOS_FOUND))
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBRADOS
|
||||
FOUND_VAR LIBRADOS_FOUND
|
||||
REQUIRED_VARS LIBRADOS_FOUND LIBRADOS_INCLUDE_DIRS LIBRADOS_LIBRARIES
|
||||
VERSION_VAR LIBRADOS_VERSION
|
||||
)
|
||||
|
||||
if(LIBRADOS_FOUND)
|
||||
find_package_handle_standard_args(LIBRADOS
|
||||
REQUIRED_VARS LIBRADOS_FOUND LIBRADOS_INCLUDE_DIRS LIBRADOS_LIBRARIES
|
||||
VERSION_VAR LIBRADOS_VERSION
|
||||
)
|
||||
else()
|
||||
find_package_handle_standard_args(LIBRADOS
|
||||
REQUIRED_VARS LIBRADOS_FOUND
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBRADOS_INCLUDE_DIR LIBRADOS_LIBRARY)
|
||||
|
@ -5,24 +5,24 @@ For your convenience, we have provided a Docker-based building and testing metho
|
||||
### The following distributions are currently supported:
|
||||
|
||||
- archlinux _(Arch Linux)_ [[Dockerfile](/docker/archlinux/Dockerfile)]
|
||||
- centos-7 _(CentOS 7)_ [[Dockerfile](/docker/centos/7/Dockerfile)]
|
||||
- centos-stream-8 _(CentOS Stream 8)_ [[Dockerfile](/docker/centos/stream/Dockerfile)]
|
||||
- centos-stream-9 _(CentOS Stream 9)_ [[Dockerfile](/docker/centos/stream/Dockerfile)]
|
||||
- debian-10 _(Debian 10)_ [[Dockerfile](/docker/debian/Dockerfile)]
|
||||
- debian-11 _(Debian 11)_ [[Dockerfile](/docker/debian/Dockerfile)]
|
||||
- debian-12 _(Debian 12)_ [[Dockerfile](/docker/debian/Dockerfile)]
|
||||
- debian-testing _(Debian Testing)_ [[Dockerfile](/docker/debian/Dockerfile)]
|
||||
- debian-unstable _(Debian Unstable)_ [[Dockerfile](/docker/debian/Dockerfile)]
|
||||
- fedora-34 _(Fedora 34)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-35 _(Fedora 35)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-36 _(Fedora 36)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-37 _(Fedora 37)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-38 _(Fedora 38)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-39 _(Fedora 39)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-40 _(Fedora 40)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- fedora-rawhide _(Fedora Rawhide)_ [[Dockerfile](/docker/fedora/Dockerfile)]
|
||||
- opensuse-leap-15 _(openSUSE Leap 15)_ [[Dockerfile](/docker/opensuse/Dockerfile)]
|
||||
- opensuse-tumbleweed _(openSUSE Tumbleweed)_ [[Dockerfile](/docker/opensuse/Dockerfile)]
|
||||
- ubuntu-20.04 _(Ubuntu 20.04)_ [[Dockerfile](/docker/ubuntu/Dockerfile)]
|
||||
- ubuntu-22.04 _(Ubuntu 22.04)_ [[Dockerfile](/docker/ubuntu/Dockerfile)]
|
||||
- ubuntu-24.04 _(Ubuntu 24.04)_ [[Dockerfile](/docker/ubuntu/Dockerfile)]
|
||||
- ubuntu-devel _(Ubuntu Devel)_ [[Dockerfile](/docker/ubuntu/Dockerfile)]
|
||||
|
||||
### Requirements:
|
||||
|
@ -32,10 +32,11 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_CXX_STANDARD:STRING=17 \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -1,178 +0,0 @@
|
||||
# Arguments
|
||||
ARG mapnik_version=3.1.0
|
||||
|
||||
# Mapnik Builder
|
||||
FROM centos:centos7 as mapnik-builder
|
||||
|
||||
## Arguments
|
||||
ARG mapnik_version
|
||||
|
||||
## Install mapnik-builder dependencies
|
||||
RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \
|
||||
ulimit -n 40000; \
|
||||
echo "install_weak_deps=0" >> /etc/yum.conf && \
|
||||
sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \
|
||||
yum --assumeyes install epel-release centos-release-scl && \
|
||||
yum --assumeyes upgrade && \
|
||||
yum --assumeyes install \
|
||||
boost169-devel \
|
||||
bzip2 \
|
||||
cairo-devel \
|
||||
devtoolset-9-gcc \
|
||||
devtoolset-9-gcc-c++ \
|
||||
freetype-devel \
|
||||
gdal-devel \
|
||||
harfbuzz-devel \
|
||||
libicu-devel \
|
||||
libjpeg-devel \
|
||||
libpng-devel \
|
||||
libtiff-devel \
|
||||
libwebp-devel \
|
||||
libxml2-devel \
|
||||
make \
|
||||
patch \
|
||||
postgresql-devel \
|
||||
proj-devel \
|
||||
python3 \
|
||||
sqlite-devel \
|
||||
tar \
|
||||
zlib-devel
|
||||
|
||||
## Download, Build & Install `Mapnik`
|
||||
WORKDIR /tmp/mapnik_src
|
||||
RUN --mount=id=centos:centos7-mapnik:${mapnik_version},target=/tmp/mapnik_src,type=cache \
|
||||
export DESTDIR="/tmp/mapnik"; \
|
||||
export GDAL_DATA="$(gdal-config --datadir)"; \
|
||||
export JOBS="$(nproc)"; \
|
||||
export PROJ_LIB="/usr/share/proj"; \
|
||||
export PYTHON="python3"; \
|
||||
mkdir --parents ${GDAL_DATA} ${PROJ_LIB}; \
|
||||
if [ ! -f SConstruct ]; then \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/releases/download/v${mapnik_version}/mapnik-v${mapnik_version}.tar.bz2 \
|
||||
| tar --extract --bzip2 --strip-components=1 --file=-; \
|
||||
sed -i 's#BOOST_APPEND = match.groups()\[0\]#BOOST_APPEND = ""#g' SConstruct; \
|
||||
fi; \
|
||||
source /opt/rh/devtoolset-9/enable; \
|
||||
export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; \
|
||||
export CUSTOM_LDFLAGS="-L/usr/lib64/boost169"; \
|
||||
bash configure \
|
||||
CPP_TESTS=False \
|
||||
CUSTOM_CFLAGS="${CUSTOM_CFLAGS:-}" \
|
||||
CUSTOM_CXXFLAGS="${CUSTOM_CXXFLAGS:-}" \
|
||||
CUSTOM_DEFINES="${CUSTOM_DEFINES:-}" \
|
||||
CUSTOM_LDFLAGS="${CUSTOM_LDFLAGS:-}" \
|
||||
DEMO=False \
|
||||
DESTDIR="${DESTDIR}" \
|
||||
FAST=True \
|
||||
INPUT_PLUGINS=all \
|
||||
LIBDIR_SCHEMA=lib64 \
|
||||
OPTIMIZATION=2 \
|
||||
PREFIX=/usr \
|
||||
SVG2PNG=True \
|
||||
XMLPARSER=libxml2 && \
|
||||
make PYTHON="${PYTHON}" && \
|
||||
make install PYTHON="${PYTHON}"
|
||||
|
||||
# Builder
|
||||
FROM centos:centos7 as builder
|
||||
|
||||
## Install builder dependencies
|
||||
RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \
|
||||
ulimit -n 40000; \
|
||||
echo "install_weak_deps=0" >> /etc/yum.conf && \
|
||||
sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \
|
||||
yum --assumeyes install epel-release centos-release-scl && \
|
||||
yum --assumeyes upgrade && \
|
||||
yum --assumeyes install \
|
||||
boost169-devel \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
devtoolset-9-gcc \
|
||||
devtoolset-9-gcc-c++ \
|
||||
gdal \
|
||||
glib2-devel \
|
||||
harfbuzz-devel \
|
||||
httpd-devel \
|
||||
iniparser-devel \
|
||||
libcurl-devel \
|
||||
libicu-devel \
|
||||
libjpeg \
|
||||
libmemcached-devel \
|
||||
librados2-devel \
|
||||
libtiff \
|
||||
libwebp \
|
||||
make \
|
||||
proj
|
||||
|
||||
## Copy files from builder(s)
|
||||
### Mapnik
|
||||
COPY --from=mapnik-builder /tmp/mapnik /
|
||||
|
||||
## Build, Test & Install `mod_tile`
|
||||
COPY . /tmp/mod_tile_src
|
||||
WORKDIR /tmp/mod_tile_build
|
||||
RUN source /opt/rh/devtoolset-9/enable && \
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
export CFLAGS="-I/usr/include/boost169" && \
|
||||
export CXXFLAGS="-I/usr/include/boost169" && \
|
||||
cmake3 -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake3 --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
export DESTDIR=/tmp/mod_tile && \
|
||||
ctest3 --output-on-failure && \
|
||||
(cmake3 --install . --strip || make DESTDIR=${DESTDIR} install/strip)
|
||||
|
||||
# Runner
|
||||
FROM centos:centos7 as runner
|
||||
|
||||
## Install runner dependencies
|
||||
RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \
|
||||
ulimit -n 40000; \
|
||||
echo "install_weak_deps=0" >> /etc/yum.conf && \
|
||||
sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \
|
||||
yum --assumeyes install epel-release && \
|
||||
yum --assumeyes upgrade && \
|
||||
yum --assumeyes install \
|
||||
boost169-filesystem \
|
||||
boost169-program-options \
|
||||
boost169-regex \
|
||||
cairo \
|
||||
gdal \
|
||||
harfbuzz \
|
||||
httpd \
|
||||
iniparser \
|
||||
libicu \
|
||||
libmemcached \
|
||||
librados2 \
|
||||
libtiff \
|
||||
libwebp \
|
||||
proj
|
||||
|
||||
## Copy files from builder(s)
|
||||
### Mapnik
|
||||
COPY --from=mapnik-builder /tmp/mapnik /
|
||||
### mod_tile
|
||||
COPY --from=builder /tmp/mod_tile /
|
||||
COPY --chown=apache:apache --from=builder \
|
||||
/tmp/mod_tile_src/utils/example-map \
|
||||
/usr/share/renderd/example-map
|
||||
COPY --from=builder \
|
||||
/tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \
|
||||
/etc/httpd/conf.d/renderd-example-map.conf
|
||||
|
||||
## Add configuration
|
||||
RUN printf '\n[example-map]\nMAXZOOM=20\nMINZOOM=0\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf
|
||||
RUN printf '\n[example-map-jpg]\nMAXZOOM=20\nMINZOOM=0\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf
|
||||
RUN printf '\n[example-map-png256]\nMAXZOOM=20\nMINZOOM=0\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf
|
||||
RUN printf '\n[example-map-png32]\nMAXZOOM=20\nMINZOOM=0\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf
|
||||
RUN printf '\n[example-map-webp]\nMAXZOOM=20\nMINZOOM=0\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf
|
||||
|
||||
## Start services
|
||||
CMD httpd -e debug -k start; \
|
||||
G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground
|
@ -56,15 +56,10 @@ RUN --mount=id=centos:stream${centos_stream_version}-mapnik:${mapnik_version},ta
|
||||
if [ ! -f SConstruct ]; then \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/releases/download/v${mapnik_version}/mapnik-v${mapnik_version}.tar.bz2 \
|
||||
| tar --extract --bzip2 --strip-components=1 --file=-; \
|
||||
if [ "${centos_stream_version}" = "9" ]; then \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
|
||||
| patch -Np1; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
|
||||
| patch -F3 -Np1; \
|
||||
fi \
|
||||
fi; \
|
||||
if [ "${centos_stream_version}" = "8" ]; then \
|
||||
export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
|
||||
| patch -Np1; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
|
||||
| patch -F3 -Np1; \
|
||||
fi; \
|
||||
bash configure \
|
||||
CPP_TESTS=False \
|
||||
@ -103,7 +98,7 @@ RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/
|
||||
dnf --assumeyes install \
|
||||
boost-devel \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
cmake \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdal \
|
||||
@ -132,10 +127,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -56,15 +56,10 @@ RUN --mount=id=centos:stream${centos_stream_version}-mapnik:${mapnik_version},ta
|
||||
if [ ! -f SConstruct ]; then \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/releases/download/v${mapnik_version}/mapnik-v${mapnik_version}.tar.bz2 \
|
||||
| tar --extract --bzip2 --strip-components=1 --file=-; \
|
||||
if [ "${centos_stream_version}" = "9" ]; then \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
|
||||
| patch -Np1; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
|
||||
| patch -F3 -Np1; \
|
||||
fi \
|
||||
fi; \
|
||||
if [ "${centos_stream_version}" = "8" ]; then \
|
||||
export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
|
||||
| patch -Np1; \
|
||||
curl --silent --location https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
|
||||
| patch -F3 -Np1; \
|
||||
fi; \
|
||||
bash configure \
|
||||
CPP_TESTS=False \
|
||||
|
@ -19,10 +19,10 @@ RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/
|
||||
dnf --assumeyes install epel-release && \
|
||||
dnf --assumeyes upgrade && \
|
||||
dnf --assumeyes install \
|
||||
boost1.78-devel \
|
||||
boost-devel \
|
||||
bzip2 \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
cmake \
|
||||
freetype-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
@ -82,9 +82,9 @@ RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/
|
||||
dnf --assumeyes install epel-release && \
|
||||
dnf --assumeyes upgrade && \
|
||||
dnf --assumeyes install \
|
||||
boost1.78-devel \
|
||||
boost-devel \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
cmake \
|
||||
freetype-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
@ -104,6 +104,7 @@ RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/
|
||||
libxml2-devel \
|
||||
make \
|
||||
pkg-config \
|
||||
procps \
|
||||
proj-devel
|
||||
|
||||
## Copy files from builder(s)
|
||||
@ -116,11 +117,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES:PATH=/usr/include/boost1.78 \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
@ -145,9 +145,7 @@ RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/
|
||||
dnf --assumeyes install epel-release && \
|
||||
dnf --assumeyes upgrade && \
|
||||
dnf --assumeyes install \
|
||||
boost1.78-filesystem \
|
||||
boost1.78-program-options \
|
||||
boost1.78-regex \
|
||||
boost-regex \
|
||||
cairo \
|
||||
gdal \
|
||||
harfbuzz \
|
||||
|
@ -36,10 +36,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -1,6 +1,4 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
x-mod_tile:
|
||||
build_defaults: &build_defaults
|
||||
context: ..
|
||||
@ -56,28 +54,6 @@ services:
|
||||
- styles:/opt/styles
|
||||
- tiles:/var/cache/renderd/tiles
|
||||
- ./full-entrypoint.sh:/entrypoint.sh:ro
|
||||
centos-7:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults
|
||||
dockerfile: docker/centos/7/Dockerfile
|
||||
ulimits:
|
||||
nofile: 40000
|
||||
centos-stream-8:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_centos_stream
|
||||
args:
|
||||
centos_stream_version: "8"
|
||||
extra_repository: powertools
|
||||
centos-stream-8-autotools:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_centos_stream
|
||||
args:
|
||||
centos_stream_version: "8"
|
||||
extra_repository: powertools
|
||||
dockerfile: docker/centos/stream/Dockerfile.autotools
|
||||
centos-stream-9:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
@ -146,20 +122,20 @@ services:
|
||||
libmapnik_version: "3.1"
|
||||
debian_version: "12"
|
||||
dockerfile: docker/debian/Dockerfile.autotools
|
||||
debian-testing:
|
||||
debian-unstable:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_debian
|
||||
args:
|
||||
libmapnik_version: "3.1"
|
||||
debian_version: testing
|
||||
debian-testing-autotools:
|
||||
debian_version: unstable
|
||||
debian-unstable-autotools:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_debian
|
||||
args:
|
||||
libmapnik_version: "3.1"
|
||||
debian_version: testing
|
||||
debian_version: unstable
|
||||
dockerfile: docker/debian/Dockerfile.autotools
|
||||
fedora-34:
|
||||
<<: *service_defaults
|
||||
@ -197,6 +173,12 @@ services:
|
||||
<<: *build_defaults_fedora
|
||||
args:
|
||||
fedora_version: "39"
|
||||
fedora-40:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_fedora
|
||||
args:
|
||||
fedora_version: "40"
|
||||
fedora-rawhide:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
@ -209,6 +191,7 @@ services:
|
||||
<<: *build_defaults_opensuse
|
||||
args:
|
||||
boost_version: "1_75_0"
|
||||
gcc_version: "13"
|
||||
opensuse_version: "leap:15"
|
||||
opensuse-tumbleweed:
|
||||
<<: *service_defaults
|
||||
@ -238,13 +221,20 @@ services:
|
||||
args:
|
||||
libmapnik_version: "3.1"
|
||||
ubuntu_version: "22.04"
|
||||
ubuntu-22.04-autotools:
|
||||
ubuntu-24.04:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_ubuntu
|
||||
args:
|
||||
libmapnik_version: "3.1"
|
||||
ubuntu_version: "22.04"
|
||||
ubuntu_version: "24.04"
|
||||
ubuntu-24.04-autotools:
|
||||
<<: *service_defaults
|
||||
build:
|
||||
<<: *build_defaults_ubuntu
|
||||
args:
|
||||
libmapnik_version: "3.1"
|
||||
ubuntu_version: "24.04"
|
||||
dockerfile: docker/ubuntu/Dockerfile.autotools
|
||||
ubuntu-devel:
|
||||
<<: *service_defaults
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Arguments
|
||||
ARG fedora_version=38
|
||||
ARG fedora_version=40
|
||||
|
||||
# Builder
|
||||
FROM fedora:${fedora_version} as builder
|
||||
@ -31,10 +31,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Arguments
|
||||
ARG boost_version
|
||||
ARG gcc_version
|
||||
ARG opensuse_version=leap:15
|
||||
|
||||
# Mapnik Builder
|
||||
@ -7,6 +8,7 @@ FROM opensuse/${opensuse_version} as mapnik-builder
|
||||
|
||||
## Arguments
|
||||
ARG boost_version
|
||||
ARG gcc_version
|
||||
ARG opensuse_version
|
||||
|
||||
## Install mapnik-builder dependencies
|
||||
@ -17,8 +19,8 @@ RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zy
|
||||
cairo-devel \
|
||||
cmake \
|
||||
freetype-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gcc${gcc_version} \
|
||||
gcc${gcc_version}-c++ \
|
||||
gdal-devel \
|
||||
git \
|
||||
harfbuzz-devel \
|
||||
@ -39,7 +41,13 @@ RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zy
|
||||
python3 \
|
||||
sqlite3-devel \
|
||||
tar \
|
||||
zlib-devel
|
||||
zlib-devel && \
|
||||
if [ -n "${gcc_version}" ]; then \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 10; \
|
||||
update-alternatives --install /usr/bin/cc gcc /usr/bin/gcc-${gcc_version} 10; \
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 10; \
|
||||
update-alternatives --install /usr/bin/c++ g++ /usr/bin/g++-${gcc_version} 10; \
|
||||
fi
|
||||
|
||||
## Download, Build & Install `Mapnik`
|
||||
WORKDIR /tmp/mapnik_src
|
||||
@ -53,9 +61,12 @@ RUN --mount=id=opensuse:${opensuse_version}-mapnik-src:latest,target=/tmp/mapnik
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
export DESTDIR=/tmp/mapnik && \
|
||||
cmake -B . -S /tmp/mapnik_src \
|
||||
-DBUILD_BENCHMARK:BOOL=OFF \
|
||||
-DBUILD_DEMO_CPP:BOOL=OFF \
|
||||
-DBUILD_DEMO_VIEWER:BOOL=OFF \
|
||||
-DBUILD_TESTING:BOOL=OFF \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_CXX_STANDARD:STRING=17 \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DMAPNIK_PKGCONF_DIR:PATH=/usr/share/pkgconfig && \
|
||||
cmake --build . && \
|
||||
@ -113,10 +124,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Arguments
|
||||
ARG libmapnik_version=3.1
|
||||
ARG runner_additional_packages
|
||||
ARG ubuntu_version=22.04
|
||||
ARG ubuntu_version=24.04
|
||||
|
||||
# Builder
|
||||
FROM ubuntu:${ubuntu_version} as builder
|
||||
@ -37,10 +37,10 @@ WORKDIR /tmp/mod_tile_build
|
||||
RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON && \
|
||||
cmake --build .
|
||||
RUN export CTEST_PARALLEL_LEVEL=$(nproc) && \
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Arguments
|
||||
ARG libmapnik_version=3.1
|
||||
ARG ubuntu_version=22.04
|
||||
ARG ubuntu_version=24.04
|
||||
|
||||
# Builder
|
||||
FROM ubuntu:${ubuntu_version} as builder
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Building on CentOS
|
||||
# Building on Arch Linux
|
||||
|
||||
This document provides users with step-by-step instructions on how to compile and use`mod_tile` and `renderd`.
|
||||
|
||||
@ -6,59 +6,48 @@ Please see our [Continuous Integration script](/.github/workflows/build-and-test
|
||||
|
||||
A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience.
|
||||
|
||||
_CentOS does not provide a `mapnik`/`mapnik-devel` package, so it will first need to be built & installed, which is beyond the scope of this document, please visit the project's [installation document on GitHub](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) or our [Continuous Integration script](/.github/actions/dependencies/build-and-install/mapnik/action.yml) for more information._
|
||||
|
||||
## CentOS 7
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Update installed packages
|
||||
sudo yum --assumeyes update
|
||||
sudo pacman --sync --refresh --sysupgrade --noconfirm
|
||||
|
||||
# Install build dependencies
|
||||
# (libmemcached-devel & librados2-devel are optional)
|
||||
sudo yum --assumeyes install epel-release
|
||||
sudo yum --assumeyes --setopt=install_weak_deps=False install \
|
||||
boost169-devel \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
# (libmemcached is optional)
|
||||
sudo pacman --sync --refresh --noconfirm \
|
||||
apache \
|
||||
apr \
|
||||
boost \
|
||||
cairo \
|
||||
cmake \
|
||||
curl \
|
||||
extra-cmake-modules \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdal \
|
||||
git \
|
||||
glib2-devel \
|
||||
harfbuzz-devel \
|
||||
httpd-devel \
|
||||
iniparser-devel \
|
||||
libcurl-devel \
|
||||
libicu-devel \
|
||||
libjpeg \
|
||||
libmemcached-devel \
|
||||
librados2-devel \
|
||||
libtiff \
|
||||
libwebp \
|
||||
glib2 \
|
||||
iniparser \
|
||||
lcov \
|
||||
libmemcached \
|
||||
make \
|
||||
proj
|
||||
mapnik \
|
||||
pkgconf
|
||||
|
||||
# Download, Build, Test & Install `mod_tile`
|
||||
export CFLAGS="-I/usr/include/boost169"
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
|
||||
export CXXFLAGS="-I/usr/include/boost169"
|
||||
rm -rf /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
mkdir /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
cd /tmp/mod_tile_src
|
||||
git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake3 -B . -S /tmp/mod_tile_src \
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake3 --build .
|
||||
ctest3
|
||||
cmake --build .
|
||||
ctest
|
||||
sudo cmake --install . --strip
|
||||
|
||||
# Create /usr/share/renderd directory
|
||||
@ -68,13 +57,17 @@ sudo mkdir --parents /usr/share/renderd
|
||||
sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map
|
||||
|
||||
# Add configuration
|
||||
sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/httpd/conf.d/renderd-example-map.conf
|
||||
sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/httpd/conf/extra/httpd-tile-renderd-example-map.conf
|
||||
printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf
|
||||
printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf
|
||||
printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf
|
||||
printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf
|
||||
printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf
|
||||
|
||||
# Enable configuration
|
||||
printf '\nInclude conf/extra/httpd-tile.conf\n' | sudo tee -a /etc/httpd/conf/httpd.conf
|
||||
printf '\nInclude conf/extra/httpd-tile-renderd-example-map.conf\n' | sudo tee -a /etc/httpd/conf/httpd.conf
|
||||
|
||||
# Start services
|
||||
sudo httpd
|
||||
sudo renderd -f
|
27
docs/build/building_on_centos_stream.md
vendored
27
docs/build/building_on_centos_stream.md
vendored
@ -8,18 +8,6 @@ A Docker-based building & testing setup pipeline is also available [here](/docke
|
||||
|
||||
_CentOS Stream does not provide a `mapnik`/`mapnik-devel` package, so it will first need to be built & installed, which is beyond the scope of this document, please visit the project's [installation document on GitHub](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) or our [Continuous Integration script](/.github/actions/dependencies/build-and-install/mapnik/action.yml) for more information._
|
||||
|
||||
## CentOS Stream 8
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Update config-manager DNF plugin
|
||||
sudo dnf --assumeyes install "dnf-command(config-manager)"
|
||||
|
||||
# Enable PowerTools Repository
|
||||
sudo dnf config-manager --save --setopt=powertools.enabled=1
|
||||
```
|
||||
|
||||
## CentOS Stream 9
|
||||
|
||||
```shell
|
||||
@ -30,11 +18,7 @@ sudo dnf --assumeyes install "dnf-command(config-manager)"
|
||||
|
||||
# Enable CRB Repository
|
||||
sudo dnf config-manager --save --setopt=crb.enabled=1
|
||||
```
|
||||
|
||||
## CentOS Stream 8/9
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Update installed packages
|
||||
@ -46,7 +30,7 @@ sudo dnf --assumeyes install epel-release
|
||||
sudo dnf --assumeyes --setopt=install_weak_deps=False install \
|
||||
boost-devel \
|
||||
cairo-devel \
|
||||
cmake3 \
|
||||
cmake \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdal \
|
||||
@ -63,6 +47,7 @@ sudo dnf --assumeyes --setopt=install_weak_deps=False install \
|
||||
libtiff \
|
||||
libwebp \
|
||||
make \
|
||||
procps \
|
||||
proj
|
||||
|
||||
# Download, Build, Test & Install `mod_tile`
|
||||
@ -74,10 +59,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
8
docs/build/building_on_debian.md
vendored
8
docs/build/building_on_debian.md
vendored
@ -42,10 +42,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
10
docs/build/building_on_fedora.md
vendored
10
docs/build/building_on_fedora.md
vendored
@ -6,7 +6,7 @@ Please see our [Continuous Integration script](/.github/workflows/build-and-test
|
||||
|
||||
A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience.
|
||||
|
||||
## Fedora 34/35/36/37/38/39
|
||||
## Fedora 34/35/36/37/38/39/40
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@ -39,10 +39,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
10
docs/build/building_on_freebsd.md
vendored
10
docs/build/building_on_freebsd.md
vendored
@ -34,6 +34,8 @@ sudo pkg install --yes \
|
||||
|
||||
# Download, Build, Test & Install `mod_tile`
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
|
||||
export CTEST_CLIENT_HOST="::1"
|
||||
export CTEST_SERVER_HOST="localhost"
|
||||
export LIBRARY_PATH="/usr/local/lib"
|
||||
rm -rf /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
mkdir /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
@ -42,10 +44,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
14
docs/build/building_on_macos.md
vendored
14
docs/build/building_on_macos.md
vendored
@ -4,7 +4,7 @@ This document provides users with step-by-step instructions on how to compile an
|
||||
|
||||
Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details.
|
||||
|
||||
## macOS 11/12/13
|
||||
## macOS 11/12/13/14
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@ -28,11 +28,11 @@ brew install \
|
||||
pkg-config
|
||||
|
||||
# Download, Build, Test & Install `mod_tile`
|
||||
export CFLAGS="-Wno-implicit-function-declaration"
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
|
||||
export CPATH=$(brew --prefix)/include
|
||||
export ICU_ROOT=$(brew --prefix icu4c)
|
||||
export LDFLAGS="-undefined dynamic_lookup"
|
||||
export LIBRARY_PATH="/usr/local/lib"
|
||||
export LIBRARY_PATH=$(brew --prefix)/lib
|
||||
rm -rf /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
mkdir /tmp/mod_tile_src /tmp/mod_tile_build
|
||||
cd /tmp/mod_tile_src
|
||||
@ -40,10 +40,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/var/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
8
docs/build/building_on_opensuse.md
vendored
8
docs/build/building_on_opensuse.md
vendored
@ -58,10 +58,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
10
docs/build/building_on_ubuntu.md
vendored
10
docs/build/building_on_ubuntu.md
vendored
@ -6,7 +6,7 @@ Please see our [Continuous Integration script](/.github/workflows/build-and-test
|
||||
|
||||
A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience.
|
||||
|
||||
# Ubuntu 20.04/22.04
|
||||
# Ubuntu 20.04/22.04/24.04
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@ -42,10 +42,10 @@ git clone --depth 1 https://github.com/openstreetmap/mod_tile.git .
|
||||
cd /tmp/mod_tile_build
|
||||
cmake -B . -S /tmp/mod_tile_src \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
|
||||
-DENABLE_TESTS:BOOL=ON
|
||||
cmake --build .
|
||||
ctest
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include <mapnik/datasource.hpp>
|
||||
#include <mapnik/datasource_cache.hpp>
|
||||
|
||||
#if MAPNIK_MAJOR_VERSION < 4
|
||||
#include <boost/optional.hpp>
|
||||
#endif
|
||||
|
||||
#include "parameterize_style.hpp"
|
||||
#include "g_logger.h"
|
||||
@ -72,7 +74,7 @@ static void parameterize_map_language(mapnik::Map &m, char * parameter)
|
||||
mapnik::parameters params = l.datasource()->params();
|
||||
|
||||
if (params.find("table") != params.end()) {
|
||||
boost::optional<std::string> table = params.get<std::string>("table");
|
||||
auto table = params.get<std::string>("table");
|
||||
|
||||
if (table && table->find(",name") != std::string::npos) {
|
||||
std::string str = *table;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
Reference in New Issue
Block a user