gnu: sdl2: Use udev to discover input devices.
Without udev SDL falls back on custom detection code, which blocks every three seconds while checking for new devices. * gnu/packages/sdl.scm (sdl2)[inputs]: Add eudev. [arguments]<#:make-flags>: Add LDFLAGS to include eudev in rpath so that dlopen can find it. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
This commit is contained in:
		
							parent
							
								
									3ccfa4048a
								
							
						
					
					
						commit
						9d4ed35703
					
				
					 1 changed files with 14 additions and 8 deletions
				
			
		| 
						 | 
					@ -132,13 +132,18 @@ joystick, and graphics hardware.")
 | 
				
			||||||
                   "--disable-kmsdrm-shared")
 | 
					                   "--disable-kmsdrm-shared")
 | 
				
			||||||
                 ,flags))
 | 
					                 ,flags))
 | 
				
			||||||
       ((#:make-flags flags ''())
 | 
					       ((#:make-flags flags ''())
 | 
				
			||||||
 | 
					        `(cons*
 | 
				
			||||||
          ;; Add the Fcitx header files to GCCs "system header" search path
 | 
					          ;; Add the Fcitx header files to GCCs "system header" search path
 | 
				
			||||||
          ;; in order to suppress compiler warnings induced by those:
 | 
					          ;; in order to suppress compiler warnings induced by those:
 | 
				
			||||||
          ;;   .../include/fcitx-utils/utarray.h:178:9: error: ISO C90 forbids
 | 
					          ;;   .../include/fcitx-utils/utarray.h:178:9: error: ISO C90 forbids
 | 
				
			||||||
          ;;   mixed declarations and code [-Werror=declaration-after-statement]
 | 
					          ;;   mixed declarations and code [-Werror=declaration-after-statement]
 | 
				
			||||||
        `(append (list (string-append "C_INCLUDE_PATH="
 | 
					          (string-append "C_INCLUDE_PATH="
 | 
				
			||||||
                                      (assoc-ref %build-inputs "fcitx")
 | 
					                         (assoc-ref %build-inputs "fcitx") "/include")
 | 
				
			||||||
                                      "/include"))
 | 
					          ;; SDL dlopens libudev, so make sure it is in rpath. This overrides
 | 
				
			||||||
 | 
					          ;; the LDFLAG set in sdl’s configure-flags, which isn’t necessary
 | 
				
			||||||
 | 
					          ;; as sdl2 includes Mesa by default.
 | 
				
			||||||
 | 
					          (string-append "LDFLAGS=-Wl,-rpath,"
 | 
				
			||||||
 | 
					                         (assoc-ref %build-inputs "eudev") "/lib")
 | 
				
			||||||
          ,flags))))
 | 
					          ,flags))))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     ;; SDL2 needs to be built with ibus support otherwise some systems
 | 
					     ;; SDL2 needs to be built with ibus support otherwise some systems
 | 
				
			||||||
| 
						 | 
					@ -146,6 +151,7 @@ joystick, and graphics hardware.")
 | 
				
			||||||
     ;;
 | 
					     ;;
 | 
				
			||||||
     ;; For more information, see: https://dev.solus-project.com/T1721
 | 
					     ;; For more information, see: https://dev.solus-project.com/T1721
 | 
				
			||||||
     (append `(("dbus" ,dbus)
 | 
					     (append `(("dbus" ,dbus)
 | 
				
			||||||
 | 
					               ("eudev" ,eudev) ; for discovering input devices
 | 
				
			||||||
               ("fcitx" ,fcitx) ; helps with CJK input
 | 
					               ("fcitx" ,fcitx) ; helps with CJK input
 | 
				
			||||||
               ("glib" ,glib)
 | 
					               ("glib" ,glib)
 | 
				
			||||||
               ("ibus" ,ibus)
 | 
					               ("ibus" ,ibus)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue