To: vim_dev@googlegroups.com Subject: Patch 8.2.4524 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4524 Problem: MS-Windows: cannot build with some sodium libraries. Solution: Make the DLL name configuragle. Add build instructions. (Ken Takata, closes #9905) Files: src/INSTALLpc.txt, src/Make_cyg_ming.mak, src/Make_mvc.mak, src/crypt.c *** ../vim-8.2.4523/src/INSTALLpc.txt 2022-01-25 10:30:52.473915958 +0000 --- src/INSTALLpc.txt 2022-03-07 15:11:33.998044632 +0000 *************** *** 34,43 **** 11. Building with Ruby support 12. Building with Tcl support 13. Building with DirectX (DirectWrite) support ! 14. Windows 3.1 ! 15. MS-DOS ! 16. Installing after building from sources The currently recommended way (that means it has been verified to work) is --- 34,44 ---- 11. Building with Ruby support 12. Building with Tcl support 13. Building with DirectX (DirectWrite) support ! 14. Building with libsodium support ! 15. Windows 3.1 ! 16. MS-DOS ! 17. Installing after building from sources The currently recommended way (that means it has been verified to work) is *************** *** 247,255 **** $ pacman -S git - For enabling libsodium support, you also need to install the package - - $ pacman -S mingw-w64-x86_64-libsodium 2.3. Keep the build environment up-to-date --- 248,253 ---- *************** *** 846,865 **** mingw32-make -f Make_ming.mak DIRECTX=yes ! 14. Windows 3.1x ================ The Windows 3.1x support was removed in patch 7.4.1364. ! 15. MS-DOS ========== The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions work on MS-DOS because of the limited amount of memory available. ! 16. Installing after building from sources ========================================== [provided by Michael Soyka, updated by Ken Takata] --- 844,898 ---- mingw32-make -f Make_ming.mak DIRECTX=yes ! 14. Building with libsodium support ! =================================== ! ! For better encryption support, you can build Vim with libsodium. ! ! A) Using MSVC ! ! You can download the latest libsodium library from here: ! https://download.libsodium.org/libsodium/releases/ ! ! At this moment, libsodium-1.0.18-stable-msvc.zip is the latest package. ! Unpack it to anywhere you like, and specify the path to the SODIUM option: ! ! nmake -f Make_mvc.mak SODIUM=C:/path/to/libsodium ! (libsodium.dll will be used as the libsodium DLL name.) ! ! B) Using MinGW ! ! If you use msys2, you can install the libsodium package by pacman (or pacboy): ! ! $ pacman -S mingw-w64-x86_64-libsodium # for 64-bit Vim ! $ pacman -S mingw-w64-i686-libsodium # for 32-bit Vim ! $ pacboy -S libsodium:m # for both 32-bit and 64-bit Vim ! ! Then set SODIUM to yes: ! ! mingw32-make -f Make_ming.mak SODIUM=yes ! (libsodium-23.dll will be used as the libsodium DLL name.) ! ! Or you can set the path to libsodium explicitly: ! ! mingw32-make -f Make_ming.mak SODIUM=C:/path/to/libsodium ! (libsodium.dll will be used as the libsodium DLL name.) ! ! ! 15. Windows 3.1x ================ The Windows 3.1x support was removed in patch 7.4.1364. ! 16. MS-DOS ========== The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions work on MS-DOS because of the limited amount of memory available. ! 17. Installing after building from sources ========================================== [provided by Michael Soyka, updated by Ken Takata] *** ../vim-8.2.4523/src/Make_cyg_ming.mak 2022-03-06 14:01:48.179250403 +0000 --- src/Make_cyg_ming.mak 2022-03-07 15:11:33.998044632 +0000 *************** *** 670,683 **** ifdef SODIUM DEFINES += -DHAVE_SODIUM ! ifneq ($(SODIUM),yes) CFLAGS += -I $(SODIUM)/include endif ifndef DYNAMIC_SODIUM DYNAMIC_SODIUM=yes endif ifeq ($(DYNAMIC_SODIUM),yes) ! DEFINES += -DDYNAMIC_SODIUM else SODIUMLIB = -lsodium endif --- 670,686 ---- ifdef SODIUM DEFINES += -DHAVE_SODIUM ! ifeq ($(SODIUM),yes) ! SODIUM_DLL = libsodium-23.dll ! else ! SODIUM_DLL = libsodium.dll CFLAGS += -I $(SODIUM)/include endif ifndef DYNAMIC_SODIUM DYNAMIC_SODIUM=yes endif ifeq ($(DYNAMIC_SODIUM),yes) ! DEFINES += -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"$(SODIUM_DLL)\" else SODIUMLIB = -lsodium endif *** ../vim-8.2.4523/src/Make_mvc.mak 2022-03-02 17:34:52.156249510 +0000 --- src/Make_mvc.mak 2022-03-07 15:11:33.998044632 +0000 *************** *** 391,397 **** !if "$(SODIUM)" != "no" SOD_INC = /I "$(SODIUM)\include" ! if "$(DYNAMIC_SODIUM)" == "yes" ! SOD_DEFS = -DHAVE_SODIUM -DDYNAMIC_SODIUM SOD_LIB = ! else SOD_DEFS = -DHAVE_SODIUM --- 391,398 ---- !if "$(SODIUM)" != "no" SOD_INC = /I "$(SODIUM)\include" ! if "$(DYNAMIC_SODIUM)" == "yes" ! SODIUM_DLL = libsodium.dll ! SOD_DEFS = -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"$(SODIUM_DLL)\" SOD_LIB = ! else SOD_DEFS = -DHAVE_SODIUM *** ../vim-8.2.4523/src/crypt.c 2022-02-12 11:18:32.318462415 +0000 --- src/crypt.c 2022-03-07 15:11:33.998044632 +0000 *************** *** 251,257 **** sodium_runtime_link_init(int verbose) { static HINSTANCE hsodium = NULL; ! const char *libname = "libsodium.dll"; int i; if (hsodium != NULL) --- 251,257 ---- sodium_runtime_link_init(int verbose) { static HINSTANCE hsodium = NULL; ! const char *libname = DYNAMIC_SODIUM_DLL; int i; if (hsodium != NULL) *************** *** 270,276 **** if ((*sodium_funcname_table[i].ptr = symbol_from_dll(hsodium, sodium_funcname_table[i].name)) == NULL) { ! FreeLibrary(hsodium); hsodium = NULL; if (verbose) semsg(_(e_could_not_load_library_function_str), sodium_funcname_table[i].name); --- 270,276 ---- if ((*sodium_funcname_table[i].ptr = symbol_from_dll(hsodium, sodium_funcname_table[i].name)) == NULL) { ! close_dll(hsodium); hsodium = NULL; if (verbose) semsg(_(e_could_not_load_library_function_str), sodium_funcname_table[i].name); *** ../vim-8.2.4523/src/version.c 2022-03-07 13:31:10.704100882 +0000 --- src/version.c 2022-03-07 15:13:31.529900166 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4524, /**/ -- Press any key to continue, press any other key to quit. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///