libreoffice: fix stack protector detection

This commit is contained in:
Kacper Kasper
2018-07-31 01:22:39 +02:00
parent 4b39739838
commit 87139540d7
2 changed files with 36 additions and 11 deletions

View File

@@ -17,7 +17,7 @@ and Open Source office suite on the market:
HOMEPAGE="https://www.libreoffice.org/"
COPYRIGHT="2000-2018 LibreOffice contributors"
LICENSE="MPL v2.0"
REVISION="10"
REVISION="11"
COMMIT="1c56d5fec2ddd9f68aaaf21e9dbe287db893c092"
SOURCE_URI="https://github.com/LibreOffice/core/archive/$COMMIT.tar.gz"
CHECKSUM_SHA256="8ead56edb57384bf6f18331566a6d52a04d97bfd9e52e139925b8f6224d84b20"
@@ -108,7 +108,6 @@ REQUIRES="
lib:libsmime3$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libssl3$secondaryArchSuffix
lib:libssp$secondaryArchSuffix
lib:libstaroffice_0.0$secondaryArchSuffix
lib:libvisio_0.1$secondaryArchSuffix
lib:libwpd_0.10$secondaryArchSuffix
@@ -172,7 +171,7 @@ BUILD_REQUIRES="
devel:liborcus_0.13$secondaryArchSuffix
devel:libpagemaker_0.0$secondaryArchSuffix
devel:libpoppler$secondaryArchSuffix
devel:libpthread_stubs$secondaryArchSuffix
devel:libpthread_stubs
devel:libqxp_0.0$secondaryArchSuffix
devel:libraptor2$secondaryArchSuffix
devel:librdf$secondaryArchSuffix
@@ -212,7 +211,7 @@ BUILD_PREREQUIRES="
cmd:make
cmd:patch
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:pkg_config
cmd:python2.7
cmd:python3.6
cmd:which
@@ -227,8 +226,10 @@ BUILD()
cd .. ; mv $sourceDir core
ln -s core core-$COMMIT; cd core
export CFLAGS="-fno-stack-protector"
export CXXFLAGS="-fno-stack-protector"
pkgconfig_libdir="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
pkgconfig_datadir="`finddir B_SYSTEM_DIRECTORY`/$relativeDataDir/pkgconfig"
export PKG_CONFIG_LIBDIR="$pkgconfig_libdir:$pkgconfig_datadir"
runConfigure ./autogen.sh \
--with-distro=LibreOfficeHaiku \
--enable-kde5 \

View File

@@ -1,11 +1,11 @@
From bfe48ff76c7e05ada61e7f1e0b03ebaeb715a97c Mon Sep 17 00:00:00 2001
From 502b3d46c2b0edf22c4d47d1384f3f740ed7e7c9 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
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 2a66608..e26f8e1 100644
index 9936b0e..4193e55 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -142,7 +142,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
@@ -26,7 +26,7 @@ index 2a66608..e26f8e1 100644
$(if $(ENABLE_MACOSX_SANDBOX),, \
regmerge \
regview \
@@ -1022,7 +1022,7 @@ $(eval $(call gb_Helper_register_packages_for_install,brand,\
@@ -1017,7 +1017,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) \
@@ -39,14 +39,14 @@ index 2a66608..e26f8e1 100644
2.16.4
From 7b73ecd7f14b66474c9ec18b6beb94250530d3f4 Mon Sep 17 00:00:00 2001
From bcab46b0dee58ee4e501aa46204a392afcd4e854 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
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
index ebeb00d..da4f697 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_
@@ -62,3 +62,27 @@ index 315e5c8..5aff39b 100644
2.16.4
From d3973ea8b2cdadfe9a748d424835de9fde8f5140 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Mon, 30 Jul 2018 22:38:23 +0000
Subject: Fix stack protector check
* "return 0;" is not enough to trigger it.
diff --git a/configure.ac b/configure.ac
index 9b31d89..e19cd6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5916,7 +5916,8 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
AC_MSG_CHECKING([whether $CC supports -fstack-protector-strong])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -fstack-protector-strong"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char a[8]; return 0; ]])],[
+HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
CFLAGS=$save_CFLAGS
if test "$HAVE_GCC_STACK_PROTECTOR_STRONG" = "TRUE"; then
AC_MSG_RESULT([yes])
--
2.16.4