diff --git a/.github/workflows/on_PR_meson.yaml b/.github/workflows/on_PR_meson.yaml index eece1bad54..8ce8654ddc 100644 --- a/.github/workflows/on_PR_meson.yaml +++ b/.github/workflows/on_PR_meson.yaml @@ -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: @@ -76,6 +72,29 @@ 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}} @@ -83,16 +102,18 @@ jobs: 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 @@ -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 @@ -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 @@ -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 diff --git a/em.txt b/em.txt new file mode 100644 index 0000000000..5956c1506c --- /dev/null +++ b/em.txt @@ -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' diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000000..7bbb3800f1 --- /dev/null +++ b/include/meson.build @@ -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', +) diff --git a/meson.build b/meson.build index 2562ab0923..4a9417cfbb 100644 --- a/meson.build +++ b/meson.build @@ -17,12 +17,10 @@ else endif if host_machine.system() == 'windows' - if cpp.get_argument_syntax() == 'gcc' - if cpp.compiles('#include \n#ifdef _UCRT\n#error\n#endif') - add_project_arguments('-D__USE_MINGW_ANSI_STDIO', '-D__MINGW_USE_VC2005_COMPAT', language: 'cpp') - endif - else + if cpp.get_argument_syntax() == 'msvc' add_project_arguments('-DNOMINMAX', language: 'cpp') + elif cpp.compiles('#include \n#ifdef _UCRT\n#error\n#endif') + error('Non UCRT MinGW is unsupported. Please update toolchain') endif endif @@ -91,8 +89,10 @@ endif if meson.version().version_compare('>= 0.60') iconv_dep = dependency('iconv', required: get_option('iconv')) +elif not get_option('iconv').disabled() and not cpp.links('#include \nint main(){iconv_open("", "");}') + iconv_dep = cpp.find_library('iconv', required: get_option('iconv')) else - iconv_dep = dependency('', required: false) + iconv_dep = get_option('iconv').disabled() ? dependency('', required: false) : declare_dependency() endif if iconv_dep.found() deps += iconv_dep @@ -124,235 +124,23 @@ cfile = configure_file( configuration: cdata, ) -base_lib = files( - 'src/asfvideo.cpp', - 'src/basicio.cpp', - 'src/bmffimage.cpp', - 'src/bmpimage.cpp', - 'src/cr2image.cpp', - 'src/crwimage.cpp', - 'src/datasets.cpp', - 'src/easyaccess.cpp', - 'src/epsimage.cpp', - 'src/error.cpp', - 'src/exif.cpp', - 'src/futils.cpp', - 'src/gifimage.cpp', - 'src/http.cpp', - 'src/image.cpp', - 'src/iptc.cpp', - 'src/jp2image.cpp', - 'src/jpgimage.cpp', - 'src/matroskavideo.cpp', - 'src/metadatum.cpp', - 'src/mrwimage.cpp', - 'src/orfimage.cpp', - 'src/pgfimage.cpp', - 'src/photoshop.cpp', - 'src/preview.cpp', - 'src/properties.cpp', - 'src/psdimage.cpp', - 'src/quicktimevideo.cpp', - 'src/rafimage.cpp', - 'src/riffvideo.cpp', - 'src/rw2image.cpp', - 'src/tags.cpp', - 'src/tgaimage.cpp', - 'src/tiffimage.cpp', - 'src/types.cpp', - 'src/value.cpp', - 'src/version.cpp', - 'src/webpimage.cpp', - 'src/xmp.cpp', - 'src/xmpsidecar.cpp', -) - -int_lib = files( - 'src/canonmn_int.cpp', - 'src/casiomn_int.cpp', - 'src/cr2header_int.cpp', - 'src/crwimage_int.cpp', - 'src/fujimn_int.cpp', - 'src/helper_functions.cpp', - 'src/image_int.cpp', - 'src/jp2image_int.cpp', - 'src/makernote_int.cpp', - 'src/minoltamn_int.cpp', - 'src/nikonmn_int.cpp', - 'src/olympusmn_int.cpp', - 'src/orfimage_int.cpp', - 'src/panasonicmn_int.cpp', - 'src/pentaxmn_int.cpp', - 'src/rw2image_int.cpp', - 'src/samsungmn_int.cpp', - 'src/sigmamn_int.cpp', - 'src/sonymn_int.cpp', - 'src/tags_int.cpp', - 'src/tiffcomposite_int.cpp', - 'src/tiffimage_int.cpp', - 'src/tiffvisitor_int.cpp', - 'src/utils.cpp', -) - -headers = files( - 'include/exiv2/basicio.hpp', - 'include/exiv2/bmffimage.hpp', - 'include/exiv2/bmpimage.hpp', - 'include/exiv2/config.h', - 'include/exiv2/convert.hpp', - 'include/exiv2/cr2image.hpp', - 'include/exiv2/crwimage.hpp', - 'include/exiv2/datasets.hpp', - 'include/exiv2/easyaccess.hpp', - 'include/exiv2/epsimage.hpp', - 'include/exiv2/error.hpp', - 'include/exiv2/exif.hpp', - 'include/exiv2/exiv2.hpp', - 'include/exiv2/futils.hpp', - 'include/exiv2/gifimage.hpp', - 'include/exiv2/http.hpp', - 'include/exiv2/image.hpp', - 'include/exiv2/image_types.hpp', - 'include/exiv2/iptc.hpp', - 'include/exiv2/jp2image.hpp', - 'include/exiv2/jpgimage.hpp', - 'include/exiv2/metadatum.hpp', - 'include/exiv2/mrwimage.hpp', - 'include/exiv2/orfimage.hpp', - 'include/exiv2/pgfimage.hpp', - 'include/exiv2/photoshop.hpp', - 'include/exiv2/pngimage.hpp', - 'include/exiv2/preview.hpp', - 'include/exiv2/properties.hpp', - 'include/exiv2/psdimage.hpp', - 'include/exiv2/rafimage.hpp', - 'include/exiv2/rw2image.hpp', - 'include/exiv2/slice.hpp', - 'include/exiv2/tags.hpp', - 'include/exiv2/tgaimage.hpp', - 'include/exiv2/tiffimage.hpp', - 'include/exiv2/types.hpp', - 'include/exiv2/value.hpp', - 'include/exiv2/version.hpp', - 'include/exiv2/webpimage.hpp', - 'include/exiv2/xmp_exiv2.hpp', - 'include/exiv2/xmpsidecar.hpp', -) - -headers += exiv_conf -headers += cfile - -libinc = include_directories('include/exiv2') -xmp_lib = files() -if expat_dep.found() - libinc = include_directories('include/exiv2', 'xmpsdk/include') - xmp_lib = files( - 'xmpsdk/src/ExpatAdapter.cpp', - 'xmpsdk/src/MD5.cpp', - 'xmpsdk/src/ParseRDF.cpp', - 'xmpsdk/src/UnicodeConversions.cpp', - 'xmpsdk/src/WXMPIterator.cpp', - 'xmpsdk/src/WXMPMeta.cpp', - 'xmpsdk/src/WXMPUtils.cpp', - 'xmpsdk/src/XML_Node.cpp', - 'xmpsdk/src/XMPCore_Impl.cpp', - 'xmpsdk/src/XMPIterator.cpp', - 'xmpsdk/src/XMPMeta-GetSet.cpp', - 'xmpsdk/src/XMPMeta-Parse.cpp', - 'xmpsdk/src/XMPMeta-Serialize.cpp', - 'xmpsdk/src/XMPMeta.cpp', - 'xmpsdk/src/XMPUtils-FileInfo.cpp', - 'xmpsdk/src/XMPUtils.cpp', - ) -endif - -if zlib_dep.found() - base_lib += files('src/pngimage.cpp') - int_lib += files('src/pngchunk_int.cpp') - headers += files('include/exiv2/photoshop.hpp') -endif - -install_man('man/man1/exiv2.1') - -install_headers( - headers, - subdir: 'exiv2', -) - -exiv2int = static_library( - 'exiv2int', - int_lib, - cpp_args: '-DEXIV2API=', - dependencies: deps, - include_directories: libinc, -) - +libinc = include_directories('.', 'include/exiv2') depinc = include_directories('.', 'include') -exiv2int_dep = declare_dependency( - include_directories: depinc, - link_with: exiv2int, -) - -# This is compiled separately, because there are multiple sources for iconv -# (methods "builtin" and "system") and it's possible to have the include -# directory from one dependency leak over and force the system iconv to be used -# instead of the builtin one. This causes miscompilation. -convertlib = static_library( - '_convert', - 'src/convert.cpp', - cpp_args: cargs, - gnu_symbol_visibility: 'hidden', - dependencies: iconv_dep, - include_directories: [depinc, libinc], - build_by_default: false, -) - -exiv2 = library( - 'exiv2', - base_lib, - xmp_lib, - cpp_args: cargs, - version: meson.project_version(), - soversion: sover, - gnu_symbol_visibility: 'hidden', - link_with: convertlib, - dependencies: [deps, exiv2int_dep], - include_directories: libinc, - install: true, -) - -dllapi = '-DEXIV2API=' -if host_machine.system() == 'windows' and get_option('default_library') != 'static' - dllapi = '-DEXIV2API=__declspec(dllimport)' -endif - -exiv2_dep = declare_dependency( - compile_args: dllapi, - dependencies: intl_dep, - include_directories: depinc, - link_with: exiv2, -) - -pkg = import('pkgconfig') -pkg.generate( - exiv2, - description: 'Exif/IPTC/Xmp C++ metadata library and tools plus ICC Profiles, Previews and more.', - url: 'https://exiv2.org', -) +subdir('xmpsdk') +subdir('src') +subdir('include') -exiv2inc = include_directories('include/exiv2', 'src') +install_man('man/man1/exiv2.1') exiv2_sources = files( 'app/actions.cpp', 'app/app_utils.cpp', 'app/exiv2.cpp', 'app/getopt.cpp', + host_machine.system() == 'windows' ? 'app/wmain.cpp' : [], ) -if host_machine.system() == 'windows' - exiv2_sources += files('app/wmain.cpp') -endif - +exiv2inc = include_directories('src', 'include/exiv2') executable( 'exiv2', exiv2_sources, @@ -411,3 +199,4 @@ foreach g : gopt endforeach subdir('unitTests') +subdir('po') diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000000..4a17dff034 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,16 @@ +gtext = find_program('xgettext', required: get_option('nls')) +if not gtext.found() + subdir_done() +endif + +i18n = import('i18n') + +i18n.gettext( + 'exiv2', + preset: 'glib', + args: [ + '--files-from=@0@/POTFILES.in'.format(meson.current_source_dir()), + '--copyright-holder="Exiv2 authors"', + '--msgid-bugs-address=https://github.com/Exiv2/exiv2/issues', + ], +) diff --git a/src/convert.cpp b/src/convert.cpp index 7788e5741d..ed097eed14 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -1386,7 +1386,7 @@ void moveXmpToIptc(XmpData& xmpData, IptcData& iptcData) { converter.cnvFromXmp(); } -bool convertStringCharset(std::string& str, const char* from, const char* to) { +bool convertStringCharset([[maybe_unused]] std::string& str, const char* from, const char* to) { if (0 == strcmp(from, to)) return true; // nothing to do #if defined EXV_HAVE_ICONV diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000000..b5848ca9c4 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,136 @@ +base_lib = files( + 'basicio.cpp', + 'bmffimage.cpp', + 'bmpimage.cpp', + 'cr2image.cpp', + 'crwimage.cpp', + 'datasets.cpp', + 'easyaccess.cpp', + 'epsimage.cpp', + 'error.cpp', + 'exif.cpp', + 'futils.cpp', + 'gifimage.cpp', + 'http.cpp', + 'image.cpp', + 'iptc.cpp', + 'jp2image.cpp', + 'jpgimage.cpp', + 'metadatum.cpp', + 'mrwimage.cpp', + 'orfimage.cpp', + 'pgfimage.cpp', + 'photoshop.cpp', + 'pngimage.cpp', + 'preview.cpp', + 'properties.cpp', + 'psdimage.cpp', + 'rafimage.cpp', + 'rw2image.cpp', + 'tags.cpp', + 'tgaimage.cpp', + 'tiffimage.cpp', + 'types.cpp', + 'value.cpp', + 'version.cpp', + 'webpimage.cpp', + 'xmp.cpp', + 'xmpsidecar.cpp', +) + +if get_option('video') + base_lib += files('asfvideo.cpp', 'matroskavideo.cpp', 'quicktimevideo.cpp', 'riffvideo.cpp') +endif + +int_lib = files( + 'canonmn_int.cpp', + 'casiomn_int.cpp', + 'cr2header_int.cpp', + 'crwimage_int.cpp', + 'fujimn_int.cpp', + 'helper_functions.cpp', + 'image_int.cpp', + 'jp2image_int.cpp', + 'makernote_int.cpp', + 'minoltamn_int.cpp', + 'nikonmn_int.cpp', + 'olympusmn_int.cpp', + 'orfimage_int.cpp', + 'panasonicmn_int.cpp', + 'pentaxmn_int.cpp', + 'pngchunk_int.cpp', + 'rw2image_int.cpp', + 'samsungmn_int.cpp', + 'sigmamn_int.cpp', + 'sonymn_int.cpp', + 'tags_int.cpp', + 'tiffcomposite_int.cpp', + 'tiffimage_int.cpp', + 'tiffvisitor_int.cpp', + 'utils.cpp', +) + +exiv2int = static_library( + 'exiv2int', + int_lib, + cpp_args: '-DEXIV2API=', + dependencies: deps, + include_directories: libinc, +) + +exiv2int_dep = declare_dependency( + include_directories: libinc, + link_with: exiv2int, +) + +# This is compiled separately, because there are multiple sources for iconv +# (methods "builtin" and "system") and it's possible to have the include +# directory from one dependency leak over and force the system iconv to be used +# instead of the builtin one. This causes miscompilation. +convertlib = static_library( + '_convert', + 'convert.cpp', + cpp_args: cargs, + gnu_symbol_visibility: 'hidden', + dependencies: iconv_dep, + include_directories: libinc, + build_by_default: false, +) + +exiv2 = library( + 'exiv2', + base_lib, + xmp_lib, + cpp_args: cargs, + version: meson.project_version(), + soversion: sover, + gnu_symbol_visibility: 'hidden', + link_with: convertlib, + dependencies: [deps, exiv2int_dep], + install: true, +) + +dllapi = '-DEXIV2API=' +if host_machine.system() == 'windows' and get_option('default_library') != 'static' + dllapi = '-DEXIV2API=__declspec(dllimport)' +endif + +cmake = import('cmake') +cmake.write_basic_package_version_file( + name: meson.project_name(), + version: meson.project_version(), +) + +pkg = import('pkgconfig') +pkg.generate( + exiv2, + description: 'Exif/IPTC/Xmp C++ metadata library and tools plus ICC Profiles, Previews and more.', + url: 'https://exiv2.org', +) + +exiv2_dep = declare_dependency( + compile_args: dllapi, + dependencies: intl_dep, + include_directories: depinc, + link_with: exiv2, +) diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap index 90e742db9c..bda901160f 100644 --- a/subprojects/expat.wrap +++ b/subprojects/expat.wrap @@ -3,11 +3,11 @@ directory = expat-2.5.0 source_url = https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.xz source_filename = expat-2.5.0.tar.bz2 source_hash = ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe -patch_filename = expat_2.5.0-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.5.0-2/get_patch -patch_hash = f6cc5ff0d909a2f51a907cc6ca655fb18517a0f58bbe67e4a9c621f1549560c9 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.5.0-2/expat-2.5.0.tar.bz2 -wrapdb_version = 2.5.0-2 +patch_filename = expat_2.5.0-3_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.5.0-3/get_patch +patch_hash = e30c8c32f79fd4563a86a5c9cfe419568c35b775077c2d1428170081129406b4 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.5.0-3/expat-2.5.0.tar.bz2 +wrapdb_version = 2.5.0-3 [provide] expat = expat_dep diff --git a/subprojects/inih.wrap b/subprojects/inih.wrap index b783643606..a4079d25ca 100644 --- a/subprojects/inih.wrap +++ b/subprojects/inih.wrap @@ -1,9 +1,10 @@ [wrap-file] -directory = inih-r56 -source_url = https://github.com/benhoyt/inih/archive/r56.tar.gz -source_filename = inih-r56.tar.gz -source_hash = 4f2ba6bd122d30281a8c7a4d5723b7af90b56aa828c0e88256d7fceda03a491a -wrapdb_version = r56-1 +directory = inih-r57 +source_url = https://github.com/benhoyt/inih/archive/r57.tar.gz +source_filename = inih-r57.tar.gz +source_hash = f03f98ca35c3adb56b2358573c8d3eda319ccd5287243d691e724b7eafa970b3 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/inih_r57-1/inih-r57.tar.gz +wrapdb_version = r57-1 [provide] inih = inih_dep diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap index 23af071a2e..4f19672e4c 100644 --- a/subprojects/zlib.wrap +++ b/subprojects/zlib.wrap @@ -1,12 +1,13 @@ [wrap-file] directory = zlib-1.2.13 source_url = http://zlib.net/fossils/zlib-1.2.13.tar.gz +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.2.13-4/zlib-1.2.13.tar.gz source_filename = zlib-1.2.13.tar.gz source_hash = b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30 -patch_filename = zlib_1.2.13-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-2/get_patch -patch_hash = a7abea3ad65dc2c291ad5fbbf5355d0585a7f7b8c935d4a74335b8fe18684506 -wrapdb_version = 1.2.13-2 +patch_filename = zlib_1.2.13-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-4/get_patch +patch_hash = 19636b7807e679b92240bc7a99aed85d1be908a45430b12c7687a825cb499d5e +wrapdb_version = 1.2.13-4 [provide] zlib = zlib_dep diff --git a/unitTests/meson.build b/unitTests/meson.build index d5875a8342..35d7723936 100644 --- a/unitTests/meson.build +++ b/unitTests/meson.build @@ -50,13 +50,12 @@ endif t_args = ['-UEXIV2API', '-DEXIV2API=', '-DTESTDATA_PATH="@0@"'.format('..' / 'test' / 'data')] -privinc = include_directories('../src', '../include/exiv2') unit_tests = executable( 'unit_tests', test_sources, cpp_args: t_args, dependencies: [deps, exiv2_dep, gtest_dep], - include_directories: privinc, + include_directories: exiv2inc, ) test('Unit Tests', unit_tests) diff --git a/xmpsdk/meson.build b/xmpsdk/meson.build new file mode 100644 index 0000000000..e164bb8907 --- /dev/null +++ b/xmpsdk/meson.build @@ -0,0 +1,24 @@ +if not expat_dep.found() + xmp_lib = files() + subdir_done() +endif + +libinc = [libinc, include_directories('include')] +xmp_lib = files( + 'src/ExpatAdapter.cpp', + 'src/MD5.cpp', + 'src/ParseRDF.cpp', + 'src/UnicodeConversions.cpp', + 'src/WXMPIterator.cpp', + 'src/WXMPMeta.cpp', + 'src/WXMPUtils.cpp', + 'src/XML_Node.cpp', + 'src/XMPCore_Impl.cpp', + 'src/XMPIterator.cpp', + 'src/XMPMeta-GetSet.cpp', + 'src/XMPMeta-Parse.cpp', + 'src/XMPMeta-Serialize.cpp', + 'src/XMPMeta.cpp', + 'src/XMPUtils-FileInfo.cpp', + 'src/XMPUtils.cpp', +)