--- src/config.cmake.h.orig	2025-10-08 03:57:41.000000000 +0800
+++ src/config.cmake.h	2025-10-22 10:24:23.000000000 +0800
@@ -23,7 +23,6 @@
 #define DARKTABLE_MODULEDIR "@REL_BIN_TO_MODULEDIR@"
 #define DARKTABLE_DATADIR   "@REL_BIN_TO_DATADIR@"
 #define DARKTABLE_SHAREDIR  "@REL_BIN_TO_SHAREDIR@"
-#define DARKTABLE_KERNELSDIR "@REL_BIN_TO_DATADIR@/kernels"
 
 #define SHARED_MODULE_PREFIX "@CMAKE_SHARED_MODULE_PREFIX@"
 #define SHARED_MODULE_SUFFIX "@CMAKE_SHARED_MODULE_SUFFIX@"

--- src/common/file_location.h.orig	2025-10-08 03:57:41.000000000 +0800
+++ src/common/file_location.h	2025-10-22 10:21:42.000000000 +0800
@@ -29,7 +29,7 @@
 gchar *dt_loc_get_home_dir(const gchar *user);
 
 /** initializes all dirs */
-void dt_loc_init(const char *datadir, const char *moduledir, const char *localedir, const char *configdir, const char *cachedir, const char *tmpdir, const char *kerneldir);
+void dt_loc_init(const char *datadir, const char *moduledir, const char *localedir, const char *configdir, const char *cachedir, const char *tmpdir);
 /** init systemwide data dir */
 void dt_loc_init_datadir(const char *application_directory, const char *datadir);
 /** init the plugin dir */
@@ -44,8 +44,6 @@
 void dt_loc_init_user_config_dir(const char *configdir);
 /** init user cache dir */
 void dt_loc_init_user_cache_dir(const char *cachedir);
-/** init OpenCL kernels dir */
-void dt_loc_init_kerneldir(const char *application_directory, const char *kerneldir);
 
 /** init specific dir. Value is appended if application_directory is not NULL (relative path resolution). */
 gchar *dt_loc_init_generic(const char *absolute_value, const char *application_directory, const char *default_value);
@@ -53,10 +51,8 @@
 void dt_check_opendir(const char* text, const char* directory);
 
 /* temporary backward_compatibility*/
-void dt_loc_get_kerneldir(char *kerneldir, size_t bufsize);
 void dt_loc_get_datadir(char *datadir, size_t bufsize);
 void dt_loc_get_sharedir(char *sharedir, size_t bufsize);
-void dt_loc_get_kerneldir(char *kerneldir, size_t bufsize);
 void dt_loc_get_moduledir(char *moduledir, size_t bufsize);
 void dt_loc_get_localedir(char *localedir, size_t bufsize);
 void dt_loc_get_tmp_dir(char *tmpdir, size_t bufsize);

--- src/common/file_location.c.orig	2025-10-08 03:57:41.000000000 +0800
+++ src/common/file_location.c	2025-10-22 10:22:20.000000000 +0800
@@ -36,7 +36,7 @@
 #include "file_location.h"
 #include "whereami.h"
 
-void dt_loc_init(const char *datadir, const char *moduledir, const char *localedir, const char *configdir, const char *cachedir, const char *tmpdir, const char *kerneldir)
+void dt_loc_init(const char *datadir, const char *moduledir, const char *localedir, const char *configdir, const char *cachedir, const char *tmpdir)
 {
   // Assemble pathes
   char* application_directory = NULL;
@@ -58,7 +58,6 @@
   dt_loc_init_datadir(application_directory, datadir);
   dt_loc_init_moduledir(application_directory, moduledir);
   dt_loc_init_localedir(application_directory, localedir);
-  dt_loc_init_kerneldir(application_directory, kerneldir);
   dt_loc_init_user_config_dir(configdir);
   dt_loc_init_user_cache_dir(cachedir);
   dt_loc_init_sharedir(application_directory);
@@ -259,17 +258,6 @@
   dt_check_opendir("ansel.sharedir", darktable.sharedir);
 }
 
-void dt_loc_init_kerneldir(const char* application_directory, const char *kerneldir)
-{
-  darktable.kerneldir = dt_loc_init_generic(kerneldir, application_directory, DARKTABLE_KERNELSDIR);
-  dt_check_opendir("ansel.kerneldir", darktable.kerneldir);
-}
-
-void dt_loc_get_kerneldir(char *kerneldir, size_t bufsize)
-{
-  g_strlcpy(kerneldir, darktable.kerneldir, bufsize);
-}
-
 void dt_loc_get_moduledir(char *moduledir, size_t bufsize)
 {
   g_strlcpy(moduledir, darktable.moduledir, bufsize);

--- src/common/darktable.h.orig	2025-10-08 03:57:41.000000000 +0800
+++ src/common/darktable.h	2025-10-22 10:22:41.000000000 +0800
@@ -589,7 +589,6 @@
   char *tmpdir;
   char *configdir;
   char *cachedir;
-  char *kerneldir;
   dt_lua_state_t lua_state;
   GList *guides;
   double start_wtime;

--- src/common/darktable.c.orig	2025-10-08 03:57:41.000000000 +0800
+++ src/common/darktable.c	2025-10-22 10:23:16.000000000 +0800
@@ -455,7 +455,6 @@
   char *tmpdir_from_command = NULL;
   char *configdir_from_command = NULL;
   char *cachedir_from_command = NULL;
-  char *kerneldir_from_command = NULL;
 
 #ifdef HAVE_OPENCL
   gboolean exclude_opencl = FALSE;
@@ -607,12 +606,6 @@
         argv[k-1] = NULL;
         argv[k] = NULL;
       }
-      else if(!strcmp(argv[k], "--kerneldir") && argc > k + 1)
-      {
-        kerneldir_from_command = argv[++k];
-        argv[k-1] = NULL;
-        argv[k] = NULL;
-      }
       else if(argv[k][1] == 'd' && argc > k + 1)
       {
         if(!strcmp(argv[k + 1], "all"))
@@ -849,7 +842,7 @@
   }
 
   // get valid directories
-  dt_loc_init(datadir_from_command, moduledir_from_command, localedir_from_command, configdir_from_command, cachedir_from_command, tmpdir_from_command, kerneldir_from_command);
+  dt_loc_init(datadir_from_command, moduledir_from_command, localedir_from_command, configdir_from_command, cachedir_from_command, tmpdir_from_command);
 
   if(darktable.unmuted & DT_DEBUG_MEMORY)
   {

--- src/cli/main.c.orig	2025-10-22 06:54:09.000000000 +0800
+++ src/cli/main.c	2025-10-22 11:23:52.000000000 +0800
@@ -180,7 +180,7 @@
 #endif
 
   // get valid locale dir
-  dt_loc_init(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+  dt_loc_init(NULL, NULL, NULL, NULL, NULL, NULL);
   char localedir[PATH_MAX] = { 0 };
   dt_loc_get_localedir(localedir, sizeof(localedir));
   bindtextdomain(GETTEXT_PACKAGE, localedir);

--- src/generate-cache/main.c.orig	2025-10-22 06:54:09.000000000 +0800
+++ src/generate-cache/main.c	2025-10-22 11:24:18.000000000 +0800
@@ -149,7 +149,7 @@
 #endif
 
   // get valid locale dir
-  dt_loc_init(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+  dt_loc_init(NULL, NULL, NULL, NULL, NULL, NULL);
   char localedir[PATH_MAX] = { 0 };
   dt_loc_get_localedir(localedir, sizeof(localedir));
   bindtextdomain(GETTEXT_PACKAGE, localedir);

