# HG changeset patch # User Sebastien Jodogne # Date 1515047216 -3600 # Node ID 6f90b762be6a671a609bbc1833e60f3e287ed64a # Parent 98007e87cc30629fb4b469f3edc139a3f271084d no need for patch.exe diff -r 98007e87cc30 -r 6f90b762be6a CMakeLists.txt --- a/CMakeLists.txt Wed Jan 03 18:09:02 2018 +0100 +++ b/CMakeLists.txt Thu Jan 04 07:26:56 2018 +0100 @@ -41,6 +41,7 @@ mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE) set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/Orthanc) +set(ORTHANC_DISABLE_PATCH ON) # No need for the "patch" command-line tool set(ENABLE_LOCALE OFF) # Disable support for locales (notably in Boost) include(CheckIncludeFiles) diff -r 98007e87cc30 -r 6f90b762be6a Orthanc/Resources/CMake/Compiler.cmake --- a/Orthanc/Resources/CMake/Compiler.cmake Wed Jan 03 18:09:02 2018 +0100 +++ b/Orthanc/Resources/CMake/Compiler.cmake Thu Jan 04 07:26:56 2018 +0100 @@ -195,6 +195,16 @@ endif() +if (CMAKE_COMPILER_IS_GNUCXX) + # "When creating a static library using binutils (ar) and there + # exist a duplicate object name (e.g. a/Foo.cpp.o, b/Foo.cpp.o), the + # resulting static library can end up having only one of the + # duplicate objects. [...] This bug only happens if there are many + # objects." https://cmake.org/Bug/view.php?id=14874 + set(CMAKE_CXX_ARCHIVE_APPEND " q ") +endif() + + if (STATIC_BUILD) add_definitions(-DORTHANC_STATIC=1) else() diff -r 98007e87cc30 -r 6f90b762be6a Orthanc/Resources/ThirdParty/patch/NOTES.txt --- a/Orthanc/Resources/ThirdParty/patch/NOTES.txt Wed Jan 03 18:09:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -=========== -INFORMATION -=========== - -This is a precompiled version of the "patch" standard tool for -Windows. It was compiled using the MSYS framework. - -The binaries originate from the "Git for Windows 1.9.5" package -(https://msysgit.github.io/). The build instructions have been -provided on the discussion group of Git for Windows [1]. They are -copied/pasted below for reference. - - - -================ -UPSTREAM PROJECT -================ - -URL to the upstream project: -http://savannah.gnu.org/projects/patch/ - -License of patch: GPLv2 (GNU General Public License v2) - -Copyright (C) 1988 Larry Wall "with lots o' patches by Paul Eggert" -Copyright (C) 1997 Free Software Foundation, Inc. - - - -====================== -BUILD INSTRUCTIONS [1] -====================== - -The easiest way to find out about this is to install the Git SDK, then -run - - pacman -Qu $(which patch.exe) - -to find out which package contains the `patch.exe` binary. It so happens -to be patch.2.7.5-1 at the moment. Since this is an MSys2 package (not a -MinGW one, otherwise the patch utility would be in /mingw64/bin/, not -/usr/bin/), this package is built from the recipes in - - https://github.com/msys2/MSYS2-packages - -The `patch` package is obviously built from the subdirectory - - https://github.com/Alexpux/MSYS2-packages/tree/master/patch - -and the PKGBUILD file specifies that the source is fetched from -ftp://ftp.gnu.org/gnu/patch/patch-2.7.5.tar.xz: - -https://github.com/Alexpux/MSYS2-packages/blob/900744becd072f687029b0f830ab6fe95cf533d6/patch/PKGBUILD#L14 - -and then these two patches are applied before building: - -https://github.com/Alexpux/MSYS2-packages/blob/900744becd072f687029b0f830ab6fe95cf533d6/patch/msys2-patch-2.7.1.patch - -and - -https://github.com/Alexpux/MSYS2-packages/blob/900744becd072f687029b0f830ab6fe95cf533d6/patch/msys2-patch-manifest.patch - -As you can see, some light changes are applied, i.e. `patch.exe` will -always write in binary mode with MSys2, and the executable will have a -manifest embedded that allows it to run as non-administrator. - -Ciao, -Johannes Schindelin - - -[1] https://groups.google.com/d/msg/git-for-windows/xWyVr4z6Ri0/6RKeV028EAAJ diff -r 98007e87cc30 -r 6f90b762be6a Orthanc/Resources/ThirdParty/patch/msys-1.0.dll Binary file Orthanc/Resources/ThirdParty/patch/msys-1.0.dll has changed diff -r 98007e87cc30 -r 6f90b762be6a Orthanc/Resources/ThirdParty/patch/patch.exe Binary file Orthanc/Resources/ThirdParty/patch/patch.exe has changed diff -r 98007e87cc30 -r 6f90b762be6a Orthanc/Resources/ThirdParty/patch/patch.exe.manifest --- a/Orthanc/Resources/ThirdParty/patch/patch.exe.manifest Wed Jan 03 18:09:02 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - diff -r 98007e87cc30 -r 6f90b762be6a Resources/SyncOrthancFolder.py --- a/Resources/SyncOrthancFolder.py Wed Jan 03 18:09:02 2018 +0100 +++ b/Resources/SyncOrthancFolder.py Thu Jan 04 07:26:56 2018 +0100 @@ -32,12 +32,15 @@ 'Resources/MinGWToolchain.cmake', 'Resources/Patches/boost-1.65.1-linux-standard-base.patch', 'Resources/ThirdParty/VisualStudio/stdint.h', - 'Resources/ThirdParty/patch/NOTES.txt', - 'Resources/ThirdParty/patch/msys-1.0.dll', - 'Resources/ThirdParty/patch/patch.exe', - 'Resources/ThirdParty/patch/patch.exe.manifest', 'Resources/WindowsResources.py', 'Resources/WindowsResources.rc', + + # NB: The "patch.exe" for Windows is not necessary, + # as the only patch applies to Linux Standard Base + #'Resources/ThirdParty/patch/NOTES.txt', + #'Resources/ThirdParty/patch/msys-1.0.dll', + #'Resources/ThirdParty/patch/patch.exe', + #'Resources/ThirdParty/patch/patch.exe.manifest', ] SDK = [