[Libreoffice-commits] .: 5 commits - desktop/scripts desktop/source fpicker/source shell/source sysui/desktop

Caolán McNamara caolan at kemper.freedesktop.org
Wed Oct 13 12:32:33 PDT 2010


 desktop/scripts/soffice.sh                       |   13 +-
 desktop/scripts/unopkg.sh                        |   13 +-
 desktop/source/deployment/misc/dp_platform.cxx   |    5 
 fpicker/source/unx/gnome/FPentry.cxx             |    6 
 fpicker/source/unx/gnome/SalGtkFilePicker.cxx    |    6 
 fpicker/source/unx/gnome/SalGtkFolderPicker.cxx  |    6 
 fpicker/source/unx/gnome/SalGtkPicker.cxx        |    6 
 shell/source/backends/localebe/localebackend.cxx |  142 +++++++++++------------
 shell/source/tools/lngconvex/lngconvex.cxx       |    4 
 shell/source/unix/misc/senddoc.sh                |   13 +-
 sysui/desktop/productversion.mk                  |    7 -
 sysui/desktop/slackware/makefile.mk              |    4 
 sysui/desktop/solaris/makefile.mk                |    2 
 sysui/desktop/util/makefile.mk                   |    4 
 14 files changed, 140 insertions(+), 91 deletions(-)

New commits:
commit 65bfd5bd282ca621e536840a16421b8f799714e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 15:33:44 2010 +0100

    tweaks for AIX

diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk
index c957ea8..fb8570b 100644
--- a/sysui/desktop/productversion.mk
+++ b/sysui/desktop/productversion.mk
@@ -33,7 +33,7 @@ PKGREV          = $(LAST_MINOR:s/m//:s/s/./)
 ABSLOCALOUT:=$(shell @cd $(PRJ) && pwd)$/$(ROUT)
 
 # create desktop-integration subfolder on linux
-.IF "$(OS)"=="LINUX"
+.IF "$(OS)"=="LINUX" || "$(OS)"=="AIX"
 # rpm seems to require absolute paths here :(
 PKGDIR:=$(ABSLOCALOUT)$/bin$/desktop-integration
 RPMMACROS= \
@@ -43,11 +43,8 @@ RPMMACROS= \
 PKGDIR=$(BIN)
 .ENDIF
 
-PRODUCTLIST = libreoffice broffice.org
+.INCLUDE : productversion.mk
 
-# default values to minimize maintainance effort 
-PRODUCTVERSION = 3.3
-PRODUCTVERSIONSHORT = 3
 PKGVERSION = $(PRODUCTVERSION)
 # gnome-vfs treats everything behind the last '.' as an icon extension, 
 # even though the "icon_filename" in '.keys' is specified as filename 
diff --git a/sysui/desktop/slackware/makefile.mk b/sysui/desktop/slackware/makefile.mk
index 6fde1ca..bc4c74c 100644
--- a/sysui/desktop/slackware/makefile.mk
+++ b/sysui/desktop/slackware/makefile.mk
@@ -92,7 +92,7 @@ $(MISC)/$(TARGET)/usr/share/applications/ :
 
 $(MISC)/$(TARGET)/empty.tar :
     @$(MKDIRHIER) $(@:d)/empty
-    @tar -C $(MISC)/$(TARGET)/empty --owner=root --group=root --same-owner -cf $@ .
+    @$(GNUTAR) -C $(MISC)/$(TARGET)/empty --owner=root --group=root --same-owner -cf $@ .
 
 
 # --- packaging ---------------------------------------------------
@@ -104,7 +104,7 @@ $(MENUFILES) : $(MISC)/$(TARGET)/empty.tar
     -$(RM) -r $(MISC)$/$(@:b)
     dmake $(MISC)$/$(@:b)$/usr/share/applications $(MISC)$/$(@:b)$/install$/slack-desc $(MISC)$/$(@:b)$/install$/doinst.sh
     @$(COPY) $(MISC)/$(TARGET)$/empty.tar $@.tmp
-    @tar -C $(MISC)/$(@:b) --owner=root --group=root --same-owner --exclude application.flag -rf $@.tmp install usr opt
+    @$(GNUTAR) -C $(MISC)/$(@:b) --owner=root --group=root --same-owner --exclude application.flag -rf $@.tmp install usr opt
     @gzip < $@.tmp > $@
     @$(RM) $@.tmp
     $(RM) -r $(MISC)$/$(@:b)
diff --git a/sysui/desktop/solaris/makefile.mk b/sysui/desktop/solaris/makefile.mk
index d2ffc8c..f74dae1 100644
--- a/sysui/desktop/solaris/makefile.mk
+++ b/sysui/desktop/solaris/makefile.mk
@@ -124,7 +124,7 @@ $(PKGFILES) : $(MISC)$/{$(PRODUCTLIST)}$/prototype
 .IF "$(DONTCOMPRESS)"==""
     $(FASPAC) $(SOLARBINDIR)/faspac-so.sh -a -d $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
 .ENDIF # "$(DONTCOMPRESS)"==""
-    @tar -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int | gzip > $@
+    @$(GNUTAR) -cf - -C $(PKGDIR) $(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int | gzip > $@
     @rm -rf $(PKGDIR)/$(@:b:b:s/-/ /:1:s/.//)$(PRODUCTVERSIONSHORT)-desktop-int
 
 .ENDIF
diff --git a/sysui/desktop/util/makefile.mk b/sysui/desktop/util/makefile.mk
index a8c6fea..8255cc0 100644
--- a/sysui/desktop/util/makefile.mk
+++ b/sysui/desktop/util/makefile.mk
@@ -53,7 +53,7 @@ ALLTAR: $(RPMTARFILES) $(DEBTARFILES)
 
 $(RPMTARFILES) : $(PKGDIR)
     $(MKDIRHIER) $(@:d)
-    tar -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*.rpm)} | gzip > $@
+    $(GNUTAR) -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*.rpm)} | gzip > $@
 
 .ENDIF # "$(TARFILE)" != ""
 
