Commit 182a4730 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add the patches and diffs the build system needs

parent a66d6680
......@@ -8,7 +8,6 @@ CMakeLists.txt.user*
.directory
*.rej
*.orig
*.patch
*.autosave
*.swp
.gdb_history
......@@ -20,8 +19,6 @@ CMakeLists.txt.user*
*.includes
.DS_Store
*.kate-swap
*.diff
*.patch
.idea
GTAGS
GPATH
......
diff --git a/cmake/EigenConfigureTesting.cmake b/cmake/EigenConfigureTesting.cmake
index 11ecc95..f7f8b34 100644
--- a/cmake/EigenConfigureTesting.cmake
+++ b/cmake/EigenConfigureTesting.cmake
@@ -41,7 +41,7 @@ endif()
# copy ctest properties, which currently
# o raise the warning levels
-configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
+#configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
# restore default CMAKE_MAKE_PROGRAM
set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM_SAVE})
This diff is collapsed.
diff -Nru -x '*~' expat-2.1.0.orig/lib/libexpat.def expat-2.1.0/lib/libexpat.def
--- expat-2.1.0.orig/lib/libexpat.def 2007-05-11 19:20:24.000000000 +0200
+++ expat-2.1.0/lib/libexpat.def 2013-03-11 10:57:39.156121700 +0100
@@ -1,6 +1,5 @@
; DEF file for MS VC++
-LIBRARY
EXPORTS
XML_DefaultCurrent @1
XML_ErrorString @2
diff -Nru -x '*~' expat-2.1.0.orig/lib/libexpatw.def expat-2.1.0/lib/libexpatw.def
--- expat-2.1.0.orig/lib/libexpatw.def 2007-05-11 19:20:24.000000000 +0200
+++ expat-2.1.0/lib/libexpatw.def 2013-03-11 10:57:48.157279100 +0100
@@ -1,6 +1,5 @@
; DEF file for MS VC++
-LIBRARY
EXPORTS
XML_DefaultCurrent @1
XML_ErrorString @2
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
diff --git a/src/desktoptojson/CMakeLists.txt b/src/desktoptojson/CMakeLists.txt
index dd668a4..424d14c 100644
--- a/src/desktoptojson/CMakeLists.txt
+++ b/src/desktoptojson/CMakeLists.txt
@@ -11,5 +11,5 @@ ecm_mark_nongui_executable(desktoptojson)
target_link_libraries(desktoptojson Qt5::Core)
target_compile_definitions(desktoptojson PRIVATE BUILDING_DESKTOPTOJSON_TOOL=1)
-
+set_target_properties(desktoptojson PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/bin")
install(TARGETS desktoptojson EXPORT KF5CoreAddonsToolingTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59917fa..b56e0af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,10 @@ if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
add_subdirectory(src)
-add_subdirectory(autotests)
+
+if (BUILD_TESTING)
+ add_subdirectory(autotests)
+endif()
# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5I18n")
diff --git a/cmake/KF5I18NMacros.cmake b/cmake/KF5I18NMacros.cmake
index 53ba812..db8ea98 100644
--- a/cmake/KF5I18NMacros.cmake
+++ b/cmake/KF5I18NMacros.cmake
@@ -25,14 +25,9 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-find_package(Gettext REQUIRED)
-find_package(PythonInterp REQUIRED)
-
-set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py)
-set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake)
-
#create the implementation files from the ui files and add them to the list of sources
#usage: KI18N_WRAP_UI(foo_SRCS ${ui_files})
+set(_ki18n_uic_script ${CMAKE_CURRENT_LIST_DIR}/kf5i18nuic.cmake)
macro (KI18N_WRAP_UI _sources )
foreach (_current_FILE ${ARGN})
@@ -57,6 +52,13 @@ macro (KI18N_WRAP_UI _sources )
endforeach (_current_FILE)
endmacro (KI18N_WRAP_UI)
+find_package(Gettext)
+find_package(PythonInterp)
+
+if (Gettext_FOUND AND PythonInterp_FOUND)
+
+set(_ki18n_pmap_compile_script ${CMAKE_CURRENT_LIST_DIR}/ts-pmap-compile.py)
+
#install the scripts for a given language in the target folder
#usage: KI18N_INSTALL_TS_FILES("ja" ${scripts_dir})
function(KI18N_INSTALL_TS_FILES lang scripts_dir)
@@ -225,3 +227,7 @@ function(_KI18N_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name)
set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} )
endfunction()
# End of CMake copied code ####################################################
+
+else()
+ message("Warning: Python and Gettext are needed for some functionality.")
+endif() # Python and gettext found
diff --git a/src/kcollapsiblegroupbox.cpp b/src/kcollapsiblegroupbox.cpp
index edda7af..3ae7d86 100644
--- a/src/kcollapsiblegroupbox.cpp
+++ b/src/kcollapsiblegroupbox.cpp
@@ -94,9 +94,9 @@ void KCollapsibleGroupBox::setTitle(const QString& title)
}
d->shortcutId = grabShortcut(QKeySequence::mnemonic(title));
-
+#ifndef QT_NO_ACCESSIBILITY
setAccessibleName(title);
-
+#endif
emit titleChanged();
}
diff --git a/src/kled.cpp b/src/kled.cpp
index 1e46929..63a817b 100644
--- a/src/kled.cpp
+++ b/src/kled.cpp
@@ -57,7 +57,9 @@ KLed::KLed(const QColor &color, QWidget *parent)
d(new Private)
{
setColor(color);
+#ifndef QT_NO_ACCESSIBILITY
updateAccessibleName();
+#endif
}
KLed::KLed(const QColor &color, State state, Look look, Shape shape,
@@ -70,7 +72,9 @@ KLed::KLed(const QColor &color, State state, Look look, Shape shape,
d->shape = shape;
setColor(color);
+#ifndef QT_NO_ACCESSIBILITY
updateAccessibleName();
+#endif
}
KLed::~KLed()
diff --git a/src/kstartupinfo.cpp b/src/kstartupinfo.cpp
index a97b8b5..0ae7e5b 100644
--- a/src/kstartupinfo.cpp
+++ b/src/kstartupinfo.cpp
@@ -493,7 +493,7 @@ bool KStartupInfo::sendStartupX(Display *disp_P, const KStartupInfoId &id_P,
#ifdef KSTARTUPINFO_ALL_DEBUG
qCDebug(LOG_KWINDOWSYSTEM) << "sending " << msg;
#endif
- return KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
+ return true; // KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
#else
Q_UNUSED(disp_P)
Q_UNUSED(data_P)
@@ -548,7 +548,7 @@ bool KStartupInfo::sendChangeX(Display *disp_P, const KStartupInfoId &id_P,
#ifdef KSTARTUPINFO_ALL_DEBUG
qCDebug(LOG_KWINDOWSYSTEM) << "sending " << msg;
#endif
- return KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
+ return true; //KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
#else
Q_UNUSED(disp_P)
Q_UNUSED(data_P)
@@ -580,7 +580,7 @@ bool KStartupInfo::sendFinishX(Display *disp_P, const KStartupInfoId &id_P)
#ifdef KSTARTUPINFO_ALL_DEBUG
qCDebug(LOG_KWINDOWSYSTEM) << "sending " << msg;
#endif
- return KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
+ return true; //KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
#else
Q_UNUSED(disp_P)
return true;
@@ -615,7 +615,7 @@ bool KStartupInfo::sendFinishX(Display *disp_P, const KStartupInfoId &id_P,
#ifdef KSTARTUPINFO_ALL_DEBUG
qCDebug(LOG_KWINDOWSYSTEM) << "sending " << msg;
#endif
- return KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
+ return true; //KXMessages::broadcastMessageX(disp_P, NET_STARTUP_MSG, msg);
#else
Q_UNUSED(disp_P)
Q_UNUSED(id_P)
diff --git a/src/platforms/xcb/kwindowsystem.cpp b/src/platforms/xcb/kwindowsystem.cpp
index 9d28704..603d9b2 100644
--- a/src/platforms/xcb/kwindowsystem.cpp
+++ b/src/platforms/xcb/kwindowsystem.cpp
@@ -196,7 +196,7 @@ bool NETEventFilter::nativeEventFilter(xcb_generic_event_t *ev)
int old_number_of_desktops = numberOfDesktops();
bool old_showing_desktop = showingDesktop();
unsigned long m[ 5 ];
- NETRootInfo::event(ev, m, 5);
+ //NETRootInfo::event(ev, m, 5);
if ((m[ PROTOCOLS ] & CurrentDesktop) && currentDesktop() != old_current_desktop) {
emit s_q->currentDesktopChanged(currentDesktop());
--- windows/libiconv.rc.orig Sun May 27 18:38:24 2007
+++ windows/libiconv.rc Wed Feb 4 19:50:47 2009
@@ -3,8 +3,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
- PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
+ FILEVERSION 1,13,1,0
+ PRODUCTVERSION 1,13,1,0
FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
#ifdef _DEBUG
FILEFLAGS 0x1L /* VS_FF_DEBUG */
@@ -22,13 +22,13 @@
VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\0"
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "LGPLed libiconv for Windows NT/2000/XP/Vista and Windows 95/98/ME\0"
- VALUE "FileVersion", PACKAGE_VERSION_STRING "\0"
+ VALUE "FileVersion", "1.13.1" "\0"
VALUE "InternalName", "iconv.dll\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2007\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "iconv.dll\0"
VALUE "ProductName", "libiconv: character set conversion library\0"
- VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0"
+ VALUE "ProductVersion", "1.13.1" "\0"
END
END
BLOCK "VarFileInfo"
--- windows/iconv.rc.orig Sun Oct 7 18:25:21 2007
+++ windows/iconv.rc Wed Feb 4 19:50:50 2009
@@ -3,8 +3,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
- PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
+ FILEVERSION 1,13,1,0
+ PRODUCTVERSION 1,13,1,0
FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
#ifdef _DEBUG
FILEFLAGS 0x1L /* VS_FF_DEBUG */
@@ -22,13 +22,13 @@
VALUE "Comments", "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\0"
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "GPLed iconv for Windows NT/2000/XP/Vista\0"
- VALUE "FileVersion", PACKAGE_VERSION_STRING "\0"
+ VALUE "FileVersion", "1.13.1" "\0"
VALUE "InternalName", "iconv.exe\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2009\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "iconv.exe\0"
VALUE "ProductName", "iconv: character set conversion program\0"
- VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0"
+ VALUE "ProductVersion", "1.13.1" "\0"
END
END
BLOCK "VarFileInfo"
diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h
index 473c84c..2990bef 100644
--- a/srclib/stdio.in.h
+++ b/srclib/stdio.in.h
@@ -695,7 +695,7 @@ _GL_CXXALIASWARN (gets);
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+//_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..5f6fcd8
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,102 @@
+project(ilmbase)
+
+cmake_minimum_required(VERSION 2.8)
+
+set(ilmbase_lib_STATIC STATIC)
+
+set(ilmbase_srcs_Imath
+ Imath/ImathShear.cpp
+ Imath/ImathColorAlgo.cpp
+ Imath/ImathMatrixAlgo.cpp
+ Imath/ImathBox.cpp
+ Imath/ImathFun.cpp
+ Imath/ImathRandom.cpp
+ Imath/ImathVec.cpp
+ )
+file(GLOB ilmbase_header_Imath Imath/*.h)
+
+set(ilmbase_srcs_IlmThread
+ IlmThread/IlmThreadMutex.cpp
+ IlmThread/IlmThreadMutexPosix.cpp
+ IlmThread/IlmThreadSemaphorePosixCompat.cpp
+ IlmThread/IlmThreadPosix.cpp
+ IlmThread/IlmThreadPool.cpp
+ IlmThread/IlmThreadSemaphore.cpp
+ IlmThread/IlmThreadSemaphorePosix.cpp
+ IlmThread/IlmThread.cpp
+ )
+if(WIN32)
+ set(ilmbase_srcs_IlmThread ${ilmbase_srcs_IlmThread}
+ IlmThread/IlmThreadSemaphoreWin32.cpp
+ IlmThread/IlmThreadMutexWin32.cpp
+ IlmThread/IlmThreadWin32.cpp
+ )
+endif(WIN32)
+file(GLOB ilmbase_header_IlmThread IlmThread/*.h)
+
+set(ilmbase_srcs_Half
+ Half/half.cpp
+ )
+file(GLOB ilmbase_header_Half Half/*.h)
+
+set(ilmbase_srcs_IexMath
+ IexMath/IexMathFloatExc.cpp
+ IexMath/IexMathFpu.cpp
+ )
+file(GLOB ilmbase_header_IexMath IexMath/*.h)
+
+set(ilmbase_srcs_Iex
+ Iex/IexBaseExc.cpp
+ Iex/IexThrowErrnoExc.cpp
+ )
+file(GLOB ilmbase_header_Iex Iex/*.h)
+
+include_directories(${CMAKE_INSTALL_PREFIX}/include)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Half)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/IexMath)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Iex)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+if(WIN32)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/config.windows)
+else(WIN32)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/config)
+endif(WIN32)
+
+
+set(ilmbase_header_IlmThread ${ilmbase_header_IlmThread} ${CMAKE_CURRENT_SOURCE_DIR}/config.windows/IlmBaseConfig.h)
+
+add_executable(toFloat Half/toFloat.cpp)
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
+ COMMAND $<TARGET_FILE:toFloat> > ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
+ DEPENDS toFloat
+ )
+add_custom_target(toFloat_h DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h)
+
+add_executable(eLut Half/eLut.cpp)
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eLut.h
+ COMMAND $<TARGET_FILE:eLut> > ${CMAKE_CURRENT_BINARY_DIR}/eLut.h
+ DEPENDS eLut
+ )
+add_custom_target(eLut_h DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/eLut.h)
+
+add_library(Imath ${ilmbase_lib_STATIC} ${ilmbase_srcs_Imath})
+install(TARGETS Imath LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
+install(FILES ${ilmbase_header_Imath} DESTINATION include)
+
+add_library(IlmThread ${ilmbase_lib_STATIC} ${ilmbase_srcs_IlmThread})
+install(TARGETS IlmThread LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
+install(FILES ${ilmbase_header_IlmThread} DESTINATION include)
+
+add_library(Half ${ilmbase_lib_STATIC} ${ilmbase_srcs_Half})
+install(TARGETS Half LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
+add_dependencies(Half toFloat_h eLut_h)
+install(FILES ${ilmbase_header_Half} DESTINATION include)
+
+add_library(Iex ${ilmbase_lib_STATIC} ${ilmbase_srcs_Iex})
+install(TARGETS Iex LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
+install(FILES ${ilmbase_header_Iex} DESTINATION include)
+
+add_library(IexMath ${ilmbase_lib_STATIC} ${ilmbase_srcs_IexMath})
+install(TARGETS IexMath LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
+install(FILES ${ilmbase_header_IexMath} DESTINATION include)
diff --git a/Half/half.h b/Half/half.h
index 5e707ef..776bb84 100644
--- a/Half/half.h
+++ b/Half/half.h
@@ -87,17 +87,8 @@
#include <iostream>
-#if defined(OPENEXR_DLL)
- #if defined(HALF_EXPORTS)
- #define HALF_EXPORT __declspec(dllexport)
- #else
- #define HALF_EXPORT __declspec(dllimport)
- #endif
- #define HALF_EXPORT_CONST
-#else
- #define HALF_EXPORT
- #define HALF_EXPORT_CONST const
-#endif
+#define HALF_EXPORT
+#define HALF_EXPORT_CONST const
class HALF_EXPORT half
{
diff --git a/IlmThread/IlmThread.h b/IlmThread/IlmThread.h
index e5ca595..b91a8b9 100644
--- a/IlmThread/IlmThread.h
+++ b/IlmThread/IlmThread.h
@@ -93,25 +93,13 @@
#include "IlmBaseConfig.h"
#if defined _WIN32 || defined _WIN64
- #ifdef NOMINMAX
- #undef NOMINMAX
- #endif
- #define NOMINMAX
#include <windows.h>
#include <process.h>
#elif HAVE_PTHREAD
#include <pthread.h>
#endif
-#if defined(OPENEXR_DLL) && !defined(ZENO_STATIC)
- #ifdef ILMTHREAD_EXPORTS
- #define ILMTHREAD_EXPORT __declspec(dllexport)
- #else
- #define ILMTHREAD_EXPORT __declspec(dllimport)
- #endif
-#else
- #define ILMTHREAD_EXPORT
-#endif
+#define ILMTHREAD_EXPORT
namespace IlmThread {
diff --git a/IlmThread/IlmThreadMutex.h b/IlmThread/IlmThreadMutex.h
index 354282b..3fe39c9 100644
--- a/IlmThread/IlmThreadMutex.h
+++ b/IlmThread/IlmThreadMutex.h
@@ -69,10 +69,6 @@
#include "IlmBaseConfig.h"
#if defined _WIN32 || defined _WIN64
- #ifdef NOMINMAX
- #undef NOMINMAX
- #endif
- #define NOMINMAX
#include <windows.h>
#elif HAVE_PTHREAD
#include <pthread.h>
diff --git a/IlmThread/IlmThreadSemaphore.h b/IlmThread/IlmThreadSemaphore.h
index a9ba60a..8ffd282 100644
--- a/IlmThread/IlmThreadSemaphore.h
+++ b/IlmThread/IlmThreadSemaphore.h
@@ -45,10 +45,6 @@
#include "IlmBaseConfig.h"
#if defined _WIN32 || defined _WIN64
- #ifdef NOMINMAX
- #undef NOMINMAX
- #endif
- #define NOMINMAX
#include <windows.h>
#elif HAVE_PTHREAD && !HAVE_POSIX_SEMAPHORES
#include <pthread.h>
diff --git a/Imath/ImathMatrixAlgo.cpp b/Imath/ImathMatrixAlgo.cpp
index 8896c8d..fd75d3d 100644
--- a/Imath/ImathMatrixAlgo.cpp
+++ b/Imath/ImathMatrixAlgo.cpp
@@ -44,12 +44,9 @@
#include "ImathMatrixAlgo.h"
#include <cmath>
+#include <algorithm>
-#if defined(OPENEXR_DLL)
- #define EXPORT_CONST __declspec(dllexport)
-#else
- #define EXPORT_CONST const
-#endif
+#define EXPORT_CONST const
namespace Imath {
@@ -627,12 +624,12 @@ T
maxOffDiag (const Imath::Matrix33<T>& A)
{
T result = 0;
- result = std::max (result, std::abs (A[0][1]));
- result = std::max (result, std::abs (A[0][2]));
- result = std::max (result, std::abs (A[1][0]));
- result = std::max (result, std::abs (A[1][2]));
- result = std::max (result, std::abs (A[2][0]));
- result = std::max (result, std::abs (A[2][1]));
+ result = (std::max) (result, std::abs (A[0][1]));
+ result = (std::max) (result, std::abs (A[0][2]));
+ result = (std::max) (result, std::abs (A[1][0]));
+ result = (std::max) (result, std::abs (A[1][2]));
+ result = (std::max) (result, std::abs (A[2][0]));
+ result = (std::max) (result, std::abs (A[2][1]));
return result;
}
@@ -646,7 +643,7 @@ maxOffDiag (const Imath::Matrix44<T>& A)
for (int j = 0; j < 4; ++j)
{
if (i != j)
- result = std::max (result, std::abs (A[i][j]));
+ result = (std::max) (result, std::abs (A[i][j]));
}
}
@@ -1091,7 +1088,7 @@ maxOffDiagSymm (const TM& A)
T result = 0;
for (unsigned int i = 0; i < TM::dimensions(); ++i)
for (unsigned int j = i+1; j < TM::dimensions(); ++j)
- result = std::max (result, std::abs (A[i][j]));
+ result = (std::max) (result, std::abs (A[i][j]));
return result;
}
diff --git a/Imath/ImathMatrixAlgo.h b/Imath/ImathMatrixAlgo.h
index 6cb1568..ede2ab7 100644
--- a/Imath/ImathMatrixAlgo.h
+++ b/Imath/ImathMatrixAlgo.h
@@ -57,15 +57,7 @@
#include <math.h>
-#ifdef OPENEXR_DLL
- #ifdef IMATH_EXPORTS
- #define IMATH_EXPORT_CONST extern __declspec(dllexport)
- #else
- #define IMATH_EXPORT_CONST extern __declspec(dllimport)
- #endif
-#else
- #define IMATH_EXPORT_CONST extern const
-#endif
+#define IMATH_EXPORT_CONST extern const
namespace Imath {
This diff is collapsed.
diff --git a/jconfig.cfg b/jconfig.cfg
index c4548fc..6e5d2dc 100644
--- a/jconfig.cfg
+++ b/jconfig.cfg
@@ -18,8 +18,7 @@
#undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not enum, on Windows systems. */
-#ifdef _WIN32
-#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+#ifndef boolean /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#ifndef FALSE /* in case these macros already exist */
@@ -29,7 +28,6 @@ typedef unsigned char boolean;
#define TRUE 1
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-#endif
#ifdef JPEG_INTERNALS
diff -Nru -x '*~' lcms2-2.4.orig/CMakeLists.txt lcms2-2.4/CMakeLists.txt
--- lcms2-2.4.orig/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ lcms2-2.4/CMakeLists.txt 2013-01-24 11:35:17.013861600 +0100
@@ -0,0 +1,22 @@
+project(lcms2)
+
+option(BUILD_TESTS "build the test executable" OFF)
+option(BUILD_STATIC "build the static library" OFF)
+option(BUILD_UTILS "build the utilities executables" ON)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
+cmake_minimum_required(VERSION 2.6)
+
+include_directories(
+${CMAKE_BINARY_DIR}/include
+${CMAKE_SOURCE_DIR}/include
+)
+
+add_subdirectory(src)
+if(BUILD_TESTS)
+ add_subdirectory(testbed)
+endif(BUILD_TESTS)
+if(BUILD_UTILS)
+ add_subdirectory(utils)
+endif(BUILD_UTILS)
diff -Nru -x '*~' lcms2-2.4.orig/include/lcms2.h lcms2-2.4/include/lcms2.h
--- lcms2-2.4.orig/include/lcms2.h 2012-09-10 18:01:51.000000000 +0200
+++ lcms2-2.4/include/lcms2.h 2013-01-24 11:35:17.022862100 +0100
@@ -199,25 +199,25 @@
// Calling convention -- this is hardly platform and compiler dependent
#ifdef CMS_IS_WINDOWS_
-# if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
-# ifdef __BORLANDC__
-# define CMSEXPORT __stdcall _export
-# define CMSAPI
-# else
-# define CMSEXPORT _stdcall
-# ifdef CMS_DLL_BUILD
+# if !defined(CMS_STATIC)
+# ifdef __BORLANDC__
+# define CMSEXPORT __stdcall _export
+# define CMSAPI
+# else
+# define CMSEXPORT
+# ifdef CMS_DLL_BUILD
# define CMSAPI __declspec(dllexport)
-# else
-# define CMSAPI __declspec(dllimport)
-# endif
-# endif
-# else
-# define CMSEXPORT
-# define CMSAPI
-# endif
+# else
+# define CMSAPI __declspec(dllimport)
+# endif
+# endif
+# else
+# define CMSEXPORT
+# define CMSAPI
+# endif
#else
-# define CMSEXPORT
-# define CMSAPI
+# define CMSEXPORT
+# define CMSAPI
#endif
// Some common definitions
diff -Nru -x '*~' lcms2-2.4.orig/src/CMakeLists.txt lcms2-2.4/src/CMakeLists.txt
--- lcms2-2.4.orig/src/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ lcms2-2.4/src/CMakeLists.txt 2013-01-24 11:42:39.515171300 +0100
@@ -0,0 +1,63 @@
+# some configure checks:
+if(WIN32)
+ if(MSVC)
+ set(UINT8_T "unsigned char")
+ set(UINT16_T "unsigned short")
+ set(UINT32_T "unsigned long")
+ set(INT8_T "char")
+ set(INT16_T "short")
+ set(INT32_T "long")
+ else(MSVC)
+ set(UINT8_T "uint8_t")
+ set(UINT16_T "uint16_t")
+ set(UINT32_T "uint32_t")
+ set(INT8_T "int8_t")
+ set(INT16_T "int16_t")
+ set(INT32_T "int32_t")
+ endif(MSVC)
+endif(WIN32)
+
+set(lcms_SRCS
+ cmscnvrt.c
+ cmserr.c
+ cmsgamma.c
+ cmsgmt.c
+ cmsintrp.c
+ cmsio0.c
+ cmsio1.c
+ cmslut.c
+ cmsplugin.c
+ cmssm.c
+ cmsmd5.c
+ cmsmtrx.c
+ cmspack.c
+ cmspcs.c
+ cmswtpnt.c
+ cmsxform.c
+ cmssamp.c
+ cmsnamed.c
+ cmscam02.c
+ cmsvirt.c
+ cmstypes.c
+ cmscgats.c
+ cmsps2.c
+ cmsopt.c
+ cmshalf.c
+)
+
+include_directories(${CMAKE_BINARY_DIR})
+
+add_library(lcms SHARED ${lcms_SRCS})
+set_target_properties(lcms PROPERTIES OUTPUT_NAME "lcms2"
+ DEFINE_SYMBOL CMS_DLL_BUILD)
+
+if(BUILD_TESTS OR BUILD_UTILS OR BUILD_STATIC)
+ add_library(lcms_static ${lcms_SRCS})
+ set_target_properties(lcms_static PROPERTIES COMPILE_FLAGS -DCMS_STATIC)
+ set(LCMS_STATIC lcms_static)
+endif(BUILD_TESTS OR BUILD_UTILS OR BUILD_STATIC)
+
+install(TARGETS lcms ${LCMS_STATIC} RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../include/lcms2.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/lcms2_plugin.h DESTINATION include)
diff -Nru -x '*~' lcms2-2.4.orig/testbed/CMakeLists.txt lcms2-2.4/testbed/CMakeLists.txt
--- lcms2-2.4.orig/testbed/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ lcms2-2.4/testbed/CMakeLists.txt 2013-01-24 11:35:17.033862800 +0100
@@ -0,0 +1,5 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include ${CMAKE_CURRENT_SOURCE_DIR}/../src)
+
+add_executable(testcms testcms2.c)
+target_link_libraries(testcms lcms_static)
+set_target_properties(testcms PROPERTIES COMPILE_FLAGS -DCMS_STATIC)
diff -Nru -x '*~' lcms2-2.4.orig/testbed/testcms2.c lcms2-2.4/testbed/testcms2.c
--- lcms2-2.4.orig/testbed/testcms2.c 2012-09-10 18:01:51.000000000 +0200
+++ lcms2-2.4/testbed/testcms2.c 2013-01-24 11:35:17.043863300 +0100
@@ -31,7 +31,7 @@
#include "lcms2_internal.h"
// On Visual Studio, use debug CRT
-#ifdef _MSC_VER
+#ifdef _WIN32