[Ttssh2-commit] [8522] openssl のビルドに使用する perl を libs/ にインストールするようにした

scmno****@osdn***** scmno****@osdn*****
2020年 2月 2日 (日) 02:12:29 JST


Revision: 8522
          https://osdn.net/projects/ttssh2/scm/svn/commits/8522
Author:   zmatsuo
Date:     2020-02-02 02:12:29 +0900 (Sun, 02 Feb 2020)
Log Message:
-----------
openssl のビルドに使用する perl を libs/ にインストールするようにした

- libs/ を cmake で準備するとき
- 使用する perl の種類によってビルドに失敗する
- 使用していない jom を削除

Modified Paths:
--------------
    trunk/libs/buildall.cmake
    trunk/libs/openssl11.cmake

Added Paths:
-----------
    trunk/libs/perl.cmake

Removed Paths:
-------------
    trunk/libs/jom.cmake

-------------- next part --------------
Modified: trunk/libs/buildall.cmake
===================================================================
--- trunk/libs/buildall.cmake	2020-01-31 15:37:51 UTC (rev 8521)
+++ trunk/libs/buildall.cmake	2020-02-01 17:12:29 UTC (rev 8522)
@@ -12,11 +12,13 @@
   set(ARCHITECTURE_OPTION -DARCHITECTURE=${ARCHITECTURE})
 endif()
 
-# install tool
-message("jom")
-execute_process(
-  COMMAND ${CMAKE_COMMAND} -P jom.cmake
-  )
+# install tools
+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+  message("perl")
+  execute_process(
+    COMMAND ${CMAKE_COMMAND} -P perl.cmake
+    )
+endif()
 
 # build
 message("oniguruma")

Deleted: trunk/libs/jom.cmake
===================================================================
--- trunk/libs/jom.cmake	2020-01-31 15:37:51 UTC (rev 8521)
+++ trunk/libs/jom.cmake	2020-02-01 17:12:29 UTC (rev 8522)
@@ -1,29 +0,0 @@
-# cmake -P jom.cmake
-
-set(SRC_ARC "jom_1_1_3.zip")
-set(SRC_URL "http://download.qt.io/official_releases/jom/jom_1_1_3.zip")
-set(SRC_ARC_HASH_SHA256 128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8)
-set(DOWN_DIR "${CMAKE_SOURCE_DIR}/download/jom")
-set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/jom")
-
-if(NOT EXISTS ${INSTALL_DIR}/nmake.exe)
-
-  file(DOWNLOAD
-    ${SRC_URL}
-    ${DOWN_DIR}/${SRC_ARC}
-    EXPECTED_HASH SHA256=${SRC_ARC_HASH_SHA256}
-    SHOW_PROGRESS
-    )
-
-  file(MAKE_DIRECTORY ${INSTALL_DIR})
-
-  execute_process(
-    COMMAND ${CMAKE_COMMAND} -E tar "xvf" ${DOWN_DIR}/${SRC_ARC}
-    WORKING_DIRECTORY ${INSTALL_DIR}
-    )
-
-  execute_process(
-    COMMAND ${CMAKE_COMMAND} -E copy ${INSTALL_DIR}/jom.exe ${INSTALL_DIR}/nmake.exe
-    )
-
-endif()