@@ -61,6 +61,6 @@ $(RPMTARFILES) : $(PKGDIR)
 
 $(DEBTARFILES) : $(PKGDIR)
     $(MKDIRHIER) $(@:d)
-    tar -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell @cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*.deb)} | gzip > $@
+    $(GNUTAR) -C $(PKGDIR:d:d) -cf - $(PKGDIR:f)$/{$(shell @cd $(PKGDIR); ls $(@:b:b:s/-/ /:1)*.deb)} | gzip > $@
     
 .ENDIF
commit c9a594003bf31368a2579e20ca9e68b97e6130e7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 15:10:27 2010 +0100

    AIX tweaks

diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index b289ba4..327ae04 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -35,54 +35,37 @@
 
 #include <stdio.h>
 
-#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
+#ifdef WNT
 
-#include <rtl/ustrbuf.hxx>
-#include <locale.h>
-#include <string.h>
+#ifdef WINVER
+#undef WINVER
+#endif
+#define WINVER 0x0501
 
-/*
- * Note: setlocale is not at all thread safe, so is this code. It could
- * especially interfere with the stuff VCL is doing, so make sure this
- * is called from the main thread only.
- */
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+#include <windows.h>
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
 
-static rtl::OUString ImplGetLocale(int category)
+rtl::OUString ImplGetLocale(LCID lcid)
 {
-    const char *locale = setlocale(category, "");
-
-    // Return "en-US" for C locales
-    if( (locale == NULL) || ( locale[0] == 'C' && locale[1] == '\0' ) )
-        return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) );
-
-
-    const char *cp;
-    const char *uscore = NULL;
+    TCHAR buffer[8];
+    LPTSTR cp = buffer;
 
-    // locale string have the format lang[_ctry][.encoding][@modifier]
-    // we are only interested in the first two items, so we handle
-    // '.' and '@' as string end.
-    for (cp = locale; *cp; cp++)
+    cp += GetLocaleInfo( lcid, LOCALE_SISO639LANGNAME , buffer, 4 );
+    if( cp > buffer )
     {
-        if (*cp == '_')
-            uscore = cp;
-        if (*cp == '.' || *cp == '@')
-            break;
-    }
+        if( 0 < GetLocaleInfo( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) )
+            // #i50822# minus character must be written before cp
+            *(cp - 1) = '-';
 
-    rtl::OUStringBuffer aLocaleBuffer;
-    if( uscore != NULL )
-    {
-        aLocaleBuffer.appendAscii(locale, uscore++ - locale);
-        aLocaleBuffer.appendAscii("-");
-        aLocaleBuffer.appendAscii(uscore, cp - uscore);
-    }
-    else
-    {
-        aLocaleBuffer.appendAscii(locale, cp - locale);
+        return rtl::OUString::createFromAscii(buffer);
     }
 
-    return aLocaleBuffer.makeStringAndClear();
+    return rtl::OUString();
 }
 
 #elif defined(MACOSX) 
