[Libreoffice-commits] .: 2 commits - config_host.mk.in configure.in desktop/Module_desktop.mk desktop/Package_scripts.mk desktop/Package_soffice_sh.mk desktop/scripts

David Tardon dtardon at kemper.freedesktop.org
Wed Jan 11 08:33:34 PST 2012


 config_host.mk.in             |    1 
 configure.in                  |    7 -
 desktop/Module_desktop.mk     |    5 +
 desktop/Package_scripts.mk    |    2 
 desktop/Package_soffice_sh.mk |   38 +++++++++
 desktop/scripts/Makefile      |   35 ++++++++
 desktop/scripts/soffice.sh    |  177 ++++++++++++++++++++++++++++++++++++++++++
 desktop/scripts/soffice.sh.in |  177 ------------------------------------------
 8 files changed, 260 insertions(+), 182 deletions(-)

New commits:
commit 7ad72045d7c3a99dbb67f817ad570097de383c3f
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Jan 11 17:31:44 2012 +0100

    avoid generating a file in the source tree

diff --git a/config_host.mk.in b/config_host.mk.in
index 236a58c..57125bd 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -167,6 +167,7 @@ export INSTALLDIR="@INSTALLDIR@"
 export INSTALLDIRNAME="@INSTALLDIRNAME@"
 export INTRO_BIPMAP="@INTRO_BITMAP@"
 @x_JAVALIB@ export JAVALIB="@JAVALIB@"
+export JITC_PROCESSOR_TYPE_EXPORT="@JITC_PROCESSOR_TYPE_EXPORT@"
 export JFREEREPORT_JAR="@JFREEREPORT_JAR@"
 export KDE4_CFLAGS="@KDE4_CFLAGS@"
 export KDE4_LIBS="@KDE4_LIBS@"
diff --git a/configure.in b/configure.in
index e44bf75..d3b3a7e 100644
--- a/configure.in
+++ b/configure.in
@@ -10422,12 +10422,9 @@ else
     echo > set_soenv.last
 fi
 
-AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env])
+AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env])
 AC_OUTPUT
 
-# make sure this is executable
-chmod +x desktop/scripts/soffice.sh
-
 # touch the config timestamp file set_soenv.stamp
 if test ! -f set_soenv.stamp; then
     echo > set_soenv.stamp
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index c14600f..267cc2c 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -68,6 +68,11 @@ $(eval $(call gb_Module_add_targets,desktop,\
     Pagein_impress \
     Pagein_writer \
 ))
+ifneq ($(JITC_PROCESSOR_TYPE_EXPORT),)
+$(eval $(call gb_Module_add_targets,desktop,\
+    Package_soffice_sh \
+))
+endif
 endif
 
 ifeq ($(OS),WNT)
diff --git a/desktop/Package_scripts.mk b/desktop/Package_scripts.mk
index d2afeda..7611765 100644
--- a/desktop/Package_scripts.mk
+++ b/desktop/Package_scripts.mk
@@ -47,10 +47,12 @@ $(eval $(call gb_Package_add_file,desktop_scripts,bin/unoinfo,unoinfo.sh))
 $(eval $(call gb_Package_add_file,desktop_scripts,bin/unopkg,unopkg.sh))
 
 ifneq ($(OS),MACOSX)
+ifeq ($(JITC_PROCESSOR_TYPE_EXPORT),)
 
 $(eval $(call gb_Package_add_file,desktop_scripts,bin/soffice,soffice.sh))
 
 endif
+endif
 
 endif
 
