Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 6636512f7ab99e63fc7eb86a6cbc03a6 > files > 2

OpenOffice.org-1.1.4-7.1.102mdk.src.rpm

%define name		OpenOffice.org
%define version		1.1.4
%define release		7.1.102mdk

%define subver	645
%define tarver	1.1.4
%define stlver	4.6.2
%define jdkver	1.4.2_06
%define ximianiconsver	1_1-10
%define kdeiconsver	1_1-0.3

# Only IA-32 and PPC for now
ExclusiveArch: %{ix86} ppc

# Define Mandrake Linux version we are building for
%define mdkversion %(perl -pe '/(\\d+)\\.(\\d)\\.?(\\d)?/; $_="$1$2".($3||0)' /etc/mandrake-release)

# Find a free display (resources generation requires X) and sets XDISPLAY
%define init_xdisplay XDISPLAY=2; while /bin/true; do if [ ! -f /tmp/.X$XDISPLAY-lock ]; then sleep 2s; ( /usr/X11R6/bin/Xvfb -ac :$XDISPLAY >& /dev/null & ); sleep 15s; if [ -f /tmp/.X$XDISPLAY-lock ]; then break; fi; fi; XDISPLAY=$(($XDISPLAY+1)); done

# The virtual X server PID
%define kill_xdisplay kill $(cat /tmp/.X$XDISPLAY-lock)

# Languages (English and German are always built)
# FIXME: split generation of language subpackages, otherwise rpm makes
# a broken pipe
%define languages1 "ENUS,FREN,GERM,SPAN,ITAL,DTCH,PORT,SWED,POL,RUSS"
%define languages2 "DAN,GREEK,TURK,CHINSIM,CHINTRAD,JAPN,KOREAN,CZECH,CAT,FINN"
%define languages3 "ARAB,SLOVAK,PORTBR,ESTONIAN,NORBOK,NORNYN,BASQUE,WELSH,SLOVENIAN"
%define languages4 "AFRIK,ZULU,HEBREW,NSOTHO,HUNG"
%define languages  "%{languages1},%{languages2},%{languages3},%{languages4}"

# Supported languages for localized help files (others are not
# complete/advanced enough)
%define helplangs1 "ENUS,FREN,GERM,ITAL,SWED,SPAN,JAPN,FINN,DTCH"
%define helplangs2 "KOREAN,CHINSIM,CHINTRAD,CZECH,SLOVAK,RUSS,BASQUE,SLOVENIAN,PORTBR,TURK"
%define helplangs  "%{helplangs1},%{helplangs2}"

# Ximian icons
%define use_ximianicons 1
%{?_with_ximianicons: %global use_ximianicons 1}
%{?_without_ximianicons: %global use_ximianicons 0}

# KDE icons
%define use_kdeicons 0
%{?_with_kdeicons: %global use_kdeicons 1}
%{?_without_kdeicons: %global use_kdeicons 0}

# GCC 3.3.4
%define use_gcc334 0
%{?_with_gcc334: %global use_gcc334 1}
%{?_without_gcc334: %global use_gcc334 0}

# GCC 3.4.1
%define use_gcc341 1
%{?_with_gcc341: %global use_gcc341 1}
%{?_without_gcc341: %global use_gcc341 0}

# CCACHE
%define use_ccache 0
%{?_with_ccache: %global use_ccache 1}
%{?_without_ccache: %global use_ccache 0}

# JDK
%define use_sunjdk 1
%{?_with_jdk: %global use_sunjdk 1}
%{?_without_jdk: %global use_sunjdk 0}

# Mozilla
%define build_mozilla 1
%{?_with_mozilla: %global build_mozilla 1}
%{?_without_mozilla: %global build_mozilla 0}

%if %{use_gcc334}
%define use_gcc341 0
%endif

%if %{use_gcc341}
%define build_mozilla 0
%endif

Summary:	Open source office suite
Name:		%{name}
Version:	%{version}
Release:	%{release}
Epoch:		1
URL:		http://www.openoffice.org/
License:	LGPL
Group:		Office
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Obsoletes:	openoffice
Provides:	openoffice = %{version}-%{release}
Requires:	libunixODBC2, libsane1, Xaw3d
Requires:	OpenOffice.org-libs = %{epoch}:%{version}-%{release}

# For PDF output driver
Requires:	ghostscript

# Requires a language package and some MySpell dictionary
Requires:	OpenOffice.org-l10n = %{version}

# Don't provide nor require Mozilla libraries
%define __find_provides %{_builddir}/OOo_%{version}_src/find_provides.sh
%define __find_requires %{_builddir}/OOo_%{version}_src/find_requires.sh

PreReq:		/usr/sbin/chkfontpath

####################################################################
#
# Compilers: only support builds with gcc >= 3.2
#
####################################################################

Requires:		libgcc >= 3.2-0.3mdk, libstdc++ >= 3.2-0.3mdk
BuildRequires:		gcc >= 3.2-0.3mdk, gcc-c++ >= 3.2-0.3mdk
%if %{use_gcc334}
Requires:		libstdc++3.3 >= 3.3.4
%endif

# For www-browser script
Requires:		mandrake_desk >= 10.1-6mdk

# For drakoo wizard
Requires: drakoo

%if !%use_sunjdk
BuildRequires:		gcc-java >= 3.2-0.3mdk, gcj-tools >= 3.2-0.3mdk
%else
BuildConflicts:		gcc-java
BuildConflicts:		gcj-tools
%endif

%if %use_gcc334
%define GCC		gcc-3.3.4
%define CXX		g++-3.3.4
%else
%define GCC		gcc
%define CXX		g++
%define GCJ		gcj
%endif

%ifarch %{ix86}
%define build_env	LinuxIntelEnv.Set
%define build_out_path	unxlngi4.pro
%endif
%ifarch ppc
%define build_env	LinuxPPCEnv.Set
%define build_out_path	unxlngppc4.pro
%endif
%ifarch x86_64
%define build_env	LinuxAMDEnv.Set
%define build_out_path	unxlngx4.pro
%endif

####################################################################
#
# BuildRequires
#
####################################################################

BuildRequires:	pam-devel, perl, zip, autoconf, flex, unzip
BuildRequires:	XFree86, XFree86-Xvfb, xpm-devel
BuildRequires:	perl-MDK-Common
BuildRequires:	freetype2-devel
BuildRequires:	zlib-devel
BuildRequires:	cups-devel

# Make sure we have a working tcsh first
%if %{mdkversion} >= 900
BuildRequires:	tcsh >= 6.12-2mdk
%else
BuildRequires:	tcsh
%endif

# Source12 (xmlparse) needs xsltproc
BuildRequires:	libxslt-proc >= 1.0.19
BuildRequires:	libxml2 >= 2.4.23

# We need a bison which can handle former bison 1.28 "-d -o <file>" args
BuildRequires:	bison >= 1.32-2mdk

# Use system DB library
%if %{mdkversion} >= 1010
%define libdb_major 4
%define libdb_minor 2
BuildRequires:	libdb-devel >= 4.2.5-4mdk
BuildRequires:	libdbjava >= 4.2.5-4mdk
BuildRequires:	libdbcxx >= 4.2.5-4mdk
%else
%if %{mdkversion} >= 920
%define libdb_major 4
%define libdb_minor 1
BuildRequires:	libdb-devel >= 4.1.25-3mdk
BuildRequires:	libdbjava >= 4.1.25-3mdk
BuildRequires:	libdbcxx >= 4.1.25-3mdk
%else
%if %{mdkversion} >= 910
%define libdb_major 4
%define libdb_minor 0
BuildRequires:	libdb4.0-devel >= 4.0.14-5mdk
BuildRequires:	libdbjava4.0 >= 4.0.14-5mdk
BuildRequires:	libdbcxx4.0 >= 4.0.14-5mdk
%else
%if %{mdkversion} >= 900
%define libdb_major 3
%define libdb_minor 3
BuildRequires:	libdb3.3-devel >= 3.3.11-9mdk
BuildRequires:	libdbjava3.3 >= 3.3.11-9mdk
BuildRequires:	libdbcxx3.3 >= 3.3.11-9mdk
%endif
%endif
%endif
%endif

# We need "convert" program for XPM -> PNG icon conversion
BuildRequires:	ImageMagick

# Needed for Source14 (help/<lang>/err.html modifier)
BuildRequires:	perl-XML-Twig, perl-HTML-Parser

# We want Freetype 2.1.3 with light hint for MDK 9.1
%define build_ft_lighthint 0
%if %{mdkversion} >= 910
%define build_ft_lighthint 1
Requires:	freetype2 >= 2.1.3-3mdk
BuildRequires:	freetype2-devel >= 2.1.3-3mdk
%endif

# Needed for GNOME integration 
BuildRequires:	libgtk+2-devel

# Needed for building with JDK
%if %use_sunjdk
BuildRequires:	jdk = %{jdkver}
%endif

%if %use_ccache
BuildRequires:	ccache
%endif

%if %use_gcc334
BuildRequires: gcc3.3
BuildRequires: gcc3.3-c++
BuildRequires: gcc3.3-cpp
%endif

BuildRequires:	startup-notification-devel

####################################################################
#
# Sources
#
####################################################################

Source0:	OOo_%{tarver}_source.tar.bz2
Source1:	STLport-%{stlver}.tar.bz2
Source2:	gpc231.tar.bz2
Source3:	openoffice-rsfile-global.bz2
Source4:	openoffice-rsfile-local.bz2
Source5:	openoffice-wrapper.pl
Source6:	openoffice-xlate-lang.pl
Source7:	openoffice-dpack-lang.pl
Source8:	openoffice-licenses.tar.bz2
Source9:	openoffice-png48x48.tar.bz2
# <http://whiteboard.openoffice.org/doc/Samples/User/template/index.html>
Source10:	openoffice-template-extra.tar.bz2
# <http://whiteboard.openoffice.org/doc/Samples/User/gallery/index.html>
Source11:	openoffice-gallery-extra.tar.bz2
Source12:	openoffice-1.0.1-xmlparse.sh
Source13:	openoffice-gen-langpack.sh
Source14:	openoffice-transmute-help-errfile.pl
Source15:	openoffice.conf
Source16:	openoffice-create-instdb.pl
Source20:	openoffice-1.1.3-basque-archive.tar.bz2
Source21:	http://ooo.ximian.com/packages/ooo-icons-OOO_%{ximianiconsver}.tar.bz2
Source22:	openoffice-scale-icons.pl
Source23:	http://kde.openoffice.org/files/documents/159/1975/ooo-KDE_icons-OOO_%{kdeiconsver}.tar.bz2
# extracted from Ximian ooo-build-1.1.61/desktop
Source24:	ooo-ximian-desktop-icons.tar.bz2
Source25:	openoffice-mdk-splash.tar.bz2

# Localized helpcontent
# <ftp://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/helpcontent/>
#
Source100:	helpcontent_33_unix.tgz
Source101:	helpcontent_34_unix.tgz
Source102:	helpcontent_39_unix.tgz
Source103:	helpcontent_46_unix.tgz
Source104:	helpcontent_49_unix.tgz
Source105:	helpcontent_07_unix.tgz
Source106:	helpcontent_35_unix.tgz

# Czech, from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files/
Source107:	helpcontent_42_unix.tgz

Source108:	helpcontent_81_unix.tgz
Source109:	helpcontent_82_unix.tgz
Source110:	helpcontent_86_unix.tgz
Source111:	helpcontent_88_unix.tgz

# Slovak, from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files/
Source112:	helpcontent_43_unix.tgz

# Dutch, re-archived from http://borft.student.utwente.nl/openoffice/contrib/help_files/)
Source113:	helpcontent_31_unix.tgz

# Basque
Source114:	helpcontent_10_unix.tgz

# Slovenian, from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files/)
Source115:	helpcontent_50_unix.tgz

# Estonian, from ftp://ftp.linux.ee/pub/openoffice/contrib/helpcontent/et-unix.zip
# (incomplete, only 33% translated). Discontinued.
#Source116:	helpcontent_77_unix.tgz

# Portuguese, from ftp://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/helpcontent/helpcontent_55_unix.tgz
Source117:	helpcontent_55_unix.tgz

# Turkish, from ftp://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/helpcontent/helpcontent_90_unix.tgz
Source118:	helpcontent_90_unix.tgz


####################################################################
#
# Patches
#
####################################################################

##
## Fixes from CVS (1.1-branch)
##

##
## General patches
##

# MDK config (CFLAGS et al.)
Patch10:	openoffice-1.1.2-mdkconfig.patch.bz2

# Don't install python-2.2 stuff for now
Patch11:	openoffice-1.1.2-disable-python.patch.bz2

# Make sure we are using Java includes from fakejdk
Patch12:	openoffice-1.1-config-fakejdk-includes.patch.bz2

# Don't uglify HTML for iso 8859-2
Patch13:	openoffice-iso8859-2-html.patch.bz2

# Don't catch SIGSEGV and SIGILL
Patch14:	openoffice-1.0.2-sal-sigsegv.patch.bz2

# Check that we have the necessary help files. The rationale is if
# help/<lang>/err.html exists then, we have localized help data,
# possibly not installed. Otherwise, we won't have localized help and
# we try to fallback to English.
Patch16:	openoffice-1.0.1-help-fallback-en.patch.bz2

# Add POSTAPP<N>TARGET to be executed after APP targets are built
Patch17:	openoffice-1.1-postapp-target.patch.bz2

# Make setup look for a "localized" instdb.ins script specified by a
# new -LANG: option. Hackaround until I find a way to do that in scp
# or autoresponse files.
Patch18:	openoffice-1.0.3-setup-localized-instdb.patch.bz2

# Get command line arguments, the regular way and not from
# /proc/<pid>/cmdline [msec 4 fix]
#
# FIXME: fallback to the previous scheme during the build as I don't
# expect people building in msec 4, and not all *main.cxx are aware of
# that change (say idlc et al.)
Patch19:	openoffice-1.1-sal-main-cmdline.patch.bz2

# Add PDF converters both suitable for either view or press purposes
# as printer option to global psprint.conf
Patch20:	openoffice-1.1-psprint-pdf-drivers.patch.bz2

# Stop forwarding to stderr things we don't actually care of while
# testing for spooler availability
Patch21:	openoffice-1.1-psprint-nullify-stderr.patch.bz2

# Don't copy nor install at setup time standard libraries (libgcc_s, libstdc++)
Patch22:	openoffice-1.1.2-no-stdlibs.patch.bz2

# Hack up scpzip so that it doesn't duplicate everything 17 or more
# times than necessary
Patch23:	openoffice-1.0.2-scpzip.patch.bz2

# Use MDK colors
Patch24:	openoffice-1.1-mdkcolors.patch.bz2

# Use light hinting for freetype2 >= 2.1.3-3mdk
Patch25:	openoffice-ft-set-hint.patch.bz2

# Use CUPS to grab the corresponding PPD file
Patch26:	openoffice-1.1.3-psprint-cups.patch.bz2

# Handle SAL_DEBUGGER in soffice script
Patch27:	openoffice-1.1-SAL_DEBUGGER.patch.bz2

# Add debug for setup so that the /tmp directory is not removed
Patch28:	openoffice-debug-keepsetup.patch.bz2

# Fix broken inline assembly
Patch29:	openoffice-1.1-broken-asm.patch.bz2

# Make $HOME/Documents the work directory
Patch31:	openoffice-1.1-path-home-documents.patch.bz2

# Look for additional templates in <ooo>share/templates/extra/
Patch32:	openoffice-1.1-path-extra-templates.patch.bz2

# MySpell dictionaries are shared in /usr/share/dict/ooo
Patch35:	openoffice-1.1-path-myspell-dictionaries.patch.bz2

# Enable automatic spellchecking by default
Patch36:	openoffice-1.1-auto-spellchecking.patch.bz2

# Use default fonts available in the distribution
Patch37:	openoffice-1.1.4-mdkfonts.patch.bz2

# Disable KDE screensaver during presentations
Patch39:	openoffice-1.1-impress-no-kde-screensaver.patch.bz2

# Make font substitution algorithm match documentation (IZ #19591)
Patch40:	openoffice-1.1-vcl-font-subst.patch.bz2

##
## Ximian patches
##

# Add word count feature under Tools/Hyphenation item
Patch100:	openoffice-1.1-sw-word-count.patch.bz2

# Allow default to .doc/.xls/.ppt documents
Patch101:	openoffice-1.1.3-ooo-ms-defaults.patch.bz2

# Add support for 32-bit bitmaps and icons
Patch102:	openoffice-1.1.3-bmp32.patch.bz2

##
## STLport 4.6.2 patches
##

# Exception patch for STLport 4.5.3 and gcc3
Patch300:	STLport-%{stlver}-gcc3stdexcept.patch.bz2

# Nuke STLport badlink
Patch301:	STLport-4.5.3-nobadlink.patch.bz2

# Add support for MDK gcc-3.1.0 to STLport-4.5.3
# (aka. gxx_includedir is /usr/include/g++-v31/)
Patch302:	STLport-4.5.3-gcc31includes.patch.bz2

# Add support for gcc >= 3.1.1 includes
# (aka. gxx_includedir is /usr/include/c++/<gxx_version>/)
Patch303:	STLport-4.5.3-gcc3Xincludes.patch.bz2