Modified: trunk/libs/openssl11.cmake
===================================================================
--- trunk/libs/openssl11.cmake	2020-01-31 15:37:51 UTC (rev 8521)
+++ trunk/libs/openssl11.cmake	2020-02-01 17:12:29 UTC (rev 8522)
@@ -93,15 +93,17 @@
     PERL perl
     )
 elseif("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
-  # Active/Strawberry Perl (cygwin版は使えない)
+  # Active/Strawberry Perl
   find_program(
     PERL perl.exe
+    HINTS ${CMAKE_CURRENT_SOURCE_DIR}/perl/perl/bin
     HINTS c:/Perl64/bin
     HINTS c:/Perl/bin
-    HINTS C:/Strawberry/perl/bin
-#    HINTS c:/cygwin/usr/bin
-#    HINTS c:/cygwin64/usr/bin
+    HINTS c:/Strawberry/perl/bin
     )
+  if("${PERL}" MATCHES "[Cc]ygwin")
+    message(FATAL_ERROR "cygwin perl! ${PERL}")
+  endif()
 else()
   # MinGW
   find_program(
@@ -188,10 +190,8 @@
 
   if((${CMAKE_GENERATOR} MATCHES "Win64") OR ("${ARCHITECTURE}" MATCHES "x64"))
     set(CONFIG_TARGET "VC-WIN64A")
-    set(DO_MS "ms\\do_win64a.bat")
   else()
     set(CONFIG_TARGET "VC-WIN32")
-    set(DO_MS "ms\\do_ms.bat")
   endif()
   if(("${CMAKE_BUILD_TYPE}" STREQUAL "Release") OR ("${CMAKE_CONFIGURATION_TYPE}" STREQUAL "Release"))
   else()
@@ -207,7 +207,7 @@
   file(TO_NATIVE_PATH ${VCVARS32} VCVARS32_N)
   string(REGEX REPLACE [[^(.*)\\.*$]] [[\1]] PERL_N_PATH ${PERL_N})
   file(APPEND "${SRC_DIR}/build_cmake.bat"
-    "set PATH=${PERL_N_PATH};%PATH%\n"
+    "set PATH=${PERL_N_PATH};c:\\windows;c:\\windows\\system32\n"
     )
   if(${CMAKE_GENERATOR} MATCHES "Visual Studio 8 2005")
     ## Visual Studio 2005 特別処理
@@ -241,16 +241,7 @@
       "call \"${VCVARS32_N}\"\n"
       )
   endif()
-  # jomでビルドの高速化を試したが次のエラーが出てしまう
-  # 複数の CL.EXE が同じ .PDB ファイルに書き込む場合、/FS を使用してください。
-  # if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/jom/nmake.exe")
-  #   file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} CMAKE_CURRENT_SOURCE_DIR_N)
-  #   file(APPEND "${SRC_DIR}/build_cmake.bat"
-  #     "set PATH=${CMAKE_CURRENT_SOURCE_DIR_N}\\jom;%PATH%\n"
-  #     )
-  # endif()
   file(APPEND "${SRC_DIR}/build_cmake.bat"
-    "set PATH=%PATH%;${PERL_N_PATH}\n"
     "perl Configure no-asm no-async no-shared ${CONFIG_TARGET} --prefix=${INSTALL_DIR_N} --openssldir=${INSTALL_DIR_N}\\SSL\n"
     "nmake -f makefile install\n"
     )

Added: trunk/libs/perl.cmake
===================================================================
--- trunk/libs/perl.cmake	                        (rev 0)
+++ trunk/libs/perl.cmake	2020-02-01 17:12:29 UTC (rev 8522)
@@ -0,0 +1,25 @@
+# cmake -P perl.cmake
+
+set(SRC_ARC "strawberry-perl-5.30.1.1-32bit.zip")
+set(SRC_URL "http://strawberryperl.com/download/5.30.1.1/strawberry-perl-5.30.1.1-32bit.zip")
+set(SRC_ARC_HASH_SHA256 cd9d7d5a3d0099752d6587770f4920b2b3818b16078e7b4dbf83f2aa2c037f70)
+set(DOWN_DIR "${CMAKE_SOURCE_DIR}/download/perl")
+set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/perl")
+
+if(NOT EXISTS ${INSTALL_DIR}/perl/bin/perl.exe)
+
+  file(DOWNLOAD
+    ${SRC_URL}
+    ${DOWN_DIR}/${SRC_ARC}
+    EXPECTED_HASH SHA256=${SRC_ARC_HASH_SHA256}
+    SHOW_PROGRESS
+    )
+
+  file(MAKE_DIRECTORY ${INSTALL_DIR})
+
+  execute_process(
+    COMMAND ${CMAKE_COMMAND} -E tar "xvf" ${DOWN_DIR}/${SRC_ARC}
+    WORKING_DIRECTORY ${INSTALL_DIR}
+    )
+
+endif()


Ttssh2-commit メーリングリストの案内