From 61de4002f116a2a9c7bc834b25d6bbde97f08883 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 29 Mar 2022 10:16:07 -0700 Subject: [PATCH 1/4] .editorconfig: Add --- .editorconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2a2b05e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = tab +indent_size = 8 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + -- GitLab From 9509a1861e2212727fee372d8e5aaccd9ceb4426 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 29 Mar 2022 10:16:54 -0700 Subject: [PATCH 2/4] editorconfig: add meson files --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 2a2b05e..8ad819c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,6 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +[{meson.build, meson_options.txt}] +indent_size = 2 +indent_style = space -- GitLab From 367bfff9c15b02ec03d7eeec0d9309a3402be28f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 29 Mar 2022 10:49:58 -0700 Subject: [PATCH 3/4] meson: Add a meson build system This defaults to building both libraries just like the autotools build does. It makes use of the meson xorg-module for building the man pages, which has still not landed. --- man/meson.build | 15 +++++++++++++++ meson.build | 25 +++++++++++++++++++++++++ src/meson.build | 25 +++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 man/meson.build create mode 100644 meson.build create mode 100644 src/meson.build diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 0000000..198f62b --- /dev/null +++ b/man/meson.build @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: MIT +# Copyright © 2022 Intel Corporation + +xorg = import('unstable-xorg') + +foreach m : ['Xv', 'XvCreateImage', 'XvFreeAdaptorInfo', 'XvFreeEncodingInfo', + 'XvGetPortAttribute', 'XvGetStill', 'XvGetVideo', 'XvGrabPort', + 'XvListImageFormats', 'XvPortNotify', 'XvPutImage', 'XvPutStill', + 'XvPutVideo', 'XvQueryAdaptors', 'XvQueryBestSize', + 'XvQueryEncodings', 'XvQueryExtension', 'XvQueryPortAttributes', + 'XvSelectPortNotify', 'XvSelectVideoNotify', 'XvSetPortAttribute', + 'XvShmCreateImage', 'XvShmPutImage', 'XvStopVideo', 'XvUngrabPort', + 'XvVideoNotify'] + xorg.format_man('@0@.man'.format(m), 'lib') +endforeach diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..232829a --- /dev/null +++ b/meson.build @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT +# Copyright © 2022 Intel Corporation + +project( + 'libxv', + 'c', + version : '1.0.11', + meson_version : '>= 0.62.99', + default_options : ['default_library=both'] +) + +deps = [ + dependency('x11', version : '>= 1.6'), + dependency('xext'), + dependency('xextproto'), + dependency('videoproto'), +] + +install_headers( + 'include/X11/extensions/Xvlib.h', + subdir : 'X11/extensions', +) + +subdir('src') +subdir('man') diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..168234c --- /dev/null +++ b/src/meson.build @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT +# Copyright © 2022 Intel Corporation + +libxv = library( + 'Xv', + 'Xv.c', + dependencies : deps, + version : '1.0.0', + install : true, +) + +ext_libxv = declare_dependency( + link_with : libxv, + include_directories : '../include', +) + +meson.override_dependency('xv', ext_libxv) + +pkg = import('pkgconfig') + +pkg.generate( + libxv, + filebase : 'xv', + description : 'The Xv Library', +) -- GitLab From 0e78524ee264d7ffd3660580840a068298f2e33b Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 29 Mar 2022 10:51:47 -0700 Subject: [PATCH 4/4] autotools: add meson files to dist --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index defcc53..a78ef2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,4 +41,8 @@ lint: (cd src && $(MAKE) $(MFLAGS) lint) endif LINT -EXTRA_DIST = README.md +EXTRA_DIST = \ + meson.build \ + src/meson.build \ + man/meson.build \ + README.md -- GitLab