Rest of the conversion to meson/ninja missed in the first push. Thanks again Claud for the assist.
This commit is contained in:
		
							
								
								
									
										18
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -55,9 +55,27 @@ __pycache__/ | |||||||
| # Local build directory and artifacts | # Local build directory and artifacts | ||||||
| local-build/ | local-build/ | ||||||
| debug-*.out | debug-*.out | ||||||
|  | debug.log | ||||||
| *.gmo | *.gmo | ||||||
| *.pot | *.pot | ||||||
|  |  | ||||||
|  | # Package artifacts | ||||||
|  | *.pkg.tar.zst | ||||||
|  | distro-packages/*/cthulhu/ | ||||||
|  |  | ||||||
|  | # Generated makefiles (should not be committed) | ||||||
|  | Makefile | ||||||
|  | Makefile.in | ||||||
|  |  | ||||||
|  | # Sound files (if binary) | ||||||
|  | sounds/ | ||||||
|  |  | ||||||
|  | # Test files that might be temporary | ||||||
|  | test-dbus.sh | ||||||
|  | test-local-meson.sh | ||||||
|  | test_displayversion.py | ||||||
|  | PORTING-NOTES.md | ||||||
|  |  | ||||||
| # Translation files | # Translation files | ||||||
| po/stamp-po | po/stamp-po | ||||||
| po/insert-header.sed | po/insert-header.sed | ||||||
|   | |||||||
							
								
								
									
										57
									
								
								Makefile.am
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								Makefile.am
									
									
									
									
									
								
							| @@ -1,57 +0,0 @@ | |||||||
| ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |  | ||||||
|  |  | ||||||
| if BUILD_HELP |  | ||||||
| SUBDIRS = docs icons po src help |  | ||||||
| else |  | ||||||
| SUBDIRS = docs icons po src |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| DISTCHECK_CONFIGURE_FLAGS =     \ |  | ||||||
| 	--disable-scrollkeeper |  | ||||||
|  |  | ||||||
| DISTCLEANFILES =                \ |  | ||||||
| 	cthulhu-autostart.desktop |  | ||||||
|  |  | ||||||
| README: README.md |  | ||||||
| 	cp $< $@ |  | ||||||
|  |  | ||||||
| gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor |  | ||||||
|  |  | ||||||
| install-data-hook: update-icon-cache |  | ||||||
| uninstall-hook: update-icon-cache |  | ||||||
| update-icon-cache: |  | ||||||
| 	@-if test -z "$(DESTDIR)"; then \ |  | ||||||
| 		echo "Updating Gtk icon cache."; \ |  | ||||||
| 		$(gtk_update_icon_cache); \ |  | ||||||
| 	else \ |  | ||||||
| 		echo "*** Icon cache not updated.  After (un)install, run this:"; \ |  | ||||||
| 		echo "***   $(gtk_update_icon_cache)"; \ |  | ||||||
| 	fi |  | ||||||
|  |  | ||||||
| autostartdir	 = $(sysconfdir)/xdg/autostart |  | ||||||
| autostart_in_files = cthulhu-autostart.desktop.in |  | ||||||
| autostart_DATA   = $(autostart_in_files:.desktop.in=.desktop) |  | ||||||
|  |  | ||||||
| $(autostart_DATA): $(autostart_in_files) |  | ||||||
| 	$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ |  | ||||||
|  |  | ||||||
| EXTRA_DIST =                \ |  | ||||||
| 	$(autostart_in_files) \ |  | ||||||
| 	$(icon_DATA)        \ |  | ||||||
| 	ChangeLog           \ |  | ||||||
| 	MAINTAINERS         \ |  | ||||||
| 	README.md |  | ||||||
|  |  | ||||||
| dist-hook: |  | ||||||
| 	@if test -d "$(srcdir)/.git"; \ |  | ||||||
| 	then \ |  | ||||||
| 		echo Creating ChangeLog && \ |  | ||||||
| 		( cd "$(top_srcdir)" && \ |  | ||||||
| 		  echo '# Generated by Makefile. Do not edit.'; echo; \ |  | ||||||
| 		  $(top_srcdir)/missing --run git log --pretty=format:"%ai %an <%ae>%n%n        %s%n" --name-status CTHULHU_2_26_0.. ) > ChangeLog.tmp \ |  | ||||||
| 		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ |  | ||||||
| 		|| ( rm -f ChangeLog.tmp ; \ |  | ||||||
| 		echo Failed to generate ChangeLog >&2 ); \ |  | ||||||
| 	else \ |  | ||||||
| 		echo A git clone is required to generate a ChangeLog >&2; \ |  | ||||||
| 	fi |  | ||||||
| @@ -1,57 +0,0 @@ | |||||||
| hicolordir = $(datadir)/icons/hicolor |  | ||||||
| app_icons = \ |  | ||||||
| 	cthulhu-16x16.png		\ |  | ||||||
| 	cthulhu-22x22.png		\ |  | ||||||
| 	cthulhu-24x24.png		\ |  | ||||||
| 	cthulhu-32x32.png		\ |  | ||||||
| 	cthulhu-48x48.png		\ |  | ||||||
| 	cthulhu-256x256.png	\ |  | ||||||
| 	cthulhu-scalable.svg 	\ |  | ||||||
| 	cthulhu-symbolic.svg |  | ||||||
|  |  | ||||||
| install-data-local: |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/16x16/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-16x16.png $(DESTDIR)$(hicolordir)/16x16/apps/cthulhu.png |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/22x22/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-22x22.png $(DESTDIR)$(hicolordir)/22x22/apps/cthulhu.png |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/24x24/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-24x24.png $(DESTDIR)$(hicolordir)/24x24/apps/cthulhu.png |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/32x32/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-32x32.png $(DESTDIR)$(hicolordir)/32x32/apps/cthulhu.png |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/48x48/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-48x48.png $(DESTDIR)$(hicolordir)/48x48/apps/cthulhu.png |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/scalable/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-scalable.svg $(DESTDIR)$(hicolordir)/scalable/apps/cthulhu.svg |  | ||||||
| 	@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/symbolic/apps |  | ||||||
| 	$(INSTALL_DATA) $(srcdir)/cthulhu-symbolic.svg $(DESTDIR)$(hicolordir)/symbolic/apps/cthulhu-symbolic.svg |  | ||||||
| 	 |  | ||||||
| gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor |  | ||||||
|  |  | ||||||
| install-data-hook: |  | ||||||
| 	@-if test -z "$(DESTDIR)"; then \ |  | ||||||
| 		echo "Updating Gtk icon cache."; \ |  | ||||||
| 		$(gtk_update_icon_cache); \ |  | ||||||
| 	else \ |  | ||||||
| 		echo "*** Icon cache not updated.  After install, run this:"; \ |  | ||||||
| 		echo "***   $(gtk_update_icon_cache)"; \ |  | ||||||
| 	fi |  | ||||||
|  |  | ||||||
| uninstall-hook: |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/16x16/apps/cthulhu.png |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/22x22/apps/cthulhu.png |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/24x24/apps/cthulhu.png |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/32x32/apps/cthulhu.png |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/48x48/apps/cthulhu.png |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/scalable/apps/cthulhu.svg |  | ||||||
| 	rm -f $(DESTDIR)$(hicolordir)/symbolic/apps/cthulhu-symbolic.svg |  | ||||||
| 	@-if test -z "$(DESTDIR)"; then \ |  | ||||||
| 		echo "Updating Gtk icon cache."; \ |  | ||||||
| 		$(gtk_update_icon_cache); \ |  | ||||||
| 	else \ |  | ||||||
| 		echo "*** Icon cache not updated.  After uninstall, run this:"; \ |  | ||||||
| 		echo "***   $(gtk_update_icon_cache)"; \ |  | ||||||
| 	fi |  | ||||||
|  |  | ||||||
| update-icon-cache: |  | ||||||
|  |  | ||||||
| EXTRA_DIST = $(app_icons) |  | ||||||
							
								
								
									
										53
									
								
								icons/meson.build
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								icons/meson.build
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | |||||||
|  | # Install icons in hicolor icon theme locations | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-16x16.png', | ||||||
|  |   rename: 'cthulhu.png', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '16x16' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-22x22.png', | ||||||
|  |   rename: 'cthulhu.png',  | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '22x22' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-24x24.png', | ||||||
|  |   rename: 'cthulhu.png', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '24x24' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-32x32.png', | ||||||
|  |   rename: 'cthulhu.png', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '32x32' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-48x48.png', | ||||||
|  |   rename: 'cthulhu.png', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '48x48' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-256x256.png', | ||||||
|  |   rename: 'cthulhu.png', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / '256x256' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-scalable.svg', | ||||||
|  |   rename: 'cthulhu.svg', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-symbolic.svg', | ||||||
|  |   install_dir: get_option('datadir') / 'icons' / 'hicolor' / 'symbolic' / 'apps' | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | # Additional icons | ||||||
|  | install_data( | ||||||
|  |   'cthulhu-splash.svg', | ||||||
|  |   install_dir: get_option('datadir') / 'cthulhu' / 'icons' | ||||||
|  | ) | ||||||
							
								
								
									
										120
									
								
								meson.build
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								meson.build
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,120 @@ | |||||||
|  | project('cthulhu', | ||||||
|  |   version: '2025.08.11', | ||||||
|  |   meson_version: '>= 1.0.0', | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | python = import('python') | ||||||
|  | gnome = import('gnome') | ||||||
|  | i18n = import('i18n') | ||||||
|  |  | ||||||
|  | python_minimum_version = '3.3' | ||||||
|  | python3 = python.find_installation('python3', required: true) | ||||||
|  | if not python3.language_version().version_compare(f'>= @python_minimum_version@') | ||||||
|  |   error(f'Python @python_minimum_version@ or newer is required.') | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # Hard dependencies (checked via pkg-config) | ||||||
|  | dependency('atspi-2', version: '>= 2.48.0') | ||||||
|  | dependency('atk-bridge-2.0', version: '>= 2.26.0') | ||||||
|  | dependency('pygobject-3.0', version: '>= 3.18') | ||||||
|  |  | ||||||
|  | # Hard Python module dependencies | ||||||
|  | gi_result = python.find_installation('python3', modules:['gi'], required: false) | ||||||
|  | if not gi_result.found() | ||||||
|  |   error('gi (PyGObject) is required') | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | json_result = python.find_installation('python3', modules:['json'], required: false) | ||||||
|  | if not json_result.found() | ||||||
|  |   error('json module is required') | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # End users might not have the Gtk development libraries installed, making pkg-config fail. | ||||||
|  | # Therefore, check this dependency via python. | ||||||
|  | gtk_major_version = '3' | ||||||
|  | gtk_minor_version = '0' | ||||||
|  | gtk_command = ' '.join([ | ||||||
|  |   'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk;', | ||||||
|  |   'print(f"{Gtk.get_major_version()}.{Gtk.get_minor_version()}.{Gtk.get_micro_version()}");', | ||||||
|  |   f'failed = Gtk.get_major_version() != @gtk_major_version@;', | ||||||
|  |   'exit(failed)' | ||||||
|  | ]) | ||||||
|  | gtk_test = run_command(python3, '-c', gtk_command, check: false) | ||||||
|  | description = f'GTK @gtk_major_version@.@gtk_minor_version@' | ||||||
|  | version = gtk_test.stdout().strip() | ||||||
|  | if gtk_test.returncode() != 0 | ||||||
|  |   error(f'@description@ failed (found @version@)') | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # Optional python modules with their descriptions | ||||||
|  | optional_modules = { | ||||||
|  |   'brlapi': 'braille output', | ||||||
|  |   'louis': 'contracted braille', | ||||||
|  |   'speechd': 'speech output', | ||||||
|  |   'pluggy': 'plugin system', | ||||||
|  |   'dasbus': 'D-Bus remote controller', | ||||||
|  |   'psutil': 'system information commands', | ||||||
|  |   'gi.repository.Wnck': 'mouse review', | ||||||
|  | } | ||||||
|  |  | ||||||
|  | summary = {} | ||||||
|  | foreach module, description : optional_modules | ||||||
|  |   result = python.find_installation('python3', modules:[module], required: false) | ||||||
|  |   if result.found() | ||||||
|  |     summary += {description: f'yes (found @module@)'} | ||||||
|  |   else | ||||||
|  |     summary += {description: f'no (missing @module@)'} | ||||||
|  |   endif | ||||||
|  | endforeach | ||||||
|  |  | ||||||
|  | # Optional synthesizer services | ||||||
|  | speech_output = [] | ||||||
|  | if python.find_installation('python3', modules:['speechd'], required: false).found() | ||||||
|  |   speech_output += ['speechd'] | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | if speech_output.length() > 0 | ||||||
|  |   summary += {'speech output': 'yes (found @0@)'.format(', '.join(speech_output))} | ||||||
|  | else | ||||||
|  |   summary += {'speech output': 'no (missing speechd)'} | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # Check for GStreamer | ||||||
|  | gstreamer_dep = dependency('gstreamer-1.0', required: false) | ||||||
|  | if gstreamer_dep.found() | ||||||
|  |   summary += {'sound support': 'yes (found gstreamer)'} | ||||||
|  | else | ||||||
|  |   summary += {'sound support': 'no (missing gstreamer)'} | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # Check for libpeas | ||||||
|  | libpeas_dep = dependency('libpeas-1.0', required: false) | ||||||
|  | if libpeas_dep.found() | ||||||
|  |   summary += {'plugin loading': 'yes (found libpeas)'} | ||||||
|  | else | ||||||
|  |   summary += {'plugin loading': 'no (missing libpeas)'} | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | # Integration with session startup | ||||||
|  | i18n.merge_file( | ||||||
|  |   input: 'cthulhu-autostart.desktop.in', | ||||||
|  |   output: '@BASENAME@', | ||||||
|  |   type: 'desktop', | ||||||
|  |   po_dir: meson.project_source_root() / 'po', | ||||||
|  |   install: true, | ||||||
|  |   install_dir: get_option('sysconfdir') / 'xdg' / 'autostart', | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | gnome.post_install( | ||||||
|  |   gtk_update_icon_cache: true, | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | summary += {'Install dir': python.find_installation('python3').get_install_dir()} | ||||||
|  |  | ||||||
|  | subdir('docs') | ||||||
|  | subdir('help') | ||||||
|  | subdir('icons') | ||||||
|  | subdir('po') | ||||||
|  | subdir('src') | ||||||
|  |  | ||||||
|  | summary(summary) | ||||||
							
								
								
									
										3
									
								
								meson_options.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								meson_options.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | option('help', type: 'boolean', value: true, description: 'Build help documentation') | ||||||
|  | option('plugin-system', type: 'boolean', value: true, description: 'Enable plugin system support') | ||||||
|  | option('d-bus-service', type: 'boolean', value: true, description: 'Enable D-Bus remote controller service') | ||||||
							
								
								
									
										6
									
								
								po/meson.build
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								po/meson.build
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | i18n.gettext('cthulhu', | ||||||
|  |   args: [ | ||||||
|  |     '--default-domain=cthulhu', | ||||||
|  |     '--from-code=UTF-8', | ||||||
|  |   ] | ||||||
|  | ) | ||||||
		Reference in New Issue
	
	Block a user