95 lines
4.0 KiB
Diff
95 lines
4.0 KiB
Diff
--- Magics-3.1.0-Source/CMakeLists.txt.orig 2018-07-14 23:54:17.288197937 +0200
|
|
+++ Magics-3.1.0-Source/CMakeLists.txt 2018-07-14 23:55:22.101674827 +0200
|
|
@@ -74,6 +74,9 @@ ecbuild_add_option( FEATURE EFAS
|
|
DEFAULT OFF
|
|
DESCRIPTION "enable EFAS coastlines and catchments" )
|
|
|
|
+ecbuild_add_option( FEATURE BIT_REPRODUCIBLE
|
|
+ DEFAULT ON
|
|
+ DESCRIPTION "build bit-reproducible package" )
|
|
|
|
set( MAGICS_NAME "Magics" )
|
|
set( MAGICS_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} )
|
|
--- Magics-3.0.1-Source/cmake/ecbuild_config.h.in.orig 2018-03-06 17:36:35.534619111 +0100
|
|
+++ Magics-3.0.1-Source/cmake/ecbuild_config.h.in 2018-03-06 17:52:27.253635175 +0100
|
|
@@ -148,14 +148,18 @@
|
|
|
|
/* config info */
|
|
|
|
-#define @PNAME@_OS_NAME "@CMAKE_SYSTEM@"
|
|
+#define @PNAME@_OS_NAME "linux"
|
|
#define @PNAME@_OS_BITS @EC_OS_BITS@
|
|
#define @PNAME@_OS_BITS_STR "@EC_OS_BITS@"
|
|
#define @PNAME@_OS_STR "@EC_OS_NAME@.@EC_OS_BITS@"
|
|
-#define @PNAME@_OS_VERSION "@CMAKE_SYSTEM_VERSION@"
|
|
+#define @PNAME@_OS_VERSION "OBS"
|
|
#define @PNAME@_SYS_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@"
|
|
|
|
-#define @PNAME@_BUILD_TIMESTAMP "@EC_BUILD_TIMESTAMP@"
|
|
+#ifndef HAVE_BIT_REPRODUCIBLE
|
|
+ #define @PNAME@_BUILD_TIMESTAMP "@EC_BUILD_TIMESTAMP@"
|
|
+#else
|
|
+ #define @PNAME@_BUILD_TIMESTAMP "NO-TIMESTAMP-FOR-BIT_REPRODUCIBLE-BUILD"
|
|
+#endif
|
|
#define @PNAME@_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
|
|
|
#define @PNAME@_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@"
|
|
@@ -177,9 +181,6 @@
|
|
#define @PNAME@_INSTALL_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@"
|
|
#define @PNAME@_INSTALL_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_DATA_DIR@"
|
|
|
|
-#define @PNAME@_DEVELOPER_SRC_DIR "@CMAKE_SOURCE_DIR@"
|
|
-#define @PNAME@_DEVELOPER_BIN_DIR "@CMAKE_BINARY_DIR@"
|
|
-
|
|
/* Fortran support */
|
|
|
|
#if @EC_HAVE_FORTRAN@
|
|
--- Magics-3.0.1-Source/cmake/ecbuild_print_summary.cmake.orig 2018-03-06 17:46:14.526719559 +0100
|
|
+++ Magics-3.0.1-Source/cmake/ecbuild_print_summary.cmake 2018-03-06 17:53:01.049174209 +0100
|
|
@@ -57,7 +57,9 @@ macro( ecbuild_print_summary )
|
|
ecbuild_info( "endiness : Little Endian -- IEEE [${IEEE_LE}]" )
|
|
endif()
|
|
ecbuild_info( "build type : [${CMAKE_BUILD_TYPE}]" )
|
|
- ecbuild_info( "timestamp : [${EC_BUILD_TIMESTAMP}]" )
|
|
+ if ( NOT HAVE_BIT_REPRODUCIBLE )
|
|
+ ecbuild_info( "timestamp : [${EC_BUILD_TIMESTAMP}]" )
|
|
+ endif()
|
|
ecbuild_info( "install prefix : [${CMAKE_INSTALL_PREFIX}]" )
|
|
ecbuild_info( " bin dir : [${${PROJECT_NAME}_FULL_INSTALL_BIN_DIR}]" )
|
|
ecbuild_info( " lib dir : [${${PROJECT_NAME}_FULL_INSTALL_LIB_DIR}]" )
|
|
--- Magics-3.0.1-Source/cmake/ecbuild_get_date.cmake.orig 2018-03-06 17:53:17.648947793 +0100
|
|
+++ Magics-3.0.1-Source/cmake/ecbuild_get_date.cmake 2018-03-06 17:54:11.188217542 +0100
|
|
@@ -20,12 +20,16 @@
|
|
##############################################################################
|
|
|
|
macro(ecbuild_get_date RESULT)
|
|
+ if (HAVE_BIT_REPRODUCIBLE)
|
|
+ ecbuild_info("date not included in bit-reproducible builds")
|
|
+ else()
|
|
if(UNIX)
|
|
execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
|
|
string(REGEX REPLACE "(..)/(..)/(....).*" "\\3.\\2.\\1" ${RESULT} ${${RESULT}})
|
|
else()
|
|
ecbuild_error("date not implemented")
|
|
endif()
|
|
+ endif()
|
|
endmacro(ecbuild_get_date)
|
|
|
|
##############################################################################
|
|
@@ -42,11 +46,15 @@ endmacro(ecbuild_get_date)
|
|
##############################################################################
|
|
|
|
macro(ecbuild_get_timestamp RESULT)
|
|
+ if (HAVE_BIT_REPRODUCIBLE)
|
|
+ ecbuild_info("timestamp not included in bit-reproducible builds")
|
|
+ else()
|
|
if(UNIX)
|
|
execute_process(COMMAND "date" "+%Y/%m/%d/%H/%M/%S" OUTPUT_VARIABLE _timestamp)
|
|
string(REGEX REPLACE "(....)/(..)/(..)/(..)/(..)/(..).*" "\\1\\2\\3\\4\\5\\6" ${RESULT} ${_timestamp})
|
|
else()
|
|
ecbuild_warn("This is NOT UNIX - timestamp not implemented")
|
|
endif()
|
|
+ endif()
|
|
endmacro(ecbuild_get_timestamp)
|
|
|