Skip to content

Commit 71c831d

Browse files
authored
Mapnik is now in FreeBSD's package repositories (#319)
1 parent e50836f commit 71c831d

1 file changed

Lines changed: 10 additions & 67 deletions

File tree

.github/actions/freebsd/action.yml

Lines changed: 10 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -3,94 +3,37 @@ inputs:
33
build-dependencies:
44
default: >-
55
apache24
6-
boost-all
76
cairo
87
ceph14
98
cmake
109
coreutils
1110
curl
12-
freetype2
13-
gdal
1411
glib
15-
gmake
16-
harfbuzz
17-
icu
1812
iniparser
19-
libjpeg-turbo
2013
libmemcached
21-
png
22-
proj
23-
python39
24-
sqlite3
25-
tiff
26-
webp
27-
zlib-ng
14+
mapnik
15+
pkgconf
2816
description: List of build dependency package(s) to install
29-
mapnik-version:
30-
default: 3.1.0
31-
description: Version of Mapnik to build & install
32-
python-version:
33-
default: 3.9
34-
description: Version of Python
3517

3618
runs:
3719
using: composite
3820
steps:
39-
- name: Create `Mapnik` source directory
40-
run: |
41-
mkdir mapnik-src
42-
shell: bash --noprofile --norc -euxo pipefail {0}
43-
44-
- name: Cache `Mapnik` source directory
45-
id: cache-mapnik-src
46-
uses: actions/cache@v3
47-
with:
48-
path: mapnik-src
49-
key: freebsd-vm:0.3.0-LLVM-mapnik-${{ inputs.mapnik-version }}
50-
51-
- name: Download `Mapnik`
52-
run: |
53-
curl --location --silent \
54-
https://github.com/mapnik/mapnik/releases/download/v${{ inputs.mapnik-version }}/mapnik-v${{ inputs.mapnik-version }}.tar.bz2 \
55-
| tar --extract --bzip2 --strip-components=1 --file=-
56-
curl --location --silent \
57-
https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \
58-
| patch -F3 -Np1
59-
curl --location --silent \
60-
https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \
61-
| patch -F3 -Np1
62-
curl --location --silent \
63-
https://github.com/mapnik/mapnik/commit/7f0daee8b37d8cf6eff32529b1762ffd5104f3f3.patch \
64-
| patch -F3 -Np1
65-
shell: bash --noprofile --norc -euxo pipefail {0}
66-
working-directory: mapnik-src
67-
if: steps.cache-mapnik-src.outputs.cache-hit != 'true'
68-
6921
- name: Install dependencies, Build, Test & Install `mod_tile`
7022
uses: vmactions/freebsd-vm@v0.3.0
7123
with:
7224
mem: 4096
7325
prepare: |
74-
pkg install --yes ${{ inputs.build-dependencies }}
26+
mkdir -p /usr/local/etc/pkg/repos
27+
sed 's#/quarterly#/latest#g' /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf
7528
pkg upgrade --yes
76-
set JOBS=`sysctl -n hw.ncpu`
77-
setenv JOBS ${JOBS}
78-
setenv PYTHON python${{ inputs.python-version }}
79-
cd ${GITHUB_WORKSPACE}/mapnik-src
80-
sh configure \
81-
CPP_TESTS=False \
82-
DEMO=False \
83-
FAST=True \
84-
HB_INCLUDES=/usr/local/include/harfbuzz \
85-
HB_LIBS=/usr/local/lib \
86-
ICU_INCLUDES=/usr/local/include \
87-
ICU_LIBS=/usr/local/lib \
88-
OPTIMIZATION=0 && \
89-
gmake PYTHON=${PYTHON} && \
90-
gmake install PYTHON=${PYTHON}
29+
pkg install --yes ${{ inputs.build-dependencies }}
9130
release: 13.1
9231
run: |
93-
cmake -S . -B build -DCMAKE_LIBRARY_PATH=/usr/local/lib -DENABLE_TESTS=1
32+
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
33+
cmake -B build -S . \
34+
-DCMAKE_LIBRARY_PATH:PATH=/usr/local/lib \
35+
-DENABLE_TESTS:BOOL=ON
9436
cmake --build build
9537
ctest --test-dir build
9638
cmake --install build
39+
usesh: true

0 commit comments

Comments
 (0)