Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson backports for 0.28.x #2815

Merged
merged 19 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 66 additions & 46 deletions .github/workflows/on_PR_meson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,41 @@ jobs:
name: Linux-GCC${{matrix.cxx}}-deps=${{matrix.deps}}
strategy:
matrix:
cxx: ['7', '10']
deps: ['enabled', 'disabled']
cxx: ['7', '13']
deps: ['forcefallback', 'default']
steps:
- uses: actions/checkout@v3

- name: Install packages
run: |
sudo apt install -y g++-${{matrix.cxx}} libcurl4-gnutls-dev
python3 -m pip install meson ninja

- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
version: ${{matrix.cxx}}
- name: Install meson
run: python3 -m pip install meson ninja
- name: Compile and Test
env:
CXX: g++-${{matrix.cxx}}
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3
meson compile -C "${{github.workspace}}/build"
meson test -C "${{github.workspace}}/build"
Ubuntu-clang:
runs-on: ubuntu-20.04
name: Linux-Clang${{matrix.cxx}}-deps=${{matrix.deps}}
strategy:
matrix:
cxx: ['7', '12']
deps: ['enabled', 'disabled']
cxx: ['7', '17']
deps: ['forcefallback', 'default']
steps:
- uses: actions/checkout@v3

- name: Install packages
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1
with:
version: ${{matrix.cxx}}
- name: Install meson
run: |
sudo apt install -y clang-${{matrix.cxx}} libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev lld-${{matrix.cxx}} libcurl4-gnutls-dev
python3 -m pip install meson ninja

sudo apt install -y libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev
- name: Compile and Test
env:
CXX: clang++-${{matrix.cxx}}
CXXFLAGS: -stdlib=libc++
CXX_LD: lld-${{matrix.cxx}}
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++20
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
VisualStudio:
Expand All @@ -76,23 +72,48 @@ jobs:
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++latest
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
VisualStudio-clang-cl:
runs-on: windows-latest
name: clang-cl-${{matrix.deps}}
strategy:
matrix:
deps: ['forcefallback', 'default']
steps:
- uses: actions/checkout@v3

- name: Install packages
run: |
python -m pip install meson ninja

- uses: ilammy/msvc-dev-cmd@v1

- name: Compile and Test
env:
CC: clang-cl
CXX: clang-cl
run: |
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++latest
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
MSYS2:
runs-on: windows-latest
name: MSYS2-${{matrix.platform}}-deps=${{matrix.deps}}
strategy:
matrix:
deps: ['enabled', 'disabled']
platform: ['UCRT64', 'CLANG32', 'CLANG64']
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3

- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
install: >-
dos2unix
pacboy: >-
cc:p
cmake:p
curl:p
gtest:p
libinih:p
Expand All @@ -101,7 +122,6 @@ jobs:
pkgconf:p

- name: Compile and Test
shell: msys2 {0}
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
Expand All @@ -117,14 +137,14 @@ jobs:

- name: Install packages
run: |
brew install curl
python3 -m pip install meson ninja
brew install curl brotli inih expat googletest
python3 -m pip install meson==0.54.1 ninja

- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3
meson compile -C "${{github.workspace}}/build"
meson test -C "${{github.workspace}}/build"
FreeBSD:
runs-on: macos-latest
name: FreeBSD
Expand All @@ -134,22 +154,22 @@ jobs:
uses: vmactions/freebsd-vm@v0
with:
prepare: |
pkg install -y curl ninja meson gettext pkgconf googletest expat inih brotli
pkg install -y cmake curl ninja meson gettext pkgconf googletest expat inih brotli
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
OpenBSD:
runs-on: macos-latest
name: OpenBSD
Emscripten:
runs-on: ubuntu-latest
name: Emscripten
steps:
- uses: actions/checkout@v3
- name: OpenBSD
uses: vmactions/openbsd-vm@v0
with:
prepare: |
pkg_add curl ninja meson gettext pkgconf gtest libiconv
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
- uses: actions/checkout@v4
- name: Install packages
run: |
python3 -m pip install meson ninja
- name: Emscripten
uses: mymindstorm/setup-emsdk@v12
- name: Compile
run: |
meson setup "${{github.workspace}}/build" --cross-file="${{github.workspace}}/em.txt" --wrap-mode=forcefallback -Ddefault_library=static -Dwarning_level=3 -Dcpp_std=c++20 -DunitTests=disabled -Dcurl=disabled
meson compile -C "${{github.workspace}}/build" --verbose
11 changes: 11 additions & 0 deletions em.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[binaries]
c = 'emcc'
cpp = 'em++'
ar = 'emar'
nm = 'emnm'

[host_machine]
system = 'emscripten'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
60 changes: 60 additions & 0 deletions include/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
headers = files(
'exiv2/basicio.hpp',
'exiv2/bmffimage.hpp',
'exiv2/bmpimage.hpp',
'exiv2/config.h',
'exiv2/convert.hpp',
'exiv2/cr2image.hpp',
'exiv2/crwimage.hpp',
'exiv2/datasets.hpp',
'exiv2/easyaccess.hpp',
'exiv2/epsimage.hpp',
'exiv2/error.hpp',
'exiv2/exif.hpp',
'exiv2/exiv2.hpp',
'exiv2/futils.hpp',
'exiv2/gifimage.hpp',
'exiv2/http.hpp',
'exiv2/image.hpp',
'exiv2/image_types.hpp',
'exiv2/iptc.hpp',
'exiv2/jp2image.hpp',
'exiv2/jpgimage.hpp',
'exiv2/metadatum.hpp',
'exiv2/mrwimage.hpp',
'exiv2/orfimage.hpp',
'exiv2/pgfimage.hpp',
'exiv2/photoshop.hpp',
'exiv2/pngimage.hpp',
'exiv2/preview.hpp',
'exiv2/properties.hpp',
'exiv2/psdimage.hpp',
'exiv2/rafimage.hpp',
'exiv2/rw2image.hpp',
'exiv2/slice.hpp',
'exiv2/tags.hpp',
'exiv2/tgaimage.hpp',
'exiv2/tiffimage.hpp',
'exiv2/types.hpp',
'exiv2/value.hpp',
'exiv2/version.hpp',
'exiv2/webpimage.hpp',
'exiv2/xmp_exiv2.hpp',
'exiv2/xmpsidecar.hpp',
)

if get_option('video')
headers += files('exiv2/asfvideo.hpp', 'exiv2/matroskavideo.hpp', 'exiv2/quicktimevideo.hpp', 'exiv2/riffvideo.hpp')
endif

if zlib_dep.found()
headers += files('exiv2/pngimage.hpp')
endif

headers += exiv_conf
headers += cfile

install_headers(
headers,
subdir: 'exiv2',
)
Loading