From 79b3c8a17b83ac7d946ecf58edbafa58c88ffd75f879e87efc381e6890edca63 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Fri, 2 Aug 2013 07:26:14 +0000 Subject: [PATCH] Accepting request 185565 from LibreOffice:Unstable - set PYTHON variables using python-config on SLED11 because the pkg-config files are not there - set the PYTHON variables only in the main libreoffice.spec because they are not needed to build help - build-link-rt.diff: liblt is linked with librt, so we need to link the libmerged with librt as well; it fixes the build on SLED11 - use -g1 instead of -g to reduce the memory and disk usage with debugging symbols; note that only .o files need about 12GB when compliled with full debugging symbols OBS-URL: https://build.opensuse.org/request/show/185565 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=48 --- build-link-rt.diff | 10 ++++++++++ build_prepare.inc | 10 +++------- libreoffice-help-en-US.spec | 1 + libreoffice-l10n.spec | 4 ++-- libreoffice.changes | 13 +++++++++++++ libreoffice.spec | 15 +++++++++++++++ 6 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 build-link-rt.diff diff --git a/build-link-rt.diff b/build-link-rt.diff new file mode 100644 index 0000000..02209f3 --- /dev/null +++ b/build-link-rt.diff @@ -0,0 +1,10 @@ +--- Library_merged.mk.old 2013-07-23 12:40:26.000000000 +0200 ++++ Library_merged.mk 2013-07-31 16:33:34.000000000 +0200 +@@ -89,6 +89,7 @@ ifeq ($(OS),LINUX) + $(eval $(call gb_Library_add_libs,merged,\ + -lm \ + -ldl \ ++ -lrt \ + -lpthread \ + )) + endif diff --git a/build_prepare.inc b/build_prepare.inc index 6c8d263..823d3d0 100644 --- a/build_prepare.inc +++ b/build_prepare.inc @@ -56,11 +56,12 @@ fi source /etc/profile.d/alljava.sh %endif # use RPM_OPT_FLAGS, ... +# FIXME: use -g1 instead of -g; the .o files need about 12GB disk space with full debugging symbols; there is not enough disk space and not enough memory for linking libmerged on the build hosts # 12.3 has broken cppconnector with wrong incude paths %if 0%{?suse_version} == 01230 -ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g'` -fno-strict-aliasing -I/usr/include/mysql-connector/ " +ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g' -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'` -fno-strict-aliasing -I/usr/include/mysql-connector/ " %else -ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g'` -fno-strict-aliasing" +ARCH_FLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/\-fexceptions//g' -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g'` -fno-strict-aliasing" %endif CFLAGS="$ARCH_FLAGS" CXXFLAGS="$ARCH_FLAGS" @@ -74,8 +75,3 @@ export PATH="$RPM_BUILD_DIR/libreoffice-%version/make-%gnu_make_version-gbuild:$ %if %suse_version < 1140 export PATH="$RPM_BUILD_DIR/libreoffice-%version/zip30:$PATH" %endif -# Whack in our python2 so we don't have to use internal one -# which is quite nightmare. -export PYTHON=/usr/bin/python -export PYTHON_CFLAGS=`pkg-config --cflags python` -export PYTHON_LIBS=`pkg-config --libs python` diff --git a/libreoffice-help-en-US.spec b/libreoffice-help-en-US.spec index 06a7a1a..a9501e8 100644 --- a/libreoffice-help-en-US.spec +++ b/libreoffice-help-en-US.spec @@ -257,4 +257,5 @@ rm -f %_datadir/%lo_home/help_en_US_list.txt.postun 2>/dev/null %files -f file-lists/help_en_US_list.txt -n libreoffice-help-en-US %defattr(-,root,root) + %changelog diff --git a/libreoffice-l10n.spec b/libreoffice-l10n.spec index c35ab78..c9a42c4 100644 --- a/libreoffice-l10n.spec +++ b/libreoffice-l10n.spec @@ -1664,8 +1664,8 @@ PreReq: grep PreReq: libreoffice >= 3.5 %endif Requires: libreoffice = %{version} -Provides: OpenOffice_org-sh-YU = %version Provides: OpenOffice_org-sh-YU:%_prefix/ooo-2.0/program/resource/sw680sh-YU.res +Provides: OpenOffice_org-sh-YU = %version Obsoletes: OpenOffice_org-sh-YU < %version # compat stuff Provides: OpenOffice_org-sh = %{version} @@ -1752,8 +1752,8 @@ PreReq: libreoffice >= 3.5 %endif Requires: libreoffice = %{version} Requires: scalable-font-ru -Provides: OpenOffice_org-sr-CS = %version Provides: OpenOffice_org-sr-CS:%_prefix/ooo-2.0/program/resource/sw680sr-CS.res +Provides: OpenOffice_org-sr-CS = %version Obsoletes: OpenOffice_org-sr-CS < %version # compat stuff Provides: OpenOffice_org-sr = %{version} diff --git a/libreoffice.changes b/libreoffice.changes index c75ec4e..536115b 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Aug 1 14:46:22 UTC 2013 - pmladek@suse.com + +- set PYTHON variables using python-config on SLED11 because the pkg-config + files are not there +- set the PYTHON variables only in the main libreoffice.spec because + they are not needed to build help +- build-link-rt.diff: liblt is linked with librt, so we need to link + the libmerged with librt as well; it fixes the build on SLED11 +- use -g1 instead of -g to reduce the memory and disk usage with + debugging symbols; note that only .o files need about 12GB when + compliled with full debugging symbols + ------------------------------------------------------------------- Tue Jul 30 13:06:00 UTC 2013 - pmladek@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index a478950..f8e1450 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -594,6 +594,9 @@ Patch2: split-icons-search-usr-share.diff # search help icons in /usr/share # FIXME: make it configurable in integrate into git Patch3: officecfg-help-in-usr-share.diff +# liblt is linked with librt, so we need to link the mergedlib with librt as well +# it fixes build on SLED11 +Patch4: build-link-rt.diff # change user config dir name from ~/.libreoffice/3 to ~/.libreoffice/3-suse # to avoid BerkleyDB incompatibility with the plain build # FIXME: make it configurable and push upstream @@ -1299,6 +1302,7 @@ the LibreOffice localizations separately. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 %patch5 %patch6 -p1 %patch7 -p1 @@ -1345,6 +1349,17 @@ cd - %build %{expand:%(cat %_sourcedir/build_prepare.inc)} +# Whack in our python2 so we don't have to use internal one +# which is quite nightmare. +export PYTHON=/usr/bin/python +%if 0%{?suse_version} > 01130 +export PYTHON_CFLAGS=`pkg-config --cflags python` +export PYTHON_LIBS=`pkg-config --libs python` +%else +# pkg-config support is not available in the pyton package on SLED11 +export PYTHON_CFLAGS=`python-config --includes` +export PYTHON_LIBS=`python-config --libs` +%endif %if %prepare_build != 0 ./autogen.sh $PARALLEL_BUILD \ --libdir=%{_libdir} \