mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
LibreOffice6: add recipe 6.4.7.2 version (enabled for 32 bit only)
This commit is contained in:
387
app-office/libreoffice/libreoffice6-6.4.7.2.recipe
Normal file
387
app-office/libreoffice/libreoffice6-6.4.7.2.recipe
Normal file
@@ -0,0 +1,387 @@
|
||||
SUMMARY="A full office productivity suite"
|
||||
DESCRIPTION="LibreOffice is a powerful office suite – its clean interface and \
|
||||
feature-rich tools help you unleash your creativity and enhance your \
|
||||
productivity.
|
||||
It's compatible with a wide range of document formats such as MS Word (.doc, \
|
||||
.docx), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx) and Publisher.
|
||||
|
||||
LibreOffice includes several applications that make it the most powerful Free \
|
||||
and Open Source office suite on the market:
|
||||
|
||||
- Writer (word processing)
|
||||
- Calc (spreadsheets)
|
||||
- Impress (presentations)
|
||||
- Draw (vector graphics and flowcharts)
|
||||
- Base (databases)
|
||||
- Math (formula editing)"
|
||||
HOMEPAGE="https://www.libreoffice.org/"
|
||||
COPYRIGHT="2000-2020 LibreOffice contributors"
|
||||
LICENSE="MPL v2.0"
|
||||
REVISION="1"
|
||||
|
||||
SOURCE_URI="https://github.com/LibreOffice/core/archive/libreoffice-$portVersion.tar.gz"
|
||||
SOURCE_DIR="core-libreoffice-$portVersion"
|
||||
CHECKSUM_SHA256="ade533e1a240f3263486d193aa24cf62a19f9a81457dc3bb680858bb10ae7648"
|
||||
|
||||
SOURCE_URI_2="https://github.com/LibreOffice/translations/archive/libreoffice-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256_2="54c2d8b80e5f00577bc4299bd9f5e7c50fce8ab7eb8083599369993c721cd464"
|
||||
SOURCE_DIR_2="translations-libreoffice-$portVersion"
|
||||
SOURCE_FILENAME_2="translations-libreoffice-$portVersion.tar.gz"
|
||||
|
||||
srcGitRevision3="cd5a5ee2cc0e3b3a62a5827d22035752ec7813a3"
|
||||
SOURCE_URI_3="https://github.com/threedeyes/LibreOfficeLauncher/archive/$srcGitRevision3.tar.gz"
|
||||
CHECKSUM_SHA256_3="5314962ca770369398599e175dc2c35c685d3fc968c9894390490c737036e528"
|
||||
SOURCE_DIR_3="LibreOfficeLauncher-$srcGitRevision3"
|
||||
SOURCE_FILENAME_3="LibreOfficeLauncher-$srcGitRevision3.tar.gz"
|
||||
|
||||
PATCHES="libreoffice-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
libreoffice.iom
|
||||
libreoffice.rdef.in
|
||||
create_buildid.sh
|
||||
"
|
||||
|
||||
POST_INSTALL_SCRIPTS="$relativePostInstallDir/create_buildid.sh"
|
||||
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
fi
|
||||
|
||||
boostMinimumVersion=1.69.0
|
||||
libreofficeLanguages="af ar be bg bn br brx bs ca ca-valencia cs cy da de dsb el en-GB en-ZA eo es et eu fa fi fr fy ga gd gl he hi hr hu id is it ja ka kk kmr-Latn ko lb lt lv mk mn nb ne nl nn pl pt pt-BR ro ru sa-IN sd sk sl sq sr sr-Latn sv szl tg th tr tt ug uk uz vi zh-CN zh-TW"
|
||||
|
||||
PROVIDES="
|
||||
libreoffice6$secondaryArchSuffix = $portVersion
|
||||
app:LibreOffice$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libabw_0.1$secondaryArchSuffix
|
||||
lib:libboost_date_time$secondaryArchSuffix
|
||||
lib:libboost_filesystem$secondaryArchSuffix
|
||||
lib:libboost_iostreams$secondaryArchSuffix
|
||||
lib:libboost_locale$secondaryArchSuffix
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcdr_0.1$secondaryArchSuffix
|
||||
lib:libclucene_core$secondaryArchSuffix
|
||||
lib:libcmis_0.5$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libe_book_0.1$secondaryArchSuffix
|
||||
lib:libepoxy$secondaryArchSuffix
|
||||
lib:libepubgen_0.1$secondaryArchSuffix
|
||||
lib:libetonyek_0.1$secondaryArchSuffix
|
||||
lib:libexpat$secondaryArchSuffix
|
||||
lib:libexslt$secondaryArchSuffix
|
||||
lib:libexttextcat_2.0$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreehand_0.1$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgraphite2$secondaryArchSuffix
|
||||
lib:libharfbuzz_icu$secondaryArchSuffix
|
||||
lib:libharfbuzz$secondaryArchSuffix
|
||||
lib:libhunspell_1.7$secondaryArchSuffix
|
||||
lib:libhyphen$secondaryArchSuffix
|
||||
lib:libicui18n$secondaryArchSuffix >= 66
|
||||
lib:libicuuc$secondaryArchSuffix >= 66
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libKF5ConfigCore$secondaryArchSuffix
|
||||
lib:libKF5CoreAddons$secondaryArchSuffix
|
||||
lib:libKF5I18n$secondaryArchSuffix
|
||||
lib:libKF5KIOCore$secondaryArchSuffix
|
||||
lib:libKF5KIOFileWidgets$secondaryArchSuffix
|
||||
lib:libKF5KIOWidgets$secondaryArchSuffix
|
||||
lib:libKF5WindowSystem$secondaryArchSuffix
|
||||
lib:liblangtag$secondaryArchSuffix
|
||||
lib:liblber_2.4$secondaryArchSuffix
|
||||
lib:liblcms2$secondaryArchSuffix
|
||||
lib:libldap_2.4$secondaryArchSuffix
|
||||
lib:liblpsolve55$secondaryArchSuffix
|
||||
lib:libmspub_0.1$secondaryArchSuffix
|
||||
lib:libmwaw_0.3$secondaryArchSuffix
|
||||
lib:libmythes_1.2$secondaryArchSuffix
|
||||
lib:libmysqlclient$secondaryArchSuffix
|
||||
lib:libneon$secondaryArchSuffix
|
||||
lib:libnspr4$secondaryArchSuffix
|
||||
lib:libnss3$secondaryArchSuffix
|
||||
lib:libnssutil3$secondaryArchSuffix
|
||||
lib:libnumbertext_1.0$secondaryArchSuffix
|
||||
lib:libodfgen_0.1$secondaryArchSuffix
|
||||
lib:liborcus_0.15$secondaryArchSuffix
|
||||
lib:libpagemaker_0.0$secondaryArchSuffix
|
||||
lib:libplc4$secondaryArchSuffix
|
||||
lib:libplds4$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libpoppler$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libqxp_0.0$secondaryArchSuffix
|
||||
lib:libraptor2$secondaryArchSuffix
|
||||
lib:librdf$secondaryArchSuffix
|
||||
lib:librevenge_0.0$secondaryArchSuffix
|
||||
lib:librevenge_stream_0.0$secondaryArchSuffix
|
||||
lib:libsmime3$secondaryArchSuffix
|
||||
lib:libssl3$secondaryArchSuffix
|
||||
lib:libstaroffice_0.0$secondaryArchSuffix
|
||||
lib:libuuid$secondaryArchSuffix
|
||||
lib:libvisio_0.1$secondaryArchSuffix
|
||||
lib:libwpd_0.10$secondaryArchSuffix
|
||||
lib:libwpg_0.3$secondaryArchSuffix
|
||||
lib:libwps_0.4$secondaryArchSuffix
|
||||
lib:libxmlsec1_nss$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libxslt$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libzmf_0.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
ARCHITECTURES_galleries="any"
|
||||
PROVIDES_galleries="
|
||||
libreoffice6${secondaryArchSuffix}_galleries = $portVersion
|
||||
"
|
||||
REQUIRES_galleries="
|
||||
libreoffice6$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
for lang in $libreofficeLanguages; do
|
||||
typeset -l langcode
|
||||
langcode=${lang/-/_}
|
||||
eval "PROVIDES_${langcode}=\"\
|
||||
libreoffice6${secondaryArchSuffix}_${langcode} = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_${langcode}=\"\
|
||||
libreoffice6$secondaryArchSuffix == $portVersion base\
|
||||
\"; \
|
||||
DESCRIPTION_${langcode}=\"Translations for the Libreoffice suite ($lang)\"; \
|
||||
ARCHITECTURES_${langcode}=\"any\""
|
||||
done
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
unixodbc${secondaryArchSuffix}_devel
|
||||
devel:glm
|
||||
devel:libabw_0.1$secondaryArchSuffix
|
||||
devel:libboost_date_time$secondaryArchSuffix >= $boostMinimumVersion
|
||||
devel:libboost_filesystem$secondaryArchSuffix >= $boostMinimumVersion
|
||||
devel:libboost_iostreams$secondaryArchSuffix >= $boostMinimumVersion
|
||||
devel:libboost_locale$secondaryArchSuffix >= $boostMinimumVersion
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libcdr_0.1$secondaryArchSuffix
|
||||
devel:libclucene_contribs_lib$secondaryArchSuffix
|
||||
devel:libclucene_core$secondaryArchSuffix
|
||||
devel:libcmis_0.5$secondaryArchSuffix
|
||||
devel:libcppunit$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libe_book_0.1$secondaryArchSuffix
|
||||
devel:libepoxy$secondaryArchSuffix
|
||||
devel:libepubgen_0.1$secondaryArchSuffix
|
||||
devel:libetonyek_0.1$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libexttextcat_2.0$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreehand_0.1$secondaryArchSuffix
|
||||
# devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libgraphite2$secondaryArchSuffix
|
||||
devel:libharfbuzz_icu$secondaryArchSuffix
|
||||
devel:libhunspell_1.7$secondaryArchSuffix
|
||||
devel:libhyphen$secondaryArchSuffix
|
||||
devel:libicuuc$secondaryArchSuffix >= 66
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libKF5ConfigCore$secondaryArchSuffix
|
||||
devel:libKF5CoreAddons$secondaryArchSuffix
|
||||
devel:libKF5I18n$secondaryArchSuffix
|
||||
devel:libKF5KIOCore$secondaryArchSuffix
|
||||
devel:libKF5KIOFileWidgets$secondaryArchSuffix
|
||||
devel:libKF5KIOWidgets$secondaryArchSuffix
|
||||
devel:libKF5WindowSystem$secondaryArchSuffix
|
||||
devel:liblangtag$secondaryArchSuffix
|
||||
devel:liblcms2$secondaryArchSuffix
|
||||
devel:libldap$secondaryArchSuffix
|
||||
devel:liblpsolve55$secondaryArchSuffix
|
||||
devel:libmspub_0.1$secondaryArchSuffix
|
||||
devel:libmwaw_0.3$secondaryArchSuffix
|
||||
devel:libmysqlclient$secondaryArchSuffix
|
||||
devel:libmythes_1.2$secondaryArchSuffix
|
||||
devel:libneon$secondaryArchSuffix
|
||||
devel:libnss3$secondaryArchSuffix
|
||||
devel:libnumbertext_1.0$secondaryArchSuffix
|
||||
devel:libodfgen_0.1$secondaryArchSuffix
|
||||
devel:liborcus_0.15$secondaryArchSuffix
|
||||
devel:libpagemaker_0.0$secondaryArchSuffix
|
||||
devel:libpoppler$secondaryArchSuffix
|
||||
devel:libqrcodegen$secondaryArchSuffix
|
||||
devel:libqxp_0.0$secondaryArchSuffix
|
||||
devel:libraptor2$secondaryArchSuffix
|
||||
devel:librdf$secondaryArchSuffix
|
||||
devel:librevenge_0.0$secondaryArchSuffix
|
||||
devel:libsane$secondaryArchSuffix
|
||||
devel:libstaroffice_0.0$secondaryArchSuffix
|
||||
devel:libvisio_0.1$secondaryArchSuffix
|
||||
devel:libwpd_0.10$secondaryArchSuffix
|
||||
devel:libwpg_0.3$secondaryArchSuffix
|
||||
devel:libwps_0.4$secondaryArchSuffix
|
||||
devel:libuuid$secondaryArchSuffix
|
||||
devel:libxmlsec1_nss$secondaryArchSuffix
|
||||
devel:libxslt$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libzmf_0.0$secondaryArchSuffix
|
||||
devel:mdds >= 1.5
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:bison
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:fontforge
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:genbrk
|
||||
cmd:genccode
|
||||
cmd:gencmn
|
||||
cmd:git
|
||||
cmd:gperf
|
||||
cmd:grep
|
||||
cmd:kf5_config$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtool$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:patch
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python2.7
|
||||
cmd:python3.6
|
||||
cmd:ucpp
|
||||
cmd:which
|
||||
cmd:xz
|
||||
cmd:zip
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# disable tooltips as they crash libreoffice currently
|
||||
cd officecfg/registry/schema/org/openoffice/Office
|
||||
sed -i '/Activates the Tip/{n;n;n;s/true/false/}' Common.xcs
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# rename $sourceDir to something shorter, otherwise build fails with
|
||||
# execv: Argument too big /sources/core/sw/Library_sw.mk:20
|
||||
cd .. ; mv core-libreoffice-$portVersion core
|
||||
ln -s core core-libreoffice-$portVersion; cd core
|
||||
|
||||
rm -rf translations
|
||||
ln -s $sourceDir2 translations
|
||||
|
||||
pkgconfig_libdir="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
|
||||
pkgconfig_datadir="`finddir B_SYSTEM_DIRECTORY`/$relativeDataDir/pkgconfig"
|
||||
export PKG_CONFIG_LIBDIR="$pkgconfig_libdir:$pkgconfig_datadir"
|
||||
|
||||
./autogen.sh \
|
||||
--with-distro=LibreOfficeHaiku \
|
||||
--enable-kf5 \
|
||||
--enable-qt5 \
|
||||
--enable-release-build \
|
||||
--enable-readonly-installset \
|
||||
--enable-python=no \
|
||||
--enable-build-opensymbol \
|
||||
--enable-sal-log \
|
||||
\
|
||||
--disable-ccache \
|
||||
--disable-firebird-sdbc \
|
||||
--disable-postgresql-sdbc \
|
||||
--disable-fetch-external \
|
||||
--disable-dependency-tracking \
|
||||
\
|
||||
--with-fonts=no \
|
||||
--with-vendor="HaikuPorts" \
|
||||
--with-system-libs \
|
||||
--with-boost-libdir=`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir \
|
||||
--with-system-ucpp \
|
||||
\
|
||||
--without-doxygen \
|
||||
--without-helppack-integration \
|
||||
--without-java \
|
||||
--without-system-jars \
|
||||
--with-lang="$libreofficeLanguages"
|
||||
|
||||
make $jobArgs build-nocheck
|
||||
|
||||
pushd $sourceDir3/src
|
||||
make
|
||||
popd
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
appDir=$appsDir/LibreOffice
|
||||
mkdir -p $appDir
|
||||
cp -r ../core/instdir/* $appDir
|
||||
mv $appDir/program/soffice.bin $appDir/program/LibreOffice
|
||||
mv $sourceDir3/src/LibreOffice\ {Calc,Database,Draw,Impress,Math,Writer} $appDir
|
||||
|
||||
# make sure we do not copy default profile
|
||||
rm -rf $appDir/user
|
||||
rm -rf $appDir/share/xdg
|
||||
|
||||
packageEntries galleries \
|
||||
$appDir/share/gallery $appDir/presets/gallery
|
||||
|
||||
declare -a files
|
||||
declare -a filesToPackage
|
||||
typeset -l langcode
|
||||
|
||||
for lang in $libreofficeLanguages; do
|
||||
unset files
|
||||
unset filesToPackage
|
||||
langcode=${lang/-/_}
|
||||
|
||||
files=("${files[@]}" "$appDir/program/resource/${lang/-/_}")
|
||||
files=("${files[@]}" "$appDir/share/autotext/$lang")
|
||||
files=("${files[@]}" "$appDir/share/autocorr/$lang")
|
||||
files=("${files[@]}" "$appDir/share/registry/res/registry_$lang.xcd")
|
||||
files=("${files[@]}" "$appDir/share/registry/res/fcfg_langpack_$lang.xcd")
|
||||
files=("${files[@]}" "$appDir/share/registry/Langpack_$lang.xcd")
|
||||
files=("${files[@]}" "$appDir/readmes/README_$lang")
|
||||
|
||||
for f in ${files[@]}; do
|
||||
if [ -f $f ] || [ -d $f ]; then
|
||||
filesToPackage=("${filesToPackage[@]}" "$f")
|
||||
fi
|
||||
done
|
||||
|
||||
packageEntries ${langcode} ${filesToPackage[@]}
|
||||
done
|
||||
|
||||
mkdir -p $postInstallDir
|
||||
cp $portDir/additional-files/create_buildid.sh $postInstallDir
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.LibreOffice"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/libreoffice.rdef.in > \
|
||||
$sourceDir/../core/libreoffice.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/../core/libreoffice.rdef \
|
||||
$appDir/program/LibreOffice
|
||||
|
||||
addAppDeskbarSymlink $appDir/program/LibreOffice "LibreOffice/LibreOffice"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Calc" "LibreOffice/LibreOffice Calc"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Database" "LibreOffice/LibreOffice Database"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Draw" "LibreOffice/LibreOffice Draw"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Impress" "LibreOffice/LibreOffice Impress"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Math" "LibreOffice/LibreOffice Math"
|
||||
addAppDeskbarSymlink "$appDir/LibreOffice Writer" "LibreOffice/LibreOffice Writer"
|
||||
}
|
||||
433
app-office/libreoffice/patches/libreoffice-6.4.7.2.patchset
Normal file
433
app-office/libreoffice/patches/libreoffice-6.4.7.2.patchset
Normal file
@@ -0,0 +1,433 @@
|
||||
From c03536371bc767970d464a0bde4dc30970421e8e Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 15 Feb 2020 14:52:59 +0300
|
||||
Subject: Make Elementary the default on Haiku
|
||||
|
||||
|
||||
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
|
||||
index 225414f..a971e11 100644
|
||||
--- a/vcl/source/app/IconThemeSelector.cxx
|
||||
+++ b/vcl/source/app/IconThemeSelector.cxx
|
||||
@@ -58,6 +58,9 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvi
|
||||
#ifdef _WIN32
|
||||
(void)desktopEnvironment;
|
||||
return "colibre";
|
||||
+#elif defined(__HAIKU__)
|
||||
+ (void)desktopEnvironment;
|
||||
+ return "elementary";
|
||||
#else
|
||||
OUString r;
|
||||
if ( desktopEnvironment.equalsIgnoreAsciiCase("plasma5") ||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 9b04dafc3824d3d433b42d3fe66ac1848d53d58f Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Wed, 24 Oct 2018 17:01:09 +0300
|
||||
Subject: Show used vcl backend on Haiku
|
||||
|
||||
|
||||
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
|
||||
index c4c3be9..119380d 100644
|
||||
--- a/vcl/source/app/svapp.cxx
|
||||
+++ b/vcl/source/app/svapp.cxx
|
||||
@@ -1155,7 +1155,7 @@ OUString Application::GetHWOSConfInfo()
|
||||
aDetails.append( VclResId(SV_APP_DEFAULT) );
|
||||
aDetails.append( "; " );
|
||||
|
||||
-#if (defined LINUX || defined _WIN32 || defined MACOSX)
|
||||
+#if (defined LINUX || defined _WIN32 || defined MACOSX || defined (__HAIKU__))
|
||||
aDetails.append( SV_APP_VCLBACKEND );
|
||||
aDetails.append( GetToolkitName() );
|
||||
aDetails.append( "; " );
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 1053d9e72ecc2d89410bc877c6b667b2048035b9 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Wed, 24 Oct 2018 17:01:34 +0300
|
||||
Subject: Identify Haiku in about window
|
||||
|
||||
|
||||
diff --git a/vcl/unx/generic/app/geninst.cxx b/vcl/unx/generic/app/geninst.cxx
|
||||
index b661163..329265a 100644
|
||||
--- a/vcl/unx/generic/app/geninst.cxx
|
||||
+++ b/vcl/unx/generic/app/geninst.cxx
|
||||
@@ -70,6 +70,8 @@ OUString SalGenericInstance::getOSVersion()
|
||||
}
|
||||
fclose( pVersion );
|
||||
}
|
||||
+#elif defined(__HAIKU__)
|
||||
+ aKernelVer = "Haiku";
|
||||
#endif
|
||||
return aKernelVer;
|
||||
}
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From e63502e45d5c100a5bbd80269c9dc9f14d2c1b8b Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Wed, 24 Oct 2018 17:02:04 +0300
|
||||
Subject: Workaround a crash on quit. See Haiku #13159
|
||||
|
||||
|
||||
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
|
||||
index 643c42a..d4b47cb 100644
|
||||
--- a/desktop/source/app/main.c
|
||||
+++ b/desktop/source/app/main.c
|
||||
@@ -17,6 +17,12 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
+
|
||||
#include <sal/main.h>
|
||||
|
||||
#include "sofficemain.h"
|
||||
@@ -50,6 +56,9 @@ SAL_IMPLEMENT_MAIN() {
|
||||
#ifdef __gnu_linux__
|
||||
g_Exiting = 1;
|
||||
#endif
|
||||
+#endif
|
||||
+#ifdef __HAIKU__
|
||||
+ kill (getpid(), SIGKILL);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From e96b7cda0014ad783122c456a76cde523b5c8cc5 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 15 Feb 2020 15:04:53 +0300
|
||||
Subject: Implement ShellExec on Haiku
|
||||
|
||||
|
||||
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
|
||||
index 3daea4a..d114d79 100644
|
||||
--- a/shell/source/unix/exec/shellexec.cxx
|
||||
+++ b/shell/source/unix/exec/shellexec.cxx
|
||||
@@ -180,6 +180,9 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
aBuffer.append(" -R");
|
||||
}
|
||||
aBuffer.append(" --");
|
||||
+
|
||||
+#elif __HAIKU__
|
||||
+ aBuffer.append("open");
|
||||
#else
|
||||
// Just use xdg-open on non-Mac
|
||||
aBuffer.append("/usr/bin/xdg-open");
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 5299c0b1c26ecce9ee151b89f85a710b5f710a1f Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 20 Jul 2019 01:18:50 +0300
|
||||
Subject: Comment out linking with pthread
|
||||
|
||||
|
||||
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
|
||||
index 8854aab..f0489a8 100644
|
||||
--- a/solenv/gbuild/platform/unxgcc.mk
|
||||
+++ b/solenv/gbuild/platform/unxgcc.mk
|
||||
@@ -45,9 +45,9 @@ gb_CFLAGS := \
|
||||
# At least libstdc++ (which is approximated here with !HAVE_LIBCXX) needs -pthread when including
|
||||
# various C++ headers like <thread>, see <https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/
|
||||
# manual/using.html#manual.intro.using.flags>:
|
||||
-ifeq ($(HAVE_LIBCXX),)
|
||||
-gb_CXX_LINKFLAGS := -pthread
|
||||
-endif
|
||||
+#ifeq ($(HAVE_LIBCXX),)
|
||||
+#gb_CXX_LINKFLAGS := -pthread
|
||||
+#endif
|
||||
|
||||
gb_CXXFLAGS := \
|
||||
$(gb_CXXFLAGS_COMMON) \
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 9d72216b26b85f0a5abbd8e29485b66364f202ef Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 11 Aug 2019 11:46:49 +1000
|
||||
Subject: Workaround for ambiguous methods
|
||||
|
||||
|
||||
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx
|
||||
index 088f5a2..1288061 100644
|
||||
--- a/include/o3tl/sorted_vector.hxx
|
||||
+++ b/include/o3tl/sorted_vector.hxx
|
||||
@@ -92,6 +92,17 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ size_type erase2( const Value& x )
|
||||
+ {
|
||||
+ std::pair<const_iterator, bool> const ret(Find_t()(m_vector.begin(), m_vector.end(), x));
|
||||
+ if (ret.second)
|
||||
+ {
|
||||
+ m_vector.erase(m_vector.begin() + (ret.first - m_vector.begin()));
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
void erase( size_t index )
|
||||
{
|
||||
m_vector.erase(m_vector.begin() + index);
|
||||
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
|
||||
index 8636d6b..0defdfc 100644
|
||||
--- a/sc/source/core/data/attarray.cxx
|
||||
+++ b/sc/source/core/data/attarray.cxx
|
||||
@@ -375,7 +375,7 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
|
||||
if(itr != rCondFormatData.end())
|
||||
{
|
||||
ScCondFormatIndexes aNewCondFormatData(rCondFormatData);
|
||||
- aNewCondFormatData.erase(nIndex);
|
||||
+ aNewCondFormatData.erase2(nIndex);
|
||||
ScCondFormatItem aItem( std::move(aNewCondFormatData) );
|
||||
pPatternAttr->GetItemSet().Put( aItem );
|
||||
SetPatternArea( nTempStartRow, nTempEndRow, std::move(pPatternAttr), true );
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 2c1bab9663a4338ef01868308d6cd5b601510e23 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 11 Aug 2019 11:47:40 +1000
|
||||
Subject: Add XP_HAIKU defs for xmlsec
|
||||
|
||||
|
||||
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
|
||||
index c49417d..ec75755 100644
|
||||
--- a/svl/Library_svl.mk
|
||||
+++ b/svl/Library_svl.mk
|
||||
@@ -95,6 +95,12 @@ $(eval $(call gb_Library_use_system_win32_libs,svl,\
|
||||
shlwapi \
|
||||
))
|
||||
|
||||
+ifeq ($(OS),HAIKU)
|
||||
+$(eval $(call gb_Library_add_defs,svl,\
|
||||
+ -DXP_HAIKU=1 \
|
||||
+))
|
||||
+endif
|
||||
+
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Library_add_defs,svl,\
|
||||
-DSVL_CRYPTO_MSCRYPTO \
|
||||
diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk
|
||||
index bd2cb6a..9d6a90c 100644
|
||||
--- a/xmlsecurity/Library_xsec_xmlsec.mk
|
||||
+++ b/xmlsecurity/Library_xsec_xmlsec.mk
|
||||
@@ -116,6 +116,12 @@ $(eval $(call gb_Library_add_defs,xsec_xmlsec,\
|
||||
-DXMLSEC_CRYPTO_NSS \
|
||||
))
|
||||
|
||||
+ifeq ($(OS),HAIKU)
|
||||
+$(eval $(call gb_Library_add_defs,xsec_xmlsec,\
|
||||
+ -DXP_HAIKU=1 \
|
||||
+))
|
||||
+endif
|
||||
+
|
||||
ifeq ($(SYSTEM_XMLSEC),)
|
||||
$(eval $(call gb_Library_add_libs,xsec_xmlsec,\
|
||||
$(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.a \
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 632ddc27944cfa8be5db73aa0d0be9b62970a487 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 15 Feb 2020 15:08:51 +0300
|
||||
Subject: Cast to boolean
|
||||
|
||||
|
||||
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
|
||||
index 8a57f55..4835901 100644
|
||||
--- a/vcl/source/filter/jpeg/jpegc.cxx
|
||||
+++ b/vcl/source/filter/jpeg/jpegc.cxx
|
||||
@@ -163,13 +163,13 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
|
||||
rContext.aOwner.set(&rContext.cinfo);
|
||||
jpeg_svstream_src(&rContext.cinfo, pInputStream);
|
||||
SourceManagerStruct *source = reinterpret_cast<SourceManagerStruct*>(rContext.cinfo.src);
|
||||
- jpeg_read_header(&rContext.cinfo, TRUE);
|
||||
+ jpeg_read_header(&rContext.cinfo, static_cast<boolean>(TRUE));
|
||||
|
||||
rContext.cinfo.scale_num = 1;
|
||||
rContext.cinfo.scale_denom = 1;
|
||||
rContext.cinfo.output_gamma = 1.0;
|
||||
- rContext.cinfo.raw_data_out = FALSE;
|
||||
- rContext.cinfo.quantize_colors = FALSE;
|
||||
+ rContext.cinfo.raw_data_out = static_cast<boolean>(FALSE);
|
||||
+ rContext.cinfo.quantize_colors = static_cast<boolean>(FALSE);
|
||||
|
||||
/* change scale for preview import */
|
||||
long nPreviewWidth = previewSize.Width();
|
||||
@@ -204,8 +204,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
|
||||
if (rContext.cinfo.scale_denom > 1)
|
||||
{
|
||||
rContext.cinfo.dct_method = JDCT_FASTEST;
|
||||
- rContext.cinfo.do_fancy_upsampling = FALSE;
|
||||
- rContext.cinfo.do_block_smoothing = FALSE;
|
||||
+ rContext.cinfo.do_fancy_upsampling = static_cast<boolean>(FALSE);
|
||||
+ rContext.cinfo.do_block_smoothing = static_cast<boolean>(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
|
||||
}
|
||||
|
||||
jpeg_set_defaults( &cinfo );
|
||||
- jpeg_set_quality( &cinfo, static_cast<int>(nQualityPercent), FALSE );
|
||||
+ jpeg_set_quality( &cinfo, static_cast<int>(nQualityPercent), static_cast<boolean>(FALSE) );
|
||||
|
||||
cinfo.density_unit = 1;
|
||||
cinfo.X_density = rPPI.getX();
|
||||
@@ -419,7 +419,7 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
|
||||
cinfo.comp_info[0].v_samp_factor = 2;
|
||||
}
|
||||
|
||||
- jpeg_start_compress( &cinfo, TRUE );
|
||||
+ jpeg_start_compress( &cinfo, static_cast<boolean>(TRUE) );
|
||||
|
||||
for( nY = 0; nY < nHeight; nY++ )
|
||||
{
|
||||
@@ -454,10 +454,10 @@ void Transform(void* pInputStream, void* pOutputStream, long nAngle)
|
||||
jvirt_barray_ptr* aSourceCoefArrays = nullptr;
|
||||
jvirt_barray_ptr* aDestinationCoefArrays = nullptr;
|
||||
|
||||
- aTransformOption.force_grayscale = FALSE;
|
||||
- aTransformOption.trim = FALSE;
|
||||
- aTransformOption.perfect = FALSE;
|
||||
- aTransformOption.crop = FALSE;
|
||||
+ aTransformOption.force_grayscale = static_cast<boolean>(FALSE);
|
||||
+ aTransformOption.trim = static_cast<boolean>(FALSE);
|
||||
+ aTransformOption.perfect = static_cast<boolean>(FALSE);
|
||||
+ aTransformOption.crop = static_cast<boolean>(FALSE);
|
||||
|
||||
// Angle to transform option
|
||||
// 90 Clockwise = 270 Counterclockwise
|
||||
@@ -486,7 +486,7 @@ void Transform(void* pInputStream, void* pOutputStream, long nAngle)
|
||||
aDestinationInfo.err->error_exit = errorExit;
|
||||
aDestinationInfo.err->output_message = outputMessage;
|
||||
|
||||
- aDestinationInfo.optimize_coding = TRUE;
|
||||
+ aDestinationInfo.optimize_coding = static_cast<boolean>(TRUE);
|
||||
|
||||
JpegDecompressOwner aDecompressOwner;
|
||||
JpegCompressOwner aCompressOwner;
|
||||
@@ -506,7 +506,7 @@ void Transform(void* pInputStream, void* pOutputStream, long nAngle)
|
||||
jpeg_svstream_src (&aSourceInfo, pInputStream);
|
||||
|
||||
jcopy_markers_setup(&aSourceInfo, aCopyOption);
|
||||
- jpeg_read_header(&aSourceInfo, TRUE);
|
||||
+ jpeg_read_header(&aSourceInfo, static_cast<boolean>(TRUE));
|
||||
jtransform_request_workspace(&aSourceInfo, &aTransformOption);
|
||||
|
||||
aSourceCoefArrays = jpeg_read_coefficients(&aSourceInfo);
|
||||
@@ -516,7 +516,7 @@ void Transform(void* pInputStream, void* pOutputStream, long nAngle)
|
||||
jpeg_svstream_dest (&aDestinationInfo, pOutputStream);
|
||||
|
||||
// Compute optimal Huffman coding tables instead of precomputed tables
|
||||
- aDestinationInfo.optimize_coding = TRUE;
|
||||
+ aDestinationInfo.optimize_coding = static_cast<boolean>(TRUE);
|
||||
jpeg_write_coefficients(&aDestinationInfo, aDestinationCoefArrays);
|
||||
jcopy_markers_execute(&aSourceInfo, &aDestinationInfo, aCopyOption);
|
||||
jtransform_execute_transformation(&aSourceInfo, &aDestinationInfo, aSourceCoefArrays, &aTransformOption);
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From e116706a86fc12824929f9d769b72a89d08841f8 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 15 Feb 2020 17:45:08 +0300
|
||||
Subject: Revert fstack-protector check removal in
|
||||
9db11a8ab648f4d04e59e6bb94cd640f64835447
|
||||
|
||||
|
||||
diff --git a/config_host.mk.in b/config_host.mk.in
|
||||
index e47ca61..3c3eb35 100644
|
||||
--- a/config_host.mk.in
|
||||
+++ b/config_host.mk.in
|
||||
@@ -244,6 +244,7 @@ export USING_X11=@USING_X11@
|
||||
export HAMCREST_JAR=@HAMCREST_JAR@
|
||||
export HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=@HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED@
|
||||
export HAVE_GCC_AVX=@HAVE_GCC_AVX@
|
||||
+export HAVE_GCC_STACK_PROTECTOR_STRONG=@HAVE_GCC_STACK_PROTECTOR_STRONG@
|
||||
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
|
||||
export HAVE_GCC_BUILTIN_FFS=@HAVE_GCC_BUILTIN_FFS@
|
||||
export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c0a09f1..b3a1eec 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -6203,6 +6203,17 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
+ AC_MSG_CHECKING([whether $CC_BASE supports -fstack-protector-strong])
|
||||
+ save_CFLAGS=$CFLAGS
|
||||
+ CFLAGS="$CFLAGS -O0 -Werror -fstack-protector-strong"
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char a[8]; a[7] = 0; ]])],[ HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
|
||||
+ CFLAGS=$save_CFLAGS
|
||||
+ if test "$HAVE_GCC_STACK_PROTECTOR_STRONG" = "TRUE"; then
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ else
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ fi
|
||||
+
|
||||
AC_MSG_CHECKING([whether $CC_BASE supports atomic functions])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
int v = 0;
|
||||
@@ -6374,6 +6385,7 @@ AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
AC_SUBST(HAVE_GCC_AVX)
|
||||
+AC_SUBST(HAVE_GCC_STACK_PROTECTOR_STRONG)
|
||||
AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
|
||||
AC_SUBST(HAVE_GCC_BUILTIN_FFS)
|
||||
AC_SUBST(HAVE_GCC_STACK_CLASH_PROTECTION)
|
||||
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
|
||||
index 712a61d..2c3d5f1 100644
|
||||
--- a/solenv/gbuild/platform/com_GCC_defs.mk
|
||||
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
|
||||
@@ -67,7 +67,6 @@ gb_CFLAGS_COMMON := \
|
||||
-fmessage-length=0 \
|
||||
-fno-common \
|
||||
-pipe \
|
||||
- -fstack-protector-strong \
|
||||
|
||||
gb_CXXFLAGS_COMMON := \
|
||||
-Wall \
|
||||
@@ -82,7 +81,6 @@ gb_CXXFLAGS_COMMON := \
|
||||
-fmessage-length=0 \
|
||||
-fno-common \
|
||||
-pipe \
|
||||
- -fstack-protector-strong \
|
||||
|
||||
gb_CXXFLAGS_DISABLE_WARNINGS = -w
|
||||
|
||||
@@ -136,7 +134,11 @@ endif
|
||||
gb_VISIBILITY_FLAGS_CXX := -fvisibility-inlines-hidden
|
||||
gb_CXXFLAGS_COMMON += $(gb_VISIBILITY_FLAGS_CXX)
|
||||
|
||||
+ifeq ($(HAVE_GCC_STACK_PROTECTOR_STRONG),TRUE)
|
||||
+gb_CFLAGS_COMMON += -fstack-protector-strong
|
||||
+gb_CXXFLAGS_COMMON += -fstack-protector-strong
|
||||
gb_LinkTarget_LDFLAGS += -fstack-protector-strong
|
||||
+endif
|
||||
|
||||
ifneq ($(ENABLE_PCH),)
|
||||
ifeq ($(COM_IS_CLANG),TRUE)
|
||||
--
|
||||
2.26.0
|
||||
|
||||
Reference in New Issue
Block a user