Skip to content

Commit

Permalink
Add an option for reproducible library builds
Browse files Browse the repository at this point in the history
This can be useful to the library packagers, notably under Debian.

Closes #17000.
  • Loading branch information
vadz committed May 27, 2017
1 parent a7ae3de commit 2f8a343
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 59 deletions.
37 changes: 37 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ enable_rpath
enable_objc_uniquifying
enable_visibility
enable_tls
enable_repro_build
enable_intl
enable_xlocale
enable_config
Expand Down Expand Up @@ -2080,6 +2081,7 @@ Optional Features:
--enable-objc_uniquifying enable Objective-C class name uniquifying
--disable-visibility disable use of ELF symbols visibility even if supported
--disable-tls disable use of compiler TLS support
--enable-repro-build enable reproducible build mode
--enable-intl use internationalization system
--enable-xlocale use x-locale support (requires wxLocale)
--enable-config use wxConfig (and derived) classes
Expand Down Expand Up @@ -6079,6 +6081,36 @@ fi



enablestring=
defaultval=
if test -z "$defaultval"; then
if test x"$enablestring" = xdisable; then
defaultval=yes
else
defaultval=no
fi
fi

# Check whether --enable-repro_build was given.
if test "${enable_repro_build+set}" = set; then :
enableval=$enable_repro_build;
if test "$enableval" = yes; then
wx_cv_use_repro_build='wxUSE_REPRODUCIBLE_BUILD=yes'
else
wx_cv_use_repro_build='wxUSE_REPRODUCIBLE_BUILD=no'
fi

else

wx_cv_use_repro_build='wxUSE_REPRODUCIBLE_BUILD=${'DEFAULT_wxUSE_REPRODUCIBLE_BUILD":-$defaultval}"

fi


eval "$wx_cv_use_repro_build"




enablestring=
defaultval=$wxUSE_ALL_FEATURES
Expand Down Expand Up @@ -30677,6 +30709,11 @@ else
fi
fi

if test "x$wxUSE_REPRODUCIBLE_BUILD" = "xyes"; then
$as_echo "#define wxUSE_REPRODUCIBLE_BUILD 1" >>confdefs.h

fi


if test "x$WXWIN_COMPATIBILITY_2_8" = "xyes"; then
$as_echo "#define WXWIN_COMPATIBILITY_2_8 1" >>confdefs.h
Expand Down
6 changes: 6 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,8 @@ WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C c
WX_ARG_DISABLE(visibility, [ --disable-visibility disable use of ELF symbols visibility even if supported], wxUSE_VISIBILITY)
WX_ARG_DISABLE(tls, [ --disable-tls disable use of compiler TLS support], wxUSE_COMPILER_TLS)

WX_ARG_ENABLE(repro_build, [ --enable-repro-build enable reproducible build mode], wxUSE_REPRODUCIBLE_BUILD)

dnl ---------------------------------------------------------------------------
dnl optional non GUI features
dnl ---------------------------------------------------------------------------
Expand Down Expand Up @@ -5134,6 +5136,10 @@ else
fi
fi

if test "x$wxUSE_REPRODUCIBLE_BUILD" = "xyes"; then
AC_DEFINE(wxUSE_REPRODUCIBLE_BUILD)
fi

dnl ---------------------------------------------------------------------------
dnl compatibility level
dnl ---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/doxygen/mainpages/const_wxusedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ This table summarizes some of the global build features affecting the entire
@itemdef{wxUSE_PROTOCOL_HTTP, Use wxHTTP class. (requireswxProtocol)}
@itemdef{wxUSE_RADIOBOX, Use wxRadioBox class.}
@itemdef{wxUSE_RADIOBTN, Use wxRadioButton class.}
@itemdef{wxUSE_REPRODUCIBLE_BUILD, Make library builds reproducible.}
@itemdef{wxUSE_REGEX, Use wxRegEx class.}
@itemdef{wxUSE_RICHTEXT, Use wxRichTextCtrl class.}
@itemdef{wxUSE_RICHTEXT_XML_HANDLER, See src/xrc/xh_richtext.cpp file.}
Expand Down
27 changes: 18 additions & 9 deletions include/wx/android/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1282,15 +1292,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down
27 changes: 18 additions & 9 deletions include/wx/gtk/setup0.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1283,15 +1293,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down
27 changes: 18 additions & 9 deletions include/wx/motif/setup0.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1283,15 +1293,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down
29 changes: 19 additions & 10 deletions include/wx/msw/setup0.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1283,15 +1293,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down Expand Up @@ -1374,7 +1383,7 @@

// Use wxDropTarget and wxDropSource classes for drag and drop (this is
// different from "built in" drag and drop in wxTreeCtrl which is always
// available). Requires wxUSE_DATAOBJ and wxUSE_OLE.
// available). Requires wxUSE_DATAOBJ.
//
// Default is 1.
//
Expand Down
31 changes: 18 additions & 13 deletions include/wx/osx/setup0.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1284,15 +1294,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down Expand Up @@ -1439,10 +1448,6 @@
// Compile wxUIActionSimulator class?
#define wxUSE_UIACTIONSIMULATOR 1

// This is only used under Unix, but needs to be defined here as it's checked
// by wx/unix/chkconf.h.
#define wxUSE_XTEST 0

// ----------------------------------------------------------------------------
// wxDC classes for various output formats
// ----------------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions include/wx/setup_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down
27 changes: 18 additions & 9 deletions include/wx/univ/setup0.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
// Recommended setting: 0
#define wxUSE_UNSAFE_WXSTRING_CONV 1

// If set to 1, enables "reproducible builds", i.e. build output should be
// exactly the same if the same build is redone again. As using __DATE__ and
// __TIME__ macros clearly makes the build irreproducible, setting this option
// to 1 disables their use in the library code.
//
// Default is 0
//
// Recommended setting: 0
#define wxUSE_REPRODUCIBLE_BUILD 0

// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1282,15 +1292,14 @@
// Metafiles support
// ----------------------------------------------------------------------------

// Windows supports the graphics format known as metafile which is, though not
// portable, is widely used under Windows and so is supported by wxWin (under
// Windows only, of course). Win16 (Win3.1) used the so-called "Window
// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
// default, WMFs will be used under Win16 and EMFs under Win32. This may be
// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
// in any metafile related classes at all.
// Windows supports the graphics format known as metafile which, though not
// portable, is widely used under Windows and so is supported by wxWidgets
// (under Windows only, of course). Both the so-called "Window MetaFiles" or
// WMFs, and "Enhanced MetaFiles" or EMFs are supported in wxWin and, by
// default, EMFs will be used. This may be changed by setting
// wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting wxUSE_ENH_METAFILE to 0.
// You may also set wxUSE_METAFILE to 0 to not compile in any metafile
// related classes at all.
//
// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
//
Expand Down
2 changes: 2 additions & 0 deletions setup.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@

#define wxUSE_UNSAFE_WXSTRING_CONV 0

#define wxUSE_REPRODUCIBLE_BUILD 0



#define wxUSE_ON_FATAL_EXCEPTION 0
Expand Down

0 comments on commit 2f8a343

Please sign in to comment.