mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
434 lines
14 KiB
Plaintext
434 lines
14 KiB
Plaintext
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
|
|
|