# Add EXTRA_CXXFLAGS for RPM_OPT_FLAGS, some fixlets
Patch304:	STLport-%{stlver}-extra-cxxflags.patch.bz2

# Fixes for gcc 3.4.1
Patch305:	STLport-%{stlver}-gcc34.patch.bz2

# Fixes for istream, which dies when reading double from file
# (see http://www.stlport.com/dcforum/DCForumID6/1549.html)
Patch306:	STLport-4.6.2-istream.patch.bz2


##
## Enable system libraries & fonts
##

# Use system DB library
Patch400:       openoffice-1.1.4-system-db.patch.bz2

# Use system FreeType 2 library
Patch401:	openoffice-1.1-system-freetype.patch.bz2

# Use system getopt library
Patch402:       openoffice-1.1.2-system-getopt.patch.bz2

# Use system zlib
Patch403:	openoffice-1.1.2-system-zlib.patch.bz2

# Use system Xrender library
Patch404:	openoffice-1.1-system-xrender.patch.bz2

# Use system Vera fonts
Patch405:	openoffice-1.1.2-system-vera-fonts.patch.bz2

##
## 64-bit ports (incomplete!)
##
Patch500:       openoffice-1.0.2-64bit-fixes-idlc.patch.bz2
Patch501:       openoffice-1.0.2-64bit-fixes-dmake.patch.bz2
Patch502:       openoffice-1.0.2-64bit-fixes-odbc.patch.bz2
# TODO: split as it grows and stabilizes
Patch503:       openoffice-1.0.2-64bit-fixes.patch.bz2

Patch540:       openoffice-1.0.2-x86_64-config.patch.bz2
Patch541:       openoffice-1.0.2-x86_64-solenv.patch.bz2
Patch542:       openoffice-1.0.2-x86_64-sal.patch.bz2
Patch543:       openoffice-1.0.2-x86_64-cppu.patch.bz2
Patch544:       openoffice-1.0.2-x86_64-bridges.patch.bz2
Patch545:       openoffice-1.0.2-x86_64-psprint.patch.bz2
Patch546:       openoffice-1.0.2-x86_64-nas-fixes.patch.bz2
# FIXME: Colateral, induced by previous patch on 32-bit platform
Patch599:	openoffice-1.0.2-64bit-fixes-colateral.patch.bz2


# (gg) Patch many typos in italian translation
Patch920:	openoffice-1.1.3-final-lang-typo-italian.patch.bz2
Patch921:	openoffice-1.1.3-lang-italian-fontooowizard.patch.bz2

# (gg) Patch for czech localization
# (built using GSI files from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files)
Patch935: openoffice-1.1.4-lang-czech-fixes.patch.bz2
# (gg) Patch for slovak thesaurus langcode
Patch936: openoffice-1.1.4-slovak-thesaurus.patch.bz2

# (gg) Patch for estonian localization
# (built using GSI files from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files)
Patch940: openoffice-1.1.3-lang-estonian-fixes.patch.bz2

# (gg) Patch for welsh localization
Patch950: openoffice-1.1.3-lang-welsh-fixes.patch.bz2

# (gg) Patch for using Sazanami fonts instead of Kochi for Japanese
Patch960: openoffice-1.1.4-jp-sazanami_font.patch.bz2

# (gg) Patch for basque localization
Patch970: openoffice-1.1.3-lang-basque-fixes.patch.bz2

# (gg) Patch for using chinese Newsung fonts
Patch980: openoffice-1.1.4-mdkfonts-newsung.patch.bz2

#
# Other patches
#
# (gg) Patch for getting OOo compiling with freetype2 2.1.7
Patch1000:	openoffice-1.1-ft217.patch.bz2

# (gg) Patch for ISSUE #18588 (officecfg and extracting schema)
Patch1012:	openoffice-1.1-remove-cfg-schema-18588.patch.bz2

# (gg) Patch for removing gtk from crashrep (merged from Janik's CZ OOo archives)
Patch1013:	openoffice-1.1-remove-gtk-from-crashrep.patch.bz2

# (gg) Patch for fixing not translatable string in Tools/Options/External applications
Patch1015:	openoffice-1.1-remove-word-option-15640.patch.bz2

# (gg) Fixes export to word95/6 for non ascii languages (ximian, http://www.openoffice.org//issues/show_bug.cgi?id=33074)
Patch1016:	openoffice-1.1.2-export-word95.patch.bz2

# (gg) Patch for disabling default OpenGL 3D acceleration (safer)
Patch1017:	openoffice-1.1-disabledefaultopengl.patch.bz2

# (gg) Patch for excel5 & 95 filters (merged from Janik's CZ OOo archives)
Patch1018:	openoffice-1.1-excel5_95.patch.bz2

# (gg) Patch fir ISSUE #15909 (merged from Janik's CZ OOo archives)
Patch1019:	openoffice-1.1-caption-15909.patch.bz2

# (gg) Patch for building under kernel 2.6 (from Gentoo/JJ)
Patch1020:	openoffice-1.1-linux26-nptl.patch.bz2

# (gg) Patch for adding zoom combobox (from Ximian OOo_1_1/zoom-combobox.diff)
Patch1021:      openoffice-1.1-zoom-combobox.patch.bz2

# (gg) Patch for fixing UTF-8 strings in greek menus (must be in ISO8859-7 instead)
Patch1023:	openoffice-1.1.2-fixutf8-el.patch.bz2

# (gg) Patch for use JDK 1.4.2
Patch1027: openoffice-1.1.2-jdk142.patch.bz2

# (gg) Mozilla instead of Netscape (from Ximian)
Patch1028: openoffice-1.1.2-mozilla-not-nescape.patch.bz2

# (gg) Fix the splash to not screwup on redraw (from Ximian, IZ#19646, http://www.openoffice.org/issues/show_bug.cgi?id=19646)
Patch1029: openoffice-1.1.2-gui-splash-redraw.patch.bz2

# (gg) Don't let splash screen take over (from Ximian, IZ#23609, http://www.openoffice.org/issues/show_bug.cgi?id=23609)
Patch1030: openoffice-1.1.4-no-splash-takeover.patch.bz2

# (gg) Don't do hundreds of sched_yields; (from Ximian, IZ#9277, IZ#22761, http://www.openoffice.org/issues/show_bug.cgi?id=9277)
Patch1031: openoffice-1.1.2-thread-yield.patch.bz2

# (gg) Fix svtools build dependencies (from Ximian, bug http://www.openoffice.org/issues/show_bug.cgi?id=28379)
Patch1033: openoffice-1.1.2-build-svtools-dep.patch.bz2

# (gg) Make officecfg parallel-build safe (from Ximian)
Patch1034: openoffice-1.1.2-officecfg-parallel-build-fix.patch.bz2

# (gg) Defensive coding for mapmode (from Ximian, bug http://www.openoffice.org/issues/show_bug.cgi?id=19496)
Patch1035: openoffice-1.1.2-crash-mapmode.patch.bz2

# (gg) Fix bugs for exported document hanging OOo on 'Slide show' (from Ximian, bug http://www.openoffice.org/issues/show_bug.cgi?id=26747)
Patch1036: openoffice-1.1.2-crash-escherex.patch.bz2

# (gg) Make the font scaling sane, use Xft dpi setting (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=15507)
Patch1038: openoffice-1.1.2-gui-font-scale.patch.bz2
Patch1039: openoffice-1.1.2-font-antialias-size.patch.bz2

# (gg) Font sizing - different from desktop & desktop settings (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=16682)
Patch1040: openoffice-1.1.2-font-size-unbreak.patch.bz2

# (gg) Use default font size to 10pt instead of 8pt (from Ximian)
Patch1041: openoffice-1.1.2-gui-font-default-size.patch.bz2

# (gg) Make the default bullet symbol larger (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=21829)
Patch1042: openoffice-1.1.2-sw-default-bullet.patch.bz2

# (gg) Let bullet symbols don't appear as fields (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=21916)
Patch1043: openoffice-1.1.2-sw-bullet-not-field.patch.bz2

# (gg) Insert symbol defaults to the Symbol font, not a random one (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=15512)
Patch1044: openoffice-1.1.2-sw-insert-symbol.patch.bz2

# (gg) Fix hang on reimporting a .doc with more than 4095 styles (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=26550)
Patch1045: openoffice-1.1.2-sw-ms-fmt-import.patch.bz2

# (gg) Improve MS import/export for .doc with formulas (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=8276)
Patch1046: openoffice-1.1.2-ms-filter-convert.patch.bz2

# (gg) Avoid spell checker underlined words to be exported (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=21440)
Patch1047: openoffice-1.1.2-sd-export-hide-spell-check.patch.bz2

# (gg) Avoid DNS lookup for conversion of domain names to FQDN, which is causing slow downs (from LFS)
Patch1048: openoffice-1.1.2-domainname.patch.bz2

# (gg) Don't pack .orig and .bak files to the english help content (from Ximian)
Patch1050: openoffice-1.1.2-helpcontent-no-bak.patch.bz2

# (gg) use KDE default programs for helper (from Ximian)
Patch1053: openoffice-1.1.2-helper-programs-kde.patch.bz2

# (gg) Don't link Xinerama lib statically
Patch1054: openoffice-1.1.3-xinerama-nostatic.patch.bz2

# (gg) mark the files in share/template/<lang>/wizard/bitmap as lang specific (from Ximian)
Patch1055: openoffice-1.1.2-build-wizard-bitmap.patch.bz2

# (gg) Use pt not px as font unit (from ximian, http://www.openoffice.org/issues/show_bug.cgi?id=15507)
Patch1059: openoffice-1.1.2-gtk-pt-not-pixel.patch.bz2

# (gg) Use system font (from ximian, http://www.openoffice.org/issues/show_bug.cgi?id=16683)
Patch1060: openoffice-1.1.2-gui-ft-use-system-font.patch.bz2

# (gg) Workaround for Autopilot bug (http://qa.mandrakesoft.com/show_bug.cgi?id=6559)
# [basically revert Patch32]
Patch1061: openoffice-1.1.2-autopilot.patch.bz2

# (gg) Patch for using libdb4.2
Patch1062: openoffice-1.1.4-db42.patch.bz2

# (gg) Icons (Ximian set)
# Compositing fixes for alpha bg's
Patch1063: openoffice-1.1.3-gui-icon-composite.patch.bz2
Patch1064: openoffice-1.1.3-gui-tbx-ctrl-bg.patch.bz2
# Fix 'new' button sizing (from ximian, #15208 http://www.openoffice.org/issues/show_bug.cgi?id=15208)
Patch1065: openoffice-1.1.3-gui-tbx-new-size.patch.bz2
# (gg) Some of the new help & other icons needed (from ximian)
Patch1066: openoffice-1.1.3-gui-new-icons.patch.bz2
# (gg) Transfer alpha masks around (from ximian)
Patch1067: openoffice-1.1.3-icon-render.patch.bz2
# (gg) Make insensitive icons look pleasant (from ximian)
Patch1068: openoffice-1.1.3-gui-insensitive.patch.bz2
# (gg) High quality interpolate for tbx button selector (from ximian)
Patch1069: openoffice-1.1.3-gui-tbxcust.patch.bz2
# (gg) Image loading needs to split off the alpha mask (from ximian)
Patch1070: openoffice-1.1.3-gui-image-load.patch.bz2
# (gg) Fix some broken icon compositing foo (from ximian, http://www.openoffice.org/issues/show_bug.cgi?id=20470)
Patch1071: openoffice-1.1.3-icon-masks.patch.bz2
# (gg) Fix htmltoolbar image alpha (from ximian)
Patch1072: openoffice-1.1.3-gui-alpha-hypertoolbar.patch.bz2
# (gg) GUI toolboxes (toolbox separators look saner, mouseover triangles
# resize & make set large icons as the default, etc.) (from Ximian)
Patch1073: openoffice-1.1.3-gui-toolbox.patch.bz2
Patch1074: openoffice-1.1.3-gui-toolbox-large-icons1.patch.bz2
Patch1075: openoffice-1.1.3-gui-toolbox-tristate.patch.bz2
# (gg) Add 'merge & center' toolbar button (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=33126)
# (required a FID_MERGE_CENTER definition by Patch1066 [gui-new-icons])
Patch1076: openoffice-1.1.3-sc-merge-cell.patch.bz2
# (gg) Fix menu bloat / icon rendering / layout issues (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=17937)
Patch1077: openoffice-1.1.3-gui-menu-fixes1.patch.bz2
Patch1078: openoffice-1.1.3-gui-menu-check-images.patch.bz2
Patch1079: openoffice-1.1.3-gui-menu-check-render.patch.bz2
Patch1080: openoffice-1.1.3-gui-menu-checkitems.patch.bz2
# (gg) Fix default palette sizing (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=19158)
Patch1081: openoffice-1.1.3-gui-tbx-palette.patch.bz2
Patch1082: openoffice-1.1.3-gui-menu-new-wizard-translations.patch.bz2
Patch1083: openoffice-1.1.3-gui-toolbox-prelight.patch.bz2

# (gg) Patch for let Dialog remembers file save path, type (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=17967)
Patch1087: openoffice-1.1.3-print-dialog.patch.bz2
# (gg) warn the user about printer errors (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=17966)
Patch1088: openoffice-1.1.3-print-error.patch.bz2
# (gg) Avoid registration dialog at startup (from Ximian)
Patch1089: openoffice-1.1.3-gui-startup-declutter.patch.bz2
# (gg) Startup notification fixed (from Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=18970)
Patch1090: openoffice-1.1.3-startup-fix.patch.bz2
# (gg) Fix doc load crasher (from Ximian, http://bugzilla.ximian.com/show_bug.cgi?id=59373)
Patch1091: openoffice-1.1.3-sw-crash-fix.patch.bz2
# (gg) Get KDE font weight and size, and use menuFont for menus (Ximian)
Patch1092: openoffice-1.1.3-gui-fonts-kde.patch.bz2
# (gg) Fix ugly rulers with larger font sizes (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=22098)
Patch1093: openoffice-1.1.3-gui-scale-ruler.patch.bz2
# (gg) Use www-browser as default browser
Patch1094: openoffice-1.1.3-browser-mdk.patch.bz2
# (gg) Fix doc load crasher (Ximian, http://bugzilla.ximian.com/show_bug.cgi?id=64030)
Patch1095: openoffice-1.1.3-sw-import-crash.patch.bz2
# (gg) Fix a security problem with tmp files (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=33357, CAN-2004-0752)
Patch1096: openoffice-1.1.3-security-tmp-dir.patch.bz2
# (gg) Fix impress spellcheck (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=32320)
Patch1097: openoffice-1.1.3-crash-sd-spellcheck.patch.bz2
# (gg) Use customized MDK splash screens
Patch1098: openoffice-1.1.3-mdk-splash.patch.bz2
# (gg) Fix checkbox field crash #33980 (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=33980)
Patch1099: openoffice-1.1.3-crash-sw-checkbox.patch.bz2
# (gg) Fix doc import crasher (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=29731)
Patch1100: openoffice-1.1.3-crash-sw-redline.patch.bz2
# (gg) Fix RTF import filter  (http://www.openoffice.org/issues/show_bug.cgi?id=35653)
Patch1101: openoffice-1.1.4-rtf-hex-i35653.patch.bz2
# (gg) Fix transex3 merging (Ximian, http://www.openoffice.org/issues/show_bug.cgi?id=37811)
Patch1102: openoffice-1.1.4-transex3-gsi-format-fixes.patch.bz2
# (gg) Exit from Print Preview with Escape key (http://www.openoffice.org/issues/show_bug.cgi?id=35777)
Patch1103: openoffice-1.1.4-sw-escape-print-preview.patch.bz2
# (gg) Disable optimization on some file to avoid paste problems from browsers (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=110934)
Patch1104: openoffice-1.1.4-unotools-image-paste-crash-fix.patch.bz2
# (gg) Fix crashes due to parsing a missing SummaryInformation stream (http://www.openoffice.org/issues/show_bug.cgi?id=36280)
Patch1105: openoffice-1.1.4-sfx2-no-summary-crash-fix.patch.bz2
# (gg) Added Calc keyboard shortcuts (http://www.openoffice.org/issues/show_bug.cgi?id=38108)
Patch1106: openoffice-1.1.4-calc-new-acceleration.patch.bz2
# Optimal Page Wrap should be default for graphics insertion (http://bugzilla.ximian.com/show_bug.cgi?id=59831)
Patch1107: openoffice-1.1.4-writer-default-as-optimal-page-wrap.patch.bz2
# Fix crasher in online layout mode (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137969)
Patch1108: openoffice-1.1.4-sw-online-layout-crash-fix.patch.bz2
# (gg) Fall back to english and .vor files if no .stw/.sdw template can be found (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118742)
Patch1109: openoffice-1.1.4-sw-autopilot-fallback-to-vor.patch.bz2
Patch1110: openoffice-1.1.4-sw-template-fallback-to-english.patch.bz2
# (gg) dlopen() libGL.so.1 instead of libGL.so (Ximian)
Patch1111: openoffice-1.1.4-libgl-soname.patch.bz2


# Patches for compiling under gcc 3.4.1
#######################################
# (gg) IZ #28294
Patch1200: openoffice-1.1.2-gcc341-solenv.patch.bz2

