A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

meson: Avoid same name in custom_target()

Using a same target name in different subdirs causes errors with meson < 0.50.0. See:

https://github.com/mesonbuild/meson/issues/4377

Fixes https://github.com/nana-4/materia-theme/issues/562

roundabout,
created on Friday, 26 March 2021, 23:00:10 (1616799610), received on Sunday, 11 May 2025, 13:23:02 (1746969782)
Author identity: nana-4 <hnmaigo@gmail.com>

68baf8058909f3decc2d639e82911fee57dc77a6

src/gtk-3.0/meson.build

@@ -21,12 +21,12 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk3_dir = join_paths(theme['dir'], 'gtk-3.0')
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk3_variants = [
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            '',
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            'gtk',
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ]
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              # Only non-dark themes need a dark variant.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              if theme['color'] != '-dark'
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk3_variants += '-dark'
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk3_variants += 'gtk-dark'
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              endif
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              install_subdir(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -50,11 +50,11 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk3_scss_conf.set('current_source_dir', meson.current_source_dir())
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              foreach gtk3_variant: gtk3_variants
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk3_temp_name = '@0@.gtk@1@'.format(theme['name'], gtk3_variant)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk3_temp_name = '@0@.gtk3.@1@'.format(theme['name'], gtk3_variant)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                # Configure SCSS file
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk3_scss = configure_file(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              input: 'gtk@0@.scss.in'.format(gtk3_variant),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              input: '@0@.scss.in'.format(gtk3_variant),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  output: '@0@.scss'.format(gtk3_temp_name),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  configuration: gtk3_scss_conf,
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -73,7 +73,7 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                meson.add_install_script(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  sh, '-c', 'cp "@0@" "@1@"'.format(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    gtk3_css.full_path(),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk3_dir, 'gtk@0@.css'.format(gtk3_variant)),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk3_dir, '@0@.css'.format(gtk3_variant)),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  ),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              endforeach
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/gtk-4.0/meson.build

@@ -30,12 +30,12 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk4_dir = join_paths(theme['dir'], 'gtk-4.0')
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk4_variants = [
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            '',
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            'gtk',
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              ]
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              # Only non-dark themes need a dark variant.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              if theme['color'] != '-dark'
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk4_variants += '-dark'
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk4_variants += 'gtk-dark'
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              endif
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              install_subdir(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -60,11 +60,11 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              gtk4_scss_conf.set('current_source_dir', meson.current_source_dir())
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              foreach gtk4_variant: gtk4_variants
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk4_temp_name = '@0@.gtk@1@'.format(theme['name'], gtk4_variant)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            gtk4_temp_name = '@0@.gtk4.@1@'.format(theme['name'], gtk4_variant)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                # Configure SCSS file
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gtk4_scss = configure_file(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              input: 'gtk@0@.scss.in'.format(gtk4_variant),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              input: '@0@.scss.in'.format(gtk4_variant),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  output: '@0@.scss'.format(gtk4_temp_name),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  configuration: gtk4_scss_conf,
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -83,7 +83,7 @@ foreach theme: themes

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                meson.add_install_script(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  sh, '-c', 'cp "@0@" "@1@"'.format(
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    gtk4_css.full_path(),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk4_dir, 'gtk@0@.css'.format(gtk4_variant)),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk4_dir, '@0@.css'.format(gtk4_variant)),
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                  ),
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                )
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              endforeach