From 042d6232f4fa4c05c7e0950609c3c5a2525f5b04 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 8 Jun 2022 10:33:48 +0900 Subject: [PATCH] rearrange the directories of git repository and fix some build break. Change-Id: I723cb9e5f13f05f5761d668737f6e2c9c84f9cac --- {src/clients => clients}/input-generator.c | 0 {src/clients => clients}/meson.build | 26 ++++---- {src/clients => clients}/simple-dpms.c | 0 {src/clients => clients}/simple-tbm.c | 0 {src/examples => examples}/meson.build | 22 +++---- {src/examples => examples}/pixman-helper.c | 0 {src/examples => examples}/pixman-helper.h | 0 {src/examples => examples}/pixman-tbm-helper.c | 0 {src/examples => examples}/pixman-tbm-helper.h | 0 {src/examples => examples}/tdm-backend.c | 0 {src/examples => examples}/tinyds-tdm-dpms.c | 0 {src/examples => examples}/tinyds-tdm-libinput.c | 0 {src/examples => examples}/tinyds-tdm-renderer.c | 0 {src/examples => examples}/tinyds-tdm-renderer.h | 0 {src/examples => examples}/tinyds-tdm.c | 0 meson.build | 15 +++++ packaging/libds-tizen.spec | 31 +++++----- src/{libds-tizen => }/allocator/meson.build | 0 src/{libds-tizen => }/allocator/tbm.c | 0 src/{libds-tizen => }/backend/meson.build | 0 src/{libds-tizen => }/backend/tdm/backend.c | 0 src/{libds-tizen => }/backend/tdm/meson.build | 0 src/{libds-tizen => }/backend/tdm/output.c | 0 src/{libds-tizen => }/backend/tdm/tdm.h | 0 .../backend/tdm/tdm_buffer_queue.c | 0 .../backend/tdm/tdm_buffer_queue.h | 0 src/{libds-tizen => }/dpms.c | 0 .../input-devicemgr/input-devicemgr.c | 0 .../input-devicemgr/input-devicemgr.h | 0 src/{libds-tizen => }/input-devicemgr/meson.build | 1 - src/{libds-tizen => }/keyrouter/keyrouter.c | 0 src/{libds-tizen => }/keyrouter/keyrouter.h | 0 src/{libds-tizen => }/keyrouter/keyrouter_grab.c | 0 src/{libds-tizen => }/keyrouter/meson.build | 0 src/libds-tizen/meson.build | 63 ------------------- src/meson.build | 71 ++++++++++++++++++---- src/{libds-tizen => }/pixel_format.c | 0 src/{libds-tizen => }/pixel_format.h | 0 src/{libds-tizen => }/tbm_server.c | 0 src/{libds-tizen => }/tbm_server.h | 0 src/{libds-tizen => }/util.h | 0 src/{libds-tizen => }/util/meson.build | 0 src/{libds-tizen => }/util/security.c | 0 {src/tests => tests}/meson.build | 0 {src/tests => tests}/test-backend.c | 0 {src/tests => tests}/test-compositor.c | 0 {src/tests => tests}/test-subsurface.c | 0 {src/tests => tests}/test-surface.c | 0 48 files changed, 114 insertions(+), 115 deletions(-) rename {src/clients => clients}/input-generator.c (100%) rename {src/clients => clients}/meson.build (80%) rename {src/clients => clients}/simple-dpms.c (100%) rename {src/clients => clients}/simple-tbm.c (100%) rename {src/examples => examples}/meson.build (79%) rename {src/examples => examples}/pixman-helper.c (100%) rename {src/examples => examples}/pixman-helper.h (100%) rename {src/examples => examples}/pixman-tbm-helper.c (100%) rename {src/examples => examples}/pixman-tbm-helper.h (100%) rename {src/examples => examples}/tdm-backend.c (100%) rename {src/examples => examples}/tinyds-tdm-dpms.c (100%) rename {src/examples => examples}/tinyds-tdm-libinput.c (100%) rename {src/examples => examples}/tinyds-tdm-renderer.c (100%) rename {src/examples => examples}/tinyds-tdm-renderer.h (100%) rename {src/examples => examples}/tinyds-tdm.c (100%) rename src/{libds-tizen => }/allocator/meson.build (100%) rename src/{libds-tizen => }/allocator/tbm.c (100%) rename src/{libds-tizen => }/backend/meson.build (100%) rename src/{libds-tizen => }/backend/tdm/backend.c (100%) rename src/{libds-tizen => }/backend/tdm/meson.build (100%) rename src/{libds-tizen => }/backend/tdm/output.c (100%) rename src/{libds-tizen => }/backend/tdm/tdm.h (100%) rename src/{libds-tizen => }/backend/tdm/tdm_buffer_queue.c (100%) rename src/{libds-tizen => }/backend/tdm/tdm_buffer_queue.h (100%) rename src/{libds-tizen => }/dpms.c (100%) rename src/{libds-tizen => }/input-devicemgr/input-devicemgr.c (100%) rename src/{libds-tizen => }/input-devicemgr/input-devicemgr.h (100%) rename src/{libds-tizen => }/input-devicemgr/meson.build (98%) rename src/{libds-tizen => }/keyrouter/keyrouter.c (100%) rename src/{libds-tizen => }/keyrouter/keyrouter.h (100%) rename src/{libds-tizen => }/keyrouter/keyrouter_grab.c (100%) rename src/{libds-tizen => }/keyrouter/meson.build (100%) delete mode 100644 src/libds-tizen/meson.build rename src/{libds-tizen => }/pixel_format.c (100%) rename src/{libds-tizen => }/pixel_format.h (100%) rename src/{libds-tizen => }/tbm_server.c (100%) rename src/{libds-tizen => }/tbm_server.h (100%) rename src/{libds-tizen => }/util.h (100%) rename src/{libds-tizen => }/util/meson.build (100%) rename src/{libds-tizen => }/util/security.c (100%) rename {src/tests => tests}/meson.build (100%) rename {src/tests => tests}/test-backend.c (100%) rename {src/tests => tests}/test-compositor.c (100%) rename {src/tests => tests}/test-subsurface.c (100%) rename {src/tests => tests}/test-surface.c (100%) diff --git a/src/clients/input-generator.c b/clients/input-generator.c similarity index 100% rename from src/clients/input-generator.c rename to clients/input-generator.c diff --git a/src/clients/meson.build b/clients/meson.build similarity index 80% rename from src/clients/meson.build rename to clients/meson.build index b22419b..5d80f18 100644 --- a/src/clients/meson.build +++ b/clients/meson.build @@ -52,19 +52,19 @@ executable('ds-simple-dpms', dependency('wayland-client', required: true), dependency('tizen-dpms-client', required: true), ], - install_dir: libds_bindir, + install_dir: libds_tizen_bindir, install: true, ) -input_generator_files = ['input-generator.c'] -input_generator_deps = [ - dependency('wayland-client', required: true), - tizen_extension_client, -] - -executable('input-generator', - input_generator_files, - dependencies: input_generator_deps, - install_dir: libds_bindir, - install: true, -) +# input_generator_files = ['input-generator.c'] +# input_generator_deps = [ +# dependency('wayland-client', required: true), +# tizen_extension_client, +# ] +# +# executable('input-generator', +# input_generator_files, +# dependencies: input_generator_deps, +# install_dir: libds_tizen_bindir, +# install: true, +# ) diff --git a/src/clients/simple-dpms.c b/clients/simple-dpms.c similarity index 100% rename from src/clients/simple-dpms.c rename to clients/simple-dpms.c diff --git a/src/clients/simple-tbm.c b/clients/simple-tbm.c similarity index 100% rename from src/clients/simple-tbm.c rename to clients/simple-tbm.c diff --git a/src/examples/meson.build b/examples/meson.build similarity index 79% rename from src/examples/meson.build rename to examples/meson.build index af04c50..5917f02 100644 --- a/src/examples/meson.build +++ b/examples/meson.build @@ -35,16 +35,16 @@ tinyds_tdm_libinput_files = [ 'tinyds-tdm-renderer.c', ] -executable('tinyds-tdm-libinput', - tinyds_tdm_libinput_files, - dependencies: [ - common_deps, - dependency('pixman-1', required: true), - dependency('threads', required: true), - ], - install_dir: libds_tizen_bindir, - install : true -) +#executable('tinyds-tdm-libinput', +# tinyds_tdm_libinput_files, +# dependencies: [ +# common_deps, +# dependency('pixman-1', required: true), +# dependency('threads', required: true), +# ], +# install_dir: libds_tizen_bindir, +# install : true +#) executable('tinyds-tdm-dpms', 'tinyds-tdm-dpms.c', @@ -56,6 +56,6 @@ executable('tinyds-tdm-dpms', dependency('pixman-1', required: true), dependency('threads', required: true), ], - install_dir: libds_bindir, + install_dir: libds_tizen_bindir, install : true ) diff --git a/src/examples/pixman-helper.c b/examples/pixman-helper.c similarity index 100% rename from src/examples/pixman-helper.c rename to examples/pixman-helper.c diff --git a/src/examples/pixman-helper.h b/examples/pixman-helper.h similarity index 100% rename from src/examples/pixman-helper.h rename to examples/pixman-helper.h diff --git a/src/examples/pixman-tbm-helper.c b/examples/pixman-tbm-helper.c similarity index 100% rename from src/examples/pixman-tbm-helper.c rename to examples/pixman-tbm-helper.c diff --git a/src/examples/pixman-tbm-helper.h b/examples/pixman-tbm-helper.h similarity index 100% rename from src/examples/pixman-tbm-helper.h rename to examples/pixman-tbm-helper.h diff --git a/src/examples/tdm-backend.c b/examples/tdm-backend.c similarity index 100% rename from src/examples/tdm-backend.c rename to examples/tdm-backend.c diff --git a/src/examples/tinyds-tdm-dpms.c b/examples/tinyds-tdm-dpms.c similarity index 100% rename from src/examples/tinyds-tdm-dpms.c rename to examples/tinyds-tdm-dpms.c diff --git a/src/examples/tinyds-tdm-libinput.c b/examples/tinyds-tdm-libinput.c similarity index 100% rename from src/examples/tinyds-tdm-libinput.c rename to examples/tinyds-tdm-libinput.c diff --git a/src/examples/tinyds-tdm-renderer.c b/examples/tinyds-tdm-renderer.c similarity index 100% rename from src/examples/tinyds-tdm-renderer.c rename to examples/tinyds-tdm-renderer.c diff --git a/src/examples/tinyds-tdm-renderer.h b/examples/tinyds-tdm-renderer.h similarity index 100% rename from src/examples/tinyds-tdm-renderer.h rename to examples/tinyds-tdm-renderer.h diff --git a/src/examples/tinyds-tdm.c b/examples/tinyds-tdm.c similarity index 100% rename from src/examples/tinyds-tdm.c rename to examples/tinyds-tdm.c diff --git a/meson.build b/meson.build index 410b271..dfe8129 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,22 @@ cdata.set('LIBDS_VERSION_MAJOR', libds_tizen_version_major) cdata.set('LIBDS_VERSION_MINOR', libds_tizen_version_minor) cdata.set('LIBDS_VERSION_PATCH', libds_tizen_version_patch) +wayland_protos = dependency('wayland-protocols', + fallback: ['wayland-protocols', 'wayland_protocols'], + default_options: ['tests=false'], +) +wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') + +wayland_scanner_dep = dependency('wayland-scanner', native: true) +wayland_scanner = find_program( + wayland_scanner_dep.get_variable('wayland_scanner'), + native: true, +) + subdir('src') +subdir('tests') +subdir('examples') +subdir('clients') subdir('include') configure_file(output: 'config.h', install: false, configuration: cdata) diff --git a/packaging/libds-tizen.spec b/packaging/libds-tizen.spec index ceb7b50..5c8e2a9 100644 --- a/packaging/libds-tizen.spec +++ b/packaging/libds-tizen.spec @@ -100,9 +100,8 @@ ninja -C builddir install %{_bindir}/tdm-backend %{_bindir}/tinyds-tdm %{_bindir}/ds-simple-tbm -%{_bindir}/tinyds-tdm-libinput %{_bindir}/tinyds-tdm-dpms -%{_bindir}/input-generator +%{_bindir}/ds-simple-dpms %files keyrouter %manifest %{name}.manifest @@ -118,16 +117,18 @@ ninja -C builddir install %{_libdir}/pkgconfig/libds-tizen-keyrouter.pc %{_libdir}/libds-tizen-keyrouter.so -%files tizen-input-devicemgr -%manifest %{name}.manifest -%defattr(-,root,root,-) -%license LICENSE -%{_libdir}/libds-tizen-input-devicemgr.so.* - -%files tizen-input-devicemgr-devel -%manifest %{name}.manifest -%defattr(-,root,root,-) -%license LICENSE -%{_includedir}/libds-tizen/input-devicemgr.h -%{_libdir}/pkgconfig/libds-tizen-input-devicemgr.pc -%{_libdir}/libds-tizen-input-devicemgr.so +# %files input-devicemgr +# %manifest %{name}.manifest +# %defattr(-,root,root,-) +# %license LICENSE +# %{_libdir}/libds-tizen-input-devicemgr.so.* +# +# %files input-devicemgr-devel +# %manifest %{name}.manifest +# %defattr(-,root,root,-) +# %license LICENSE +# %{_includedir}/libds-tizen/input-devicemgr.h +# %{_libdir}/pkgconfig/libds-tizen-input-devicemgr.pc +# %{_libdir}/libds-tizen-input-devicemgr.so +# %{_bindir}/tinyds-tdm-libinput +# %{_bindir}/input-generator diff --git a/src/libds-tizen/allocator/meson.build b/src/allocator/meson.build similarity index 100% rename from src/libds-tizen/allocator/meson.build rename to src/allocator/meson.build diff --git a/src/libds-tizen/allocator/tbm.c b/src/allocator/tbm.c similarity index 100% rename from src/libds-tizen/allocator/tbm.c rename to src/allocator/tbm.c diff --git a/src/libds-tizen/backend/meson.build b/src/backend/meson.build similarity index 100% rename from src/libds-tizen/backend/meson.build rename to src/backend/meson.build diff --git a/src/libds-tizen/backend/tdm/backend.c b/src/backend/tdm/backend.c similarity index 100% rename from src/libds-tizen/backend/tdm/backend.c rename to src/backend/tdm/backend.c diff --git a/src/libds-tizen/backend/tdm/meson.build b/src/backend/tdm/meson.build similarity index 100% rename from src/libds-tizen/backend/tdm/meson.build rename to src/backend/tdm/meson.build diff --git a/src/libds-tizen/backend/tdm/output.c b/src/backend/tdm/output.c similarity index 100% rename from src/libds-tizen/backend/tdm/output.c rename to src/backend/tdm/output.c diff --git a/src/libds-tizen/backend/tdm/tdm.h b/src/backend/tdm/tdm.h similarity index 100% rename from src/libds-tizen/backend/tdm/tdm.h rename to src/backend/tdm/tdm.h diff --git a/src/libds-tizen/backend/tdm/tdm_buffer_queue.c b/src/backend/tdm/tdm_buffer_queue.c similarity index 100% rename from src/libds-tizen/backend/tdm/tdm_buffer_queue.c rename to src/backend/tdm/tdm_buffer_queue.c diff --git a/src/libds-tizen/backend/tdm/tdm_buffer_queue.h b/src/backend/tdm/tdm_buffer_queue.h similarity index 100% rename from src/libds-tizen/backend/tdm/tdm_buffer_queue.h rename to src/backend/tdm/tdm_buffer_queue.h diff --git a/src/libds-tizen/dpms.c b/src/dpms.c similarity index 100% rename from src/libds-tizen/dpms.c rename to src/dpms.c diff --git a/src/libds-tizen/input-devicemgr/input-devicemgr.c b/src/input-devicemgr/input-devicemgr.c similarity index 100% rename from src/libds-tizen/input-devicemgr/input-devicemgr.c rename to src/input-devicemgr/input-devicemgr.c diff --git a/src/libds-tizen/input-devicemgr/input-devicemgr.h b/src/input-devicemgr/input-devicemgr.h similarity index 100% rename from src/libds-tizen/input-devicemgr/input-devicemgr.h rename to src/input-devicemgr/input-devicemgr.h diff --git a/src/libds-tizen/input-devicemgr/meson.build b/src/input-devicemgr/meson.build similarity index 98% rename from src/libds-tizen/input-devicemgr/meson.build rename to src/input-devicemgr/meson.build index 30924a4..7006326 100644 --- a/src/libds-tizen/input-devicemgr/meson.build +++ b/src/input-devicemgr/meson.build @@ -3,7 +3,6 @@ libds_tizen_input_devicemgr_files = [ ] libds_tizen_input_devicemgr_deps = [ - dep_libds, dep_libds_tizen, dependency('tizen-extension-server', required: true), ] diff --git a/src/libds-tizen/keyrouter/keyrouter.c b/src/keyrouter/keyrouter.c similarity index 100% rename from src/libds-tizen/keyrouter/keyrouter.c rename to src/keyrouter/keyrouter.c diff --git a/src/libds-tizen/keyrouter/keyrouter.h b/src/keyrouter/keyrouter.h similarity index 100% rename from src/libds-tizen/keyrouter/keyrouter.h rename to src/keyrouter/keyrouter.h diff --git a/src/libds-tizen/keyrouter/keyrouter_grab.c b/src/keyrouter/keyrouter_grab.c similarity index 100% rename from src/libds-tizen/keyrouter/keyrouter_grab.c rename to src/keyrouter/keyrouter_grab.c diff --git a/src/libds-tizen/keyrouter/meson.build b/src/keyrouter/meson.build similarity index 100% rename from src/libds-tizen/keyrouter/meson.build rename to src/keyrouter/meson.build diff --git a/src/libds-tizen/meson.build b/src/libds-tizen/meson.build deleted file mode 100644 index 1ee9b99..0000000 --- a/src/libds-tizen/meson.build +++ /dev/null @@ -1,63 +0,0 @@ -libds_tizen_files = [ - 'pixel_format.c', - 'tbm_server.c', - 'dpms.c', -] - -math = meson.get_compiler('c').find_library('m') -wayland_server = dependency('wayland-server', required: true) -pixman = dependency('pixman-1', required: true) -libdrm = dependency('libdrm', required: true) -xkbcommon = dependency('xkbcommon', required: true) -rt = meson.get_compiler('c').find_library('rt') - -if wayland_server.version().version_compare('>= 1.19') - cdata.set('HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY', '1') -endif - -base_deps = [ - math, - wayland_server, - pixman, - libdrm, - xkbcommon, - rt, -] - -libds_tizen_deps = [ - base_deps, - dependency('libds', required: true), - dependency('libdrm', required: true), - dependency('libtbm', required: true), - dependency('wayland-tbm-server', required: true), - dependency('tizen-dpms-server', required: true), -] - -subdir('allocator') -subdir('backend') -subdir('util') - -lib_libds_tizen = shared_library('ds-tizen', libds_tizen_files, - dependencies: libds_tizen_deps, - include_directories: [ common_inc, include_directories('.') ], - version: meson.project_version(), - install: true -) - -dep_libds_tizen = declare_dependency( - link_with: lib_libds_tizen, - dependencies: libds_tizen_deps, - include_directories: [ common_inc, include_directories('.') ], -) - -pkgconfig = import('pkgconfig') -pkgconfig.generate(lib_libds_tizen, - version: meson.project_version(), - filebase: 'libds-tizen', - name: 'libds-tizen', - description: 'extension of libds for tizen platform', -) - -subdir('keyrouter') -subdir('input-devicemgr') - diff --git a/src/meson.build b/src/meson.build index d213f62..28ec46e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,16 +1,63 @@ -wayland_protos = dependency('wayland-protocols', - fallback: ['wayland-protocols', 'wayland_protocols'], - default_options: ['tests=false'], +libds_tizen_files = [ + 'pixel_format.c', + 'tbm_server.c', + 'dpms.c', +] + +math = meson.get_compiler('c').find_library('m') +wayland_server = dependency('wayland-server', required: true) +pixman = dependency('pixman-1', required: true) +libdrm = dependency('libdrm', required: true) +xkbcommon = dependency('xkbcommon', required: true) +rt = meson.get_compiler('c').find_library('rt') + +if wayland_server.version().version_compare('>= 1.19') + cdata.set('HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY', '1') +endif + +base_deps = [ + math, + wayland_server, + pixman, + libdrm, + xkbcommon, + rt, +] + +libds_tizen_deps = [ + base_deps, + dependency('libds', required: true), + dependency('libdrm', required: true), + dependency('libtbm', required: true), + dependency('wayland-tbm-server', required: true), + dependency('tizen-dpms-server', required: true), +] + +subdir('allocator') +subdir('backend') +subdir('util') + +lib_libds_tizen = shared_library('ds-tizen', libds_tizen_files, + dependencies: libds_tizen_deps, + include_directories: [ common_inc, include_directories('.') ], + version: meson.project_version(), + install: true +) + +dep_libds_tizen = declare_dependency( + link_with: lib_libds_tizen, + dependencies: libds_tizen_deps, + include_directories: [ common_inc, include_directories('.') ], ) -wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') -wayland_scanner_dep = dependency('wayland-scanner', native: true) -wayland_scanner = find_program( - wayland_scanner_dep.get_variable('wayland_scanner'), - native: true, +pkgconfig = import('pkgconfig') +pkgconfig.generate(lib_libds_tizen, + version: meson.project_version(), + filebase: 'libds-tizen', + name: 'libds-tizen', + description: 'extension of libds for tizen platform', ) -subdir('libds-tizen') -#subdir('tests') -subdir('examples') -subdir('clients') +subdir('keyrouter') +#subdir('input-devicemgr') + diff --git a/src/libds-tizen/pixel_format.c b/src/pixel_format.c similarity index 100% rename from src/libds-tizen/pixel_format.c rename to src/pixel_format.c diff --git a/src/libds-tizen/pixel_format.h b/src/pixel_format.h similarity index 100% rename from src/libds-tizen/pixel_format.h rename to src/pixel_format.h diff --git a/src/libds-tizen/tbm_server.c b/src/tbm_server.c similarity index 100% rename from src/libds-tizen/tbm_server.c rename to src/tbm_server.c diff --git a/src/libds-tizen/tbm_server.h b/src/tbm_server.h similarity index 100% rename from src/libds-tizen/tbm_server.h rename to src/tbm_server.h diff --git a/src/libds-tizen/util.h b/src/util.h similarity index 100% rename from src/libds-tizen/util.h rename to src/util.h diff --git a/src/libds-tizen/util/meson.build b/src/util/meson.build similarity index 100% rename from src/libds-tizen/util/meson.build rename to src/util/meson.build diff --git a/src/libds-tizen/util/security.c b/src/util/security.c similarity index 100% rename from src/libds-tizen/util/security.c rename to src/util/security.c diff --git a/src/tests/meson.build b/tests/meson.build similarity index 100% rename from src/tests/meson.build rename to tests/meson.build diff --git a/src/tests/test-backend.c b/tests/test-backend.c similarity index 100% rename from src/tests/test-backend.c rename to tests/test-backend.c diff --git a/src/tests/test-compositor.c b/tests/test-compositor.c similarity index 100% rename from src/tests/test-compositor.c rename to tests/test-compositor.c diff --git a/src/tests/test-subsurface.c b/tests/test-subsurface.c similarity index 100% rename from src/tests/test-subsurface.c rename to tests/test-subsurface.c diff --git a/src/tests/test-surface.c b/tests/test-surface.c similarity index 100% rename from src/tests/test-surface.c rename to tests/test-surface.c -- 2.7.4