# (gg) IZ #28294
Patch1201: openoffice-1.1.2-gcc341-cppu.patch.bz2

# (gg) IZ #28307, http://www.openoffice.org/nonav/issues/showattachment.cgi/14993/soltools-gcc34.diff
Patch1202: openoffice-1.1.2-gcc341-soltools.patch.bz2

# (gg) IZ #28450, http://www.openoffice.org/nonav/issues/showattachment.cgi/15682/xml2cmp-gcc34.patch
Patch1203: openoffice-1.1.2-gcc341-xml2cmp.patch.bz2

# (gg) IZ #28452, http://www.openoffice.org/nonav/issues/showattachment.cgi/14996/sal-gcc34.patch
Patch1204: openoffice-1.1.2-gcc341-sal.patch.bz2

# (gg) IZ #28777, http://www.openoffice.org/nonav/issues/showattachment.cgi/15038/store-gcc34.patch
Patch1205: openoffice-1.1.2-gcc341-store.patch.bz2

# (gg) IZ #28928, http://www.openoffice.org/nonav/issues/showattachment.cgi/15075/autodoc-gcc34.patch
Patch1206: openoffice-1.1.2-gcc341-autodoc.patch.bz2

# (gg) IZ #31209, http://www.openoffice.org/nonav/issues/showattachment.cgi/16301/sal.patch
Patch1207: openoffice-1.1.2-gcc341-saltypo.patch.bz2

# (gg) IZ #31260, http://www.openoffice.org/nonav/issues/showattachment.cgi/16327/bridges.gcc34.patch
Patch1208: openoffice-1.1.2-gcc341-bridges.patch.bz2

# (gg) IZ #31261, http://www.openoffice.org/nonav/issues/showattachment.cgi/16328/configmgr.gcc34.patch
Patch1209: openoffice-1.1.2-gcc341-configmgr.patch.bz2

# (gg) IZ #31262, http://www.openoffice.org/nonav/issues/showattachment.cgi/16329/comphelper.gcc34.patch
Patch1210: openoffice-1.1.2-gcc341-comphelper.patch.bz2

# (gg) IZ #31264, http://www.openoffice.org/issues/show_bug.cgi?id=31264
Patch1211: openoffice-1.1.3-gcc341-psprint1.patch.bz2

# (gg) IZ #31438, http://www.openoffice.org/nonav/issues/showattachment.cgi/16444/ucb.patch
Patch1212: openoffice-1.1.2-gcc341-ucb.patch.bz2

# (gg) IZ #31445, http://www.openoffice.org/nonav/issues/showattachment.cgi/16447/xmloff.gcc34.patch
Patch1213: openoffice-1.1.2-gcc341-xmloff.patch.bz2

# (gg) IZ #28784, http://www.openoffice.org/issues/show_bug.cgi?id=28784
Patch1214: openoffice-1.1.2-gcc341-icu.patch.bz2

# (gg) IZ #31424
Patch1215: openoffice-1.1.2-gcc341-lru.patch.bz2

# (gg) IZ #31439
Patch1216: openoffice-1.1.2-gcc341-geometrycontrol.patch.bz2

# (gg) IZ #28930
Patch1217: openoffice-1.1.2-gcc341-sablot052pch.patch.bz2

# (gg) from CWS
Patch1218: openoffice-1.1.2-gcc341-cppuany.patch.bz2

# (gg) IZ #31469, http://www.openoffice.org/nonav/issues/showattachment.cgi/16457/desktop.diff
Patch1219: openoffice-1.1.2-gcc341-desktop-app.patch.bz2

# (gg) IZ #31479, http://www.openoffice.org/nonav/issues/showattachment.cgi/16465/basic.gcc34.patch
Patch1220: openoffice-1.1.2-gcc341-basic-sbdef.patch.bz2

# (gg) IZ #31532, http://www.openoffice.org/nonav/issues/showattachment.cgi/16485/cppuhelper.patch
Patch1221: openoffice-1.1.2-gcc341-cppuhelper-implbase.patch.bz2

# (gg) IZ #31534
Patch1222: openoffice-1.1.2-gcc341-31534.patch.bz2

# (gg) IZ #31537, http://www.openoffice.org/nonav/issues/showattachment.cgi/16487/bf_forms.patch
Patch1223: openoffice-1.1.2-gcc341-forms-groupmanager.patch.bz2

# (gg) IZ #31542, http://www.openoffice.org/nonav/issues/showattachment.cgi/16490/bf_svx.patch
Patch1224: openoffice-1.1.2-gcc341-svx-unomaster.patch.bz2

# (gg) IZ #31542, http://www.openoffice.org/nonav/issues/showattachment.cgi/16492/part2
Patch1225: openoffice-1.1.2-gcc341-svx-shapetypehandler.patch.bz2

# (gg) IZ #31568, http://www.openoffice.org/nonav/issues/showattachment.cgi/16504/svx.patch
Patch1226: openoffice-1.1.2-gcc341-svx-accessshape.patch.bz2

# (gg) IZ #31580, http://www.openoffice.org/nonav/issues/showattachment.cgi/16508/binfilter.patch
Patch1227: openoffice-1.1.2-gcc341-31580.patch.bz2

# (gg) IZ #31592, http://www.openoffice.org/nonav/issues/showattachment.cgi/16512/extensions.patch
Patch1228: openoffice-1.1.2-gcc341-extensions-plctrl.patch.bz2

# (gg) IZ #31595, http://www.openoffice.org/issues/show_bug.cgi?id=31595
Patch1229: openoffice-1.1.2-gcc341-constreferences.patch.bz2

# (gg) IZ #31601, http://www.openoffice.org/nonav/issues/showattachment.cgi/16515/sc.patch
Patch1230: openoffice-1.1.2-gcc341-31601.patch.bz2

# (gg) IZ #31464
Patch1231: openoffice-1.1.2-gcc341-31464.patch.bz2

# (gg) IZ #31725
Patch1232: openoffice-1.1.2-gcc341-31725.patch.bz2

# (gg) Patches for new ISO scoping in for
Patch1233: openoffice-1.1.3-gcc341-ISOfor-autodoc-cgate.patch.bz2
Patch1234: openoffice-1.1.3-gcc341-ISOfor-autodoc-cxcpp.patch.bz2
Patch1235: openoffice-1.1.3-gcc341-ISOfor-autodoc-hdimpl.patch.bz2
Patch1236: openoffice-1.1.3-gcc341-ISOfor-autodoc-outposition.patch.bz2
Patch1237: openoffice-1.1.3-gcc341-ISOfor-autodoc-prpr.patch.bz2
Patch1238: openoffice-1.1.3-gcc341-ISOfor-cppu-prim.patch.bz2

# (gg) Other patches for module "cppu" from CWS
Patch1240: openoffice-1.1.2-gcc341-cppu-type.patch.bz2

# (gg) Patch for gcc341 (patches merged from 1200->1240)
Patch1250: openoffice-1.1.3-gcc341-ghibo1.patch.bz2
# (gg) Patch for gcc 341 from Hanno Meyer
Patch1251: openoffice-1.1.3-gcc341-hannomeyer.patch.bz2

# (gg) From http://www.openoffice.org/issues/show_bug.cgi?id=34480
Patch1260: openoffice-1.1.3-gcc341-noinline-i34480.patch.bz2
Patch1261: openoffice-1.1.4-sysmozilla.patch.bz2
Patch1262: openoffice-1.1.4-gcc341-i39481.patch.bz2

Patch1280:	openoffice-1.1.4-heapbug-CAN-2005-0941.patch.bz2

%description
OpenOffice.org is an Open Source, community-developed, multi-platform
office productivity suite. It includes the key desktop applications,
such as a word processor, spreadsheet, presentation manager, forumula
editing and drawing program, with a user interface and feature set
similar to other office suites. Sophisticated and flexible,
OpenOffice.org also works transparently with a variety of file
formats, including Microsoft Office.

Languages available in OpenOffice.org-l10n-* packages include: English,
French, German, Spanish, Italian, Dutch, Swedish, Finnish, Polish,
Russian, Chinese, Japanese, Korean, Danish, Greek, Turkish, Czech,
Catalan, Arab, Slovak, Basque, Norwegian Bokmal, Norwegian Nynorsk,
Welsh, Slovenian.

Localized help files available in OpenOffice.org-help-* packages
include: English, French, German, Spanish, Italian, Swedish, Russian,
Finnish, Czech, Japanese, Korean, Chinese, Slovak, Basque, Slovenian.

Spell-checking and hyphenation dictionaries are available in myspell-*
and myspell-hyph-* packages, respectively. Please install the ones
that better suit your language needs.

Usage: Simply type "ooffice" to run OpenOffice.org or select the
requested component (Writer, Calc, Draw, Impress, etc.) from your
desktop menu. The ooffice wrapper script will install a few files in
the user's home, if necessary.

   * oocalc: OpenOffice.org Calc
   * oodraw: OpenOffice.org Draw
   * ooimpress: OpenOffice.org Impress
   * oomath: OpenOffice.org Math
   * oowriter: OpenOffice.org Writer

####################################################################
#
# Extra subpackages
#
####################################################################

%package libs
Summary: OpenOffice.org shared libraries
Group: Office

%description libs
OpenOffice.org is an Open Source, community-developed, multi-platform
office productivity suite.  This package includes its shared
libraries.  You need to install this to use OpenOffice.org.

####################################################################
#
# Language subpackages
#
# Syntax: gen-langpack.sh (DESC|FILES) (L10N|HELP) <languages> <language xlator>
#
# NOTES:
# 1. Make sure arguments are correct first!
# 2. DESC generate the %package and %description sections
# 3. FILES generate the package %files section,
#    >> Assume we correctly generate filelist.<isocode> lists
#
####################################################################
%{expand:%(/bin/sh %{SOURCE13} DESC HELP %{helplangs1} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} DESC HELP %{helplangs2} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} DESC L10N %{languages1} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} DESC L10N %{languages2} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} DESC L10N %{languages3} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} DESC L10N %{languages4} %{SOURCE6})}