@@ -184,44 +167,57 @@ namespace /* private */
 
 } // namespace /* private */
 
-#endif
+#else
 
-// -------------------------------------------------------------------------------
+#include <rtl/ustrbuf.hxx>
+#include <locale.h>
+#include <string.h>
 
-#ifdef WNT
+/*
+ * Note: setlocale is not at all thread safe, so is this code. It could
+ * especially interfere with the stuff VCL is doing, so make sure this
+ * is called from the main thread only.
+ */
 
-#ifdef WINVER
-#undef WINVER
-#endif
-#define WINVER 0x0501
+static rtl::OUString ImplGetLocale(int category)
+{
+    const char *locale = setlocale(category, "");
 
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif 
+    // Return "en-US" for C locales
+    if( (locale == NULL) || ( locale[0] == 'C' && locale[1] == '\0' ) )
+        return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) );
 
-rtl::OUString ImplGetLocale(LCID lcid)
-{
-    TCHAR buffer[8];
-    LPTSTR cp = buffer;
 
-    cp += GetLocaleInfo( lcid, LOCALE_SISO639LANGNAME , buffer, 4 );
-    if( cp > buffer )
+    const char *cp;
+    const char *uscore = NULL;
+
+    // locale string have the format lang[_ctry][.encoding][@modifier]
+    // we are only interested in the first two items, so we handle
+    // '.' and '@' as string end.
+    for (cp = locale; *cp; cp++)
     {
-        if( 0 < GetLocaleInfo( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) )
-            // #i50822# minus character must be written before cp
-            *(cp - 1) = '-';
+        if (*cp == '_')
+            uscore = cp;
+        if (*cp == '.' || *cp == '@')
+            break;
+    }
 
-        return rtl::OUString::createFromAscii(buffer);
+    rtl::OUStringBuffer aLocaleBuffer;
+    if( uscore != NULL )
+    {
+        aLocaleBuffer.appendAscii(locale, uscore++ - locale);
+        aLocaleBuffer.appendAscii("-");
+        aLocaleBuffer.appendAscii(uscore, cp - uscore);
+    }
+    else
+    {
+        aLocaleBuffer.appendAscii(locale, cp - locale);
     }
 
-    return rtl::OUString();
+    return aLocaleBuffer.makeStringAndClear();
 }
 
-#endif // WNT
+#endif
 
 // -------------------------------------------------------------------------------
 
@@ -246,12 +242,12 @@ LocaleBackend* LocaleBackend::createInstance()
 
 rtl::OUString LocaleBackend::getLocale(void)
 {
-#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
-    return ImplGetLocale(LC_CTYPE);
+#if defined WNT
+    return ImplGetLocale( GetUserDefaultLCID() );
 #elif defined (MACOSX)
     return ImplGetLocale("AppleLocale");
-#elif defined WNT
-    return ImplGetLocale( GetUserDefaultLCID() );
+#else
+    return ImplGetLocale(LC_CTYPE);
 #endif
 }
 
@@ -259,12 +255,12 @@ rtl::OUString LocaleBackend::getLocale(void)
 
 rtl::OUString LocaleBackend::getUILocale(void)
 {
-#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
-    return ImplGetLocale(LC_MESSAGES);
+#if defined WNT
+    return ImplGetLocale( MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT) );
 #elif defined(MACOSX)
     return ImplGetLocale("AppleLanguages");
-#elif defined WNT
-    return ImplGetLocale( MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT) );
+#else
+    return ImplGetLocale(LC_MESSAGES);
 #endif
 }
 
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index ced48b3..eda00b9 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -26,6 +26,10 @@
  *
  ************************************************************************/
 
+#ifdef AIX
+#    undef _THREAD_SAFE
+#endif
+
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_shell.hxx"
 
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
index 83724d3..fb5c0ce 100644
--- a/shell/source/unix/misc/senddoc.sh
+++ b/shell/source/unix/misc/senddoc.sh
@@ -1,15 +1,22 @@
 #!/bin/sh
 URI_ENCODE="`dirname $0`/uri-encode"
 FOPTS=""
+sd_platform=`uname -s`
 
 # linux file utility needs -L option to resolve symlinks
-if [ "`uname -s`" = "Linux" ]
-then
+if [ "$sd_platform" = "Linux" ] ; then
   FOPTS="-L"
 fi
 
 # do not confuse the system mail clients with OOo and Java libraries
