diff options
Diffstat (limited to '')
-rw-r--r-- | external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1 | 141 | ||||
-rw-r--r-- | external/lcms2/ExternalPackage_lcms2.mk | 28 | ||||
-rw-r--r-- | external/lcms2/ExternalProject_lcms2.mk | 48 | ||||
-rw-r--r-- | external/lcms2/Makefile | 7 | ||||
-rw-r--r-- | external/lcms2/Module_lcms2.mk | 18 | ||||
-rw-r--r-- | external/lcms2/README | 3 | ||||
-rw-r--r-- | external/lcms2/UnpackedTarball_lcms2.mk | 25 | ||||
-rw-r--r-- | external/lcms2/c++17.patch.0 | 22 | ||||
-rw-r--r-- | external/lcms2/lcms2-2.4-windows.patch | 20 | ||||
-rw-r--r-- | external/lcms2/lcms2-msvc-disable-sse2.patch.1 | 10 |
10 files changed, 322 insertions, 0 deletions
diff --git a/external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1 b/external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1 new file mode 100644 index 000000000..00d404fad --- /dev/null +++ b/external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1 @@ -0,0 +1,141 @@ +From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001 +From: Marti Maria <info@littlecms.com> +Date: Wed, 15 Aug 2018 20:07:56 +0200 +Subject: [PATCH 17/18] Upgrade Visual studio 2017 15.8 + +- Upgrade to 15.8 +- Add check on CGATS memory allocation (thanks to Quang Nguyen for +pointing out this) +--- + Projects/VC2017/jpegicc/jpegicc.vcxproj | 1 + + Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj | 2 +- + Projects/VC2017/lcms2_static/lcms2_static.vcxproj | 2 +- + Projects/VC2017/linkicc/linkicc.vcxproj | 2 +- + Projects/VC2017/psicc/psicc.vcxproj | 2 +- + Projects/VC2017/testbed/testbed.vcxproj | 2 +- + Projects/VC2017/tiffdiff/tiffdiff.vcxproj | 2 +- + Projects/VC2017/tifficc/tifficc.vcxproj | 2 +- + Projects/VC2017/transicc/transicc.vcxproj | 1 + + src/cmscgats.c | 14 ++++++++++---- + 10 files changed, 19 insertions(+), 11 deletions(-) + +diff --git a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj +index 4c8aa3f..d1bf3eb 100644 +--- a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj ++++ b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid> + <RootNamespace>lcms2_DLL</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj +index 2a9988a..9fc05ce 100644 +--- a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj ++++ b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid> + <RootNamespace>lcms2_static</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/linkicc/linkicc.vcxproj b/Projects/VC2017/linkicc/linkicc.vcxproj +index 30c2b4e..51586dd 100644 +--- a/Projects/VC2017/linkicc/linkicc.vcxproj ++++ b/Projects/VC2017/linkicc/linkicc.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid> + <RootNamespace>linkicc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/psicc/psicc.vcxproj b/Projects/VC2017/psicc/psicc.vcxproj +index 9dcf89a..8f26e12 100644 +--- a/Projects/VC2017/psicc/psicc.vcxproj ++++ b/Projects/VC2017/psicc/psicc.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid> + <RootNamespace>psicc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/testbed/testbed.vcxproj b/Projects/VC2017/testbed/testbed.vcxproj +index 0af3762..3f6aea3 100644 +--- a/Projects/VC2017/testbed/testbed.vcxproj ++++ b/Projects/VC2017/testbed/testbed.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid> + <RootNamespace>testbed</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj +index 7edfe28..3a6d837 100644 +--- a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj ++++ b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid> + <RootNamespace>tiffdiff</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/Projects/VC2017/tifficc/tifficc.vcxproj b/Projects/VC2017/tifficc/tifficc.vcxproj +index cd9f04c..5ef954f 100644 +--- a/Projects/VC2017/tifficc/tifficc.vcxproj ++++ b/Projects/VC2017/tifficc/tifficc.vcxproj +@@ -22,7 +22,6 @@ + <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid> + <RootNamespace>tifficc</RootNamespace> + <Keyword>Win32Proj</Keyword> +- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> +diff --git a/src/cmscgats.c b/src/cmscgats.c +index 1a87613..8c3e96d 100644 +--- a/src/cmscgats.c ++++ b/src/cmscgats.c +@@ -1,7 +1,7 @@ + //--------------------------------------------------------------------------------- + // + // Little Color Management System +-// Copyright (c) 1998-2017 Marti Maria Saguer ++// Copyright (c) 1998-2018 Marti Maria Saguer + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8) + t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); + t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); + +- t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); +- if (t->Data == NULL) { ++ if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe) ++ { ++ SynError(it8, "AllocateDataSet: too much data"); ++ } ++ else { ++ t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*)); ++ if (t->Data == NULL) { + +- SynError(it8, "AllocateDataSet: Unable to allocate data array"); ++ SynError(it8, "AllocateDataSet: Unable to allocate data array"); ++ } + } + + } +-- +2.17.1 + diff --git a/external/lcms2/ExternalPackage_lcms2.mk b/external/lcms2/ExternalPackage_lcms2.mk new file mode 100644 index 000000000..4efd696c4 --- /dev/null +++ b/external/lcms2/ExternalPackage_lcms2.mk @@ -0,0 +1,28 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,lcms2,lcms2)) + +$(eval $(call gb_ExternalPackage_use_external_project,lcms2,lcms2)) + +ifeq ($(DISABLE_DYNLOADING),) +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2.2.dylib,src/.libs/liblcms2.2.dylib)) +else ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(eval $(call gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2-2.dll,src/.libs/liblcms2-2.dll)) +else ifeq ($(COM),MSC) +$(eval $(call gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/lcms2.dll,bin/lcms2.dll)) +endif # $(COM) +else # $(OS) != WNT/MACOSX +$(eval $(call gb_ExternalPackage_add_file,lcms2,$(LIBO_LIB_FOLDER)/liblcms2.so.2,src/.libs/liblcms2.so.2.0.8)) +endif # $(OS) +endif # $(DISABLE_DYNLOADING) + +# vim: set noet sw=4 ts=4: diff --git a/external/lcms2/ExternalProject_lcms2.mk b/external/lcms2/ExternalProject_lcms2.mk new file mode 100644 index 000000000..521024209 --- /dev/null +++ b/external/lcms2/ExternalProject_lcms2.mk @@ -0,0 +1,48 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,lcms2)) + +$(eval $(call gb_ExternalProject_register_targets,lcms2,\ + build \ +)) + +ifeq ($(COM),MSC) + +$(call gb_ExternalProject_get_state_target,lcms2,build): + $(call gb_Trace_StartRange,lcms2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + MSBuild.exe lcms2_DLL.vcxproj \ + $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \ + $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \ + /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ + /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:TargetName=lcms2 \ + ,Projects/VC2017/lcms2_DLL) + $(call gb_Trace_EndRange,lcms2,EXTERNAL) +else +$(call gb_ExternalProject_get_state_target,lcms2,build): + $(call gb_Trace_StartRange,lcms2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + ./configure --without-jpeg --without-tiff --with-pic \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \ + $(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ + CPPFLAGS=" $(SOLARINC)" \ + CFLAGS='$(CFLAGS) $(if $(debug),$(gb_DEBUGINFO_FLAGS)) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))' \ + $(if $(DISABLE_DYNLOADING), \ + --enable-static --disable-shared \ + , \ + --enable-shared --disable-static \ + ) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + && cd src \ + && $(MAKE) \ + ) + $(call gb_Trace_EndRange,lcms2,EXTERNAL) +endif +# vim: set noet sw=4 ts=4: diff --git a/external/lcms2/Makefile b/external/lcms2/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/lcms2/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/lcms2/Module_lcms2.mk b/external/lcms2/Module_lcms2.mk new file mode 100644 index 000000000..807dbae43 --- /dev/null +++ b/external/lcms2/Module_lcms2.mk @@ -0,0 +1,18 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,lcms2)) + +$(eval $(call gb_Module_add_targets,lcms2,\ + UnpackedTarball_lcms2 \ + ExternalPackage_lcms2 \ + ExternalProject_lcms2 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/lcms2/README b/external/lcms2/README new file mode 100644 index 000000000..10b18a5ad --- /dev/null +++ b/external/lcms2/README @@ -0,0 +1,3 @@ +lcms2 (little cms engine) +lcms2: Little cms is a small, speed optimized color management engine. +with the new libcdr, writerperfect will depend on lcms2
\ No newline at end of file diff --git a/external/lcms2/UnpackedTarball_lcms2.mk b/external/lcms2/UnpackedTarball_lcms2.mk new file mode 100644 index 000000000..c5e1839cf --- /dev/null +++ b/external/lcms2/UnpackedTarball_lcms2.mk @@ -0,0 +1,25 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,lcms2)) + +$(eval $(call gb_UnpackedTarball_set_tarball,lcms2,$(LCMS2_TARBALL))) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,lcms2)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,lcms2,3)) + +$(eval $(call gb_UnpackedTarball_add_patches,lcms2,\ + external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1 \ + external/lcms2/lcms2-2.4-windows.patch \ + external/lcms2/lcms2-msvc-disable-sse2.patch.1 \ + external/lcms2/c++17.patch.0 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/lcms2/c++17.patch.0 b/external/lcms2/c++17.patch.0 new file mode 100644 index 000000000..9a9de3f04 --- /dev/null +++ b/external/lcms2/c++17.patch.0 @@ -0,0 +1,22 @@ +--- include/lcms2.h ++++ include/lcms2.h +@@ -1248,13 +1248,13 @@ + CMSAPI void* CMSEXPORT cmsStageData(const cmsStage* mpe); + + // Sampling +-typedef cmsInt32Number (* cmsSAMPLER16) (register const cmsUInt16Number In[], +- register cmsUInt16Number Out[], +- register void * Cargo); ++typedef cmsInt32Number (* cmsSAMPLER16) (const cmsUInt16Number In[], ++ cmsUInt16Number Out[], ++ void * Cargo); + +-typedef cmsInt32Number (* cmsSAMPLERFLOAT)(register const cmsFloat32Number In[], +- register cmsFloat32Number Out[], +- register void * Cargo); ++typedef cmsInt32Number (* cmsSAMPLERFLOAT)(const cmsFloat32Number In[], ++ cmsFloat32Number Out[], ++ void * Cargo); + + // Use this flag to prevent changes being written to destination + #define SAMPLER_INSPECT 0x01000000 diff --git a/external/lcms2/lcms2-2.4-windows.patch b/external/lcms2/lcms2-2.4-windows.patch new file mode 100644 index 000000000..749a81200 --- /dev/null +++ b/external/lcms2/lcms2-2.4-windows.patch @@ -0,0 +1,20 @@ +TODO: Is this still needed? + +--- misc/lcms2-2.4/include/lcms2.h 2011-12-15 16:45:47.000000000 +0100 ++++ misc/build/lcms2-2.4/include/lcms2.h 2012-03-17 22:53:28.731585981 +0100 +@@ -192,6 +192,15 @@ typedef int cmsBool; + #endif // CMS_USE_BIG_ENDIAN + + ++// LibreOffice always builds this as DLL and with the stdcall calling ++// convention, so make this usable from outside without having to ++// specify CMS_DLL manually whenever the library is used. ++#ifndef CMS_DLL_BUILD ++#ifndef CMS_DLL ++#define CMS_DLL ++#endif ++#endif ++ + // Calling convention -- this is hardly platform and compiler dependent + #ifdef CMS_IS_WINDOWS_ + # if defined(CMS_DLL) || defined(CMS_DLL_BUILD) diff --git a/external/lcms2/lcms2-msvc-disable-sse2.patch.1 b/external/lcms2/lcms2-msvc-disable-sse2.patch.1 new file mode 100644 index 000000000..37ef7730b --- /dev/null +++ b/external/lcms2/lcms2-msvc-disable-sse2.patch.1 @@ -0,0 +1,10 @@ +--- lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj.orig 2014-10-02 15:15:40.228020086 +0200 ++++ lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj 2014-10-02 15:15:42.243019930 +0200 +@@ -133,6 +133,7 @@ + </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
++ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|