%prep
%setup0 -q -c -n OOo_%{version}_src -a 1 -a 8 -a 21 -a 23 -a 25
# remove mozilla binary libs
%if !%{build_mozilla}
rm -f moz/zipped/*.zip
%endif

%patch10 -p1 -b .mdkconfig
%patch11 -p1 -b .disable-python

%if !%use_sunjdk
if [[ -z "$OVERRIDE_JAVA_HOME" ]]; then
%patch12 -p1 -b .config-fakejdk-includes
fi
%endif

%patch13 -p1 -b .iso8859-2-html
%patch14 -p1 -b .sal-sigsegv
%patch16 -p1 -b .help-fallback-en
%patch17 -p1 -b .postapp-target
%patch18 -p1 -b .setup-localized-instdb
%patch19 -p1 -b .sal-main-cmdline
%patch20 -p1 -b .psprint-pdf-drivers
%patch21 -p1 -b .psprint-nullify-stderr
%patch22 -p1 -b .no-stdlibs
%patch23 -p1 -b .scpzip
perl -pi -e 'BEGIN{ $H = join " || ", map { "nLang == " . int $_ }
                    (split / /, `perl %{SOURCE6} -p %{helplangs}`); }
             s/\@HELP\@/$H/' scptools/source/linker/scpzip.cxx
%patch24 -p1 -b .mdkcolors
%if %{build_ft_lighthint}
%patch25 -p1 -b .ft-set-lighthint
%endif

%patch26 -p1 -b .psprint-cups-PPD
%patch27 -p1 -b .SAL_DEBUGGER
%patch28 -p0 -b .debug-keepsetup
%patch29 -p1 -b .asmfixes
%patch31 -p1 -b .path-home-documents
%patch32 -p1 -b .path-extra-templates
%patch35 -p1 -b .path-myspell-dictionaries
%patch36 -p1 -b .auto-spellchecking
%patch37 -p1 -b .mdkfonts
%patch39 -p1 -b .impress-no-kde-screensaver
#%patch40 -p1 -b .vcl-font-subst

%patch100 -p1 -b .sw-word-count
%patch101 -p1 -b .ooo-ms-defaults
%patch102 -p1 -b .bmp32

cd STLport-%{stlver}
%patch300 -p1 -b .gcc3stdexcept
%patch301 -p1 -b .nobadlink
#%patch302 -p1 -b .gcc31includes
#%patch303 -p1 -b .gcc3Xincludes
%patch304 -p1 -b .extra-cxxflags
%patch305 -p1 -b .gcc34
%patch306 -p1 -b .istream
cd ..

%patch400 -p1 -b .system-db
perl -pi -e "s/^(BERKELEYLIBMAJOR)=.+/\1=%{libdb_major}/;" \
         -e "s/^(BERKELEYLIBMINOR)=.+/\1=%{libdb_minor}/;" \
         solenv/inc/libs.mk
%if %{libdb_major}%{libdb_minor} >= 41
DB_TXNID="null,"
%endif
perl -pi -e "s/DB_TXNID/$DB_TXNID/" \
xmlhelp/source/com/sun/star/help/{HelpDatabases,HelpIndexer,CreateDb}.java
%patch401 -p1 -b .system-freetype
%patch402 -p1 -b .system-getopt
%patch403 -p1 -b .system-zlib
%patch404 -p1 -b .system-xrender
%patch405 -p1 -b .system-vera-fonts

%if 0
%patch500 -p1 -b .64bit-fixes-idlc
%patch501 -p1 -b .64bit-fixes-dmake
%patch502 -p1 -b .64bit-fixes-odbc
%patch503 -p1 -b .64bit-fixes
%patch540 -p1 -b .x86_64-config
%patch541 -p1 -b .x86_64-solenv
%patch542 -p1 -b .x86-64-sal
%patch543 -p1 -b .x86_64-cppu
%patch544 -p1 -b .x86_64-bridges
%patch545 -p1 -b .x86_64-psprint
%patch546 -p1 -b .x86_64-nas-fixes
%patch599 -p1 -b .64bit-fixes-colateral
%endif

# basque
#%patch909 -p1 -b .basque-bef
#%patch910 -p1 -b .basque-oth
#%patch911 -p1 -b .basque-ext

# translation fixes
%patch920 -p1 -b .typoita
%patch921 -p1 -b .ooowizit
%patch935 -p1 -b .czech
%patch936 -p1 -b .slovak-thesaurus
%patch940 -p1 -b .estonian
%patch950 -p1 -b .welsh
%patch960 -p1 -b .sazanami
%patch970 -p1 -b .ooowizeu
%patch980 -p1 -b .newsung

# other
%patch1000 -p1 -b .ft217
%patch1012 -p1 -b .18588
%patch1013 -p1 -b .crashrep_gtk
%patch1015 -p1 -b .remword
%patch1016 -p1 -b .word6_95
%patch1017 -p1 -b .opengl
%patch1018 -p1 -b .excel5_95
%patch1019 -p1 -b .15909
#%patch1020 -p1 -b .linux26
%patch1021 -p1 -b .zoom_combobox
%patch1023 -p1 -b .utf8_el
%patch1027 -p1 -b .jdk142
%patch1028 -p1 -b .mozilla
%patch1029 -p1 -b .guisplashredraw
%patch1030 -p1 -b .splashtakeover
%patch1031 -p1 -b .thread
%patch1033 -p1 -b .svtoolsdep
%patch1034 -p1 -b .officfgparallel
%patch1035 -p1 -b .crashmap
%patch1036 -p1 -b .crashesch
%patch1038 -p1 -b .guifontscale
%patch1039 -p1 -b .fontantialias
%patch1040 -p1 -b .fontsizeunbrk
%patch1041 -p1 -b .fontdefsize
%patch1042 -p1 -b .defbullet
%patch1043 -p1 -b .bulletnotfield
%patch1044 -p1 -b .insertsymb
###%patch1045 -p1 -b .swmsfmt
%patch1046 -p1 -b .msfilterconv
%patch1047 -p1 -b .hidespell
%patch1048 -p1 -b .domainname
%patch1050 -p1 -b .helpnobak
%patch1053 -p1 -b .helperkde
%patch1054 -p1 -b .xinestatic
%patch1055 -p1 -b .bitwiz
%patch1059 -p1 -b .ptnotpx
#%patch1060 -p1 -b .guisysfont
%patch1061 -p1 -b .autopilot
%if %{mdkversion} >= 1010
%patch1062 -p1 -b .db42
%endif

%if %{use_ximianicons}
%patch1063 -p1 -b .gui-icon-composite
%patch1064 -p1 -b .tbx-ctrl-bg
%patch1065 -p1 -b .gui-tbx-new-size
%patch1066 -p1 -b .gui-new-icons
%patch1067 -p1 -b .icon-render
%patch1068 -p1 -b .gui-insensitive
%patch1069 -p1 -b .gui-tbxcust
%patch1070 -p1 -b .gui-image-load
%patch1071 -p1 -b .icon-masks
%patch1072 -p1 -b .gui-alpha-hypertool
%patch1073 -p1 -b .gui-toolbox
%patch1074 -p1 -b .gui-toolbox-large
%patch1075 -p1 -b .gui-tristate
%patch1076 -p1 -b .sc-merge-cell
%patch1077 -p1 -b .gui-menu-fixes
%patch1078 -p1 -b .gui-menu-check-images
%patch1079 -p1 -b .gui-menu-check-render
%patch1080 -p1 -b .gui-menu-checkitems
%patch1081 -p1 -b .gui-tbx-palette
%patch1082 -p1 -b .gui-menu-new-wiz-transl
%patch1083 -p1 -b .gui-toolbox-prelight
%endif

%patch1087 -p1 -b .print-dialog
%patch1088 -p1 -b .print-error
%patch1089 -p1 -b .gui-startup-declutter
%patch1090 -p1 -b .startup-fix
%patch1091 -p1 -b .sw-crash-fix
%patch1092 -p1 -b .gui-fonts-kde
%patch1093 -p1 -b .gui-scale-ruler
%patch1094 -p1 -b .mdkdesktop
%patch1095 -p1 -b .sw-import-crash
%patch1096 -p1 -b .security-tmp-dir
%patch1097 -p1 -b .crash-sd-spellcheck
%patch1098 -p1 -b .mandrake-splash
%patch1099 -p1 -b .crash-sw-checkbox
###%patch1100 -p1 -b .sw-redline
%patch1101 -p1 -b .rtf-35653
%patch1102 -p1 -b .transex3-gsi-format-fixes
%patch1103 -p1 -b .sw-escape-print-preview
%patch1104 -p1 -b .unotools-image-paste-crash-fix
%patch1105 -p1 -b .sfx2-no-summary-crash-fix
%patch1106 -p1 -b .calc-new-acceleration
%patch1107 -p1 -b .writer-default-as-optimal-page-wrap
%patch1108 -p1 -b .sw-online-layout-crash-fix
%patch1109 -p1 -b .sw-autopilot-fallback-to-vor
%patch1110 -p1 -b .sw-template-fallback-to-english
%patch1111 -p1 -b .libgl-soname

# Patches for gcc 3.4.1
%if %use_gcc341
%patch1200 -p1 -b .gcc341solenv
%patch1201 -p1 -b .gcc341cppu
%patch1202 -p1 -b .gcc341soltools
%patch1203 -p1 -b .gcc341xml2cmp
%patch1204 -p1 -b .gcc341sal
%patch1205 -p1 -b .gcc341store
%patch1206 -p1 -b .gcc341autodoc
%patch1207 -p1 -b .gcc341saltypo
%patch1208 -p1 -b .gcc341bridges
%patch1209 -p1 -b .gcc341configmgr
%patch1210 -p1 -b .gcc341comphelper
%patch1211 -p1 -b .gcc341psprint
%patch1212 -p1 -b .gcc341ucb
%patch1213 -p1 -b .gcc341xmloff
%patch1214 -p1 -b .gcc341icu
%patch1215 -p1 -b .gcc341lru
%patch1216 -p1 -b .gcc341geoctrl
%patch1217 -p1 -b .gcc341sablot
%patch1218 -p1 -b .gcc341cppuany
%patch1219 -p1 -b .gcc341desktopapp
%patch1220 -p1 -b .gcc341basicsbdef
%patch1221 -p1 -b .gcc341cppuhelperimpl
%patch1222 -p1 -b .gcc341_31534
%patch1223 -p1 -b .gcc341formsgrp
%patch1224 -p1 -b .gcc341svxuno
%patch1226 -p1 -b .gcc341svxaccess
%patch1227 -p1 -b .gcc341_31580
%patch1228 -p1 -b .gcc341extens
%patch1229 -p1 -b .gcc341constref
%patch1230 -p1 -b .gcc341_31601
%patch1231 -p1 -b .gcc341_31464
%patch1232 -p1 -b .gcc341_31725
%patch1233 -p1 -b .gcc341autodoccfate
%patch1234 -p1 -b .gcc341autodoccxcpp
%patch1235 -p1 -b .gcc341autodochdiimpl
%patch1236 -p1 -b .gcc341autodocoutpos
%patch1237 -p1 -b .gcc341autodocprpr
%patch1238 -p1 -b .gcc341cppu_prim
%patch1240 -p1 -b .gcc341cppu

#%patch1250 -p1 -b .gcc341_ghibo1
%patch1251 -p1 -b .gcc341_hanno
%patch1260 -p1 -b .gcc341_noinline
%patch1261 -p1 -b .gcc341_sysmoz
%patch1262 -p1 -b .gcc341_i39481
%endif

%patch1280 -p1 -b .can-2005-0941


# External packages
%setup2 -q -T -D -a 2 -n OOo_%{version}_src
(cd gpc231; mv gpc.{c,h} ../external/gpc)


# Install localized helpcontent
cd helpcontent/unx
# don't care about main_transform.xsl, it looks safe to overwrite
for file in %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} \
            %{SOURCE104} %{SOURCE107} %{SOURCE108} %{SOURCE109} \
            %{SOURCE110} %{SOURCE111} %{SOURCE112} %{SOURCE113} \
	    %{SOURCE114} %{SOURCE105} %{SOURCE115} %{SOURCE117} \
	    %{SOURCE118}
do
  tar zxf $file
done
for file in s*.zip; do
  dir=`echo $file | sed -e "s/\(s[a-z]*\)[0-9]*.zip/\1/"`
  [[ "$dir" = "shared" ]] && dir="common"
  prefix=`echo $file | sed -e "s/s[a-z]*\([0-9]*\).zip/\1/"`
  langname=`perl %{SOURCE6} -l $prefix | tr '[A-Z ]' '[a-z_]'`
  mkdir -p $dir/$langname
  unzip -d $dir/$langname -o $file
done
rm -f *.zip
cd ../..

# Use Ximian icons
%if %{use_ximianicons}
install -m 755 %{SOURCE22} scale-icons
mkdir -p ooo-icons-bak
./scale-icons `pwd` --backupdir=./ooo-icons-bak
cp -Rf ooo-icons-OOO_%{ximianiconsver}/* .
%endif

%if %{use_kdeicons}
cp -Rf ooo-KDE_icons-OOO_%{kdeiconsver}/* .
%endif

# delete delzip files
find helpcontent/unx sysui/desktop -name "delzip" -exec rm {} \;

# Some translators translated %%PRODUCTNAME %%PRODUCTVERSION - undo this
find scp/source -name "*.lng" | \
  xargs perl -pi -e "s/(StarOffice|StarSuite) (6\.0|7)/%%PRODUCTNAME %%PRODUCTVERSION/"

%if %use_sunjdk
export OVERRIDE_JAVA_HOME=y
%else
# Build fake JDK
if [[ -z "$OVERRIDE_JAVA_HOME" ]]; then
mkdir -p fakejdk/bin fakejdk/include
cp -a %{SOURCE12} fakejdk/bin/xmlparse
sed "s~@@~`pwd`~" > fakejdk/bin/java <<"EOF"
#!/bin/sh
if [ "$1" = "-version" ]; then
  echo 'java version "1.3.1_03"' 1>&2
  exit 0
fi
if [ "$4" = org.openoffice.configuration.XMLDefaultGenerator ]; then
  exec @@/fakejdk/bin/xmlparse ${1+"$@"}
fi
echo "FIXME: Emulate java runtime with gij here"
exit 1
EOF
chmod +x fakejdk/bin/java fakejdk/bin/xmlparse
sed "s~@@~%{GCJ}~" > fakejdk/bin/javac <<"EOF"
#!/bin/sh
if [ "$1" = "-J-version" ]; then
  echo 'java version "1.3.1_03"' 1>&2
  exit 0
fi
TEMP=`mktemp -d fakejavac.XXXXXX` || exit 1
DEST=.
ANY=""
while [ $# != 0 ]; do
  if [ "$1" = "-classpath" ]; then
    shift
  elif [ "$1" = "-g" ]; then
    : # skip
  elif [ "$1" = "-d" ]; then
    DEST=$2
    shift
  else
    case "$1" in
      *.java) C=`basename "$1" .java`
	      grep '^[ 	]*package[ 	]*[^ 	]*[ 	]*;[ 	]*$' $1 > $TEMP/$C.java
	      echo "public class $C { }" >> $TEMP/$C.java
	      ANY=1
	 ;;
      *) echo "unknown option passed to javac!" 1>&2
	 exit 1;;
    esac
  fi
  shift
done
if [ -n "$ANY" ]; then
  @@ -C -d $DEST $TEMP/*.java
fi
rm -rf $TEMP
exit 0
EOF
chmod +x fakejdk/bin/javac
GCJVERS="`%{GCJ} -dumpversion`"
GCJINCS="/usr/include/libgcj-$GCJVERS"
ln -sf $GCJINCS/j* $GCJINCS/gcj fakejdk/include/
rm -f fakejdk/include/jni.h
cat > fakejdk/include/jni.h <<EOF
#ifndef FAKEJDK_JNI_H
#define FAKEJDK_JNI_H 1
#include_next <libgcj-$GCJVERS/jni.h>
#include <stdio.h>
#include <stdarg.h>

#define JNIEXPORT
#define JNICALL

typedef struct JDK1_1InitArgs
{
  jint version;
  char ** properties;
  jint checkSource, nativeStackSize, javaStackSize, minHeapSize, maxHeapSize, verifyMode;
  char *classpath;
  jint (*vfprintf) (FILE *, const char *, va_list);
  void (*exit) (jint);
  void (*abort) (void);
  jint enableClassGC, enableVerboseGC, disableAsyncGC, verbose;
  jboolean debugging;
  jint debugPort;
} JDK1_1InitArgs;

#define JavaVM_ JavaVM
#endif
EOF
fi
%endif


%build
# Don't use icecream
PATH=/bin:/usr/bin:/usr/X11R6/bin
export PATH

%if %use_sunjdk
export OVERRIDE_JAVA_HOME=y
export JAVA_HOME=/usr/lib/jdk-%{jdkver}
%endif

# Checking whether Java is accessible (use JAVA_HOME to give JDK location location)
if [[ -z "$OVERRIDE_JAVA_HOME" ]]; then
  JAVA_HOME=$PWD/fakejdk
fi
if [[ -z "$JAVA_HOME" ]]; then
  export JAVA_HOME=/usr/lib/jdk-%{jdkver}
fi
$JAVA_HOME/bin/java -version >& /dev/null

# Build STLport 4.6.2 everywhere
cd STLport-%{stlver}/src
make -f gcc-linux.mak release_dynamic release_static \
  CC="%{GCC}" CXX="%{CXX}" EXTRA_CXXFLAGS="$RPM_OPT_FLAGS"
ln -sf libstlport_gcc.so.4.6 ../lib/libstlport_gcc.so
cd ..
WITH_STLPORT4_HOME="--with-stlport4-home=$PWD"
[[ "%{_lib}" != "lib" ]] && ln -s lib %{_lib}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/%{_lib}
cd ..

# Configure OpenOffice.org build
cd config_office
%if %use_ccache
export  CC="%{_libdir}/ccache/bin/%{GCC}"
export CXX="%{_libdir}/ccache/bin/%{CXX}"
%else
export  CC=%{GCC}
export CXX=%{CXX}
%endif
export  ARCH_FLAGS_CC="$RPM_OPT_FLAGS -fno-omit-frame-pointer"
export ARCH_FLAGS_CXX="$RPM_OPT_FLAGS -fno-omit-frame-pointer -fno-for-scope -fpermissive -fno-rtti -fno-use-cxa-atexit -fvisibility-inlines-hidden"
export ARCH_FLAGS_OPT="-O2 -fno-strict-aliasing"
autoconf
./configure \
	--with-jdk-home=$JAVA_HOME \
	--with-lang="%{languages}" \
	--with-system-zlib \
	--enable-libsn \
%if !%build_mozilla
	--disable-mozilla \
%endif
	$WITH_STLPORT4_HOME
cd ..

# Build bootstrap stuff
./bootstrap

# if RPM_BUILD_NCPUS unset, set it
if [ -z "$RPM_BUILD_NCPUS" ] ; then
  if [ -x /usr/bin/getconf ] ; then
    RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
    if [ $RPM_BUILD_NCPUS -eq 0 ]; then
      RPM_BUILD_NCPUS=1
    fi
  else
    RPM_BUILD_NCPUS=1
  fi
fi

# FIXME: it doesn't work yet
RPM_BUILD_NCPUS=1

# Do parallel build if PARALLELMFLAGS contains correct -PPn definition
if [ $RPM_BUILD_NCPUS -gt 1 ]; then
  # TODO: Some makefiles are not dmake -P ready
  for i in io/source/stm dtrans/source/X11 idlc/source nas zlib toolkit/util \
           comphelper/util padmin/source svtools/util bridges/source/prot_uno \
           ucb/source/ucp/ftpproxy framework/util framework/source/unotypes; do
    perl -pi -e "s/^(PRJNAME)/MAXPROCESS=1\n\1/" $i/makefile.mk
  done
  perl -pi -e "s/(product=full)/\1 \\\$(PARALLELMFLAGS)/" makefile.mk
fi

%{init_xdisplay}
export DISPLAY=:$XDISPLAY
. %{build_env}.sh
dmake #PARALLELMFLAGS=-P$RPM_BUILD_NCPUS
%{kill_xdisplay}

%install
rm -rf $RPM_BUILD_ROOT
%if %use_sunjdk
%endif

# Launch a virtual framebuffer X server on a free display
%{init_xdisplay}

# Remove stale entries and remake zipfiles
#rm -rf ./instsetoo/%{build_out_path}/
#(. %{build_env}.sh; dmake install)

# Do a system-wide install (/net) from an auto-response file
mkdir -p $RPM_BUILD_ROOT%{_libdir}/openoffice
RESPONSE_FILE=$PWD/rsfile.ins
(cd ./instsetoo/%{build_out_path}/01/normal/;
  bzcat %{SOURCE3} | sed -e "s|<DESTDIR>|$RPM_BUILD_ROOT%{_libdir}/openoffice|" > $RESPONSE_FILE

  # Localize New and Wizard menus and OfficeObjects
  [[ ! -f setup.ins.localized ]] && {
  cp -p setup.ins setup.ins.localized
  (
  for i in `( cd ../../; echo [0-9][0-9] ) | sed 's/01 //'`; do
    if [ -f ../../$i/normal/setup.ins ]; then
      CONV=cat
      case "$i" in
      03|3[134579]|4[56789]|55|79)
        # pt, nl, fr, es, fi, ca, it, da, sv, nb, pl, de, pt-BR, nn are latin1 encoded
	CONV="iconv -f ISO-8859-1// -t UTF-8//";;
      07)
        # ru is cp1251 encoded
	CONV="iconv -f CP1251// -t UTF-8//";;
      10)
        # eu is already UTF-8 encoded
	;;
      27)
	# af is already UTF-8 encoded
	;;
      28)
	# zu is already UTF-8 encoded
	;;
      30)
        # el is iso8859-7 encoded
        CONV="iconv -f ISO-8859-7// -t UTF-8//";;
      42)
	# cz is already UTF-8 encoded
	;;
      43)
	# sk is already UTF-8 encoded
	;;
      77)
	# et is already UTF-8 encoded
	;;
      90)
        # tr is latin5 encoded
	CONV="iconv -f ISO-8859-9// -t UTF-8//";;
      96)
        # ar is cp1256 encoded
	CONV="iconv -f CP1256// -t UTF-8//";;
      8[1268])
        # ja, ko, zh-CN, zh-TW are already UTF-8 encoded
        ;;
      esac
      grep -A6 'gid_Configurationitem_Common_\(Objectnames.*_Name\|Menus_.*Titel\)' \
	../../$i/normal/setup.ins | $CONV \
	| sed "s/^--//;/^ConfigurationItem/s/\(Name\|Titel\)/$i&/"
      echo
    fi
  done
  ) | awk ' $1 ~ /Value/ { l=$0; sub(/^.*= "/,"",l); sub(/";.*$/,"",l); sub(/%PRODUCTNAME/,"OpenOffice.org",l); sub(/%PRODUCTVERSION/,"%{version}",l); n=n+1; str="@@REPLACEME" n "@@"; s="\"" str "\""; sub(/".*"/,s); printf "s|%s|%s|\n", str, l > "Common.xcu.sed" } { print } ' \
    >> setup.ins
  }

  DISPLAY=:$XDISPLAY ./setup -R:$RESPONSE_FILE
  rm -f $RESPONSE_FILE
)
%{kill_xdisplay}

# Now fixup Common.xcu
COMMON_XML_SED=$PWD/instsetoo/%{build_out_path}/01/normal/Common.xcu.sed
(cd $RPM_BUILD_ROOT%{_libdir}/openoffice/share/registry/data/org/openoffice/Office/;
  sed -e "s|<cfg:string cfg:type=\"string\" cfg:name=\"\([^\"]*\)\"\(>@@REPLACEME.*@@</cfg:\)string>|<cfg:value xml:lang=\"\1\"\2value>|" Common.xcu > Common.xcu.tmp
  sed -f $COMMON_XML_SED Common.xcu.tmp > Common.xcu
  rm -f Common.xcu.tmp
)

# Fixup instdb.ins to get rid of $RPM_BUILD_ROOT
perl -pi -e "s|$RPM_BUILD_ROOT||g" \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/instdb.ins
perl -pi -e "/^Installation gid_Installation/ .. /^End/ and s|(SourcePath.*)=.*|\1= \"%{_libdir}/openoffice/program\";|" \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/instdb.ins

# Fix setup and spadmin symlinks set by OO.org setup program
# (must have absolute symlinks)
ln -sf %{_libdir}/openoffice/program/setup $RPM_BUILD_ROOT%{_libdir}/openoffice/setup
ln -sf %{_libdir}/openoffice/program/soffice $RPM_BUILD_ROOT%{_libdir}/openoffice/spadmin
ln -sf %{_libdir}/openoffice/program/soffice $RPM_BUILD_ROOT%{_libdir}/openoffice/program/spadmin

# FIXME: I don't care about -devel things for now
rm -rf $RPM_BUILD_ROOT%{_libdir}/openoffice/program/addin

# Move KDE and CDE integration upwards in %{_datadir}. Likewise for icons
# NOTE: doing this here prevents from automatically adding those files
# to the filelist, operation carried out below.
mkdir -p $RPM_BUILD_ROOT%{_datadir}
for desktop in kde cde gnome icons; do
  mv $RPM_BUILD_ROOT%{_libdir}/openoffice/share/$desktop $RPM_BUILD_ROOT%{_datadir}/
done

# Remove setup log and useless sopatchlevel script
rm -f %{buildroot}%{_libdir}/openoffice/program/setup.log
rm -f %{buildroot}%{_libdir}/openoffice/program/sopatchlevel.sh

# Remove stuff that should come from system libraries
rm -f %{buildroot}%{_libdir}/openoffice/program/libdb{,_cxx,_java}-?.?.so

# Install new template and gallery content
mkdir -p %{buildroot}%{_libdir}/openoffice/share/template
mkdir -p %{buildroot}%{_libdir}/openoffice/share/gallery
(cd %{buildroot}%{_libdir}/openoffice/share;
  tar fxvj %{SOURCE10}
  tar fxvj %{SOURCE11}
)

# Really make dictionaries stuff go to /usr/share/dict/ooo/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/dict/ooo
mv -f  $RPM_BUILD_ROOT%{_libdir}/openoffice/share/dict/ooo/* $RPM_BUILD_ROOT%{_datadir}/dict/ooo/
chmod 644 $RPM_BUILD_ROOT%{_datadir}/dict/ooo/th_en_US.*
rm -rf $RPM_BUILD_ROOT%{_libdir}/openoffice/share/dict/ooo

# Put back DicOOo.sxw and FontOOo.sxw
mkdir -p $RPM_BUILD_ROOT%{_libdir}/openoffice/share/dict/ooo
mv -f $RPM_BUILD_ROOT%{_datadir}/dict/ooo/DicOOo.sxw $RPM_BUILD_ROOT%{_libdir}/openoffice/share/dict/ooo/
mv -f $RPM_BUILD_ROOT%{_datadir}/dict/ooo/FontOOo.sxw $RPM_BUILD_ROOT%{_libdir}/openoffice/share/dict/ooo/

# File lists are necessary for language packs
FILELIST=$PWD/filelist
find $RPM_BUILD_ROOT%{_libdir}/openoffice "(" -type f -or -type l ")" -print | \
  sed -e "s|^$RPM_BUILD_ROOT||g" > $FILELIST
find $RPM_BUILD_ROOT%{_libdir}/openoffice -type d -print | \
  sed -e "s|^$RPM_BUILD_ROOT|%dir |g" >> $FILELIST

# Extract language packs
(cd ./instsetoo/%{build_out_path}/;
  install -m 755 %{SOURCE6} oo_xlate_lang
  install -m 755 %{SOURCE7} oo_dpack_lang
  install -m 755 %{SOURCE14} oo_fixup_help
  install -m 755 %{SOURCE16} oo_gen_instdb
  for res in `echo "%{languages}" | sed -e "s/,/ /g"`; do
    isocode=`./oo_xlate_lang -i $res`
    prefix=`./oo_xlate_lang -p $res`
    tempdir=$RPM_BUILD_ROOT%{_libdir}/openoffice-$isocode
    mkdir -p $tempdir
    # may extract help files, if known to be localized enough
    case ",%{helplangs}," in
    *,$res,*)
      ./oo_dpack_lang -d=$tempdir -i=$prefix/normal/setup.ins -h
      # fix permissions
      find $tempdir/help/$isocode -type d | xargs chmod 755
      find $tempdir/help/$isocode -type f | xargs chmod 644
      # transmute error file to suggest installation of
      # OpenOffice.org-help-* package
      cp -f $tempdir/help/$isocode/err.html orig.err.html
      # nuke broken <meta http-equiv="..."/> tag and entities in
      # Finnish err.htmm
      [[ "$isocode" = "fi" ]] && {
        perl -pi -MEncode -MHTML::Entities -pi \
             -e 's/<meta\s+http-equiv=[^>]+>//i;' \
             -e '$_=Encode::encode_utf8 decode_entities $_' orig.err.html
      }
      [[ "$isocode" != "sk" ]] && \
      ./oo_fixup_help $isocode orig.err.html >$tempdir/help/$isocode/err.html
      rm -f orig.err.html
      find $tempdir/help/$isocode "(" -type f -or -type l ")" -print | \
        sed -e "s|$RPM_BUILD_ROOT%{_libdir}/openoffice-$isocode|%{_libdir}/openoffice|g" > $FILELIST.help.$isocode.in
      find $tempdir/help/$isocode -type d -print | \
        sed -e "s|$RPM_BUILD_ROOT%{_libdir}/openoffice-$isocode|%dir %{_libdir}/openoffice|g" | sort -u >> $FILELIST.help.$isocode.in
      # keep err.html and custom.css in main l10n package
      grep -v "help/$isocode\(\|/\(err.html\|custom.css\)\)$" $FILELIST.help.$isocode.in > $FILELIST.help.$isocode
      rm -f $FILELIST.help.$isocode.in
      ;;
    *)
      # default, create empty help directory
      # NOTE: with Patch16 (help-fallback-en) we fallback to English help files
      ./oo_dpack_lang -d=$tempdir -i=$prefix/normal/setup.ins
      mkdir -p $tempdir/help/$isocode
      ;;
    esac
    # link ooo resource files to iso files
    (cd $tempdir/program/resource;
      file=`echo ooo*.res`
      ln -sf $file ${file/ooo/iso}
    )
    # generate localized instdb.ins files, aka let the right files to
    # be installed for a user installation
    [[ "$isocode" != "en" ]] && {
      ./oo_gen_instdb -d $tempdir \
        -i $prefix/normal/setup.ins \
        -o $tempdir/program/instdb.ins.$isocode \
        -pn "%{name}" -pv "%{version}"
      perl -pi -e "s|$tempdir|%{_libdir}/openoffice|g" \
        $tempdir/program/instdb.ins.$isocode
    }
    # build file list
    find $tempdir "(" -type f -or -type l ")" -print | \
      sed -e "s|$tempdir|%{_libdir}/openoffice|g" > $FILELIST.$isocode
    find $tempdir -type d -print | \
      sed -e "s|$tempdir|%dir %{_libdir}/openoffice|g" | sort -u >> $FILELIST.$isocode
    # remove duplicates from l10n-en package
    [[ "$isocode" != "en" ]] && {
      mv $FILELIST.$isocode $FILELIST.$isocode.in
      perl -MMDK::Common -e "print difference2([ cat_(\"$FILELIST.$isocode.in\") ], [ cat_(\"$FILELIST.en\") ])" \
        > $FILELIST.$isocode
      rm -f $FILELIST.$isocode.in
    }
    # move files here and there
    cp -af $tempdir/* $RPM_BUILD_ROOT%{_libdir}/openoffice/
    rm -rf $tempdir
  done
)

# Remove duplicates from help vs. l10n packages
for filelist in $FILELIST.help.*; do
  raw_filelist=${filelist/.help/}
  mv $raw_filelist $raw_filelist.in
  perl -MMDK::Common -e "print difference2([ cat_(\"$raw_filelist.in\") ], [ cat_(\"$filelist\") ])" \
    > $raw_filelist
  rm -f $raw_filelist.in
done

# List of files that have to be in main package
# NOTE: we assume they always reside in the English localization
cat > $FILELIST.force << EOF
%{_libdir}/openoffice/user/config/arrowhd.soe
%{_libdir}/openoffice/user/config/classic.sog
%{_libdir}/openoffice/user/config/hatching.soh
%{_libdir}/openoffice/user/config/modern.sog
%{_libdir}/openoffice/user/config/palette.soc
%{_libdir}/openoffice/user/config/styles.sod
%{_libdir}/openoffice/help/en/err.html
EOF

# Remove those exceptions from the -l10n-en package
mv $FILELIST.en $FILELIST.in
perl -MMDK::Common -e "print difference2([ cat_(\"$FILELIST.in\") ], [ cat_(\"$FILELIST.force\") ])" \
  > $FILELIST.en
rm -f $FILELIST.in

# Remove duplicates from OpenOffice.org-l10n-en package
mv $FILELIST $FILELIST.in
perl -MMDK::Common -e "print difference2([ cat_(\"$FILELIST.in\") ], [ cat_(\"$FILELIST.en\"), cat_(\"$FILELIST.help.en\") ])" \
  > $FILELIST
rm -f $FILELIST.in

# Now split the package up into OpenOffice.org, OpenOffice.org-libs
grep "%{_libdir}/openoffice/program/lib.*so.*" $FILELIST > $FILELIST.libs
mv -f $FILELIST $FILELIST.tmp
grep -v "%{_libdir}/openoffice/program/lib.*so.*" $FILELIST.tmp > $FILELIST
rm -f $FILELIST.tmp

# Install autoresponse file for user installation
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/openoffice
bzcat %{SOURCE4} > $RPM_BUILD_ROOT%{_sysconfdir}/openoffice/autoresponse.conf
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/openoffice/autoresponse.conf

# Install global openoffice.conf
install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_sysconfdir}/openoffice/openoffice.conf

# Install OpenOffice.org wrapper script
mkdir -p $RPM_BUILD_ROOT%{_bindir}
sed -e "s|<OOVERSION>|%{version}|"    \
    -e "s|<OOTREEVERSION>|%{subver}|" \
    -e "s|<LIBDIR>|%{_libdir}|"       \
    %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/ooffice
chmod 755 $RPM_BUILD_ROOT%{_bindir}/ooffice

# Create links from oo<compoent> to actual ooffice wrapper script
for app in calc draw impress math writer; do
  ln -s ooffice $RPM_BUILD_ROOT%{_bindir}/oo$app
done

# Install regcomp tool
install -m 755 solver/%{subver}/%{build_out_path}/bin/regcomp \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/
cat > $RPM_BUILD_ROOT%{_bindir}/ooregcomp << EOF
#!/bin/sh
export LD_LIBRARY_PATH=%{_libdir}/openoffice/program:\$LD_LIBRARY_PATH
exec %{_libdir}/openoffice/program/regcomp \${1+"\$@"}
EOF
chmod +x $RPM_BUILD_ROOT%{_bindir}/ooregcomp

# Install configimport tool
install -m 755 solver/%{subver}/%{build_out_path}/bin/configimport.bin \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/
cat > $RPM_BUILD_ROOT%{_bindir}/ooconfigimport << EOF
#!/bin/sh
export LD_LIBRARY_PATH=%{_libdir}/openoffice/program:\$LD_LIBRARY_PATH
exec %{_libdir}/openoffice/program/configimport.bin \${1+"\$@"}
EOF
chmod +x $RPM_BUILD_ROOT%{_bindir}/ooconfigimport

# Install language mapper
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/openoffice/program/oo_xlate_lang

# We only take care of main OOo applications, that are
# Writer, Calc, Draw, Impress, Math Editor
DESKTOP_FILES="calc draw impress math writer"

# Dipatch GNOME .desktop files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnome/apps/OpenOffice.org
(cd $RPM_BUILD_ROOT%{_datadir}/gnome/apps/OpenOffice.org;
  mv $RPM_BUILD_ROOT%{_datadir}/gnome/net/.directory .
  touch .order
  for file in $DESKTOP_FILES; do
    mv $RPM_BUILD_ROOT%{_datadir}/gnome/net/$file.desktop .
    mv $RPM_BUILD_ROOT%{_datadir}/gnome/net/ooo%{subver}$file.desktop .
    echo "ooo%{subver}$file.desktop" >> .order
    echo "$file.desktop" >> .order
  done
)

# Dispatch KDE .desktop files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applnk/OpenOffice.org
(cd $RPM_BUILD_ROOT%{_datadir}/applnk/OpenOffice.org;
  mv $RPM_BUILD_ROOT%{_datadir}/kde/net/.directory .
  touch .order
  for file in $DESKTOP_FILES; do
    mv $RPM_BUILD_ROOT%{_datadir}/kde/net/$file.desktop .
    echo "$file.desktop" >> .order
  done
)

# Fix references to wrapper programs
find $RPM_BUILD_ROOT%{_datadir} -type f -name "*.desktop" -print | \
  sed -e "s/ /\\\\ /g" | \
  xargs perl -pi -e \
	"s|$RPM_BUILD_ROOT%{_libdir}/openoffice/program/s|%{_bindir}/oo|;\
	s|$RPM_BUILD_ROOT%{_libdir}/share/openoffice|%{_libdir}/share/openoffice|;"

# Dispatch KDE icons
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}
mv $RPM_BUILD_ROOT%{_datadir}/kde/net/share/icons/* $RPM_BUILD_ROOT%{_iconsdir}/

# Dispatch KDE mime associations
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mimelnk/application
mv $RPM_BUILD_ROOT%{_datadir}/kde/net/share/mimelnk/application/*.desktop $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/

# Convert KDE icons (XPM) to MDK menu icons (PNG)
mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
for icon in $RPM_BUILD_ROOT%{_iconsdir}/locolor/16x16/apps/ooo_*.xpm; do
  icon_base=${icon##*/}
  convert $icon $RPM_BUILD_ROOT%{_miconsdir}/${icon_base/xpm/png}
