From 9c8fb8704fb5868c23be5c7733e7b38d364fef6b Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 7 Dec 2014 21:37:21 +0100 Subject: [PATCH] disable opencl It requires bundling clcc, because only one source file is used to produce a library (the vanilla clcc only builds a binary). --- .gitignore | 1 - ...o-have-OpenCL-optional-at-configure-.patch | 103 ++++++++++++++++++ libreoffice.spec | 3 +- sources | 1 - 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch diff --git a/.gitignore b/.gitignore index adfb31b..68a60b7 100644 --- a/.gitignore +++ b/.gitignore @@ -117,4 +117,3 @@ /libreoffice-4.4.0.0.beta2.tar.xz /libreoffice-help-4.4.0.0.beta2.tar.xz /libreoffice-translations-4.4.0.0.beta2.tar.xz -/clcc-0.3.0-25-src.zip diff --git a/0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch b/0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch new file mode 100644 index 0000000..ed91dde --- /dev/null +++ b/0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch @@ -0,0 +1,103 @@ +From 764836cb00e8e6dfd2ab48e080a166ec90359e01 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sun, 7 Dec 2014 21:48:55 +0100 +Subject: [PATCH] Revert "No need to have OpenCL optional at configure-time" + +As long as this requires bundling clcc, not allowing to disable it is +unacceptable. + +This reverts commit 3b0b76462aa54f60bc9823d9c6ef64e5e35c1208. + +Conflicts: + configure.ac + +Change-Id: I12b3d5e3325bbd03cd98e1fb5139705d694493c2 +--- + configure.ac | 14 +++++++++++++- + sc/CppunitTest_sc_opencl_test.mk | 2 +- + sc/Module_sc.mk | 2 +- + sc/source/ui/optdlg/calcoptionsdlg.hxx | 2 ++ + 4 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b6ae6db..e969fbf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1096,6 +1096,10 @@ AC_ARG_ENABLE(cairo-canvas, + platforms where Cairo is available. + ]) + ++AC_ARG_ENABLE(opencl, ++ AS_HELP_STRING([--disable-opencl], ++ [Determines whether to build with OpenCL support.])) ++ + AC_ARG_ENABLE(dbus, + AS_HELP_STRING([--disable-dbus], + [Determines whether to enable features that depend on dbus. +@@ -10263,13 +10267,21 @@ dnl ================================================= + dnl Check whether to build with OpenCL support. + dnl ================================================= + +-if test $_os != iOS -a $_os != Android; then ++AC_MSG_CHECKING([whether to build with the OpenCL support.]) ++ENABLE_OPENCL= ++ ++if test $_os != iOS -a $_os != Android -a "x$enable_opencl" != "xno"; then ++ AC_MSG_RESULT([yes]) + # CLCC in BUILD_TYPE tells that we are building a bundled clcc (just the clew part), OPENCL in + # BUILD_TYPE tells that OpenCL is potentially available on the platform (optional at run-time, + # used through clew). + BUILD_TYPE="$BUILD_TYPE CLCC OPENCL" ++ ENABLE_OPENCL=TRUE + AC_DEFINE(HAVE_FEATURE_OPENCL) ++else ++ AC_MSG_RESULT([no]) + fi ++AC_SUBST(ENABLE_OPENCL) + + dnl =================================================================== + dnl Check whether to enable glTF support +diff --git a/sc/CppunitTest_sc_opencl_test.mk b/sc/CppunitTest_sc_opencl_test.mk +index 65aedde..76061ad 100644 +--- a/sc/CppunitTest_sc_opencl_test.mk ++++ b/sc/CppunitTest_sc_opencl_test.mk +@@ -15,7 +15,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_opencl_test, \ + + $(eval $(call gb_CppunitTest_use_externals,sc_opencl_test, \ + boost_headers \ +- clew \ ++ $(call gb_Helper_optional,OPENCL,clew) \ + mdds_headers \ + orcus \ + orcus-parser \ +diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk +index 9385dc5..3bf84cd 100644 +--- a/sc/Module_sc.mk ++++ b/sc/Module_sc.mk +@@ -54,7 +54,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \ + CppunitTest_sc_subsequent_filters_test \ + CppunitTest_sc_subsequent_export_test \ + CppunitTest_sc_html_export_test \ +- CppunitTest_sc_opencl_test \ ++ $(call gb_Helper_optional,OPENCL,CppunitTest_sc_opencl_test) \ + )) + + # Disabled to allow the check tinderbox execute the sd tests +diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx +index c7bfe4d..b56b4c1 100644 +--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx ++++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx +@@ -64,8 +64,10 @@ private: + OUString toString(sal_Int32 nVal) const; + SvTreeListEntry *createItem(const OUString &rCaption, const OUString& sValue) const; + void setValueAt(size_t nPos, const OUString &rString); ++#if HAVE_FEATURE_OPENCL + OpenCLConfig::ImplMatcherSet& CurrentWhiteOrBlackList(); + const OpenCLConfig::ImplMatcher& CurrentWhiteOrBlackListEntry(); ++#endif + + private: + SvxCheckListBox* mpLbSettings; +-- +2.1.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 3c5593c..1913ba2 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -119,7 +119,6 @@ Source26: %{external_url}/language-subtag-registry-2014-04-10.tar.bz2 %endif %endif Source42: %{external_url}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 -Source43: %{external_url}/clcc-0.3.0-25-src.zip # build tools BuildRequires: autoconf @@ -323,6 +322,7 @@ Patch15: 0001-add-X-TryExec-entries-to-desktop-files.patch # not upstreamed Patch16: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch Patch17: 0001-Resolves-fdo-37559-revert-adding-extra-dummy-polygon.patch +Patch18: 0001-Revert-No-need-to-have-OpenCL-optional-at-configure-.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -1261,6 +1261,7 @@ touch autogen.lastrun --disable-coinmp \ --disable-fetch-external \ --disable-gnome-vfs \ + --disable-opencl \ --disable-openssl \ --enable-evolution2 \ --enable-ext-nlpsolver \ diff --git a/sources b/sources index ccf8535..6f43b7c 100644 --- a/sources +++ b/sources @@ -10,4 +10,3 @@ a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2. ba3a6162c9756974fbcd14d13385a289 libreoffice-4.4.0.0.beta2.tar.xz 597d2d03ae966616c17cabffb90539ec libreoffice-help-4.4.0.0.beta2.tar.xz 7273a5ffac77a7f939272446cfc23e90 libreoffice-translations-4.4.0.0.beta2.tar.xz -7ec003cc775d1cd06e789fb054c1d695 clcc-0.3.0-25-src.zip