-unset LD_LIBRARY_PATH
+case $sd_platform in
+  AIX)
+    unset LIBPATH
+    ;;
+  *)
+    unset LD_LIBRARY_PATH
+    ;;
+esac
 
 # tries to locate the executable specified 
 # as first parameter in the user's path.
commit 90633b0f57cef98b2d3af888977ee7eaf5552cc8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:21:22 2010 +0100

    fix AIX build

diff --git a/fpicker/source/unx/gnome/FPentry.cxx b/fpicker/source/unx/gnome/FPentry.cxx
index 59a34a8..1a57088 100644
--- a/fpicker/source/unx/gnome/FPentry.cxx
+++ b/fpicker/source/unx/gnome/FPentry.cxx
@@ -29,6 +29,12 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_fpicker.hxx"
 
+#ifdef AIX
+#define _LINUX_SOURCE_COMPAT
+#include <sys/timer.h>
+#undef _LINUX_SOURCE_COMPAT
+#endif
+
 //----------------------------------------------
 //	includes of other projects
 //----------------------------------------------
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index b923074..35d838d 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -29,6 +29,12 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_fpicker.hxx"
 
+#ifdef AIX
+#define _LINUX_SOURCE_COMPAT
+#include <sys/timer.h>
+#undef _LINUX_SOURCE_COMPAT
+#endif
+
 //------------------------------------------------------------------------
 // includes
 //------------------------------------------------------------------------
diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
index 79640cd..b1222c8 100644
--- a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
@@ -29,6 +29,12 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_fpicker.hxx"
 
+#ifdef AIX
+#define _LINUX_SOURCE_COMPAT
+#include <sys/timer.h>
+#undef _LINUX_SOURCE_COMPAT
+#endif
+
 //------------------------------------------------------------------------
 // includes
 //------------------------------------------------------------------------
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx
index 6ba8f27..bc60e7a 100644
--- a/fpicker/source/unx/gnome/SalGtkPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx
@@ -29,6 +29,12 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_fpicker.hxx"
 
+#ifdef AIX
+#define _LINUX_SOURCE_COMPAT
+#include <sys/timer.h>
+#undef _LINUX_SOURCE_COMPAT
+#endif
+
 //------------------------------------------------------------------------
 // includes
 //------------------------------------------------------------------------
commit bafcb9f298afa86c7dbb65f3a424d131f95bbed1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:19:35 2010 +0100

    fix typo

diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 2d428af..bee6d9a 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -190,7 +190,7 @@ namespace
         else
         {
             OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "
-            "Check the platform element in the descripion.xml");
+            "Check the platform element in the description.xml");
             ret = false;
         }
         return ret;
commit fbca9235378e29cffb12dfe4c04f958242ffd3d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:17:31 2010 +0100

    add AIX to desktop

diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index f7d4a76..00c2b5c 100644
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -121,8 +121,17 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
     my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
         "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
     if [ -n "$my_path" ] ; then
-        LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-        export LD_LIBRARY_PATH
+        sd_platform=`uname -s`
+        case $sd_platform in
+          AIX)
+            LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
+            export LIBPATH
+            ;;
+          *)
+            LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+            export LD_LIBRARY_PATH
+            ;;
+        esac
     fi
 fi
 
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index 3f06444..6adedda 100644
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -57,8 +57,17 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
     my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
         "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
     if [ -n "$my_path" ] ; then
-        LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-        export LD_LIBRARY_PATH
+        sd_platform=`uname -s`
+        case $sd_platform in
+          AIX)
+            LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
+            export LIBPATH
+            ;;
+          *)
+            LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+            export LD_LIBRARY_PATH
+            ;;
+        esac
     fi
 fi
 
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index ff1130d..2d428af 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -70,6 +70,7 @@
 #define PLATFORM_OS2_X86            "os2_x86"
 
 
+#define PLATFORM_AIX_POWERPC        "aix_powerpc"
 
 
 
@@ -184,6 +185,8 @@ namespace
             ret = checkOSandCPU(OUSTR("MacOSX"), OUSTR("PowerPC"));
         else if (token.equals(OUSTR(PLATFORM_OS2_X86)))
             ret = checkOSandCPU(OUSTR("OS2"), OUSTR("x86"));
+        else if (token.equals(OUSTR(PLATFORM_AIX_POWERPC)))
+            ret = checkOSandCPU(OUSTR("AIX"), OUSTR("PowerPC"));
         else
         {
             OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "


More information about the Libreoffice-commits mailing list