done
mkdir -p $RPM_BUILD_ROOT%{_liconsdir}
for icon in $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/ooo_*.xpm; do
  icon_base=${icon##*/}
  convert $icon $RPM_BUILD_ROOT%{_liconsdir}/${icon_base/xpm/png}
done

# Overlap Ximian menu desktop icons
%if %{use_ximianicons}
tar -jxf %{SOURCE24} -C $RPM_BUILD_ROOT%{_iconsdir}
find $RPM_BUILD_ROOT%{_datadir} -type f -name "*.desktop" -print0 | \
  xargs -0 perl -pi -e \
	"s|^Icon=(.*)xpm|Icon=$1.png|"
%endif

# Disable desktop (KDE, GNOME, CDE) integration for user installs
for module in gid_Module_Optional_Gnome gid_Module_Optional_Kde gid_Module_Optional_Cde; do
  perl -pi -e "/^Module $module/ .. /^End/ and s|(Installed.*)=.*|\1= NO;|" \
    $RPM_BUILD_ROOT%{_libdir}/openoffice/program/instdb.ins*
done
perl -pi -e "/^Module gid_Module_Root/ .. /^End/ and s/gid_Procedure_(Kde_Inst|Copy_Readme_File),//g" \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/instdb.ins*
perl -ni -e "/^Procedure gid_Procedure_Copy_Readme_File/ .. /^End/ or print" \
  $RPM_BUILD_ROOT%{_libdir}/openoffice/program/instdb.ins*

# Nuke unpackaged files (CDE, MySpell from dedicated package ...)
rm -rf $RPM_BUILD_ROOT%{_datadir}/{cde,gnome/net,kde/net}
rm  -f $RPM_BUILD_ROOT%{_datadir}/dict/ooo/*.{lst,aff,dic,txt}
rm  -f $RPM_BUILD_ROOT%{_iconsdir}/[0-9][0-9][0-9]_*.png
rm -rf $RPM_BUILD_ROOT%{_iconsdir}/document-icons/
rm -rf $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/
rm -rf $RPM_BUILD_ROOT%{_iconsdir}/hicolor/22x22/
rm -rf $RPM_BUILD_ROOT%{_iconsdir}/locolor/22x22/

# FIXME: permissions hack
for ext in bau dat dic sdw stw stc sxw soc sod soe sog soh htm xpm vor sti; do
  find $RPM_BUILD_ROOT -type f -name "*.${ext}" | xargs chmod 644
done

# Generate menus
mkdir -p $RPM_BUILD_ROOT%{_menudir}

GenerateMenu() {
[ -f "$RPM_BUILD_ROOT%{_menudir}/%{name}" ] || touch $RPM_BUILD_ROOT%{_menudir}/%{name}
mimetypes_item=
[ "$6" != "" ] && mimetypes_item="mimetypes=\"$6\""
cat >> $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF
?package(%{name}): needs=x11 section="$2" icon="$3" title="$4" longtitle="$5" command="oo$1" \
$mimetypes_item kde_opt="InitialPreference=100" startup_notify="true"
EOF
}

GenerateMenu calc \
  "Office/Spreadsheets" \
  "ooo_calc.png" \
  "OpenOffice.org Calc" \
  "OpenOffice.org Spreadsheet" \
  "application/vnd.sun.xml.calc,application/vnd.stardivision.calc,application/vnd.stardivision.chart,application/msexcel,application/vnd.ms-excel"

GenerateMenu draw \
  "Office/Drawing" \
  "ooo_draw.png" \
  "OpenOffice.org Draw" \
  "OpenOffice.org Drawing" \
  "application/vnd.sun.xml.draw,application/vnd.stardivision.draw"

GenerateMenu impress \
  "Office/Presentations" \
  "ooo_impress.png" \
  "OpenOffice.org Impress" \
  "OpenOffice.org Presentation" \
  "application/vnd.sun.xml.impress,application/vnd.stardivision.impress,application/mspowerpoint"

GenerateMenu writer \
  "Office/Wordprocessors" \
  "ooo_writer.png" \
  "OpenOffice.org Writer" \
  "OpenOffice.org Word Processing Component" \
  "application/vnd.sun.xml.writer,application/vnd.stardivision.writer,application/msword,application/vnd.ms-word,application/x-doc,text/rtf"

GenerateMenu math \
  "Office/Wordprocessors" \
  "ooo_math.png" \
  "OpenOffice.org Math" \
  "OpenOffice.org Formula Editor" \
  "application/vnd.stardivision.math,application/vnd.sun.xml.writer.math"

# Don't provide nor require Mozilla libraries
%if !%build_mozilla
mozlibs_patt=
for lib in `unzip -l solver/%{subver}/%{build_out_path}/bin/mozruntime.zip | perl -ne '/[0-9]+.+(lib[a-z0-9]*\.so)/ and print "$1 "'`; do
  [[ -n "$mozlibs_patt" ]] && mozlibs_patt="$mozlibs_patt\|"
  mozlibs_patt="$mozlibs_patt$lib"
done
%endif

ooolibs_patt=
for lib in `find $RPM_BUILD_ROOT%{_libdir}/openoffice/program -name "*.so*"`; do
  [[ -n "$ooolibs_patt" ]] && ooolibs_patt="$ooolibs_patt\|"
  ooolibs_patt="$ooolibs_patt${lib##*/}"
