xfree86: add per major-version driver/module subdirectories
Modules are now placed into a sub-directory by major Xserver release, so we have less hassle with trying to load drivers w/ incompatible ABI. The legacy directories are still searched (after the versioned ones) for backwards compat with badly maintained proprietary drivers (Nvidia). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									c4b0a77713
								
							
						
					
					
						commit
						30e59a9f4f
					
				| 
						 | 
				
			
			@ -9,7 +9,7 @@ shared_module(
 | 
			
		|||
    link_with: e,
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
shared_module(
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ shared_module(
 | 
			
		|||
    link_with: e,
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if build_glx
 | 
			
		||||
| 
						 | 
				
			
			@ -38,6 +38,6 @@ if build_glx
 | 
			
		|||
        link_with: e,
 | 
			
		||||
 | 
			
		||||
        install: true,
 | 
			
		||||
        install_dir: join_paths(module_dir, 'extensions')
 | 
			
		||||
        install_dir: join_paths(module_abi_dir, 'extensions')
 | 
			
		||||
    )
 | 
			
		||||
endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ shared_module(
 | 
			
		|||
    dependencies: [common_dep],
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: join_paths(module_dir, 'input'),
 | 
			
		||||
    install_dir: join_paths(module_abi_dir, 'input'),
 | 
			
		||||
 | 
			
		||||
    link_with: e,
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ shared_module(
 | 
			
		|||
    ],
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: join_paths(module_dir, 'drivers'),
 | 
			
		||||
    install_dir: join_paths(module_abi_dir, 'drivers'),
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Test that we don't have any unresolved symbols from our module to Xorg.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,7 @@ xorg_exa = shared_module('exa',
 | 
			
		|||
    link_with: [libxserver_exa, e],
 | 
			
		||||
    c_args: xorg_c_args,
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
install_man(configure_file(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ shared_module('fbdevhw',
 | 
			
		|||
    dependencies: common_dep,
 | 
			
		||||
    c_args: xorg_c_args,
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
    link_with: e,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,5 +18,5 @@ shared_module(
 | 
			
		|||
    link_with: [glamor, libxserver_glx],
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,7 +56,7 @@ xorg_int10 = shared_module('int10',
 | 
			
		|||
    c_args: int10_c_args,
 | 
			
		||||
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
install_data('xf86int10.h', install_dir: xorgsdkdir)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -175,6 +175,12 @@ LoaderSetPath(const char *path)
 | 
			
		|||
 | 
			
		||||
/* Standard set of module subdirectories to search, in order of preference */
 | 
			
		||||
static const char *stdSubdirs[] = {
 | 
			
		||||
    // first try loading from per-ABI subdir
 | 
			
		||||
    XORG_MODULE_ABI_TAG "/",
 | 
			
		||||
    XORG_MODULE_ABI_TAG "/input/",
 | 
			
		||||
    XORG_MODULE_ABI_TAG "/drivers/",
 | 
			
		||||
    XORG_MODULE_ABI_TAG "/extensions/",
 | 
			
		||||
    // now try loading from legacy / unversioned directories
 | 
			
		||||
    "",
 | 
			
		||||
    "input/",
 | 
			
		||||
    "drivers/",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,6 @@
 | 
			
		|||
module_abi_tag = 'xlibre-25.0'
 | 
			
		||||
module_abi_dir = join_paths(module_dir, module_abi_tag)
 | 
			
		||||
 | 
			
		||||
xorg_inc = include_directories(
 | 
			
		||||
    'common',
 | 
			
		||||
    'ddc',
 | 
			
		||||
| 
						 | 
				
			
			@ -16,6 +19,7 @@ xorg_inc = include_directories(
 | 
			
		|||
xorg_c_args = []
 | 
			
		||||
xorg_c_args += '-DHAVE_XORG_CONFIG_H'
 | 
			
		||||
xorg_c_args += '-DXORG_NO_SDKSYMS'
 | 
			
		||||
xorg_c_args += ('-DXORG_MODULE_ABI_TAG="'+module_abi_tag+'"')
 | 
			
		||||
 | 
			
		||||
pciaccess_dep = []
 | 
			
		||||
if get_option('pciaccess')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ shared_module('shadowfb',
 | 
			
		|||
    dependencies: common_dep,
 | 
			
		||||
    c_args: xorg_c_args,
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
    link_with: e,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@ shared_module('vgahw',
 | 
			
		|||
    dependencies: common_dep,
 | 
			
		||||
    c_args: xorg_c_args,
 | 
			
		||||
    install: true,
 | 
			
		||||
    install_dir: module_dir,
 | 
			
		||||
    install_dir: module_abi_dir,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
install_data('vgaHW.h', install_dir: xorgsdkdir)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -834,7 +834,7 @@ if build_xorg
 | 
			
		|||
    sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
 | 
			
		||||
    sdkconfig.set('includedir', join_paths('${prefix}', get_option('includedir')))
 | 
			
		||||
    sdkconfig.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
 | 
			
		||||
    sdkconfig.set('moduledir', join_paths('${exec_prefix}', module_dir))
 | 
			
		||||
    sdkconfig.set('moduledir', join_paths(join_paths('${exec_prefix}', module_dir), module_abi_tag))
 | 
			
		||||
    sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 'xorg'))
 | 
			
		||||
    sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 'X11/xorg.conf.d'))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue