Commit d130c5f748 for openssl.org

commit d130c5f74873b3aad74f58bd7d0fdea0fb16397c
Author: Norbert Pocs <norbertp@openssl.org>
Date:   Thu Jan 8 16:11:10 2026 +0100

    windows-makefile: Don't prefix libdir when it is absolute path

    When --libdir was passed to configuration as an absolute path then
    the makefile MODULESDIR_dir became concat(prefix, libdir) creating
    an invalid path.

    Fixes: https://github.com/openssl/project/issues/1797

    Signed-off-by: Norbert Pocs <norbertp@openssl.org>

    Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
    Reviewed-by: Richard Levitte <levitte@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/29579)

diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 408b571d66..e9f985f855 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -208,7 +208,7 @@ OPENSSLDIR_dir={- canonpath($openssldir_dir) -}
 LIBDIR={- our $libdir = $config{libdir} || "lib";
           file_name_is_absolute($libdir) ? "" : $libdir -}
 MODULESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath catpath);
-                  our $modulesprefix = catdir($prefix,$libdir);
+                  our $modulesprefix = file_name_is_absolute($libdir) ? $libdir : catdir($prefix,$libdir);
                   our ($modulesprefix_dev, $modulesprefix_dir,
                        $modulesprefix_file) =
                       splitpath($modulesprefix, 1);