From 932a2ac9093644ccfe58ca006ca4e43e3c55bb9c Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Tue, 5 Jun 2018 16:40:21 +0300 Subject: [PATCH] LibreOffice: enable recipe * bump version * fix missing lables * bundle with additional icon themes * correct profile path --- ....recipe => libreoffice-6.2.0.0~git.recipe} | 48 +++--- .../patches/libreoffice-6.1.0.0~git.patchset | 153 ++++++------------ 2 files changed, 78 insertions(+), 123 deletions(-) rename app-office/libreoffice/{libreoffice-6.1.0.0~git.recipe => libreoffice-6.2.0.0~git.recipe} (84%) diff --git a/app-office/libreoffice/libreoffice-6.1.0.0~git.recipe b/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe similarity index 84% rename from app-office/libreoffice/libreoffice-6.1.0.0~git.recipe rename to app-office/libreoffice/libreoffice-6.2.0.0~git.recipe index 163b5f993..1797671bd 100644 --- a/app-office/libreoffice/libreoffice-6.1.0.0~git.recipe +++ b/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe @@ -5,13 +5,12 @@ productivity. LibreOffice includes several applications that make it the most powerful Free \ and Open Source office suite on the market." HOMEPAGE="https://www.libreoffice.org/" -COPYRIGHT="2000, 2010 Oracle and/or its affiliates. - 2000, 2010 LibreOffice contributors and/or their affiliates." +COPYRIGHT="2000-2018 LibreOffice contributors." LICENSE="MPL v2.0" REVISION="1" -COMMIT="08c2927e0587428d2c242ffcdf142d39f23df092" +COMMIT="100b6a229e0ab9888578c138cd38424d16dec608" SOURCE_URI="https://github.com/LibreOffice/core/archive/$COMMIT.tar.gz" -CHECKSUM_SHA256="7f947f57743d817205b3f4f7494e21b39bdd9e2d52543c4fbc9538a99870488a" +CHECKSUM_SHA256="21639e6388bdda4d4aca82e3957e44d6fe1b20fb36e32ec9d64394be84b552c6" SOURCE_DIR="core-$COMMIT" PATCHES="libreoffice-$portVersion.patchset" ADDITIONAL_FILES="libreoffice.rdef.in" @@ -22,18 +21,6 @@ SECONDARY_ARCHITECTURES="?x86" PROVIDES=" libreoffice$secondaryArchSuffix = $portVersion app:LibreOffice$secondaryArchSuffix = $portVersion - cmd:libreoffice$secondaryArchSuffix = $portVersion - cmd:lobase$secondaryArchSuffix = $portVersion - cmd:localc$secondaryArchSuffix = $portVersion - cmd:lodraw$secondaryArchSuffix = $portVersion - cmd:loffice$secondaryArchSuffix = $portVersion - cmd:lofromtemplate$secondaryArchSuffix = $portVersion - cmd:loimpress$secondaryArchSuffix = $portVersion - cmd:lomath$secondaryArchSuffix = $portVersion - cmd:loweb$secondaryArchSuffix = $portVersion - cmd:lowriter$secondaryArchSuffix = $portVersion - cmd:soffice$secondaryArchSuffix = $portVersion - cmd:unopkg$secondaryArchSuffix = $portVersion " REQUIRES=" haiku$secondaryArchSuffix @@ -190,10 +177,13 @@ BUILD() cd .. ; mv $sourceDir core ln -s core core-$COMMIT; cd core - runConfigure ./autogen.sh --with-distro=LibreOfficeHaiku --enable-qt5 - # --disable-fetch-external + runConfigure ./autogen.sh \ + --with-distro=LibreOfficeHaiku \ + --enable-qt5 \ + --enable-release-build \ + --enable-readonly-installset - make $jobArgs build-nocheck -k # DESTDIR=$appsDir/LibreOffice + make $jobArgs build-nocheck } INSTALL() @@ -205,8 +195,18 @@ INSTALL() # workaround for missing lib cd $appsDir/LibreOffice/program - rm -f libvclplug_kde4lo.so - ln -s libvclplug_qt5lo.so libvclplug_kde4lo.so + mv libvclplug_qt5lo.so libvclplug_kde4lo.so + + # make sure we do not copy default profile + rm -rf ../user + + # zip failback icon theme and a few more + cd $sourceDir/../core/icon-themes/colibre + zip -r $appsDir/LibreOffice/share/config/images_colibre.zip * + cd ../tango + zip -r $appsDir/LibreOffice/share/config/images_tango.zip * + cd ../elementary + zip -r $appsDir/LibreOffice/share/config/images_elementary.zip * local APP_SIGNATURE="application/x-vnd.LibreOffice" local MAJOR="`echo "$portVersion" | cut -d. -f1`" @@ -219,8 +219,10 @@ INSTALL() -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@MINOR@|$MINOR|" \ -e "s|@LONG_INFO@|$LONG_INFO|" \ - $portDir/additional-files/libreoffice.rdef.in > libreoffice.rdef + $portDir/additional-files/libreoffice.rdef.in > \ + $sourceDir/../core/libreoffice.rdef - addResourcesToBinaries libreoffice.rdef $appsDir/LibreOffice/program/LibreOffice + addResourcesToBinaries $sourceDir../core/libreoffice.rdef \ + $appsDir/LibreOffice/program/LibreOffice addAppDeskbarSymlink $appsDir/LibreOffice/program/LibreOffice } diff --git a/app-office/libreoffice/patches/libreoffice-6.1.0.0~git.patchset b/app-office/libreoffice/patches/libreoffice-6.1.0.0~git.patchset index 5123a89b8..afdb9d795 100644 --- a/app-office/libreoffice/patches/libreoffice-6.1.0.0~git.patchset +++ b/app-office/libreoffice/patches/libreoffice-6.1.0.0~git.patchset @@ -1,107 +1,14 @@ -From 90bc1a0319d37c330e0f7000b3564945e3f48bfb Mon Sep 17 00:00:00 2001 -From: Kacper Kasper -Date: Sat, 5 May 2018 15:31:52 +0200 -Subject: Allow building Qt5 backend on Haiku - -Change-Id: I7e928e9e29076bdfaaeffb83791bdc35f1952055 -Reviewed-on: https://gerrit.libreoffice.org/53892 -Tested-by: Jenkins -Reviewed-by: Thorsten Behrens - -diff --git a/Repository.mk b/Repository.mk -index 69bcdae..806b7eb 100644 ---- a/Repository.mk -+++ b/Repository.mk -@@ -311,6 +311,12 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,kde, \ - )) - endif - -+ifeq ($(OS),HAIKU) -+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,haiku, \ -+ $(if $(ENABLE_QT5),vclplug_qt5) \ -+)) -+endif -+ - $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,math, \ - sm \ - smd \ -diff --git a/configure.ac b/configure.ac -index b16c574..e969eb3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4615,6 +4615,7 @@ fi - - if test "$OS" = "HAIKU"; then - enable_cairo_canvas=yes -+ test_qt5=yes - fi - - dnl =================================================================== -diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk -index 864b505..b5fc8a7 100644 ---- a/vcl/Library_vcl.mk -+++ b/vcl/Library_vcl.mk -@@ -643,6 +643,12 @@ $(eval $(call gb_Library_add_libs,vcl,\ - -lbe \ - )) - -+ifeq ($(ENABLE_QT5),TRUE) -+$(eval $(call gb_Library_add_exception_objects,vcl,\ -+ vcl/unx/generic/plugadapt/salplug \ -+)) -+endif -+ - $(eval $(call gb_Library_use_externals,vcl,\ - cairo \ - fontconfig \ -diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk -index 075eb0b..f08916d 100644 ---- a/vcl/Library_vclplug_qt5.mk -+++ b/vcl/Library_vclplug_qt5.mk -@@ -34,7 +34,7 @@ $(eval $(call gb_Library_add_defs,vclplug_qt5,\ - $(eval $(call gb_Library_use_sdk_api,vclplug_qt5)) - - $(eval $(call gb_Library_use_libraries,vclplug_qt5,\ -- vclplug_gen \ -+ $(if $(USING_X11),vclplug_gen) \ - vcl \ - tl \ - utl \ -diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk -index 59e5b9c..e8fbbbf 100644 ---- a/vcl/Module_vcl.mk -+++ b/vcl/Module_vcl.mk -@@ -115,6 +115,15 @@ $(eval $(call gb_Module_add_targets,vcl,\ - )) - endif - -+ifeq ($(OS),HAIKU) -+ifneq ($(ENABLE_QT5),) -+$(eval $(call gb_Module_add_targets,vcl,\ -+ CustomTarget_qt5_moc \ -+ Library_vclplug_qt5 \ -+)) -+endif -+endif -+ - ifneq ($(ENABLE_FUZZERS),) - $(eval $(call gb_Module_add_targets,vcl,\ - CustomTarget_nativecore \ --- -2.16.2 - - -From c60f91eac46f7b5cb433689f9600601fde1957ad Mon Sep 17 00:00:00 2001 +From b30edb5ff2e4c7cfc90eadc19f648cacc1e19d32 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov -Date: Tue, 29 May 2018 10:30:43 +0300 +Date: Fri, 1 Jun 2018 15:23:47 +0300 Subject: Fix make distro-pack-install on Haiku diff --git a/Repository.mk b/Repository.mk -index 806b7eb..c8b9f56 100644 +index 2a66608..e26f8e1 100644 --- a/Repository.mk +++ b/Repository.mk -@@ -143,7 +143,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ +@@ -142,7 +142,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,mtpfuzzer) \ $(call gb_Helper_optional,FUZZERS,htmlfuzzer) \ $(call gb_Helper_optional,FUZZERS,sftfuzzer) \ @@ -110,7 +17,7 @@ index 806b7eb..c8b9f56 100644 soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ $(if $(filter WNT,$(OS)), \ -@@ -237,7 +237,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,pdfimport, \ +@@ -236,7 +236,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,pdfimport, \ endif $(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\ @@ -119,7 +26,7 @@ index 806b7eb..c8b9f56 100644 $(if $(ENABLE_MACOSX_SANDBOX),, \ regmerge \ regview \ -@@ -1019,7 +1019,7 @@ $(eval $(call gb_Helper_register_packages_for_install,brand,\ +@@ -1022,7 +1022,7 @@ $(eval $(call gb_Helper_register_packages_for_install,brand,\ desktop_branding \ $(if $(CUSTOM_BRAND_DIR),desktop_branding_custom) \ $(if $(filter DESKTOP,$(BUILD_TYPE)),desktop_scripts_install) \ @@ -129,5 +36,51 @@ index 806b7eb..c8b9f56 100644 desktop_soffice_sh \ ) \ -- -2.16.2 +2.16.4 + + +From 3f701063bf123a1cfbf898fbd88ed6a03dac990a Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Mon, 4 Jun 2018 11:55:30 +0300 +Subject: Fix profile dir location on Haiku + + +diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk +index 315e5c8..5aff39b 100644 +--- a/instsetoo_native/CustomTarget_setup.mk ++++ b/instsetoo_native/CustomTarget_setup.mk +@@ -40,7 +40,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_ + && echo 'InstallMode=' \ + && echo 'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \ + $(if $(ENABLE_RELEASE_BUILD),\ +- && echo 'UserInstallation=$$SYSUSERCONFIG/$(if $(filter-out MACOSX WNT,$(OS)),$(shell echo $(PRODUCTNAME) | tr "[:upper:]" "[:lower:]"),$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g'))/4', \ ++ && echo 'UserInstallation=$$SYSUSERCONFIG/$(if $(filter-out HAIKU MACOSX WNT,$(OS)),$(shell echo $(PRODUCTNAME) | tr "[:upper:]" "[:lower:]"),$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g'))/4', \ + && echo 'UserInstallation=$$ORIGIN/..') \ + ) > $@ + +-- +2.16.4 + + +From 3a81037043fa0208c4469e273d78303390e27521 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Mon, 4 Jun 2018 11:58:32 +0300 +Subject: Fix invisible text on Haiku + + +diff --git a/vcl/inc/qt5/Qt5Tools.hxx b/vcl/inc/qt5/Qt5Tools.hxx +index a714f19..fcb5055 100644 +--- a/vcl/inc/qt5/Qt5Tools.hxx ++++ b/vcl/inc/qt5/Qt5Tools.hxx +@@ -58,7 +58,7 @@ inline Size toSize(const QSize& rSize) { return Size(rSize.width(), rSize.height + + inline QColor toQColor(const Color& rColor) + { +- return QColor(rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), rColor.GetTransparency()); ++ return QColor(rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), 255 - rColor.GetTransparency()); + } + + static constexpr QImage::Format Qt5_DefaultFormat32 = QImage::Format_ARGB32; +-- +2.16.4