done

# Don't provide nor require JDK-built libraries
ooolibs_patt="$ooolibs_patt\|libjawt.so"

alllibs_patt="$ooolibs_patt"
[[ -n "$mozlibs_patt" ]] && alllibs_patt="$alllibs_patt\|$mozlibs_patt"
provreq_filter="| grep -v \"\($alllibs_patt\)\""

for i in provides requires; do
  [[ "$i" = "requires" ]] && args="%{buildroot} %{_target_cpu}"
  cat > find_$i.sh <<EOF
#!/bin/sh
%{_prefix}/lib/rpm/find-$i $args $provreq_filter || :
EOF
  chmod +x find_$i.sh
done

# Fix template permissions
find $RPM_BUILD_ROOT%{_libdir}/openoffice/share/template -type d -print0 | xargs -0 chmod 755
find $RPM_BUILD_ROOT%{_libdir}/openoffice/share/template -type f -print0 | xargs -0 chmod 644

touch filelist.eu filelist.help.eu filelist.et

%post
%update_menus

%postun
%clean_menus

%clean
rm -rf $RPM_BUILD_ROOT

%files -f filelist
%defattr(-,root,root)
%doc readlicense/source/license/unx/LICENSE
%doc licenses/README.gpc licenses/COPYING licenses/COPYING.LIB
#
%{_bindir}/ooregcomp
%{_bindir}/ooconfigimport
%{_libdir}/openoffice/program/regcomp
%{_libdir}/openoffice/program/configimport.bin
%{_libdir}/openoffice/program/oo_xlate_lang
#
%{_bindir}/ooffice
%{_bindir}/oocalc
%{_bindir}/oodraw
%{_bindir}/ooimpress
%{_bindir}/oomath
%{_bindir}/oowriter
#
%dir %{_sysconfdir}/openoffice/
%config %{_sysconfdir}/openoffice/autoresponse.conf
%config %{_sysconfdir}/openoffice/openoffice.conf
# Menu entry and icons
%{_menudir}/%{name}
%{_iconsdir}/ooo_*.png
%{_miconsdir}/ooo_*.png
%{_liconsdir}/ooo_*.png
# GNOME Integration (menus)
%dir %{_datadir}/gnome/apps/
%dir %{_datadir}/gnome/apps/OpenOffice.org/
%{_datadir}/gnome/apps/OpenOffice.org/.directory
%{_datadir}/gnome/apps/OpenOffice.org/.order
%{_datadir}/gnome/apps/OpenOffice.org/calc.desktop
%{_datadir}/gnome/apps/OpenOffice.org/draw.desktop
%{_datadir}/gnome/apps/OpenOffice.org/impress.desktop
%{_datadir}/gnome/apps/OpenOffice.org/math.desktop
%{_datadir}/gnome/apps/OpenOffice.org/writer.desktop
%{_datadir}/gnome/apps/OpenOffice.org/ooo%{subver}calc.desktop
%{_datadir}/gnome/apps/OpenOffice.org/ooo%{subver}draw.desktop
%{_datadir}/gnome/apps/OpenOffice.org/ooo%{subver}impress.desktop
%{_datadir}/gnome/apps/OpenOffice.org/ooo%{subver}math.desktop
%{_datadir}/gnome/apps/OpenOffice.org/ooo%{subver}writer.desktop
# KDE Integration (menus)
%dir %{_datadir}/applnk/
%dir %{_datadir}/applnk/OpenOffice.org/
%{_datadir}/applnk/OpenOffice.org/.directory
%{_datadir}/applnk/OpenOffice.org/.order
%{_datadir}/applnk/OpenOffice.org/calc.desktop
%{_datadir}/applnk/OpenOffice.org/draw.desktop
%{_datadir}/applnk/OpenOffice.org/impress.desktop
%{_datadir}/applnk/OpenOffice.org/math.desktop
%{_datadir}/applnk/OpenOffice.org/writer.desktop
# KDE Integration (mime associations)
%dir %{_datadir}/mimelnk/
%dir %{_datadir}/mimelnk/application/
%{_datadir}/mimelnk/application/*.desktop
# KDE Integration (icons)
%dir %{_iconsdir}/locolor/
%dir %{_iconsdir}/locolor/16x16/
%dir %{_iconsdir}/locolor/16x16/apps/
%{_iconsdir}/locolor/16x16/apps/*.xpm
%dir %{_iconsdir}/locolor/32x32/
%dir %{_iconsdir}/locolor/32x32/apps/
%{_iconsdir}/locolor/32x32/apps/*.xpm
%dir %{_iconsdir}/hicolor/
%dir %{_iconsdir}/hicolor/32x32/
%dir %{_iconsdir}/hicolor/32x32/apps/
%{_iconsdir}/hicolor/32x32/apps/*.xpm
%dir %{_iconsdir}/hicolor/48x48/
%dir %{_iconsdir}/hicolor/48x48/apps/
%{_iconsdir}/hicolor/48x48/apps/*.xpm
%if %{use_ximianicons}
%{_iconsdir}/hicolor/32x32/apps/*.png
%{_iconsdir}/hicolor/48x48/apps/*.png
%endif

# MySpell (dictionaries + hyphenation) stuff
%dir %{_datadir}/dict/ooo
%{_datadir}/dict/ooo/th_en_US.dat
%{_datadir}/dict/ooo/th_en_US.idx
#

%files libs -f filelist.libs
%defattr(-,root,root)
%dir %{_libdir}/openoffice
%dir %{_libdir}/openoffice/program

# Sub language packages
%{expand:%(/bin/sh %{SOURCE13} FILES HELP %{helplangs1} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} FILES HELP %{helplangs2} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} FILES L10N %{languages1} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} FILES L10N %{languages2} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} FILES L10N %{languages3} %{SOURCE6})}
%{expand:%(/bin/sh %{SOURCE13} FILES L10N %{languages4} %{SOURCE6})}

%changelog
* Wed May 04 2005 Vincent Danen <vdanen@mandriva.com> 1.1.4-7.1.102mdk
- security fix for CAN-2005-0941

* Wed Mar 16 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-7mdk
- Added Portuguese and Turkish help files (Source117, 118).
- Disabled Patch1060 (now default for
  Accessibility/Use system default user interface font option is
  false/unchecked) for bug #13654.
- Updated Patch935 (czech).

* Fri Mar 11 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-6mdk
- Added Patch970 for fixing bug #13440 (use Newsung fonts).

* Tue Jan 18 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-5mdk
- Enable compiling with -fvisibility-inlines-hidden.

* Tue Jan 18 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-4mdk
- Added Patch1111 (libGL.so.1 soname).

* Sat Jan 15 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-3mdk
- Updated Patch1030 (no-splash-takeover).
- Added Patch1102 (fix transex3 merging).
- Added Patch1103 (print preview exit with Escape).
- Added Patch1104 (disable optimization on ucblockbytes).
- Added Patch1105 (fix crash for bug IZ#36280).
- Added Patch1106 (Calc keyboard shortcuts, IZ#38108).
- Added Patch1107 (default optimal page wrap).
- Added Patch1108 (fix crash in online layout mode).
- Added Patch1109, Patch1110 (fallback to english template files).

* Mon Jan 10 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-2mdk
- Fixed Patch1261 to avoid unpacking binary mozilla
  libraries libstdc++.so.5 based, and define 
  WITH_SYSTEM_MOZILLA when WITH_MOZILLA=NO.
- Added build_mozilla SPEC flag.

* Sat Jan 08 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.4-1mdk
- Release 1.1.4.
- Rebuilt Patch37 (mdkfonts).
- Rebuilt Patch400 (system-db).
- Rebuilt Patch960 (sazanami_fonts).
- Rebuilt Patch1062 (db42).
- Removed Patch1052 (solar-fork), merged upstream.
- Removed Patch1056 (swriter-crash), merged upstream.
- Removed Patch1058 (swriter-flylay-crash), merged upstream.
- Added Patch1101 for fixing RTF import (i35653).
- Added Patch936 for fixing slovak thesaurus langcode.
- Updated slovak help file.
- Updated slovenian help file.
- Added Patch1262 for building with gcc 3.4.3.

* Mon Dec 06 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-6mdk
- Use j2sdk 1.4.2_06.
- Recompile against gcc 3.4.3.

* Sat Dec 04 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-5mdk
- Updated Patch26 (psprint-cups).
- Updated Patch1211 (for newer Patch26).
- Updated Patch1250 (for newer Patch26).

* Sat Dec 04 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-4mdk
- Use gcc 3.4.1 (merged Hanno Meyer patches).
- Disabled mozilla.
- Removed Patch1022 (merged upstream).
- Reverted Patch26 to old version.
- Renamed Patch11XX-1199 => 12XX-1299.

* Thu Oct 07 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-3mdk
- Updated Patch26 (psprint-cups).

* Wed Oct 06 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-2mdk
- Use 1.1.3-1 source.
- Removed Patch1302 (i34117, merged upstream).
- Removed Patch1304 (boost, merged upstream).

* Mon Oct 04 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-1mdk
- Use jdk 1.4.2_05.
- 1.1.3 final.
- Removed Patch1301 (merged upstream).
- Added Patch1304 (boost) for getting 1.1.3 sources compiling.
- Added missed myspell-hyph package dependency for l10n-hu package.

* Mon Sep 27 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040915.3mdk
- Added HUNG to l10n.

* Sat Sep 25 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040915.2mdk
- Updated Patch920 fixing further typos in italian localization.
- Added Patch921 for fixing translation of FontOOo Wizard.
- Added Patch960 for providing Basque translation for FontOOO Wizard strings.

* Mon Sep 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040914.1mdk
- Updated to cvs SRX645_m47.
- Merged cws_srx645_jloo113 and cws_srx645_defsymcvt (Patches1301, 1302).
  This will basically means OOo 1.1.3rc.
- Removed Patch1022 (i23684-font-kerning), merged upstream.
- Removed Patch1049 (i18n-calc-encoding).
- Rebuilt Patch1074 (gui-toolbox-large-icons1).
- Rebuilt Patch920 (lang-typo-italian).
- Rebuilt Patch935 (lang-czech-fixes).
- Rebuilt Patch940 (lang-estonian-fixes).
- Rebuilt Patch950 (lang-welsh-fixes).
- Updated Patch32 (bmp32).
- Added Patch1099 (fix checkbox field crash, IZ#33980).
- Added Patch1303 (fix doc import crasher, IZ#29731).
- Added Requires: drakoo.
- Updated openoffice-wrapper.pl (Thierry Vignaud) for supporting drakoo
  wizard.
- Don't expand %%{Source20} (basque archive). Now should be merged.

* Thu Sep 09 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.9mdk
- Modified Patch101 (ooo-ms-defaults) so to support env var
  OOO_MS_DEFAULTS_WRITER, OOO_MS_DEFAULTS_IMPRESS, OOO_MS_DEFAULTS_IMPRESS
  for setting the default saving format (Thierry Vignaud).
- Updated Mandrakelinux splash screens (David Baudens and Élisabeth).
- Applied patches to openoffice-wrapper.pl (Thierry Vignaud).
- Added DOC_DEFAULTS_CALC, DOC_DEFAULTS_IMPRESS, DOC_DEFAULTS_WRITER to
  default openoffice.conf and set to "NATIVE".

* Wed Sep 01 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.8mdk
- Added Patch1098 for Mandrakelinux splash screens.

* Tue Aug 31 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.7mdk
- Added Patch1094 to use www-browser as default browser
  (requested by David Baudens).
- Added Patch1095 to fix doc load crasher (Ximian).
- Added Patch1096 to fix security problem with tmp files (IZ#33357, CAN-2004-0752)
- Added Patch1097 to fix a spellcheck crash in impress (IZ#32320).

* Fri Aug 27 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.6mdk
- Added Patch950, fixing welsh localization for FONTOOO|DICOOO (Rhoslyn Prys).
- Added Patch960 for using Sazanami fonts instead of
  Kochi and added patch to helpcontent_81_unix.tgz too (Utumi Irosi).
- Use Requires instead of BuildRequires for libstdc++3.3.
- Added Afrik, Zulu to l10n packages.

* Wed Aug 25 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.5mdk
- Added Patch1091 (sw-crash-fix).
- Added Patch1092 (get KDE font weight and size, Ximian)
- Added Patch1093 (Fix ugly rulers with larger font sizes, IZ #22098).
- Use Ximian icons also for menus.

* Tue Aug 24 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.4mdk
- Added Slovenian l10n/help package.

* Tue Aug 24 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.3mdk
- Re-enabled Basque l10n/help packages (without external patches).
- Added Wales l10n package.

* Mon Aug 23 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.2mdk
- Added Patch1090 (startup-fix, IZ#18970) for startup notify.

* Fri Aug 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040820.1mdk
- CVS 1.1.3 (CWS oo113fix2) updated to 20040820.
- Removed Patch1024 (neonctrl), merged upstream.
- Added Ximian icons (Source21).
- Enable sysui fonts by default (Patch1060).
- Updated Patch102 (bmp32).
- Added Patch1089 to avoid registration dialog at startup
  (requested by David Baudens).
- Added Patch1063->1075 for new Ximian icon set.
- Added Patch1076 for adding 'merge & center' toolbar button (Ximian, IZ#33126).
- Added Patch1087 for remembering file path in print dialog (Ximian, IZ#17967).
- Added Patch1088 for warning about printer errors (Ximian, IZ#17966).
- Modified scale-icons script so to match MDK matte gray color.
- Updated Patch1016 (IZ#33074).

* Tue Aug 17 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040815.1mdk
- CVS 1.1.3 (CWS ooo113fix2) updated to 20040815.
- Added Norwegian localizations (NORBOK and NORNYN).
- Updated Patch1054 (xinerama-nostatic).
- Removed Patch1057 (glyph-overlap), merged upstream.
- Updated sk helpcontent.
- Temporary removed basque patches.

* Sat Aug 14 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.3-0.20040814.1mdk
- CVS 1.1.3 (CWS ooo113fix2).
- Removed Patch1025 (stlport-compile-frmpage_cxx), merged upstream.
- Removed Patch1051 (shellexec-allowparams.patch), merged upstream.
- Removed Patch1032 (security-sonames), merged upstream.
- Removed Patch1065 (lingucomponent-memleak), merged upstream.

* Sat Aug 07 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.2-5mdk
- Added Patch945 to fix some bogus translation in UI.
- Added Patch1063 for fixing crashes when reconfiguraing the status-bar
  (crash-statusbar, IZ#31837).
- Added Patch1064 (for libdb42).
- Added Patch1065 (lingucomponent-memleak, IZ#30486).

* Wed Jul 28 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.2-4mdk
- Fixed share/template permissions to 644.

* Thu Jul 22 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.2-3mdk
- Added russian help file.
- Added Patches for gcc 3.4.1 compiling (incomplete).
- Added %use_gcc341 build flag.
- Updated Patch10 (mdkconfig) to support ARCH_FLAGS_*.
- Added Patch1056 for fixing swriter crash (swcrash, IZ#27243).
- Added Patch1057 for fixing mismatched charwidth for overlapping glyphs
  (glyph-overlap, IZ#28567).
- Added Patch1058 for fixing swriter crash (swriter-flylay-crash, IZ#29004).
- Added Patch1059 for using pt not px as menu font unit
  (gui-ft-pt-not-pixel, IZ #15507).
- Added Patch1060 for using system font by default for UI (equivalent to
  enable Tools/Options/Accessibility->Use system font for user interface)
  (.gui-ft-use-system-font, IZ#16683).
- Added Patch1061 for not using ugly X11 bitmap fonts (no-xfonts).
- Updated helpcontent_42_unix.tgz (Czech), helpcontent_43_unix.tgz (Slovak)
- Added helpcontent_50_unix.tgz (Slovenian).
- Added NORTHERNSOTHO, AFRIK, ZULU, HUNG, NORBOK, SLOVENIAN, WELSH,
  LITHUANIAN, NORNYN to openoffice-xlate-lang.pl.
- Added Estonian l10n package.
- Remove compiling with LD_ASSUME_KERNEL=2.4.1.
- Added Patch1062 (workaround for Autopilot bug http://qa.mandrakesoft.com/show_bug.cgi?id=6559).
- Added conditional build flag to use ccache (suggested by Pavel Janik).
- Added Patch930 (fixes russian localization strings).
- Added Patch935 (fixes czech localization strings).
- Added Patch940 (fixes estonian localization strings).

* Sat Jul 10 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.2-2mdk
- Added Patch1027 to allow using of JDK 1.4.2_04, and use %%jdkver macro.
- Added Patch1028 (use Mozilla instead of Netscape).
- Added Patch1029 (gui-splash-redraw, IZ#19646).
- Added Patch1030 (no-splash-takeover, IZ#23609).
- Added Patch1031 (thread-yield, IZ#9277).
- Added and rebuilt new patch set from Ximian (Patch 1032->1053).
- Added Patch1032 (security sonames).
- Added Patch1033 (fix svtools build deps, IZ#28379).
- Added Patch1034 (parallel build).
- Added Patch1035 (defensive coding for mapmode, IZ#19496).
- Added Patch1036 (fix bugs for exported documents, IZ#26747).
- Added Patch1038 (scaling as Xft dpi, IZ#15507).
- Added Patch1039 (antialias min size).
- Added Patch1040 (font size unbreak, IZ#16882).
- Added Patch1041 (default font size).
- Added Patch1042 (default bullet larger, IZ#21829).
- Added Patch1043 (bullet symbol as fields, IZ#21916).
- Added Patch1044 (symbol defaults, IZ#15512).
- Added Patch1045 (doc with more than 4095 styles, IZ#26550).
- Added Patch1046 (improve MS import/export, IZ#8276).
- Added Patch1047 (hide spellchecker underlined words, IZ#21440).
- Added Patch1048 (avoid DNS lookup FQDN conversion).
- Added Patch1049 (fixes wrong encoding strings, IZ#29504).
- Added Patch1050 (Don't pack .orig/.back files in en help content).
- Added Patch1051 (allow parameters for external programs, IZ#28720).
- Added Patch1052 (fork signalling in solar.c, IZ#17241).
- Added Patch1053 (use KDE default programs for helper).
- Added Basque languages (Patch1009, Patch1010, Patch1011).
- Updated Source20 (Basque archive).
- Change basque code in openoffice-xlate-lang.pl from 54 to 10.
- Added Patch1054 (Don't link Xinerama lib statically)
- Added Patch1055 (mark the files in share/template/<lang>/wizard/bitmap as lang specific).
- Use CP1251 instead of ISO8859-5 for RU encoding conversion.

* Sat Jun 26 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1.2-1mdk
- Release: 1.1.2.
- Rebuilt Patch11 (disable-python)
- Rebuilt Patch22 (no-stdlibs).
- Rebuilt Patch26 (psprint-cups-PPD).
- Rebuilt Patch37 (mdkfonts).
- Rebuilt Patch400 (system-db).
- Rebuilt Patch402 (getopt).
- Rebuilt Patch403 (system-zlib), and forced use of --with-system-zlib in configure.
- Rebuilt Patch405 (vera-fonts).
- Rebuilt Patch1016 (word6_95).
- Removed Patch15 (ooo/so coexists), unused.
- Removed Patch30 (stl-fixes), merged upstream.
- Removed Patch33 (unzip-export-symbols), merged upstream.
- Removed Patch38 (vcl-fix, IZ18818), merged upstream.
- Removed Patch103 (typos), merged upstream.
- Removed Patch104 (sw-export-bg-style), merged upstream.
- Removed Patch105 (gui-beep-less), merged upstream.
- Removed Patch106 (startup-fix), merged upstream.
- Removed Patch999 (vcl7pp1r2), merged upstream.
- Removed Patch1014 (newline-in-word-fields), merged.
- Disabled Patch40 (vcl-font-subst, IZ #19591), see if needs to be rebuilt.
- Disabled Patch302, Patch303 (gxx_includedir).
- Added Patch1022 (font-kerning).
- Added Patch305 (gcc3.4 for STLport 4.6.2).
- Added Patch306 (istream for STLport 4.6.2).
- Added Patch1023 (fixutf8-el) for fixing menu entry in greek
  FontOOo Wizard.
- Added Patch1024 (neonctrl) for preventing control characters from being
  included in the session error string.
- Added Patch1025 (to get frmpage.cxx compiling with STLport 4.6.2).
- Updated helpcontent_{31,33,34,39,46,49,81,82,86,88}_unix.tgz.
- Temporary disabled Patch1010, 1011 (Basque), waiting for
  completion of 1.1.2 Basque translation.
- Fixed bug #8981.
- Added Patch1026 to fix some typos in italian translations.

* Wed Mar 24 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-12mdk
- Removed eu patches from Source20 (they are no longer called after
  localize) and added to Patch1010.

* Mon Mar 01 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-11mdk
- Added %%{epoch} openoffice-gen-langpack.sh Requires.

* Thu Feb 25 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-10mdk
- Don't use %%{epoch} for l10n Requires.

* Tue Feb 23 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-9mdk
- Added %%{epoch} to Requires.

* Mon Feb 09 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-8mdk
- Added "eu" => "ES" to the country exception list in the
  openoffice-wrapper.pl for the Basque.
- Fixed openoffice-gen-langpack.sh so to avoid entries
  'Provides: OpenOpenOffice.org-l10n-zh-TW' in other l10n packs.
- Moved section of "OpenOffice.org Draw" to Office/Graphs (Laurent).

* Sat Feb 07 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-7mdk
- Rebuilt Patch1016.
- Added Patch1018 (fixes for Excel5 & 95 filters).
- Added Patch1019 (fixes ISSUE #15909)
- Added Patch1020 for allow building under kernel 2.6.
- Added Patch1021 for adding a zoom combobox (fixes bug #7088).
- Updated basque Patch1010 (removed translations for setup).

* Sat Feb 07 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-6mdk
- Added missed help*.css to the dutch help package (Source113).
- Added basque set (Source20, Source114, Patch1010, Patch1011),
  from dooteo <dooteo@zundan.com>.
- Added Patch1012 for Issue #18588 (officecfg and extracting schema).
- Added Patch1013 (removes gtk from crashrep).
- Added Patch1014 (fixes incorrect Input field newlines code in saved MS Word documents).
- Added Patch1015 (fixes not translatable string in Tools/Options/External applications).
- Added Patch1016 (fixes for Word6 & 95 filters).
- Added Patch1017 (disable default OpenGL 3D acceleration)

* Wed Feb 04 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-5mdk
- Modified openoffice-wrapper.pl and openoffice-gen-langpack.sh so
  that "Bitstream Vera Sans" will be used for UI only for ISO-Latin1 
  languages (fix bug #6021).
- Added finnish help package.
- Added dutch help package (Source113).
- Modified %%init_xdisplay macro to start from DISPLAY :2
- Increased sleep time in %%init_xdisplay macro from 2/10s to 4/15s.
- Compile using LD_ASSUME_KERNEL=2.4.1, otherwise java goes in
  exception under glibc >= 2.3.3-8mdk...

* Sat Jan 31 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-4mdk
- Added patch to openoffice-wrapper.pl to allow execution of code
  in /etc/openoffice/customconfig (JMDault).

* Wed Jan 07 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-3mdk
- Default saving format to NATIVE and not to MS (requested by Jacques Le Marois).
- Added Patch1000, to get OOo compiling with freetype2 2.1.7.

* Thu Oct 23 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-2mdk
- Added Patch999 with some of the CWS vcl7pp1r2 patches (for fixing
  bug for IZ #16573, #19841).

* Wed Oct 22 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.1-1mdk
- Release 1.1mdk.
- Added --with jdk option.
- Rebuilt Patch37 (mdkfonts).

* Mon Sep 15 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-0.rc4.2mdk
- Really enable fixed Patch102 (bmp32)
- Patch40: Make font substitution algorithm match documentation (IZ #19591)
- Updates to wrapper script:
  - Really use localized instdb.ins files for installation
  - Reactivate font substitutions for now otherwise Japanese & Korean
    help content is broken. This concerns (Andale Sans UI, Albany, Arial)

* Fri Sep 12 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-0.rc4.1mdk
- 1.1rc4
- Nuke mutation of instdb.ins since it confuses updates and is now useless
- Refine selection of MySpell packages to install along with -l10n- packages
- Add Slovak help files, update Czech files to 1.1rc4 from OOo-cs project
- Make extra psprint filters work again
- Make sure we only handle 32-bit bmp images and don't default to that
  format. Otherwise, we need to always copy/transform things around
  and this slows UI down terribly
- Make doc defaults configurable through DOC_DEFAULTS variable in
  /etc/openoffice/openoffice.conf or ~/.oofficerc. i.e. set it to "MS"
  (default) for .doc formats or any other (e.g. "NATIVE") for OOo
- Revert to use Nimbus Roman No9L as default font for text since Vera
  Serif doesn't have any oblique face yet
- Add more "Word count" translations (thanks Pablo, Giuseppe)
- Patch11: Don't install python-2.2 stuff for now
- Patch31: Update to make $HOME/Documents default only if it exists
- Merge in more Ximian patches:
  - Patch101: Conditionalize use of MS defaults (default)
  - Patch106: Startup notification fixes (IZ #18970)
- Updates to wrapper script:
  - Try hard to update user install base even through different language
  - Always default to one installed language set, preferably matching
    the current locale

* Mon Sep  1 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-0.rc3.2mdk
- Merge in some Ximian patches:
  - Patch100: Add word count feature under Tools/Hyphenation item
  - Patch101: Default to .doc for text documents
  - Patch102: Add support for 32-bit bitmaps and icons
  - Patch103: Correct typo in Options->HTML compatibility for sv (IZ #16437)
  - Patch104: Export 'no color' background to doc (IZ #18671)
  - Patch105: Don't continually beep annoyingly (IZ #18440)

* Fri Aug 22 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-0.rc3.1mdk
- 1.1rc3
- Default compiler is now any gcc >= 3.2 (thusly MDK >= 9.0)
- Use built-in Mozilla address book libraries
- Add localized UI strings for: Português do Brasil
- Temporarily remove localized help files for: Russian, Finnish, Czech
- Try to fix encodings of localized menu File/New entries
- Don't install (unlocalized) readme & license files to user dir
- Patch11: Don't build crashdump reporter
- Patch30: Fix broken inclusions of STL headers
- Patch31: Make $HOME/Documents the work directory
- Patch32: Look for additional templates in <ooo>share/templates/extra/
- Patch33: Don't export crazy symbols from svunzip (IZ #17841)
- Patch34: Remove unneeded sched_yield calls (IZ #9277)
- Patch35: MySpell dictionaries are shared in /usr/share/dict/ooo
- Patch36: Enable automatic spellchecking by default
- Patch37: Use better default fonts available in the distribution
- Patch38: Fix crash in ExtendedFontStruct::HasUnicodeChar()
- Patch39: Disable KDE screensaver during presentations
- Patch405: Use system Vera fonts
- Deprecate UI_FONT & FONT_SCALING in openoffice.conf and don't handle
  them any longer (should be handled automatically with new font
  substitution facilities)
- Updates to wrapper script:
  - Handle CTL layouts (Arabic)
  - SAL_FONTPATH_USER is gone, SAL_FONTPATH should still work though
  - Only merge in new configuration data if we are switching locales
  - Attempt to update an existing installation and let OOo merge user
    *.xml files to new *xcu
  - Drop XML::Twig parser as configuration files format is now
    overkill to handle. Better user configimport tool to merge in new
    config bits

* Mon May 19 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.1-0.beta2.1mdk
- 1.1 beta 2

* Tue Apr 29 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.3-2mdk
- Patch0: Fix vcl printer code that may have caused a crash (1.0.3.1)
- Patch29: Update to add a generic PostScript distillable output (Giuseppe)
- Patch50: Reintroduce soffice.sh fix, it got mis-integrated upstream
- Patch53: Install OOo Impress templates
- Introduce UI_LANG variable to /etc/openoffice/openoffice.conf or
  ~/.oofficerc in order to force a specific language for the user or
  system wide. This helps if you have a mismatch between the system
  locale (which the ooffice script uses) and what you actually have
  installed as OOo-l10n-* package

* Wed Apr  9 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.3-1mdk
- BuildRequires: xpm-devel for nas library build
- Rework Patch400 (system-db) to fit libdb4.0 and lib64 on MDK >= 9.2
- Use zh_{CN,TW} instead of zh-{CN,TW} in package names so that
  rpmsrate can auto-expands the filelist
- Patch599: Colateral, induced by previous 64-bit patches on 32-bit arches
- Patch49: Enable user to set priorities among embedded bitmaps,
  auto-hinting and anti-aliasing. Backport from OOo 1.1. Variables are
  SAL_EMBEDDED_BITMAP_PRIORITY, SAL_ANTIALIASED_TEXT_PRIORITY,
  SAL_AUTOHINTING_PRIORITY to be set with numerical values. Defaults
  are 2/1/1, respectively. i.e. preferring embedded bitmaps first.
  <http://gsl.openoffice.org/servlets/ReadMsg?msgId=490464&listName=features>

* Mon Mar 10 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-7mdk
- Patch1: Ignore Xerrors from XSetInputFocus() for now (IZ #10779)
- Patch25: Update to handle Kerkis as default font for Greek. Also add
  better/available candidates for Asian locales
- Patch44: Update to get correct condition for PPDKey::eraseValue()
- Patch45: Update to immediately cache the PPD file to user's psprint
- Patch46: Handle SAL_DEBUGGER in soffice script
- Patch47: Make soffice script handle chdir to dirs denoted relatively
- Patch48: Always enable antialiasing if the font is antialias capable
- Patch109: Update to really enable Slovak localization
- Patch405: Update to match current CVS sources
- Fix localized help/err.html mutation, only special case for Finnish
- Updates to wrapper script:
  - Handle CJK locales configuration better
  - Handle new --debug(ger) and --help options
  - Handle language -> font mappings better
  - Use KerkisSans as UI font for Greek
  - Also substitute Albany and Arial UI fonts, if not available
  - Make LC_CTYPE an alternative to set UI localization, not LC_MESSAGES
  - On user installation, make sure that ~/.mime.types doesn't contain
    any duplicates. i.e. don't let it grow constantly

* Tue Mar  4 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-6mdk
- Remove ~/.openoffice/user/work symlink if target is user's HOME dir
- Requires: OpenOffice.org %{version} for -help and -l10n packages
- Patch44: Keep ordering of original PPD file values in Printer Properties
- Patch45: Use CUPS to grab the corresponding PPD file

* Mon Mar  3 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-5mdk
- Patch43: Use light hinting for freetype2 >= 2.1.3-3mdk (RH)
- Patch0: Take care of selected directory in Save dialogs (IZ #8928)
- Main package now owns help/en/err.html file to suggest a help
  package to install if it is not localized yet
- Default font scaling to 100 if FONT_SCALING is not set correctly

* Fri Feb 28 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-4mdk
- Force OOo Draw styles in English for main package
- Patch42: Use MDK colors
- Patch41: Fix crash with a PPD file that does not specify the DPI
  resolution in the string version of the "Resolution" option. (IZ #11616)
- Updates to Source5 (wrapper-script):
  - Handle Arabic UI fonts and language
  - For language selection, prefer LC_ALL which has higher priority
  - If FONT_SCALING variable is not set, don't change user's config either

* Fri Feb 21 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-3mdk
- Add localized UI strings for: Arab, Slovak
- Add localized help files for: Russian, Finnish, Czech, Japanese,
  Korean, Chinese (simplified and traditional)
- Patch39: Hack up scpzip so that it doesn't duplicate everything 17
  or more times than necessary (RH). Also make sure to handle
  localized help files.

* Wed Jan 29 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-2mdk
- Remove (obsolete) specfile nonsense
- Handle/skip -g in fake javac wrapper
- Patch37: Don't use obsolete CLK_TCK macros in debug=true mode
- Patch38: Fix rsc code in debug=true mode
- Updates to Source5 (wrapper-script):
  - Don't nuke away other OpenOffice.org installations info from sversionrc

* Tue Jan 28 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-1mdk
- Update to 1.0.2 final
- Patch16 (no-stlport): Remove bits merged upstream
- Add yet another fix to errno (Patch32)
- Patch406: Use system zlib + master truanderie
- Patch407: Directly link against system Xrender library
- Patch408: Fix conflict with system zlib brought in by recent
  freetype2 packages

* Wed Jan 15 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.2-0.1mdk
- Update to OOO_STABLE_1 2002/01/13
- Mostly get rid of tcsh use during main build
- Stop symlink'ing <ooo_home>/user/work, since user Common.xml is now
  correctly generated with user Work dir being his home

* Thu Jan  9 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-10mdk
- Let extra templates be found by OOo in $(insturl)/share/template/extra
- Enforce dependency on perl-XML-Twig with a version known to work
- Add Requires: libsane1, Xaw3d
- Really make it ExclusiveArch: %{ix86} ppc
- Patch34: Enable dmake clean (Debian patch)
- Patch35: Enable RTTI & other optimizations on PPC (CVS, 1.0.2)
- Patch36: Fix bridges on PPC with gcc3 (CVS, 1.0.2)
- Patch37: Add Finnish localizatin, use "35" as prefix code
- Patch38: Fix references to errno
- Patch51: Fix build with recent Mozilla LDAP API changes
- Patch404: Correctly load system libsane
- Patch405: Fix build with newer FreeType 2.1.X libraries (Red Hat)
- Source21: Fix OpenSymbol font encoding table (RH #69996)

* Wed Sep 11 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-9mdk
- Patch33: Stop forwarding to stderr things we don't actually care of
  while testing for spooler availability. No longer Requires: lpddaemon
- Patch32: Add PDF converters both suitable for either view or press
  purposes as printer option to global psprint.conf (Giuseppe)
- Update wrapper script to reflect that change (auto page size selection)
- Make it run on "msec level 4" systems:
  - Patch30: Get command line arguments the regular way and not from
    /proc/<pid>/cmdline
  - Patch31: Stop trying to read directories up to the root to
    determine the full path of a file. Instead, use a derivative from
    realpath()

* Fri Sep  6 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-8mdk
- Fix calling of create-instdb script for future releases
- Requires the right set of font packages in -l10n- packages
- Make oo* wrapper scripts actually a link to real ooffice wrapper
- Updates to Source5 (wrapper-script):
  - Handle switch to zh-{CN,TW}
  - Handle more and correct language => UI font mappings
  - No longer expand fontpath from chkfontpath since OOo does exactly
    the same since, well, probably OOo 1.0.0.
  - Workaround MDK::Common::update_gnomekderc bug where a new
    PPD_PageSize entry was not added on a new line, if there was no
    previous user psprint.conf available and the last section didn't
    terminate with a newline character
  - Handle oo<component> --lang <lang> to actually start <component>
    in selected <lang>

* Tue Sep  3 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-7mdk
- Don't provide nor require any libraries from OOo at all.
- Patch29: Make setup look for a "localized" instdb.ins script
  specified by a new -LANG: option. Hackaround until I find a way to
  do that in scp or autoresponse files.
- Source20: Add script to generate localized instdb.ins files from
  setup.ins. Aka let the right files to be installed for a user
  installation in his language.
- Updates to Source5 (wrapper-script):
  - Add more mappings to Language -> Country table
  - Add --lang option to override default from locale
  - Use "localized" instdb.ins file as mentioned above, for a user
    installation

* Mon Sep  2 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-6mdk
- Add support for Mozilla addressbook and LDAP sources
- Fix permissions on thesaurus files
- OpenOffice.org-help-* packages now depends on locale-* as an DrakX hack
- Don't forcibly Requires: OpenOffice.org-l10n-en as it works with the
  right language package you want alone.
- Don't forcibly Requires: OpenOffice.org-l10n-* in -help- packages as
  Help can work without. e.g. Having English help with only Russian UI
  localization installed.
- Make transmute-help-errfile.pl hint about the help package to
  install in <b> instead of ugly <tt> with some fonts.
- Merge with Red Hat releases:
  - Start Xvfb in %%{init_xdisplay}
  - Set default document fonts to Nimbus Roman No9 L, Luxi Sans and
    Luxi Mono instead of the non existant Thorndale
  - Make sure New/Wizard menus and OfficeObjects are localized

* Wed Aug 28 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-5mdk
- Patch19: Make WM_CLASS property for ICCCM compliant, aka don't have
  "VCLSalFrame" showing up in taskbar of KDE 3.0 (IZ #4830, CVS HEAD)
- Add Catalan localization:
  - Source17: Catalan strings (Jesus Corrius, Jordi Mas)
  - Patch25: Add Catalan localization as POSTAPP2TARGET
  - Patch26: Various fixes/additions for Catalan support
  - Patch27: Catalan is only implemented as ca-ES (Jesus Corrius)
- Source18: Add global ooffice configation file
- Updates to Source5 (wrapper-script):
  - Define user work directory to $HOME
  - Use XML::Twig to parse and generate XML code. That's cleaner, more
    flexible but surely not the fastest way
  - Handle global ooffice config in /etc/openoffice/openoffice.conf
    and users' in ~/.oofficerc
  - Automatically define font to use for user interface based on the
    current locale. Overridden with UI_FONT config variable
  - Possibly set UI font scaling based on current display resolution
    (Jakub Jelinek, Red Hat). However, as this is not enabled by
    default, you need to properly set FONT_SCALING first
  - Define paper size to use based on the current locale, and provided
    you don't have any printer configured yet. Otherwise, printerdrake
    will still generate the right default values.

* Tue Aug 27 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-4mdk
- Fix BuildRequires: for xmlparse (Ian C. Sison)
- Patch17: Add POSTAPP<N>TARGET to be executed after APP targets are built
- Patch18: Add Czech localization as POSTAPP1TARGET
- Updates to Source5 (wrapper-script):
  - Correctly set default language for documents. Aka, transmute user
    Linguistic.xml, or create it if it doesn't exist yet
- Merge with Red Hat releases (5 new patches):
  - Patch{20,21,24,26}: Add Czech localization
  - Patch22: Fix language list for some languages
  - Patch{40,41,42}: Add some patches from <http://oo-cs.sourceforge.net/>

* Mon Aug 26 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-3mdk
- Move localized help files to new OpenOffice.org-help-* subpackages
- Add localized help files for Spanish, Italian, Swedish, German
- Make help/<lang> a real directory, possibly empty
- Patch16: Check that we have the necessary help files. The rationale
  is if help/<lang>/err.html exists then, we have localized help data,
  possibly not installed. Otherwise, we won't have localized help and
  we try to fallback to English

* Fri Aug 23 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-2mdk
- Add C/J/K UI localization. Likewise for Danish, Greek, Turkish
- bzip2 helpcontent even if bigger than tgz. We don't want binaries in CVS
- Don't handle upgrade, from 1.0-Xmdk with links from help/$ISOCODE to
  help/en, to 1.0.1-Ymdk where we sometimes have a real directory for
  help/$ISOCODE. Language packages PreReq: OpenOffice.org = %%{version}
  UPDATE: That still doesn't work. As a workaround, you can update
  with l10n-en first. Then, install proper l10n-*. That way works.
- Updates to Source13 (gen-langpack):
  - Fix %%description, don't redefine variables correctly set
  - Map zh-{CN|TW} to zh. Aka. correctly Requires: the right locales-* package
- Updates to Source5 (wrapper-script):
  - Fix silly typo introduced post-tests in versions file
    regeneration. If you installed 1.0.1-1mdk, you'd have better luck
    to rm -rf ~/.openoffice prior to rerunning "ooffice".
  - Add current version tag if it does not exist already. This occurs
    when you upgrade from 1.0 to 1.0.1 for example.
  - If the user installation exists, then the versions file is likely
    to exist too. Otherwise, if we (or the user) nuked it away, then
    simply regenerate it.

* Thu Aug 22 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.1-1mdk
- OpenOffice.org 1.0.1
- Requires: libunixODBC2
- Requires: virtual package myspell-dictionary
- Add fully versioned Requires: libgcc
- BuildRequires: gcc3.2 >= 3.2-0.3mdk
- Build with STLport 4.5.3 everywhere
- New "libs" subpackage with OpenOffice.org libraries
- Really make dictionaries stuff go to %{_datadir}/dict/ooo/
- Add localized helpcontent for French
- Update Source7 (dpack-lang) to extract help files in some cases
- Merge Source6 (xlate-lang) with Debian 1.0.1-5
- Automatically regenerate Source6 (xlate-lang) data, add resource names
- Remove support for inexistant Finnish localisation
- Rewrite Source5 (wrapper-script) in full perl. Hopefully, it's now
  more flexible and readable. Also add or fixes the following:
  - Fix paths returned by chkconfig
  - Remove older dictionary symlinks that are now global
  - Don't remove user dictionaries however
  - Add ability to change UI localisation dynamically (merge ideas
    from both Debian and Red Hat people). You have to make sure the
    correct OpenOffice.org-l10-* package is installed however
- Source1[01]: Add additional templates and gallery files from upstream
- Source13: Automatically generate language subpackages
- Patch12: Add parallel build.pl from CVS HEAD (tune later)
- Patch14: Fix set_new_handler() exception specifications, if necessary
- Patch100: Add support for gcc3.2 to UNO
- Patch101: Any gcc >= 3.1.1 has versioned libstdc++ headers location
- Patch303: Add support for any gcc >= 3.1.1 includes dir in STLport
- Patch304: Add EXTRA_CXXFLAGS for RPM_OPT_FLAGS, some fixlets for STLport
- Patch400: Use system db3 library, but only on MDK 9.0 builds
- Patch403: Load libodbc library, not linker name library (from -devel package)
- Make sure we have a correct tcsh when building on MDK 9.0
- Nuke dependency on Sun JDK, use gcj instead (Jakub Jelinek)
- Use perl regexp for postprocess in xmlparse replacement (sed loops otherwise)
- Merge with Red Hat releases (12 new patches):
  - Don't uglify HTML for iso 8859-2
  - Don't catch SIGSEGV and SIGILL
  - Don't die if we cannot write registry cache
  - Don't build internal STLport when using gcc3
  - Make sure we don't do -I/usr/include, it's evil
  - Add support for compiler variables to configure script
  - Add support for new compiler variables to makefiles (COMPCC, COMPCXX)
  - Add debug for setup so that the /tmp directory is not removed
  - Fix broken inline assembly
  - Fix broken makefiles
  - Nuke STLport badlink
  - Use system getopt()

* Wed May 29 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-5mdk
- Add Russian localization
- Build with gcc3.1 for all supported arches in MDK 9.0
- Remove Patch3, Patch4, Patch13, Patch19, Patch22
- Merge Patch22 (gcc31-misc) and Patch13 (gcc3-linker) in Patch5 (mdkconfig)
- Patch3: Add support for gcc3 on PPC
- Patch4: Workaround gcc3.1 bugs on PPC
- Patch19: Don't copy nor install at setup time standard libraries
- Patch22: Improve font server discovery (OOo 1.0-branch)
- Patch23: Updates to lingucomponent from OOo 1.0-branch:
  - Register own hypenation dictionaries (IZ #45555, IZ #4687)
  - Fix segfault under Thesaurus (IZ #4435)
  - Enable shared spellchecking capabilities
- Update Source4 (local autoresponse) to disable Java detection
- Update Source5 (wrapper script):
  - Better detection of setup failure for user installation
  - Remove any reference to en_US dictionaries for now since OOo
    provides shared ones that work
  - Better handling of broken links in the ~/.openoffice/user/worbook/
    directory. Also possibly unregister the previous dictionary

* Wed May 22 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-4mdk
- Patch22: Misc patches for gcc3.1 (experimental)
- Rebuild with gcc3.1-1mdk in Cooker

* Wed May 15 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-3mdk
- Default to gcc3.0 in Cooker/x86 for now
- Only build STLport 4.5.3 with gcc-3.0+ builds
- BuildRequires: blackdown-j2sdk = 1.3.1 on PPC (Stew)
- Patch20: cpputools regcomp workaround on PPC (Stew, IZ #3980)
- Patch21: Move OOo Math into the correct GNOME integration module
- Use official OpenOffice.org 1.0 menu icons
- Update and clean %%description to notify language packs available
- Update KDE and GNOME integration
- Update OOo Math document association
- Update Source4 (local autoresponse file) to detect Java Runtime
- Disable desktop (KDE, GNOME, CDE) integration at user's level

* Tue May  7 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-2mdk
- Build Mozilla Address book on X86. Later for PPC
- BuildRequires: freetype2-devel
- Patch17: Minor fontcache fix (copy weight attribute) from CVS
- Patch18: Build with system FreeType 2 library
- Patch19: Don't install standard libraries (libgcc_s, libstdc++)
- Update Patch8 (no-mozab) to not install mozab and runtime from setup
- Update specfile to remove hackage now done by the above two patches
- Update Patch9 (user-fontpath) to apply to the new oounix/ directory
- Update Source5 (wrapper script):
  - If ~/.openoffice user directory is not detected, remove any
    reference to that directory in ~/.sversionrc, if that file exists
  - Check that user installation succeeded. Exit 1 otherwise

* Fri May  3 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-1mdk
- OpenOffice.org 1.0
- Epoch: 1 since openoffice is obsoleted
- Remove Patch10 (psprint-euro) since merged upstream
- Patch10: Fix configure script with NULL statement for X check on Darwin
- Update KDE applnk files, icons and MIME associations unpacking
- Update Source5 (wrapper script) to patch new version tag if a
  previous installation of 641-series is found

* Tue Apr 16 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0-0.1mdk
- Update to OpenOffice.org 641d
- Package is now called OpenOffice.org. Full transition for the file
  hierarchy and revamp of "ooffice" wrapper script will happen later
  though. As this ChangeLog is becoming bigger and bigger ;-)
- ExclusiveArch: %%{ix86} ppc
- Update %%description to clarify myspell purposes
- Add northern languages: Swedish, Finnish, Polish
- Revamp compiler selection:
  - Use gcc-2.95.x on Mandrake Linux 8.2/PowerPC
  - Use gcc-3.0.4 on Mandrake Linux 8.2/Intel x86
  - Use gcc-3.1 on Mandrake Linux 9.0/Intel x86 [LATER]
- Split Patch2 into Patch1 (CLK_TCK), Patch[34] (gcc3[01]-libs)
- Remove Patch6 (bison-1.30+) since merged upstream
- Regenerate Patch3 (MDK config) into Patch5
- Regenerate Patch4 (exceptions specifications) into Patch6
- Update Patch6 with more excp-fixes for bridges test programs
- Update Patch8 (no-mozab) to remove dependency on moz module
- Patch11: Add support for gcc-3.1
- Patch12: Add support for gcc-3.1 to STLport-4.5.3
- Patch13: gcc3+ linker should be g++ instead of gcc
- Patch14: Fix main() return values in bridges tests
- Patch15: Workaround _STL to std:: for gcc < 3.0
- Patch16: JDK 1.3 does exist on PPC too
- Fix /net installation under Xvfb in %%install
- Fix instdb.ins to get rid of $RPM_BUILD_ROOT
- Remove workaround for English wordbook in %%install
- Update "ooffice" wrapper script to reflect this change
- Also make sure to remove (possibly update) broken links to dictionaries

* Wed Mar 13 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-6mdk
- BuildRequires: jdk = 1.3.1 exactly
- Disable strict aliasing for all gcc builds. aka. Fix copy-pasting in
  Calc component.

* Wed Mar  6 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-5mdk
- Add mimetypes item to menu entries
- Fix component wrapper scripts
- Fix %%post to get language from LC_MESSAGES environment variable
  instead of /etc/sysconfig/i18n
- Update the ooffice wrapper script to get rid of possible
  /usr/share/fonts/ttf/japanese/ font path that could cause
  OpenOffice.org to crash

* Mon Mar  4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-4mdk
- Update %%description to note the existence of myspell-* packages
- Fix %%post and enhance instdb.ins mutation
- Source5: Updates to the ooffice wrapper script to support
  registration of dictionary files in the user's installation

* Mon Mar  4 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-3mdk
- Patch9: Fix printing of Euro symbol (Till, Giuseppe)
- Source5: Updates to the ooffice wrapper script:
  - Enhance even more to take the result of chkfontpath into account,
    if installed. Otherwise, default to the old method
  - Remove any entry in ~/.sversionrc if OpenOffice.org was not
    provided from this package
  - Workaround location of English workdbook

* Thu Feb 28 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-2mdk
- Clean rebuild with more languages: Spanish, Dutch, Italian, Portugese
- Add KDE icons and MIME associations
- Patch8: Support extra font paths with the SAL_FONTPATH_USER variable
- Source5: Enhance with extra font paths (TrueType and Type1 fonts)

* Tue Feb 26 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 6.0.41-1mdk
- Release 641c
- Support (experimental) auto-selection of language pack
- 5 new sources:
  - Source3: Global autoresponse file for rpm build
  - Source4: Local autoresponse file for user setup
  - Source5: OpenOffice.org wrapper script (setup if necessary)
  - Source6: Misc hashes related to language sets
  - Source7: Unpack language sets
- 8 new patches:
  - Patch0: Add support/fixes for gcc-"2.96"
  - Patch1: Add support/fixes for gcc-3.0.4
  - Patch2: Exception patch for STLport 4.5.3 and gcc3
  - Patch3: MDK config (CFLAGS et al.)
  - Patch4: Fix exception specifications here and there
  - Patch5: Hackery around zipdep
  - Patch6: Hackery for new bison (1.30+)
  - Patch7: Don't build Mozilla Address Book

* Mon Oct 23 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 6.0.5-1mdk
- Initial Release

# end of file