diff --git a/desktop/Package_soffice_sh.mk b/desktop/Package_soffice_sh.mk
new file mode 100644
index 0000000..5cf1df3
--- /dev/null
+++ b/desktop/Package_soffice_sh.mk
@@ -0,0 +1,38 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon at redhat.com>
+#  (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Package_Package,desktop_soffice_sh,$(WORKDIR)/CustomTarget/desktop/scripts))
+
+$(eval $(call gb_Package_add_file,desktop_soffice_sh,bin/soffice,soffice.sh))
+
+$(eval $(call gb_Package_add_customtarget,desktop_soffice_sh,desktop/scripts))
+
+$(eval $(call gb_CustomTarget_add_dependencies,desktop/scripts,\
+    desktop/scripts/soffice.sh \
+))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/desktop/scripts/Makefile b/desktop/scripts/Makefile
new file mode 100644
index 0000000..349c5dd
--- /dev/null
+++ b/desktop/scripts/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon at redhat.com>
+#  (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+soffice.sh : $(SRCDIR)/desktop/scripts/soffice.sh
+	sed -e "s/^#@JITC_PROCESSOR_TYPE_EXPORT@/$(JITC_PROCESSOR_TYPE_EXPORT)/" $< > $@
+
+.DEFAULT_GOAL := all
+.PHONY : all
+all : soffice.sh
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
new file mode 100755
index 0000000..130f047
--- /dev/null
+++ b/desktop/scripts/soffice.sh
@@ -0,0 +1,177 @@
+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+#
+# STAR_PROFILE_LOCKING_DISABLED=1
+# export STAR_PROFILE_LOCKING_DISABLED
+#
+
+# file locking now enabled by default
+SAL_ENABLE_FILE_LOCKING=1
+export SAL_ENABLE_FILE_LOCKING
+
+# Uncomment the line below if you suspect that OpenGL is not
+# working on your system.
+# SAL_NOOPENGL=true; export SAL_NOOPENGL
+
+# uncomment line below to disable anti aliasing of fonts
+# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
+
+# uncomment line below if you encounter problems starting soffice on your system
+# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
+
+#@JITC_PROCESSOR_TYPE_EXPORT@
+
+# resolve installation directory
+sd_cwd=`pwd`
+sd_res=$0
+while [ -h "$sd_res" ] ; do
+    cd "`dirname "$sd_res"`"
+    sd_basename=`basename "$sd_res"`
+    sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
+done
+cd "`dirname "$sd_res"`"
+sd_prog=`pwd`
+cd "$sd_cwd"
+
+# linked build needs additional settings
+if [ -e $sd_prog/ooenv ] ; then
+    . $sd_prog/ooenv
+fi
+
+# try to get some debug output?
+GDBTRACECHECK=
+STRACECHECK=
+VALGRINDCHECK=
+
+# count number of selected checks; only one is allowed
+checks=
+# force the --valgrind option if the VALGRIND variable is set
+test -n "$VALGRIND" && VALGRINDOPT="--valgrind" || VALGRINDOPT=
+
+for arg in $@ $VALGRINDOPT ; do
+    case "$arg" in
+        --backtrace)
+            if which gdb >/dev/null 2>&1 ; then
+                GDBTRACECHECK="gdb -nx --command=$sd_prog/gdbtrace --args"
+                checks="c$checks"
+            else
+                echo "Error: Can't find the tool \"gdb\", --backtrace option will be ignored."
+                exit 1
+            fi
+            ;;
+        --strace)
+            if which strace >/dev/null 2>&1 ; then
+                STRACECHECK="strace -o strace.log -f -tt -s 256"
+                checks="c$checks"
+            else
+                echo "Error: Can't find the tool \"strace\", --strace option will be ignored."
+                exit 1;
+            fi
+            ;;
+         --valgrind)
+            test -n "$VALGRINDCHECK" && continue;
+            if which valgrind >/dev/null 2>&1 ; then
+                # another valgrind tool might be forced via the environment variable
+                test -z "$VALGRIND" && VALGRIND="memcheck"
+                # --trace-children-skip is pretty useful but supported only with valgrind >= 3.6.0
+                valgrind_ver=`valgrind --version | sed -e "s/valgrind-//"`
+                valgrind_ver_maj=`echo $valgrind_ver | awk -F. '{ print \$1 }'`
+                valgrind_ver_min=`echo $valgrind_ver | awk -F. '{ print \$2 }'`
+                valgrind_skip=
+                if [ "$valgrind_ver_maj" -gt 3 -o \( "$valgrind_ver_maj" -eq 3 -a "$valgrind_ver_min" -ge 6 \) ] ; then
+                    valgrind_skip='--trace-children-skip=*/java'
+                fi
+                # finally set the valgrind check
+                VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101"
+                checks="c$checks"
+                if [ "$VALGRIND" = "memcheck" ] ; then
+                    export G_SLICE=always-malloc
+                    export GLIBCXX_FORCE_NEW=1
+                fi
+            else
+                echo "Error: Can't find the tool \"valgrind\", --valgrind option will be ignored"
+                exit 1
+            fi
+            ;;
+    esac
+done
+
+if echo "$checks" | grep -q "cc" ; then
+    echo "Error: The debug options --backtrace, --strace, and --valgrind cannot be used together."
+    echo "       Please, use them one by one."
+    exit 1;
+fi
+
+case "`uname -s`" in
+NetBSD|OpenBSD|FreeBSD|DragonFly)
+# this is a temporary hack until we can live with the default search paths
+    sd_prog1="$sd_prog"
+    sd_prog2="$sd_prog/../ure-link/lib"
+    LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+    JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
+    export LD_LIBRARY_PATH
+    if [ -n "${JAVA_HOME}" ]; then
+        export JAVA_HOME
+    fi
+    ;;
+AIX)
+    LIBPATH=$sd_prog:$sd_prog/../ure-link/lib${LIBPATH:+:$LIBPATH}
+    export LIBPATH
+    ;;
+esac
+
+# run soffice.bin directly when you want to get the backtrace
+if [ -n "$GDBTRACECHECK" ] ; then
+    exec $GDBTRACECHECK "$sd_prog/soffice.bin" "$@"
+fi
+
+# valgrind --log-file=valgrind.log does not work well with --trace-children=yes
+if [ -n "$VALGRINDCHECK" ] ; then
+    echo "redirecting the standard and the error output to valgrind.log"
+    exec &>valgrind.log
+fi
+
+# do not pass the request for command line help to oosplash
+if test "$#" -eq 1; then
+    case "$1" in
+        -h | --h | --he | --hel | --help)
+            "$sd_prog/soffice.bin" --help
+            exit 0
+            ;;
+        -V | --v | --ve | --ver | --vers | --versi | --versio | --version)
+            "$sd_prog/soffice.bin" --version
+            exit 0
+            ;;
+        *)
+            ;;
+    esac
+fi
+
+# oosplash does the rest: forcing pages in, javaldx etc. are
+exec $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash" "$@"
diff --git a/desktop/scripts/soffice.sh.in b/desktop/scripts/soffice.sh.in
deleted file mode 100755
index 2014ab9..0000000
--- a/desktop/scripts/soffice.sh.in
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/bin/sh
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-#
-# STAR_PROFILE_LOCKING_DISABLED=1
-# export STAR_PROFILE_LOCKING_DISABLED
-#
-
-# file locking now enabled by default
-SAL_ENABLE_FILE_LOCKING=1
-export SAL_ENABLE_FILE_LOCKING
-
-# Uncomment the line below if you suspect that OpenGL is not
-# working on your system.
-# SAL_NOOPENGL=true; export SAL_NOOPENGL
-
-# uncomment line below to disable anti aliasing of fonts
-# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
-
-# uncomment line below if you encounter problems starting soffice on your system
-# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
-
- at JITC_PROCESSOR_TYPE_EXPORT@
-
-# resolve installation directory
-sd_cwd=`pwd`
-sd_res=$0
-while [ -h "$sd_res" ] ; do
-    cd "`dirname "$sd_res"`"
-    sd_basename=`basename "$sd_res"`
-    sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
-done
-cd "`dirname "$sd_res"`"
-sd_prog=`pwd`
-cd "$sd_cwd"
-
-# linked build needs additional settings
-if [ -e $sd_prog/ooenv ] ; then
-    . $sd_prog/ooenv
-fi
-
-# try to get some debug output?
-GDBTRACECHECK=
-STRACECHECK=
-VALGRINDCHECK=
-
-# count number of selected checks; only one is allowed
-checks=
-# force the --valgrind option if the VALGRIND variable is set
-test -n "$VALGRIND" && VALGRINDOPT="--valgrind" || VALGRINDOPT=
-
-for arg in $@ $VALGRINDOPT ; do
-    case "$arg" in
-        --backtrace)
-            if which gdb >/dev/null 2>&1 ; then
-                GDBTRACECHECK="gdb -nx --command=$sd_prog/gdbtrace --args"
-                checks="c$checks"
-            else
-                echo "Error: Can't find the tool \"gdb\", --backtrace option will be ignored."
-                exit 1
-            fi
-            ;;
-        --strace)
-            if which strace >/dev/null 2>&1 ; then
-                STRACECHECK="strace -o strace.log -f -tt -s 256"
-                checks="c$checks"
-            else
-                echo "Error: Can't find the tool \"strace\", --strace option will be ignored."
-                exit 1;
-            fi
-            ;;
-         --valgrind)
-            test -n "$VALGRINDCHECK" && continue;
-            if which valgrind >/dev/null 2>&1 ; then
-                # another valgrind tool might be forced via the environment variable
-                test -z "$VALGRIND" && VALGRIND="memcheck"
-                # --trace-children-skip is pretty useful but supported only with valgrind >= 3.6.0
-                valgrind_ver=`valgrind --version | sed -e "s/valgrind-//"`
-                valgrind_ver_maj=`echo $valgrind_ver | awk -F. '{ print \$1 }'`
-                valgrind_ver_min=`echo $valgrind_ver | awk -F. '{ print \$2 }'`
-                valgrind_skip=
-                if [ "$valgrind_ver_maj" -gt 3 -o \( "$valgrind_ver_maj" -eq 3 -a "$valgrind_ver_min" -ge 6 \) ] ; then
-                    valgrind_skip='--trace-children-skip=*/java'
-                fi
-                # finally set the valgrind check
-                VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101"
-                checks="c$checks"
-                if [ "$VALGRIND" = "memcheck" ] ; then
-                    export G_SLICE=always-malloc
-                    export GLIBCXX_FORCE_NEW=1
-                fi
-            else
-                echo "Error: Can't find the tool \"valgrind\", --valgrind option will be ignored"
-                exit 1
-            fi
-            ;;
-    esac
-done
-
-if echo "$checks" | grep -q "cc" ; then
-    echo "Error: The debug options --backtrace, --strace, and --valgrind cannot be used together."
-    echo "       Please, use them one by one."
-    exit 1;
-fi
-
-case "`uname -s`" in
-NetBSD|OpenBSD|FreeBSD|DragonFly)
-# this is a temporary hack until we can live with the default search paths
-    sd_prog1="$sd_prog"
-    sd_prog2="$sd_prog/../ure-link/lib"
-    LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-    JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
-    export LD_LIBRARY_PATH
-    if [ -n "${JAVA_HOME}" ]; then
-        export JAVA_HOME
-    fi
-    ;;
-AIX)
-    LIBPATH=$sd_prog:$sd_prog/../ure-link/lib${LIBPATH:+:$LIBPATH}
-    export LIBPATH
-    ;;
-esac
-
-# run soffice.bin directly when you want to get the backtrace
-if [ -n "$GDBTRACECHECK" ] ; then
-    exec $GDBTRACECHECK "$sd_prog/soffice.bin" "$@"
-fi
-
-# valgrind --log-file=valgrind.log does not work well with --trace-children=yes
-if [ -n "$VALGRINDCHECK" ] ; then
-    echo "redirecting the standard and the error output to valgrind.log"
-    exec &>valgrind.log
-fi
-
-# do not pass the request for command line help to oosplash
-if test "$#" -eq 1; then
-    case "$1" in
-        -h | --h | --he | --hel | --help)
-            "$sd_prog/soffice.bin" --help
-            exit 0
-            ;;
-        -V | --v | --ve | --ver | --vers | --versi | --versio | --version)
-            "$sd_prog/soffice.bin" --version
-            exit 0
-            ;;
-        *)
-            ;;
-    esac
-fi
-
-# oosplash does the rest: forcing pages in, javaldx etc. are
-exec $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash" "$@"
commit 2e30b7ca1e89282a2d2d4b5682ee82f13923d715
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Jan 11 17:32:02 2012 +0100

    bah, i forgot *export*

diff --git a/configure.in b/configure.in
index ab12cea..e44bf75 100644
--- a/configure.in
+++ b/configure.in
@@ -4313,7 +4313,7 @@ if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
     # IBMs JDK needs this...
     JITC_PROCESSOR_TYPE=6
     export JITC_PROCESSOR_TYPE
-    JITC_PROCESSOR_TYPE_EXPORT="JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE"
+    JITC_PROCESSOR_TYPE_EXPORT="export JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE"
 fi
 AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT])
 


More information about the Libreoffice-commits mailing list