summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorhira <hira@pkgsrc.org>2008-10-14 11:02:24 +0000
committerhira <hira@pkgsrc.org>2008-10-14 11:02:24 +0000
commit59230131f35d5b9e38cff8596a061660efcd1fa6 (patch)
tree768a221595539e52131066858dda381b7c10e1e0 /misc
parentcb9875277de8caa2cf2cdd064aae3a53e74d98e0 (diff)
downloadpkgsrc-59230131f35d5b9e38cff8596a061660efcd1fa6.tar.gz
Initial import of OpenOffice.org 3.0.0 as misc/openoffice3.
Release note (will be available): http://development.openoffice.org/releases/3.0.0.html
Diffstat (limited to 'misc')
-rw-r--r--misc/openoffice3/DESCR14
-rw-r--r--misc/openoffice3/MESSAGE10
-rw-r--r--misc/openoffice3/Makefile222
-rw-r--r--misc/openoffice3/Makefile.FreeBSD20
-rw-r--r--misc/openoffice3/Makefile.NetBSD24
-rw-r--r--misc/openoffice3/PLIST15
-rw-r--r--misc/openoffice3/distinfo81
-rw-r--r--misc/openoffice3/options.mk120
-rw-r--r--misc/openoffice3/patches/patch-ac22
-rw-r--r--misc/openoffice3/patches/patch-ad47
-rw-r--r--misc/openoffice3/patches/patch-ag21
-rw-r--r--misc/openoffice3/patches/patch-ah94
-rw-r--r--misc/openoffice3/patches/patch-ai13
-rw-r--r--misc/openoffice3/patches/patch-ak106
-rw-r--r--misc/openoffice3/patches/patch-am13
-rw-r--r--misc/openoffice3/patches/patch-an22
-rw-r--r--misc/openoffice3/patches/patch-ao19
-rw-r--r--misc/openoffice3/patches/patch-ap79
-rw-r--r--misc/openoffice3/patches/patch-aq22
-rw-r--r--misc/openoffice3/patches/patch-ar24
-rw-r--r--misc/openoffice3/patches/patch-as48
-rw-r--r--misc/openoffice3/patches/patch-aw23
-rw-r--r--misc/openoffice3/patches/patch-ba197
-rw-r--r--misc/openoffice3/patches/patch-bb22
-rw-r--r--misc/openoffice3/patches/patch-bd17
-rw-r--r--misc/openoffice3/patches/patch-bf13
-rw-r--r--misc/openoffice3/patches/patch-bg15
-rw-r--r--misc/openoffice3/patches/patch-bh12
-rw-r--r--misc/openoffice3/patches/patch-bi13
-rw-r--r--misc/openoffice3/patches/patch-bj20
-rw-r--r--misc/openoffice3/patches/patch-bk18
-rw-r--r--misc/openoffice3/patches/patch-bl12
-rw-r--r--misc/openoffice3/patches/patch-bm18
-rw-r--r--misc/openoffice3/patches/patch-bn16
-rw-r--r--misc/openoffice3/patches/patch-bo13
-rw-r--r--misc/openoffice3/patches/patch-bq29
-rw-r--r--misc/openoffice3/patches/patch-br58
-rw-r--r--misc/openoffice3/patches/patch-bs36
-rw-r--r--misc/openoffice3/patches/patch-bv29
-rw-r--r--misc/openoffice3/patches/patch-bw13
-rw-r--r--misc/openoffice3/patches/patch-bx14
-rw-r--r--misc/openoffice3/patches/patch-by23
-rw-r--r--misc/openoffice3/patches/patch-ch183
-rw-r--r--misc/openoffice3/patches/patch-ci19
-rw-r--r--misc/openoffice3/patches/patch-cj19
-rw-r--r--misc/openoffice3/patches/patch-ck21
-rw-r--r--misc/openoffice3/patches/patch-cn32
-rw-r--r--misc/openoffice3/patches/patch-cp12
-rw-r--r--misc/openoffice3/patches/patch-cq13
-rw-r--r--misc/openoffice3/patches/patch-cr22
-rw-r--r--misc/openoffice3/patches/patch-cs183
-rw-r--r--misc/openoffice3/patches/patch-ct21
-rw-r--r--misc/openoffice3/patches/patch-cu13
-rw-r--r--misc/openoffice3/patches/patch-cv12
-rw-r--r--misc/openoffice3/patches/patch-cw30
-rw-r--r--misc/openoffice3/patches/patch-cx16
-rw-r--r--misc/openoffice3/patches/patch-cy24
-rw-r--r--misc/openoffice3/patches/patch-dc35
-rw-r--r--misc/openoffice3/patches/patch-dd35
-rw-r--r--misc/openoffice3/patches/patch-de95
-rw-r--r--misc/openoffice3/patches/patch-dh15
-rw-r--r--misc/openoffice3/patches/patch-di22
-rw-r--r--misc/openoffice3/patches/patch-dj13
-rw-r--r--misc/openoffice3/patches/patch-dk13
-rw-r--r--misc/openoffice3/patches/patch-dl16
-rw-r--r--misc/openoffice3/patches/patch-do22
-rw-r--r--misc/openoffice3/patches/patch-dp13
-rw-r--r--misc/openoffice3/patches/patch-dt13
-rw-r--r--misc/openoffice3/patches/patch-du23
-rw-r--r--misc/openoffice3/patches/patch-dw14
-rw-r--r--misc/openoffice3/patches/patch-dx14
-rw-r--r--misc/openoffice3/patches/patch-dy22
72 files changed, 2632 insertions, 0 deletions
diff --git a/misc/openoffice3/DESCR b/misc/openoffice3/DESCR
new file mode 100644
index 00000000000..0eecb8e7ef8
--- /dev/null
+++ b/misc/openoffice3/DESCR
@@ -0,0 +1,14 @@
+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, and drawing program,
+with a user interface and feature set similar to other office suites.
+
+Components include:
+ * A universal word processing application for creating business
+ letters, extensive text documents, professional layouts, and HTML
+ documents.
+ * A sophisticated application for performing advanced spreadsheet
+ functions, such as analyzing figures, creating lists, and viewing data.
+ * A tool for creating effective eye-catching presentations.
+ * A vector-oriented draw module that enables the creation of 3D
+ illustrations.
diff --git a/misc/openoffice3/MESSAGE b/misc/openoffice3/MESSAGE
new file mode 100644
index 00000000000..79da4582ad5
--- /dev/null
+++ b/misc/openoffice3/MESSAGE
@@ -0,0 +1,10 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+ OpenOffice has now been installed in ${PREFIX}/${OO_RELEASE}.
+
+ Before using this package for the first time, each user has to run
+ a setup program, which is automatically invoked at the first start.
+ Thereafter, OpenOffice can be started using the
+ ${PREFIX}/bin/soffice command.
+===========================================================================
diff --git a/misc/openoffice3/Makefile b/misc/openoffice3/Makefile
new file mode 100644
index 00000000000..af9d1908e1e
--- /dev/null
+++ b/misc/openoffice3/Makefile
@@ -0,0 +1,222 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+#
+
+OO_VER= 3.0.0
+OO_TAG= OOO300_m9
+DISTNAME= openoffice-${OO_VER}
+PKGNAME= openoffice3-${OO_VER}
+CATEGORIES= misc
+MASTER_SITES= ${MASTER_SITE_OPENOFFICE:=stable/${OO_VER}/}
+DIST_SUBDIR= ${DISTNAME}
+
+DISTFILES= OOo_${OO_VER}_src_core.tar.bz2
+DISTFILES+= OOo_${OO_VER}_src_binfilter.tar.bz2
+DISTFILES+= OOo_${OO_VER}_src_l10n.tar.bz2
+DISTFILES+= OOo_${OO_VER}_src_system.tar.bz2
+DISTFILES+= OOo_${OO_VER}_src_extensions.tar.bz2
+
+MAINTAINER= hira@NetBSD.org
+HOMEPAGE= http://www.openoffice.org/
+COMMENT= Integrated office productivity suite (version 3)
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
+BUILD_DEPENDS+= zip-[0-9]*:../../archivers/zip
+BUILD_DEPENDS+= unzip-[0-9]*:../../archivers/unzip
+BUILD_DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip
+
+DEPENDS+= libpaper-[0-9]*:../../print/libpaper
+
+.include "../../mk/bsd.prefs.mk"
+
+WRKSRC= ${WRKDIR}/${OO_TAG}
+CONFIGURE_DIRS= config_office
+
+# Cannot compile with 3.3.x (GCC Bugzilla Bug 16879).
+GCC_REQD+= 3.4
+USE_LANGUAGES+= c c++
+
+CONFLICTS+= staroffice-[0-9]*
+CONFLICTS+= openoffice-[0-9]*
+CONFLICTS+= openoffice2-[0-9]*
+CONFLICTS+= openoffice-bin-[0-9]*
+CONFLICTS+= openoffice2-bin-[0-9]*
+CONFLICTS+= openoffice-linux-[0-9]*
+
+USE_DIRS+= xdg-1.1
+USE_TOOLS+= bash gmake imake perl pkg-config tar
+PTHREAD_OPTS+= require
+PTHREAD_AUTO_VARS= yes
+
+ONLY_FOR_PLATFORM= FreeBSD-*-i386 FreeBSD-*-x86_64
+ONLY_FOR_PLATFORM+= NetBSD-1.6Z[G-Z]*-i386 NetBSD-[2-9]*-i386
+ONLY_FOR_PLATFORM+= NetBSD-1.6Z[G-Z]*-x86_64 NetBSD-[2-9]*-x86_64
+
+GNU_CONFIGURE= yes
+
+REPLACE_PERL+= sd/res/webview/editpic.pl \
+ sd/res/webview/poll.pl \
+ sd/res/webview/savepic.pl \
+ sd/res/webview/show.pl \
+ sd/res/webview/webview.pl
+REPLACE_PYTHON+= scripting/source/pyprov/mailmerge.py
+
+SUBST_CLASSES+= bash
+SUBST_STAGE.bash= post-patch
+SUBST_MESSAGE.bash= Fix hard-coded path
+SUBST_FILES.bash= hunspell/hunspell-1.1.12.patch
+SUBST_SED.bash+= -e 's,@BASH@,${BASH},g'
+
+SUBST_CLASSES+= lib
+SUBST_STAGE.lib= post-patch
+SUBST_MESSAGE.lib= Adding library paths
+SUBST_FILES.lib= solenv/inc/pkgsrc.mk
+.for pkg in db4 expat jpeg zlib
+SUBST_SED.lib+= -e 's,@BLNK_PREFIX_${pkg}@,${BUILDLINK_PREFIX.${pkg}},g'
+LIBS+= -L${BUILDLINK_PREFIX.${pkg}}/lib
+LIBS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.${pkg}}/lib
+.endfor
+
+CONFIGURE_ENV+= LIBS=${LIBS:O:u:Q}
+CONFIGURE_ENV+= X_LIBS=${X11_LDFLAGS:M*:Q}
+CONFIGURE_ENV+= BLNK_PREFIX_db4=${BUILDLINK_PREFIX.db4}
+
+CONFIGURE_ARGS+= --with-use-shell=bash
+CONFIGURE_ARGS+= --enable-binfilter
+CONFIGURE_ARGS+= --enable-cairo
+CONFIGURE_ARGS+= --disable-systray
+CONFIGURE_ARGS+= --disable-ldap
+CONFIGURE_ARGS+= --with-system-stdlibs
+CONFIGURE_ARGS+= --with-system-cairo
+CONFIGURE_ARGS+= --with-system-curl
+CONFIGURE_ARGS+= --with-system-db
+CONFIGURE_ARGS+= --with-system-expat
+CONFIGURE_ARGS+= --with-system-freetype
+CONFIGURE_ARGS+= --with-system-jpeg
+CONFIGURE_ARGS+= --with-system-libxml2
+CONFIGURE_ARGS+= --with-system-libxslt
+CONFIGURE_ARGS+= --with-system-neon
+CONFIGURE_ARGS+= --with-system-python
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --with-dynamic-xinerama
+
+# Enable extensions
+CONFIGURE_ARGS+= --enable-minimizer
+CONFIGURE_ARGS+= --enable-presenter-console
+CONFIGURE_ARGS+= --enable-pdfimport
+CONFIGURE_ARGS+= --enable-wiki-publisher
+CONFIGURE_ARGS+= --enable-ogltrans
+CONFIGURE_ARGS+= --enable-report-builder
+
+# `portable' supports all platforms.
+CONFIGURE_ARGS+= --enable-epm --with-package-format=portable
+
+# Disable odk, gcjaot.
+CONFIGURE_ARGS+= --disable-odk --disable-gcjaot
+
+# NOTE: In this version, this value should be separated by space (comma
+# causes build error).
+CONFIGURE_ARGS+= --with-lang=${OO_LANGS:Q}
+
+.include "options.mk"
+
+UNLIMIT_RESOURCES+= datasize
+
+OO_RELEASE= OpenOffice.org${OO_VER}
+PLIST_SRC+= ${PKGDIR}/PLIST
+PLIST_SRC+= ${WRKDIR}/PLIST
+MESSAGE_SUBST+= OO_RELEASE=${OO_RELEASE}
+INSTALLATION_DIRS= bin ${OO_RELEASE} share/applications
+
+OO_UNXNAME= openoffice.org3
+OO_PKGPATH= ${WRKSRC}/instsetoo_native/${OPENOFFICE_OUTPATH}.pro/OpenOffice/portable/install
+OO_PROGRAMS= scalc sdraw simpress soffice swriter unopkg
+OO_PREFIX= ${DESTDIR}${PREFIX}/${OO_RELEASE}
+
+post-extract:
+ cd ${WRKSRC}/bridges/source/cpp_uno && \
+ mv gcc3_netbsd_intel gcc3_netbsd_intel.orig && \
+ cp -Rp gcc3_freebsd_intel gcc3_netbsd_intel && \
+ cp -Rp gcc3_freebsd_x86-64 gcc3_netbsd_x86-64
+
+do-build:
+ ${_ULIMIT_CMD} ${SETENV} ${MAKE_ENV} bash -c "cd ${WRKSRC} && ./bootstrap && source ${OPENOFFICE_SETFILE}Env.Set.sh && dmake build_all"
+
+post-build:
+ cd ${WRKDIR} && \
+ rm -fr opt && \
+ for l in ${OO_LANGS}; do \
+ for f in ${OO_PKGPATH:Q}/$${l}/*/*.sw; do \
+ tar xpfk $$f; \
+ done; \
+ done
+ cd ${WRKDIR} && \
+ rm -fr xdg && \
+ mv opt/${OO_UNXNAME}/share/xdg .
+ cd ${WRKDIR}/opt/openoffice.org && \
+ chmod ${SHAREMODE} basis3.0/program/hid.lst \
+ basis3.0/program/testtoolrc
+ ${ECHO} "#!${SH}" > ${WRKDIR}/${OO_UNXNAME}
+ ${ECHO} "exec ${OO_PREFIX}/${OO_UNXNAME}/program/soffice \"\$$@\"" \
+ >> ${WRKDIR}/${OO_UNXNAME}
+ ${ECHO} "#!${SH}" > ${WRKDIR}/${OO_UNXNAME}-printeradmin
+ ${ECHO} "exec ${OO_PREFIX}/${OO_UNXNAME}/program/spadmin" \
+ >> ${WRKDIR}/${OO_UNXNAME}-printeradmin
+
+do-install:
+ cd ${WRKDIR}/opt && \
+ tar cf - openoffice.org ${OO_UNXNAME} | tar Cxpf ${OO_PREFIX} -
+ for f in ${OO_PROGRAMS}; do \
+ ln -sf ${OO_PREFIX}/${OO_UNXNAME}/program/$$f \
+ ${DESTDIR}${PREFIX}/bin/$$f; \
+ done
+ ${INSTALL_DATA} ${WRKDIR}/xdg/* ${DESTDIR}${PREFIX}/share/applications
+ ${INSTALL_SCRIPT} ${WRKDIR}/${OO_UNXNAME} ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKDIR}/${OO_UNXNAME}-printeradmin \
+ ${DESTDIR}${PREFIX}/bin
+
+post-install:
+ cd ${DESTDIR}${PREFIX} && \
+ find ${OO_RELEASE} \! -type d -print | \
+ sort > ${WRKDIR}/PLIST && \
+ find ${OO_RELEASE} -type d -print | sort -r | \
+ awk '{print("@dirrm "$$1)}' >> ${WRKDIR}/PLIST
+ ${ECHO} bin/${OO_UNXNAME} >> ${WRKDIR}/PLIST
+ ${ECHO} bin/${OO_UNXNAME}-printeradmin >> ${WRKDIR}/PLIST
+
+# OS specific Makefile
+.if exists(Makefile.${OPSYS})
+. include "Makefile.${OPSYS}"
+.endif
+
+.include "../../mk/compiler.mk"
+
+.include "../../lang/python/application.mk"
+
+.include "../../databases/db4/buildlink3.mk"
+.include "../../devel/gperf/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/jpeg/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../www/neon/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXaw/buildlink3.mk"
+.include "../../x11/libXcursor/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/misc/openoffice3/Makefile.FreeBSD b/misc/openoffice3/Makefile.FreeBSD
new file mode 100644
index 00000000000..a33c87960ba
--- /dev/null
+++ b/misc/openoffice3/Makefile.FreeBSD
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile.FreeBSD,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+#
+
+# This package needs native Java.
+PKG_JVMS_ACCEPTED= jdk14 jdk15
+
+BUILD_DEPENDS+= coreutils>=*:../../sysutils/coreutils
+BUILD_DEPENDS+= patch>=*:../../devel/patch
+CONFIGURE_ARGS+= --with-gnu-cp=${PREFIX}/bin/gcp
+CONFIGURE_ARGS+= --with-gnu-patch=${PREFIX}/bin/gpatch
+
+.if ${MACHINE_ARCH} == "i386"
+#OPENOFFICE_DLLSUFFIX= fi
+OPENOFFICE_OUTPATH= unxfbsdi
+OPENOFFICE_SETFILE= FreeBSDX86
+.elif ${MACHINE_ARCH} == "x86_64"
+#OPENOFFICE_DLLSUFFIX= fx
+OPENOFFICE_OUTPATH= unxfbsdx
+OPENOFFICE_SETFILE= FreeBSDAMD
+.endif
diff --git a/misc/openoffice3/Makefile.NetBSD b/misc/openoffice3/Makefile.NetBSD
new file mode 100644
index 00000000000..a5ea3f84539
--- /dev/null
+++ b/misc/openoffice3/Makefile.NetBSD
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile.NetBSD,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+#
+
+# This package needs native Java.
+PKG_JVMS_ACCEPTED= jdk14 jdk15
+
+# *.pc files are required, but these don't exist on NetBSD.
+.if defined(X11_TYPE) && !empty(X11_TYPE:Mnative)
+. for _pkg_ in freetype2 Xfixes Xrandr Xrender
+. if !exists(${X11BASE}/lib/pkgconfig/${_pkg_:tl}.pc)
+USE_BUILTIN.${_pkg_}= no
+. endif
+. endfor
+.endif
+
+.if ${MACHINE_ARCH} == "i386"
+#OPENOFFICE_DLLSUFFIX= bi
+OPENOFFICE_OUTPATH= unxbsdi3
+OPENOFFICE_SETFILE= NetBSDX86
+.elif ${MACHINE_ARCH} == "x86_64"
+#OPENOFFICE_DLLSUFFIX= bx
+OPENOFFICE_OUTPATH= unxbsdx3
+OPENOFFICE_SETFILE= NetBSDX86-64
+.endif
diff --git a/misc/openoffice3/PLIST b/misc/openoffice3/PLIST
new file mode 100644
index 00000000000..d534666f578
--- /dev/null
+++ b/misc/openoffice3/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+bin/scalc
+bin/sdraw
+bin/simpress
+bin/soffice
+bin/swriter
+bin/unopkg
+share/applications/base.desktop
+share/applications/calc.desktop
+share/applications/draw.desktop
+share/applications/impress.desktop
+share/applications/math.desktop
+share/applications/printeradmin.desktop
+share/applications/qstart.desktop
+share/applications/writer.desktop
diff --git a/misc/openoffice3/distinfo b/misc/openoffice3/distinfo
new file mode 100644
index 00000000000..564b06d3c7f
--- /dev/null
+++ b/misc/openoffice3/distinfo
@@ -0,0 +1,81 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+SHA1 (openoffice-3.0.0/OOo_3.0.0_src_binfilter.tar.bz2) = 09ff91fd871f00c696befa8064fe04d7a88a3c8a
+RMD160 (openoffice-3.0.0/OOo_3.0.0_src_binfilter.tar.bz2) = edc71b8b0596d63e60431c7266140bf5188abc6d
+Size (openoffice-3.0.0/OOo_3.0.0_src_binfilter.tar.bz2) = 6596201 bytes
+SHA1 (openoffice-3.0.0/OOo_3.0.0_src_core.tar.bz2) = 8fc1e6140f8a0695accf8d34746253af431c2542
+RMD160 (openoffice-3.0.0/OOo_3.0.0_src_core.tar.bz2) = 43be2cf77523d0d95ec4c684fe705fa9b4ee4b9d
+Size (openoffice-3.0.0/OOo_3.0.0_src_core.tar.bz2) = 183003517 bytes
+SHA1 (openoffice-3.0.0/OOo_3.0.0_src_extensions.tar.bz2) = 1632374bf75eb6080c0d36e88fd981529be17a0f
+RMD160 (openoffice-3.0.0/OOo_3.0.0_src_extensions.tar.bz2) = a19bdd687abc7829de937b46e4e484a4b27f045b
+Size (openoffice-3.0.0/OOo_3.0.0_src_extensions.tar.bz2) = 13941316 bytes
+SHA1 (openoffice-3.0.0/OOo_3.0.0_src_l10n.tar.bz2) = 0ee7f44cea5549a3d3473ff7669974e8914caf97
+RMD160 (openoffice-3.0.0/OOo_3.0.0_src_l10n.tar.bz2) = cb3eac1537b75cb34485037b916b634b90c6ff13
+Size (openoffice-3.0.0/OOo_3.0.0_src_l10n.tar.bz2) = 86009445 bytes
+SHA1 (openoffice-3.0.0/OOo_3.0.0_src_system.tar.bz2) = b8af1787bd4651c808d298e81ee797bf2b7ebdcd
+RMD160 (openoffice-3.0.0/OOo_3.0.0_src_system.tar.bz2) = 10c8b58ade00cf22fdb699f38d60abee8e150436
+Size (openoffice-3.0.0/OOo_3.0.0_src_system.tar.bz2) = 44882699 bytes
+SHA1 (patch-ac) = ed6d84d40c3543eed754d74a5e65caf137f31c3d
+SHA1 (patch-ad) = 9513865551837a69202f4595232c36a656f200ca
+SHA1 (patch-ag) = 6c2f17424cfc85b5bc923a650167f14b7acabfd4
+SHA1 (patch-ah) = e0a7dd2bf36e5009b5b8a5ddc593a5a78c01a012
+SHA1 (patch-ai) = 268c8107052d2650a78d8048513f4acb2a1ee0f1
+SHA1 (patch-ak) = a121e98afdc1e22a5579cb0c70759e8a16d57662
+SHA1 (patch-am) = 8e497298dd5534bd0ef438c22595c1c0f63912a5
+SHA1 (patch-an) = cdf677a8e135fd4b447eef006558c7fea4df0be6
+SHA1 (patch-ao) = a83178adec44571ebcf7a4dd66bda52d004d465c
+SHA1 (patch-ap) = 806668c47374d46cc28ef41b17bf3632b9a81020
+SHA1 (patch-aq) = 651dad01336dce6901f1aacebe438b565a321be0
+SHA1 (patch-ar) = e3592ddc51a311a90d727ef8b595944a0ac3e623
+SHA1 (patch-as) = 6f6992430e3cea8a914ad3dcbe9ebcdf288ddc2a
+SHA1 (patch-aw) = fdd1665c729cd17d8381ab39f2e6672164a058ad
+SHA1 (patch-ba) = 0b715158cc2e2b80a5cc6e5127a3c2271eabb483
+SHA1 (patch-bb) = a2fe8b7aff8c875bdf15c70619b430f1fdbfa053
+SHA1 (patch-bd) = 8faf878760e476ed13a4506f0615f8b544a2abd4
+SHA1 (patch-bf) = d2e2363e7e08d675e3a6b9356d1ffac6d10148de
+SHA1 (patch-bg) = 0eeb3e521b3d7c47efa67bf38a1ec598056ab32a
+SHA1 (patch-bh) = 39322769872a33293d9dad56b947ca2d6d5069df
+SHA1 (patch-bi) = f9d286d8dd93c7ba99fd0ca809c6dfac5e763464
+SHA1 (patch-bj) = 80685500062b9a17e16732a9a6da7a7d1d1ed1f6
+SHA1 (patch-bk) = 5a5c03a0c965edb32e95ad342f330e2b0eaf3d9c
+SHA1 (patch-bl) = 28beb128f19199a1a86965d2e2b6d42a2565224c
+SHA1 (patch-bm) = 0f7367782155c1d0f0459912aac69a1c759ad7fa
+SHA1 (patch-bn) = 6f21ecf499135b5b47ed191eca79848b4c404447
+SHA1 (patch-bo) = 3e4bcccd0a7cea535e443d750039fa844380f8bc
+SHA1 (patch-bq) = 5a78794aac28cefb9386034e6937c8f63b2ebc65
+SHA1 (patch-br) = 2af5c86f4cf04b29cb3bab76e23b5d9b46445978
+SHA1 (patch-bs) = ede4ffcb762e89efbf95b6e4b644eb268534f1ca
+SHA1 (patch-bv) = bc035bdbc8420666a52417f2226e3e687d199e33
+SHA1 (patch-bw) = 223963fe59b71468420a697d8ea27c153b9f37ce
+SHA1 (patch-bx) = 157878e1fb4297f118ed0bbf06009506666fbc1c
+SHA1 (patch-by) = 1612b765467e51ca7498497d38a0bb6ac694f9a6
+SHA1 (patch-ch) = 0e3af3133273f2d82ad893bf1a165c0897dc0c3d
+SHA1 (patch-ci) = 4743cee1c391e04a53bd83f6ae7e58e737d08d1e
+SHA1 (patch-cj) = 45ff359ec795e5ef5c692e954d88912c74017162
+SHA1 (patch-ck) = 01925efa75759b3b8efda3ab109b0f6481f45a7f
+SHA1 (patch-cn) = 12e09dde1e8fd8afaf2f48fd6455625790b9ecc4
+SHA1 (patch-cp) = 35151ba658859c9d116ccdf44ec372c9e66435b1
+SHA1 (patch-cq) = 6691fd7fa330db000ec5a9319bf9030b83aa593d
+SHA1 (patch-cr) = aa797461919635c3e6aaa30678a7585d5640dedd
+SHA1 (patch-cs) = 10c7021fe46e702338f2f065fd666008a886292b
+SHA1 (patch-ct) = a06c5cbc543acecb4f18e858cd844302bbdb50b4
+SHA1 (patch-cu) = b930fd94413c2bdf23ea94b074e3bb5e93784009
+SHA1 (patch-cv) = 2e14a54d369a255ee39fcec7d4f1d2b11a8f4d2e
+SHA1 (patch-cw) = ba0a8da07bf6a25bb3e937f96e2827a70d70e9b9
+SHA1 (patch-cx) = db69e17d908e82cedd8cc28208fc7afec0cb3e47
+SHA1 (patch-cy) = 8d47bcf1da6f351f4f0cbf6a8355903094b0baee
+SHA1 (patch-dc) = 2a6b826ca2849110f33c612a4c4beba8f7e27e67
+SHA1 (patch-dd) = d733d6e54db93bbb7be5382ddf96cf83731a6176
+SHA1 (patch-de) = e594e9a7a4bb442adc33757c71d9d875abafd24d
+SHA1 (patch-dh) = 25d1c64a9531daf4a4f1d4fa616607b3eacfd4e0
+SHA1 (patch-di) = 571b3fb1c65ab76e8bdace418654fff2d45406cf
+SHA1 (patch-dj) = ca003c7964ad239fdd2406b0a3a76ae5e855d8d7
+SHA1 (patch-dk) = 1f022fe11b4b1c6cb960f416724054954442ee74
+SHA1 (patch-dl) = 100063c6239efddbc9b7bb994e607d2ea314844e
+SHA1 (patch-do) = c505e2e03912a068aa4666c8460b129447ec5a4e
+SHA1 (patch-dp) = ce90ba6c2cce3af1ade0257fd42106ea8345661b
+SHA1 (patch-dt) = 59964a31a8abbb324029653609b0decadbe03a75
+SHA1 (patch-du) = 3b806b2fec5af0e10753d52017224356651262f6
+SHA1 (patch-dw) = de171dec68a1a55a47f2652ecdad429020d773ef
+SHA1 (patch-dx) = 7579b1f7326951c57bd2ff597209c17d5d54f28d
+SHA1 (patch-dy) = 1feec77ce8c87fc1afb797401047669b3da41c54
diff --git a/misc/openoffice3/options.mk b/misc/openoffice3/options.mk
new file mode 100644
index 00000000000..6cd2bec5525
--- /dev/null
+++ b/misc/openoffice3/options.mk
@@ -0,0 +1,120 @@
+# $NetBSD: options.mk,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openoffice3
+PKG_SUPPORTED_OPTIONS= cups gnome gtk2 java kde ooo-external-libwpd
+PKG_OPTIONS_OPTIONAL_GROUPS= browser
+PKG_OPTIONS_GROUP.browser= firefox firefox3 seamonkey
+# The list from completelangiso in solenv/inc/postset.mk.
+OO_SUPPORTED_LANGUAGES= af ar as-IN be-BY bg br bn bn-BD bn-IN bs ca \
+ cs cy da de dz el en-GB en-US en-ZA eo es et \
+ eu fa fi fr ga gl gu-IN he hi-IN hr hu it ja \
+ ka km kn ko ku lo lt lv mk ms ml-IN mr-IN ne \
+ nb nl nn nr ns oc or-IN pa-IN pl pt pt-BR ru \
+ rw sk sl sh sr ss st sv sw sw-TZ te-IN ti-ER \
+ ta-IN th tn tr ts tg ur-IN uk uz ve vi xh \
+ zh-CN zh-TW zu
+.for l in ${OO_SUPPORTED_LANGUAGES}
+PKG_SUPPORTED_OPTIONS+= lang-${l}
+.endfor
+PKG_SUGGESTED_OPTIONS= firefox gtk2 lang-en-US
+PKG_OPTIONS_LEGACY_OPTS+= gnome-vfs:gnome
+
+.include "../../mk/bsd.options.mk"
+.include "../../mk/bsd.prefs.mk"
+
+.for l in ${PKG_OPTIONS:Mlang-*}
+OO_LANGS+= ${l:S/^lang-//1}
+.endfor
+OO_LANGS?= en-US
+
+.if !empty(PKG_OPTIONS:Mfirefox)
+CONFIGURE_ARGS+= --with-system-mozilla=firefox
+.include "../../www/firefox/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mfirefox3)
+CONFIGURE_ARGS+= --with-system-mozilla=firefox3
+.include "../../www/firefox3/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mseamonkey)
+CONFIGURE_ARGS+= --with-system-mozilla=seamonkey
+.include "../../www/seamonkey/buildlink3.mk"
+# The following browsers do not install *.pc files.
+#.elif !empty(PKG_OPTIONS:Mfirefox-gtk1)
+#CONFIGURE_ARGS+= --with-system-mozilla=firefox
+#.include "../../www/firefox-gtk1/buildlink3.mk"
+#.elif !empty(PKG_OPTIONS:Mseamonkey-gtk1)
+#CONFIGURE_ARGS+= --with-system-mozilla=seamonkey
+#.include "../../www/seamonkey-gtk1/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-mozilla
+.endif
+
+.if !empty(PKG_OPTIONS:Mooo-external-libwpd)
+CONFIGURE_ARGS+= --with-system-libwpd
+.include "../../converters/libwpd/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mcups)
+CONFIGURE_ARGS+= --enable-cups
+.include "../../print/cups/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-cups
+.endif
+
+.if !empty(PKG_OPTIONS:Mgnome)
+CONFIGURE_ARGS+= --enable-gnome-vfs --enable-evolution2
+.include "../../devel/GConf/buildlink3.mk"
+.include "../../devel/libbonobo/buildlink3.mk"
+.include "../../sysutils/gnome-vfs/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-gnome-vfs --disable-evolution2
+.endif
+
+.if !empty(PKG_OPTIONS:Mgtk2)
+CONFIGURE_ARGS+= --enable-gtk
+.include "../../x11/gtk2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-gtk
+.endif
+
+.if !empty(PKG_OPTIONS:Mjava)
+USE_JAVA2= yes
+DEPENDS+= apache-ant>=1.7.0:../../devel/apache-ant
+CONFIGURE_ARGS+= --with-java --disable-mediawiki
+
+# -rpath is missing for -lmawt. Please fix wip/jdk15.
+JAVA_XAWT_DIR= ${PKG_JAVA_HOME}/jre/lib/${MACHINE_ARCH}/xawt
+CONFIGURE_ENV+= LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JAVA_XAWT_DIR}"
+
+# I can't find wrapper of Java (${PREFIX}/bin/java).
+# It exists in ${PREFIX}/bin/ant.
+CONFIGURE_ENV+= JAVACMD="${PKG_JAVA_HOME}/bin/java"
+MAKE_ENV+= JAVACMD="${PKG_JAVA_HOME}/bin/java"
+
+# XXX
+RFLAG_AWTLIB= -L${PKG_JAVA_HOME}/jre/lib/${MACHINE_ARCH} -Wl,-R${PKG_JAVA_HOME}/jre/lib/${MACHINE_ARCH}
+
+.include "../../mk/java-env.mk"
+.include "../../mk/java-vm.mk"
+.else
+CONFIGURE_ARGS+= --without-java
+PKG_JAVA_HOME=
+JAVA_XAWT_DIR=
+RFLAG_AWTLIB=
+.endif
+
+SUBST_CLASSES+= java
+SUBST_STAGE.java= post-patch
+SUBST_MESSAGE.java= Adding JAVA_HOME
+SUBST_FILES.java= desktop/scripts/soffice.sh
+SUBST_FILES.java+= desktop/scripts/unopkg.sh
+SUBST_FILES.java+= padmin/source/spadmin.sh
+SUBST_SED.java+= -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
+SUBST_SED.java+= -e 's,@JAVA_XAWT_DIR@,${JAVA_XAWT_DIR},g'
+SUBST_SED.lib+= -e 's|@RFLAG_AWTLIB@|${RFLAG_AWTLIB}|g'
+
+.if !empty(PKG_OPTIONS:Mkde)
+CONFIGURE_ENV+= KDEDIR=${BUILDLINK_PREFIX.kdelibs:Q}
+CONFIGURE_ARGS+= --enable-kde --enable-kdeab
+.include "../../x11/kdelibs3/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-kde --disable-kdeab
+.endif
diff --git a/misc/openoffice3/patches/patch-ac b/misc/openoffice3/patches/patch-ac
new file mode 100644
index 00000000000..df7c9cb03b1
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/inc/osl/endian.h.orig 2007-02-17 23:15:28.000000000 +0900
++++ sal/inc/osl/endian.h 2007-02-17 23:16:59.000000000 +0900
+@@ -76,11 +76,14 @@
+ #ifdef NETBSD
+ # include <machine/endian.h>
+ # if BYTE_ORDER == LITTLE_ENDIAN
+-# define _LITTLE_ENDIAN
++# undef _BIG_ENDIAN
++# undef _PDP_ENDIAN
+ # elif BYTE_ORDER == BIG_ENDIAN
+-# define _BIG_ENDIAN
++# undef _LITTLE_ENDIAN
++# undef _PDP_ENDIAN
+ # elif BYTE_ORDER == PDP_ENDIAN
+-# define _PDP_ENDIAN
++# undef _LITTLE_ENDIAN
++# undef _BIG_ENDIAN
+ # endif
+ #endif
+
diff --git a/misc/openoffice3/patches/patch-ad b/misc/openoffice3/patches/patch-ad
new file mode 100644
index 00000000000..cbe5cf29ff4
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ad
@@ -0,0 +1,47 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/osl/unx/system.c.orig 2008-04-10 20:13:33.000000000 +0900
++++ sal/osl/unx/system.c 2008-08-23 12:45:39.000000000 +0900
+@@ -66,8 +66,11 @@
+ struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size )
+ #endif /* BUILD_OS_APPLEOSX */
+ #else /* MACOSX */
++#if defined (NETBSD) && (__NetBSD_Version__ < 299001000)
+ struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size )
++#endif /* (NETBSD) && (__NetBSD_Version__ < 299001000) */
+ #endif /* MACOSX */
++#if defined (NETBSD) && (__NetBSD_Version__ < 299001000)
+ {
+ struct passwd* res;
+
+@@ -133,8 +136,9 @@
+ return(res);
+ #endif /* MACOSX */
+ }
++#endif /* (NETBSD) && (__NetBSD_Version__ < 299001000) */
+
+-#if defined(NETBSD) || defined(MACOSX)
++#if (defined(NETBSD) && (__NetBSD_Version__ < 299001000)) || defined(MACOSX)
+ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
+ size_t buflen, struct passwd **result)
+ {
+@@ -427,7 +431,7 @@
+ }
+ #endif /* !defined(FREEBSD) || (__FreeBSD_version < 601103) */
+
+-#if defined(MACOSX)
++#if defined(MACOSX) || defined(NETBSD)
+ /*
+ * This section works around calls that are missing or broken
+ * in MacOS X 10.1.x and earlier.
+@@ -471,6 +475,10 @@
+ return nRet;
+ }
+
++#endif /* defined(MACOSX) || defined(NETBSD) */
++
++#if defined(MACOSX)
++
+ /* No reentrant asctime() either... */
+
+ /*******************************************************************************/
diff --git a/misc/openoffice3/patches/patch-ag b/misc/openoffice3/patches/patch-ag
new file mode 100644
index 00000000000..5a18c154b69
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ag
@@ -0,0 +1,21 @@
+$NetBSD: patch-ag,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/bin/checkdll.sh.orig 2007-02-17 17:27:21.000000000 +0900
++++ solenv/bin/checkdll.sh 2007-02-17 17:27:43.000000000 +0900
+@@ -37,7 +37,7 @@
+ # checkdll.sh - execute checkdll with all -L arguments to this script
+ # prepended to LD_LIBRARY_PATH
+
+-set -- `getopt "L:" "$@"` || {
++set -- `getopt "L:R:" "$@"` || {
+ echo "Usage: `basename $0` [-L library_path] <shared_library>" 1>&2
+ exit 1
+ }
+@@ -49,6 +49,7 @@
+ do
+ case $1 in
+ -L) shift; option=$1;;
++ -R) shift;;
+ --) break;;
+ esac
+ case "${libpath+X}" in
diff --git a/misc/openoffice3/patches/patch-ah b/misc/openoffice3/patches/patch-ah
new file mode 100644
index 00000000000..6c64c056a89
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ah
@@ -0,0 +1,94 @@
+$NetBSD: patch-ah,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/inc/_tg_app.mk.orig 2007-06-27 23:01:57.000000000 +0900
++++ solenv/inc/_tg_app.mk 2007-09-26 19:50:23.000000000 +0900
+@@ -94,7 +94,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_1.cmd
+ @echo $(APP1LINKER) $(APP1LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP1OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_1.cmd
+- @cat $(mktmp /dev/null $(APP1LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_1.cmd
++ @cat $(mktmp /dev/null $(APP1LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_1.cmd
+ @echo $(APP1LINKTYPEFLAG) $(APP1LIBSALCPPRT) $(APP1STDLIBS) $(APP1STDLIB) $(STDLIB1) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_1.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_1.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_1.cmd
+@@ -292,7 +292,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_2.cmd
+ @echo $(APP2LINKER) $(APP2LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP2OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_2.cmd
+- @cat $(mktmp /dev/null $(APP2LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_2.cmd
++ @cat $(mktmp /dev/null $(APP2LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_2.cmd
+ @echo $(APP2LINKTYPEFLAG) $(APP2LIBSALCPPRT) $(APP2STDLIBS) $(APP2STDLIB) $(STDLIB2) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_2.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_2.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_2.cmd
+@@ -490,7 +490,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_3.cmd
+ @echo $(APP3LINKER) $(APP3LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP3OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_3.cmd
+- @cat $(mktmp /dev/null $(APP3LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_3.cmd
++ @cat $(mktmp /dev/null $(APP3LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_3.cmd
+ @echo $(APP3LINKTYPEFLAG) $(APP3LIBSALCPPRT) $(APP3STDLIBS) $(APP3STDLIB) $(STDLIB3) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_3.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_3.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_3.cmd
+@@ -688,7 +688,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_4.cmd
+ @echo $(APP4LINKER) $(APP4LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP4OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_4.cmd
+- @cat $(mktmp /dev/null $(APP4LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_4.cmd
++ @cat $(mktmp /dev/null $(APP4LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_4.cmd
+ @echo $(APP4LINKTYPEFLAG) $(APP4LIBSALCPPRT) $(APP4STDLIBS) $(APP4STDLIB) $(STDLIB4) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_4.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_4.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_4.cmd
+@@ -886,7 +886,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_5.cmd
+ @echo $(APP5LINKER) $(APP5LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP5OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_5.cmd
+- @cat $(mktmp /dev/null $(APP5LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_5.cmd
++ @cat $(mktmp /dev/null $(APP5LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_5.cmd
+ @echo $(APP5LINKTYPEFLAG) $(APP5LIBSALCPPRT) $(APP5STDLIBS) $(APP5STDLIB) $(STDLIB5) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_5.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_5.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_5.cmd
+@@ -1084,7 +1084,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_6.cmd
+ @echo $(APP6LINKER) $(APP6LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP6OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_6.cmd
+- @cat $(mktmp /dev/null $(APP6LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_6.cmd
++ @cat $(mktmp /dev/null $(APP6LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_6.cmd
+ @echo $(APP6LINKTYPEFLAG) $(APP6LIBSALCPPRT) $(APP6STDLIBS) $(APP6STDLIB) $(STDLIB6) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_6.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_6.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_6.cmd
+@@ -1282,7 +1282,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_7.cmd
+ @echo $(APP7LINKER) $(APP7LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP7OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_7.cmd
+- @cat $(mktmp /dev/null $(APP7LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_7.cmd
++ @cat $(mktmp /dev/null $(APP7LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_7.cmd
+ @echo $(APP7LINKTYPEFLAG) $(APP7LIBSALCPPRT) $(APP7STDLIBS) $(APP7STDLIB) $(STDLIB7) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_7.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_7.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_7.cmd
+@@ -1480,7 +1480,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_8.cmd
+ @echo $(APP8LINKER) $(APP8LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP8OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_8.cmd
+- @cat $(mktmp /dev/null $(APP8LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_8.cmd
++ @cat $(mktmp /dev/null $(APP8LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_8.cmd
+ @echo $(APP8LINKTYPEFLAG) $(APP8LIBSALCPPRT) $(APP8STDLIBS) $(APP8STDLIB) $(STDLIB8) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_8.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_8.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_8.cmd
+@@ -1678,7 +1678,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_9.cmd
+ @echo $(APP9LINKER) $(APP9LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP9OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_9.cmd
+- @cat $(mktmp /dev/null $(APP9LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_9.cmd
++ @cat $(mktmp /dev/null $(APP9LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_9.cmd
+ @echo $(APP9LINKTYPEFLAG) $(APP9LIBSALCPPRT) $(APP9STDLIBS) $(APP9STDLIB) $(STDLIB9) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_9.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_9.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_9.cmd
+@@ -1876,7 +1876,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_10.cmd
+ @echo $(APP10LINKER) $(APP10LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP10OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_10.cmd
+- @cat $(mktmp /dev/null $(APP10LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_10.cmd
++ @cat $(mktmp /dev/null $(APP10LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_10.cmd
+ @echo $(APP10LINKTYPEFLAG) $(APP10LIBSALCPPRT) $(APP10STDLIBS) $(APP10STDLIB) $(STDLIB10) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_10.cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_10.cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_10.cmd
diff --git a/misc/openoffice3/patches/patch-ai b/misc/openoffice3/patches/patch-ai
new file mode 100644
index 00000000000..cf5281b7546
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/inc/tg_app.mk.orig 2007-07-02 18:23:33.000000000 +0900
++++ solenv/inc/tg_app.mk 2007-09-26 17:53:57.000000000 +0900
+@@ -131,7 +131,7 @@
+ @-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
+ @echo $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \
+ $(APP$(TNR)OBJS:s/.obj/.o/) '\' > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
+- @cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
++ @cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
+ @echo $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -o $@ >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
+ cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
+ @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
diff --git a/misc/openoffice3/patches/patch-ak b/misc/openoffice3/patches/patch-ak
new file mode 100644
index 00000000000..5f43c13eb0e
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ak
@@ -0,0 +1,106 @@
+$NetBSD: patch-ak,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- config_office/set_soenv.in.orig 2008-04-09 00:16:24.000000000 +0900
++++ config_office/set_soenv.in 2008-05-17 18:36:31.000000000 +0900
+@@ -40,7 +40,7 @@
+ #
+ my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $newline, $comment,
+ $comment4nt, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps,
+- $wps, $cur_dir, $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $MINGW,
++ $wps, $cur_dir, $par_dir, $I, $L, $R, $D, $buildenv, $answer, $tmp, $MINGW,
+ $USE_MINGW, $platform,
+ $cygwinver, $empty, $no_ant, $no_stl, $no_gcc_include,
+ $no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $unsetvarsbat, $exportvars, $win_format_var, $perl_os, @mingw_lib_include_paths, $mingw_lib_include_path);
+@@ -90,7 +90,7 @@
+ $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
+ $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB,
+ $PROEXT,
+- $SYSTEM_PYTHON, $PYTHONPATH, $PYTHONHOME, $SYSTEM_MOZILLA, $EPM_FLAGS);
++ $PYTHON, $SYSTEM_PYTHON, $PYTHONPATH, $PYTHONHOME, $SYSTEM_MOZILLA, $EPM_FLAGS);
+ #
+ #-------------------------------------------
+ # IId. Declaring the aliases.
+@@ -126,6 +126,7 @@
+ $par_dir = ".."; # parrent directory
+ $I = " -I"; # include search path
+ $L = " -L"; # library search path
++$R = " -R"; # library search path
+ $D = " -D"; # define search path
+ $empty = ""; # used as argument
+ $no_stl = "NO_STLPORT4"; # possible argument
+@@ -274,6 +275,16 @@
+ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
+ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
+ }
++ elsif ($platform =~ m/^x86_64/)
++ { print "Setting NetBSD x86-64 specific values... ";
++ $outfile = "NetBSDX86-64Env.Set";
++ $CPU = "X";
++ $CPUNAME = "X86_64";
++ $OUTPATH = "unxbsdx";
++ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
++ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
++ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
++ }
+ elsif ($platform =~ m/^sparc/)
+ { print "Setting NetBSD Sparc specific values... ";
+ $outfile = "NetBSDSparcEnv.Set";
+@@ -299,8 +310,14 @@
+ exit 1;
+ }
+ #Conditional setting depending on gcc3:
+- $CVER = "C300";
+- $OUTPATH = $OUTPATH."2";
++ if (@GCCVER@ >= 30401) {
++ $CVER = "C341";
++ $OUTPATH = $OUTPATH."3";
++ }
++ else {
++ $CVER = "C300";
++ $OUTPATH = $OUTPATH."2";
++ }
+ # General NetBSD settings:
+ $BIG_SVX = "TRUE";
+ $COM = "GCC";
+@@ -1361,7 +1378,8 @@
+ $L.$JRETOOLKITDIR.
+ $L.$JRETHREADDIR.
+ $L_STLPORT_LIB.
+- $L.$XLIB;
++ $L.$XLIB.
++ $R.$XLIB;
+ }
+ elsif ($platform =~ m/linux|netbasd|osf1|irix|aix|freebsd/)
+ { $SOLARLIB = $L.$par_dir.$LIB.
+@@ -1524,6 +1542,7 @@
+ }
+
+ if ($SYSTEM_PYTHON eq "NO") {
++ $PYTHON = python
+ $PYTHONPATH = '.'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'python'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'python'.$ds.'lib-dynload'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'pyuno'.$wps.$SOLARVER.$ds.$INPATH.$ds.'bin'.$ds.'pyuno';
+ $PYTHONHOME = $SOLARVER.$ds.$INPATH;
+ if ($GUIBASE eq "WIN") {
+@@ -1664,6 +1683,7 @@
+ ToFile( "JITC_PROCESSOR_TYPE","6", "e" );
+ }
+ ToFile( "DEFAULT_TO_ENGLISH_FOR_PACKING", "yes", "e" );
++ToFile( "X11_LDFLAGS", "@X_LIBS@", "e" );
+ ToFile( "ENABLE_GTK", "@ENABLE_GTK@", "e" );
+ ToFile( "GTK_CFLAGS", "@GTK_CFLAGS@", "e" );
+ ToFile( "GTK_LIBS", "@GTK_LIBS@", "e" );
+@@ -1918,6 +1938,7 @@
+ ToFile( "MOZ_LIB_XPCOM", "@MOZ_LIB_XPCOM@", "e" );
+ ToFile( "MOZ_NSPR_CFLAGS", "@MOZ_NSPR_CFLAGS@", "e" );
+ ToFile( "MOZ_NSS_CFLAGS", "@MOZ_NSS_CFLAGS@", "e" );
++ToFile( "MOZ_NSS_LIBS", "@MOZ_NSS_LIBS@", "e" );
+ ToFile( "MOZ_LDAP_CFLAGS", "@MOZ_LDAP_CFLAGS@", "e" );
+ ToFile( "WITH_WRITER2LATEX", "@WITH_WRITER2LATEX@", "e" );
+ ToFile( "WITH_FONTS", "@WITH_FONTS@", "e" );
+@@ -1943,6 +1964,7 @@
+ ToFile( "OPENSSL_CFLAGS", "@OPENSSL_CFLAGS@", "e" );
+ ToFile( "OPENSSL_LIBS", "@OPENSSL_LIBS@", "e" );
+ ToFile( "SYSTEM_PYTHON", "@SYSTEM_PYTHON@", "e" );
++ToFile( "PYTHON", "@PYTHON@", "e" );
+ ToFile( "PYTHON_CFLAGS", "@PYTHON_CFLAGS@", "e" );
+ ToFile( "PYTHON_LIBS", "@PYTHON_LIBS@", "e" );
+ if ($SYSTEM_PYTHON eq "NO") {
diff --git a/misc/openoffice3/patches/patch-am b/misc/openoffice3/patches/patch-am
new file mode 100644
index 00000000000..f7c72dc72fd
--- /dev/null
+++ b/misc/openoffice3/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- soltools/checkdll/makefile.mk.orig 2007-02-17 17:42:05.000000000 +0900
++++ soltools/checkdll/makefile.mk 2007-02-17 17:42:44.000000000 +0900
+@@ -57,7 +57,7 @@
+ STDLIB += -ldl
+ .ENDIF
+ .IF "$(OS)"=="NETBSD"
+-APP1STDLIBS += -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
++APP1STDLIBS += -u _Unwind_Resume -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
+ .ENDIF
+ .ENDIF # "$(GUI)"=="UNX"
+
diff --git a/misc/openoffice3/patches/patch-an b/misc/openoffice3/patches/patch-an
new file mode 100644
index 00000000000..33481f379b3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-an
@@ -0,0 +1,22 @@
+$NetBSD: patch-an,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- psprint/source/printergfx/printerjob.cxx.orig 2007-02-17 17:43:14.000000000 +0900
++++ psprint/source/printergfx/printerjob.cxx 2007-02-17 17:43:55.000000000 +0900
+@@ -82,6 +82,17 @@
+
+ #include "glyphset.hxx"
+
++#if defined(NETBSD)
++#if defined(__cplusplus)
++extern "C" {
++#endif
++int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
++ size_t buflen, struct passwd **result);
++#if defined(__cplusplus)
++}
++#endif
++#endif
++
+ using namespace psp;
+ using namespace rtl;
+
diff --git a/misc/openoffice3/patches/patch-ao b/misc/openoffice3/patches/patch-ao
new file mode 100644
index 00000000000..fc7a52a1219
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ao
@@ -0,0 +1,19 @@
+$NetBSD: patch-ao,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- i18npool/source/breakiterator/gendict.cxx.orig 2007-02-17 23:18:38.000000000 +0900
++++ i18npool/source/breakiterator/gendict.cxx 2007-02-17 23:20:08.000000000 +0900
+@@ -74,8 +74,12 @@
+ fprintf(cfp, "extern \"C\" {\n");
+
+ sal_Int32 count, i, j;
+- sal_Int32 lenArrayCurr = 0, lenArrayCount = 0, lenArrayLen = 0, *lenArray = NULL, charArray[0x10000];
+- sal_Bool exist[0x10000];
++ sal_Int32 lenArrayCurr = 0, lenArrayCount = 0, lenArrayLen = 0, *lenArray = NULL, *charArray;
++ sal_Bool *exist;
++ charArray = (sal_Int32*) malloc(0x10000*sizeof(*charArray));
++ if (charArray == NULL) exit(1);
++ exist = (sal_Bool*) malloc(0x10000*sizeof(*exist));
++ if (exist == NULL) exit(1);
+ for (i = 0; i < 0x10000; i++) {
+ exist[i] = sal_False;
+ charArray[i] = 0;
diff --git a/misc/openoffice3/patches/patch-ap b/misc/openoffice3/patches/patch-ap
new file mode 100644
index 00000000000..b48d8dc7228
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ap
@@ -0,0 +1,79 @@
+$NetBSD: patch-ap,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- stlport/STLport-4.5.patch.orig 2008-07-23 01:55:11.000000000 +0900
++++ stlport/STLport-4.5.patch 2008-07-26 06:44:43.000000000 +0900
+@@ -1138,3 +1138,74 @@
+ # elif defined (__FreeBSD__)
+
+ # define _Locale_CNTRL _CTYPE_C
++--- misc/STLport-4.5/src/gcc-3.0-netbsd.mak 2008-07-26 06:41:56.000000000 +0900
+++++ misc/build/STLport-4.5/src/gcc-3.0-netbsd.mak 2008-07-26 06:18:49.000000000 +0900
++@@ -1 +1,67 @@
++-dummy
+++#
+++# Note : this makefile is for gcc-3 !
+++#
+++
+++#
+++# compiler
+++#
+++CC+= -D_REENTRANT
+++CXX+= -D_REENTRANT
+++
+++#
+++# Basename for libraries
+++#
+++LIB_BASENAME = libstlport_gcc
+++
+++#
+++# guts for common stuff
+++#
+++#
+++LINK=ar cr
+++DYN_LINK=$(CXX) $(LDFLAGS) $(PTHREAD_LIBS) -fexceptions -shared -o
+++
+++OBJEXT=o
+++DYNEXT=so
+++STEXT=a
+++RM=rm -rf
+++PATH_SEP=/
+++MKDIR=mkdir -p
+++COMP=GCC$(ARCH)
+++INSTALL_STEP = install_unix
+++
+++all: all_dynamic all_static symbolic_links
+++
+++include common_macros.mak
+++
+++WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32
+++
+++CXXFLAGS_COMMON = -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} $(CXXFLAGS)
+++CFLAGS_COMMON = -D_REENTRANT -DGXX_INCLUDE_PATH=${GXX_INCLUDE_PATH} -fexceptions -I${STLPORT_DIR} ${WARNING_FLAGS} ${ARCH_FLAGS}
+++
+++CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 -fPIC
+++CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC
+++
+++CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -g -fPIC
+++CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -g -fPIC
+++
+++CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
+++CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
+++
+++CFLAGS_RELEASE_static = $(CFLAGS_COMMON) -O2 -fPIC
+++CFLAGS_RELEASE_dynamic = $(CFLAGS_COMMON) -O2 -fPIC
+++
+++CFLAGS_DEBUG_static = $(CFLAGS_COMMON) -g -fPIC
+++CFLAGS_DEBUG_dynamic = $(CFLAGS_COMMON) -g -fPIC
+++
+++CFLAGS_STLDEBUG_static = $(CFLAGS_DEBUG_static) -D_STLP_DEBUG
+++CFLAGS_STLDEBUG_dynamic = $(CFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
+++
+++include common_percent_rules.mak
+++include common_rules.mak
+++
+++#install: all
+++# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
+++
+++#%.s: %.cpp
+++# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
+++
diff --git a/misc/openoffice3/patches/patch-aq b/misc/openoffice3/patches/patch-aq
new file mode 100644
index 00000000000..601165a0b65
--- /dev/null
+++ b/misc/openoffice3/patches/patch-aq
@@ -0,0 +1,22 @@
+$NetBSD: patch-aq,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- stlport/makefile.mk.orig 2008-07-23 01:55:24.000000000 +0900
++++ stlport/makefile.mk 2008-07-26 06:02:45.000000000 +0900
+@@ -117,7 +117,7 @@
+ TAR_EXCLUDES=*/SC5/*
+ .ENDIF # "$(USE_SHELL)"=="4nt"
+
+-ADDITIONAL_FILES=src$/gcc-3.0.mak src$/gcc-3.0-macosx.mak src$/gcc-3.0-freebsd.mak src$/sunpro8.mak src$/sunpro11.mak src$/gcc-3.0-mingw.mak \
++ADDITIONAL_FILES=src$/gcc-3.0.mak src$/gcc-3.0-macosx.mak src$/gcc-3.0-freebsd.mak src$/gcc-3.0-netbsd.mak src$/sunpro8.mak src$/sunpro11.mak src$/gcc-3.0-mingw.mak \
+ src$/gcc-3.0-os2.mak src$/gcc-3.0-os2.def src$/common_macros_os2.mak
+
+
+@@ -140,6 +140,8 @@
+ # FreeBSD needs a special makefile
+ .IF "$(OS)"=="FREEBSD"
+ BUILD_FLAGS=-f gcc-3.0-freebsd.mak
++ .ELIF "$(OS)"=="NETBSD"
++ BUILD_FLAGS=-f gcc-3.0-netbsd.mak
+ .ELIF "$(OS)"=="MACOSX"
+ BUILD_FLAGS=-f gcc-3.0-macosx.mak
+ .ELIF "$(OS)"=="OS2"
diff --git a/misc/openoffice3/patches/patch-ar b/misc/openoffice3/patches/patch-ar
new file mode 100644
index 00000000000..471c45633c1
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ar
@@ -0,0 +1,24 @@
+$NetBSD: patch-ar,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/osl/unx/tempfile.c.orig 2007-02-17 23:20:56.000000000 +0900
++++ sal/osl/unx/tempfile.c 2007-02-17 23:22:45.000000000 +0900
+@@ -38,6 +38,9 @@
+ /*****************************************************************/
+
+ #include <stdio.h>
++#if defined(NETBSD)
++#include <paths.h>
++#endif
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -91,6 +94,9 @@
+ #if defined(SOLARIS) || defined (LINUX) || defined (FREEBSD)
+ if ( !pValue )
+ pValue = P_tmpdir;
++#elif defined(NETBSD)
++ if ( !pValue )
++ pValue = _PATH_TMP;
+ #endif
+ }
+ #endif /* MACOSX */
diff --git a/misc/openoffice3/patches/patch-as b/misc/openoffice3/patches/patch-as
new file mode 100644
index 00000000000..58aa1e633bc
--- /dev/null
+++ b/misc/openoffice3/patches/patch-as
@@ -0,0 +1,48 @@
+$NetBSD: patch-as,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/osl/unx/file.cxx.orig 2008-04-28 22:46:10.000000000 +0900
++++ sal/osl/unx/file.cxx 2008-08-23 12:06:31.000000000 +0900
+@@ -1418,7 +1418,7 @@
+
+ #ifdef HAVE_STATFS_H
+
+-#if defined(FREEBSD) || defined(NETBSD) || defined(MACOSX)
++#if defined(FREEBSD) || defined(MACOSX)
+ # define __OSL_STATFS_STRUCT struct statfs
+ # define __OSL_STATFS(dir, sfs) statfs((dir), (sfs))
+ # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_bsize))
+@@ -1430,7 +1430,33 @@
+ of the target platforms fix it!!!! */
+ # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
+ # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
+-#endif /* FREEBSD || NETBSD */
++#endif /* FREEBSD || MACOSX */
++
++#if defined(NETBSD)
++
++#include <sys/param.h>
++
++/* statvfs() replaced statfs() in 2.99.9 */
++# if __NetBSD_Version__ >= 299000900
++ /* 2.0D or later */
++# define __OSL_STATFS_STRUCT struct statvfs
++# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
++# define __OSL_STATFS_ISREMOTE(a) (((a).f_flag & ST_LOCAL) == 0)
++
++# else
++ /* version before 2.0D */
++# define __OSL_STATFS_STRUCT struct statfs
++# define __OSL_STATFS(dir, sfs) statfs((dir), (sfs))
++# define __OSL_STATFS_ISREMOTE(a) (((a).f_type & MNT_LOCAL) == 0)
++
++# endif /* >2.0D */
++
++# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_bsize))
++# define __OSL_STATFS_TYPENAME(a) ((a).f_fstypename)
++
++# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (strcmp((a).f_fstypename, "msdos") != 0 && strcmp((a).f_fstypename, "ntfs") != 0 && strcmp((a).f_fstypename, "smbfs") != 0)
++# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (strcmp((a).f_fstypename, "msdos") != 0)
++#endif /* NETBSD */
+
+ #if defined(LINUX)
+ # define __OSL_NFS_SUPER_MAGIC 0x6969
diff --git a/misc/openoffice3/patches/patch-aw b/misc/openoffice3/patches/patch-aw
new file mode 100644
index 00000000000..c235ddeb9e3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-aw
@@ -0,0 +1,23 @@
+$NetBSD: patch-aw,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/osl/unx/system.h.orig 2007-02-17 23:26:16.000000000 +0900
++++ sal/osl/unx/system.h 2007-02-17 22:59:36.000000000 +0900
+@@ -136,7 +136,10 @@
+ #endif
+
+ #ifdef NETBSD
++# include <sys/param.h>
++# ifndef ETIME
+ # define ETIME ETIMEDOUT
++# endif
+ # define _POSIX_THREAD_SYSCALL_SOFT 1
+ # include <pthread.h>
+ # include <netdb.h>
+@@ -530,7 +533,6 @@
+
+ #ifdef NO_PTHREAD_RTL
+ #if !defined FREEBSD || (__FreeBSD_version < 500112)
+-struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen);
+ extern struct spwd *getspnam_r(const char *name, struct spwd *result,
+ char *buffer, int buflen);
+
diff --git a/misc/openoffice3/patches/patch-ba b/misc/openoffice3/patches/patch-ba
new file mode 100644
index 00000000000..19c5a19d8f7
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ba
@@ -0,0 +1,197 @@
+$NetBSD: patch-ba,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- config_office/configure.orig 2008-09-01 20:50:01.000000000 +0900
++++ config_office/configure 2008-10-01 11:42:40.000000000 +0900
+@@ -4183,11 +4183,11 @@
+ test_randr=no
+ _os=OSF1
+ ;;
+- netbsd)
++ *netbsd*)
+ test_gtk=yes
+ build_cairo=yes
+ test_kde=yes
+- test_cups=no
++ test_cups=yes
+ test_randr=yes
+ test_freetype=yes
+ PTHREAD_CFLAGS="-pthread"
+@@ -11429,7 +11429,7 @@
+ fi
+
+ if test "$SOLAR_JAVA" != ""; then
+- if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
++ if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
+ if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then
+ cat > findhome.java <<_ACEOF
+ import java.io.File;
+@@ -11530,7 +11530,7 @@
+ echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
+ echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
+ echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
+-# if test "$JDK" == "gcj"; then
++# if test "$JDK" = "gcj"; then
+ # echo "e.g. install java-1.4.2-gcj-compat-devel and use --with-jdk-home=/usr/lib/jvm/java-1.4.2-gcj" >> warn
+ # fi
+ fi
+@@ -14208,7 +14208,7 @@
+ if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
+ test "$with_system_libxslt" != "no"; then
+ if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
+- test "$with_system_libxml" == "no"; then
++ test "$with_system_libxml" = "no"; then
+ # somehow AC_MSG_WARN won't work...
+ echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
+ echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
+@@ -14218,7 +14218,7 @@
+ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
+ test "$with_system_libxml" != "no"; then
+ if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
+- test "$with_system_libxslt" == "no"; then
++ test "$with_system_libxslt" = "no"; then
+ # somehow AC_MSG_WARN won't work...
+ echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
+ echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
+@@ -14740,13 +14740,14 @@
+
+
+ python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
++ python_ldflags=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LDFLAGS');"`
+ python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
+ PYTHON_CFLAGS="-I$python_include"
+
+ if test "$_os" = "Darwin"; then
+ PYTHON_LIBS="-framework Python"
+ else
+- PYTHON_LIBS="-lpython$python_version"
++ PYTHON_LIBS="-lpython$python_version $python_ldflags"
+ fi
+
+ save_CPPFLAGS="$CPPFLAGS"
+@@ -15003,7 +15004,7 @@
+ { echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+ echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
+ if test $ac_cv_header_db_h = yes; then
+- DB_INCLUDES=/usr/include
++ DB_INCLUDES=${BLNK_PREFIX_db4}/include/db4
+ else
+
+ CFLAGS=-I/usr/include/db4
+@@ -15133,13 +15134,13 @@
+ #AC_CHECK_LIB(db, db_create, [],
+ # [AC_MSG_ERROR([db library not installed or functional])], [])
+
+-{ echo "$as_me:$LINENO: checking for main in -ldb" >&5
+-echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: checking for main in -ldb4" >&5
++echo $ECHO_N "checking for main in -ldb4... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_db_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ldb $LIBS"
++LIBS="-ldb4 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -15193,7 +15194,7 @@
+ #define HAVE_LIBDB 1
+ _ACEOF
+
+- LIBS="-ldb $LIBS"
++ LIBS="-ldb4 $LIBS"
+
+ else
+ { { echo "$as_me:$LINENO: error: db not installed or functional" >&5
+@@ -16642,6 +16643,8 @@
+ MOZ_FLAVOUR=seamonkey
+ elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then
+ MOZ_FLAVOUR=firefox
++ elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox3"; then
++ MOZ_FLAVOUR=firefox3
+ elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then
+ MOZ_FLAVOUR=mozilla
+ else
+@@ -17378,7 +17381,7 @@
+
+ #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
+ #the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
+- if test "$MOZ_FLAVOUR" == "libxul"; then
++ if test "$MOZ_FLAVOUR" = "libxul"; then
+ MOZ_FLAVOUR="mozilla"
+ fi
+
+@@ -25060,7 +25063,7 @@
+ ENABLE_MEDIAWIKI=YES
+ { echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5
+ echo $ECHO_N "checking which Apache commons-* libs to use... $ECHO_C" >&6; }
+- if test "$with_system_apache_commons" == "yes"; then
++ if test "$with_system_apache_commons" = "yes"; then
+ SYSTEM_APACHE_COMMONS=YES
+ { echo "$as_me:$LINENO: result: external" >&5
+ echo "${ECHO_T}external" >&6; }
+@@ -25203,7 +25206,7 @@
+
+
+
+-if test "$ENABLE_MEDIAWIKI" == "YES"; then
++if test "$ENABLE_MEDIAWIKI" = "YES"; then
+ { echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5
+ echo $ECHO_N "checking which Servlet API Jar to use... $ECHO_C" >&6; }
+ if test -n "$with_system_servlet_api"; then
+@@ -25268,7 +25271,7 @@
+ fi
+ { echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5
+ echo $ECHO_N "checking which jfreereport libs to use... $ECHO_C" >&6; }
+- if test "$with_system_jfreereport" == "yes"; then
++ if test "$with_system_jfreereport" = "yes"; then
+ SYSTEM_JFREEREPORT=YES
+ { echo "$as_me:$LINENO: result: external" >&5
+ echo "${ECHO_T}external" >&6; }
+@@ -25807,7 +25810,7 @@
+ fi
+
+ KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
+- KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
++ KDE_LIBS="-L$kde_libdir -Wl,-R$kde_libdir -L$qt_libdir -Wl,-R$qt_libdir -lkdeui -lkdecore -lqt-mt"
+ fi
+
+
+@@ -26357,7 +26360,7 @@
+ XINERAMA_LINK=dynamic
+ { echo "$as_me:$LINENO: result: yes" >&5
+ echo "${ECHO_T}yes" >&6; }
+-elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
++elif test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD"; then
+ if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
+ # we have both versions, let the user decide but use the dynamic one
+ # per default
+@@ -26842,9 +26845,13 @@
+ if test -f $ANT_HOME/lib/ant/ant.jar; then
+ ANT_LIB="$ANT_HOME/lib/ant"
+ else
++ if test -f $ANT_HOME/lib/java/ant/ant.jar; then
++ ANT_LIB="$ANT_HOME/lib/java/ant"
++ else
+ { { echo "$as_me:$LINENO: error: Ant libraries not found!" >&5
+ echo "$as_me: error: Ant libraries not found!" >&2;}
+ { (exit 1); exit 1; }; }
++ fi
+ fi
+ fi
+ fi
+@@ -27052,12 +27059,12 @@
+ { echo "$as_me:$LINENO: checking build verbosity" >&5
+ echo $ECHO_N "checking build verbosity... $ECHO_C" >&6; }
+ if test -n "$enable_verbose"; then
+- if test "$enable_verbose" == "yes"; then
++ if test "$enable_verbose" = "yes"; then
+ VERBOSE="TRUE"
+ { echo "$as_me:$LINENO: result: high" >&5
+ echo "${ECHO_T}high" >&6; }
+ fi
+- if test "$enable_verbose" == "no"; then
++ if test "$enable_verbose" = "no"; then
+ VERBOSE="FALSE"
+ { echo "$as_me:$LINENO: result: low" >&5
+ echo "${ECHO_T}low" >&6; }
diff --git a/misc/openoffice3/patches/patch-bb b/misc/openoffice3/patches/patch-bb
new file mode 100644
index 00000000000..293735bec8f
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bb
@@ -0,0 +1,22 @@
+$NetBSD: patch-bb,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/osl/unx/backtrace.h.orig 2007-02-17 22:54:13.000000000 +0900
++++ sal/osl/unx/backtrace.h 2007-02-17 22:57:00.000000000 +0900
+@@ -34,7 +34,7 @@
+ ************************************************************************/
+
+
+-#if defined (SOLARIS) || (FREEBSD)
++#if defined (SOLARIS) || (FREEBSD) || (NETBSD)
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -47,7 +47,7 @@
+ void backtrace_symbols_fd( void **buffer, int size, int fd );
+
+ /* no frame.h on FreeBSD */
+-#if defined FREEBSD
++#if defined FREEBSD || NETBSD
+ struct frame {
+ long arg0[8];
+ long arg1[6];
diff --git a/misc/openoffice3/patches/patch-bd b/misc/openoffice3/patches/patch-bd
new file mode 100644
index 00000000000..042be49d8d0
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bd
@@ -0,0 +1,17 @@
+$NetBSD: patch-bd,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- sal/rtl/source/makefile.mk.orig 2008-09-03 22:08:34.000000000 +0900
++++ sal/rtl/source/makefile.mk 2008-10-14 16:15:57.000000000 +0900
+@@ -156,7 +156,11 @@
+ SYSALLOC_SLOFILES= $(SLO)$/alloc_global.obj
+ SYSALLOCCDEFS+=-DFORCE_SYSALLOC
+
+-.ENDIF # .IF "$(OS)"=="LINUX"
++.ENDIF # .IF "$(OS)"=="LINUX" || "$(OS)"=="OS2"
++
++.IF "$(OS)"=="NETBSD"
++CDEFS+=-DFORCE_SYSALLOC
++.ENDIF
+
+ #.ENDIF
+
diff --git a/misc/openoffice3/patches/patch-bf b/misc/openoffice3/patches/patch-bf
new file mode 100644
index 00000000000..75dcb321468
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bf
@@ -0,0 +1,13 @@
+$NetBSD: patch-bf,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- soltools/cpp/cpp.h.orig 2007-02-23 12:14:25.000000000 +0900
++++ soltools/cpp/cpp.h 2007-02-23 12:14:59.000000000 +0900
+@@ -2,7 +2,7 @@
+
+ #define INS 32768 /* input buffer */
+ #define OBS 8092 /* outbut buffer */
+-#define NARG 32 /* Max number arguments to a macro */
++#define NARG 64 /* Max number arguments to a macro */
+ #define NINCLUDE 32 /* Max number of include directories (-I) */
+ #define NIF 64 /* depth of nesting of #if */
+ #define NINC 32 /* depth of nesting of #include */
diff --git a/misc/openoffice3/patches/patch-bg b/misc/openoffice3/patches/patch-bg
new file mode 100644
index 00000000000..44148e7b179
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bg
@@ -0,0 +1,15 @@
+$NetBSD: patch-bg,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- vcl/util/makefile.mk.orig 2008-01-24 02:19:40.000000000 +0900
++++ vcl/util/makefile.mk 2008-04-07 18:15:43.000000000 +0900
+@@ -323,8 +323,8 @@
+
+ .IF "$(GUIBASE)"=="unx"
+
+-SHL2STDLIBS += -lXext -lSM -lICE -lX11
+-.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD"
++SHL2STDLIBS += $(X11_LDFLAGS) -lXext -lSM -lICE -lX11
++.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD"
+ # needed by salprnpsp.cxx
+ SHL2STDLIBS+= -ldl
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-bh b/misc/openoffice3/patches/patch-bh
new file mode 100644
index 00000000000..338a380eb72
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bh
@@ -0,0 +1,12 @@
+$NetBSD: patch-bh,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- psprint/util/makefile.mk.orig 2008-04-11 19:25:44.000000000 +0900
++++ psprint/util/makefile.mk 2008-05-17 18:46:26.000000000 +0900
+@@ -71,6 +71,7 @@
+ $(COMPHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
++ $(X11_LDFLAGS) \
+ -lX11
+
+ .IF "$(LIBPAPER_LINK)" == "YES"
diff --git a/misc/openoffice3/patches/patch-bi b/misc/openoffice3/patches/patch-bi
new file mode 100644
index 00000000000..43cb283abad
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bi
@@ -0,0 +1,13 @@
+$NetBSD: patch-bi,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- shell/source/unix/misc/makefile.mk.orig 2007-02-23 18:59:47.000000000 +0900
++++ shell/source/unix/misc/makefile.mk 2007-02-23 19:00:19.000000000 +0900
+@@ -59,7 +59,7 @@
+ APP1OBJS = \
+ $(OBJ)$/gnome-open-url.obj
+ APP1LIBS =
+-.IF "$(OS)"!="FREEBSD"
++.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD"
+ APP1STDLIBS=-ldl
+ .ENDIF
+
diff --git a/misc/openoffice3/patches/patch-bj b/misc/openoffice3/patches/patch-bj
new file mode 100644
index 00000000000..3a3a09adaef
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bj
@@ -0,0 +1,20 @@
+$NetBSD: patch-bj,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- toolkit/util/makefile.mk.orig 2007-02-23 19:08:23.000000000 +0900
++++ toolkit/util/makefile.mk 2007-02-23 19:09:14.000000000 +0900
+@@ -84,13 +84,13 @@
+
+ .IF "$(GUIBASE)"=="unx"
+ SHL1STDLIBS +=\
+- -lX11 -lXt -lXmu
++ $(X11_LDFLAGS) -lX11 -lXt -lXmu
+ .ENDIF
+
+ .ELSE
+ .IF "$(GUI)"=="UNX"
+ SHL1STDLIBS +=\
+- -lX11
++ $(X11_LDFLAGS) -lX11
+ .ENDIF
+ .ENDIF
+
diff --git a/misc/openoffice3/patches/patch-bk b/misc/openoffice3/patches/patch-bk
new file mode 100644
index 00000000000..89459e8e0ae
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bk
@@ -0,0 +1,18 @@
+$NetBSD: patch-bk,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- forms/util/makefile.mk.orig 2007-02-23 19:13:29.000000000 +0900
++++ forms/util/makefile.mk 2007-02-23 19:13:44.000000000 +0900
+@@ -111,11 +111,11 @@
+ .IF "$(OS)"=="MACOSX"
+ .IF "$(GUIBASE)"=="unx"
+ SHL1STDLIBS +=\
+- -lX11 -lXt -lXmu
++ $(X11_LDFLAGS) -lX11 -lXt -lXmu
+ .ENDIF
+ .ELSE
+ SHL1STDLIBS +=\
+- -lX11
++ $(X11_LDFLAGS) -lX11
+ .ENDIF # OS == MACOSX
+
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-bl b/misc/openoffice3/patches/patch-bl
new file mode 100644
index 00000000000..f6c6f2bc6c4
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bl
@@ -0,0 +1,12 @@
+$NetBSD: patch-bl,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- padmin/source/makefile.mk.orig 2008-04-11 19:03:05.000000000 +0900
++++ padmin/source/makefile.mk 2008-05-17 18:47:24.000000000 +0900
+@@ -108,6 +108,7 @@
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
++ $(X11_LDFLAGS) \
+ -lXext -lX11
+
+ UNIXTEXT = $(MISC)$/spadmin.sh
diff --git a/misc/openoffice3/patches/patch-bm b/misc/openoffice3/patches/patch-bm
new file mode 100644
index 00000000000..1b218952b06
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bm
@@ -0,0 +1,18 @@
+$NetBSD: patch-bm,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- binfilter/bf_forms/util/makefile.mk.orig 2007-02-24 00:55:39.000000000 +0900
++++ binfilter/bf_forms/util/makefile.mk 2007-02-24 00:56:10.000000000 +0900
+@@ -109,11 +109,11 @@
+ .IF "$(OS)"=="MACOSX"
+ .IF "$(GUIBASE)"=="unx"
+ SHL1STDLIBS +=\
+- -lX11 -lXt -lXmu
++ $(X11_LDFLAGS) -lX11 -lXt -lXmu
+ .ENDIF
+ .ELSE
+ SHL1STDLIBS +=\
+- -lX11
++ $(X11_LDFLAGS) -lX11
+ .ENDIF # OS == MACOSX
+
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-bn b/misc/openoffice3/patches/patch-bn
new file mode 100644
index 00000000000..e67ef39cda9
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bn
@@ -0,0 +1,16 @@
+$NetBSD: patch-bn,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- crashrep/source/unx/makefile.mk.orig 2008-08-07 00:24:20.000000000 +0900
++++ crashrep/source/unx/makefile.mk 2008-08-17 19:13:25.000000000 +0900
+@@ -61,9 +61,9 @@
+ APP1RPATH=BRAND
+
+ .IF "$(OS)" != "MACOSX"
+-APP1STDLIBS=$(DYNAMIC) -lXext -lX11
++APP1STDLIBS=$(DYNAMIC) $(X11_LDFLAGS) -lXext -lX11
+ .ENDIF
+-.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX"
++.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" && "$(OS)" != "NETBSD"
+ APP1STDLIBS+=-ldl -lnsl
+ .ENDIF
+ .IF "$(OS)" == "SOLARIS"
diff --git a/misc/openoffice3/patches/patch-bo b/misc/openoffice3/patches/patch-bo
new file mode 100644
index 00000000000..48f30eb2653
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bo
@@ -0,0 +1,13 @@
+$NetBSD: patch-bo,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- extensions/source/plugin/unx/makefile.mk.orig 2006-12-01 23:19:00.000000000 +0900
++++ extensions/source/plugin/unx/makefile.mk 2007-04-01 22:05:33.000000000 +0900
+@@ -81,7 +81,7 @@
+ APP1STDLIBS+=-lXaw
+ .ENDIF
+ .IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD"
+-APP1STDLIBS+= -lXt -lXext -lX11
++APP1STDLIBS+=$(X11_LDFLAGS) -lXt -lXext -lX11
+ .ELSE
+ APP1STDLIBS+= -lXt -lXext -lX11 -ldl
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-bq b/misc/openoffice3/patches/patch-bq
new file mode 100644
index 00000000000..b3bd3216433
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bq
@@ -0,0 +1,29 @@
+$NetBSD: patch-bq,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- instsetoo_native/util/makefile.mk.orig 2008-07-26 06:07:21.000000000 +0900
++++ instsetoo_native/util/makefile.mk 2008-07-26 06:08:22.000000000 +0900
+@@ -54,6 +54,9 @@
+ ENABLE_DOWNLOADSETS=TRUE
+ .ENDIF # "$(FORCE_DOWNLOADSETS)"!=""
+
++# Don't create download set with pkgsrc.
++ENABLE_DOWNLOADSETS=
++
+ .EXPORT: ENABLE_DOWNLOADSETS
+ .EXPORT: LAST_MINOR
+ .EXPORT: PRJ
+@@ -383,10 +386,10 @@
+ -$(MKDIRHIER) $(MSIURETEMPLATEDIR)
+ -$(MKDIRHIER) $(MSISDKOOTEMPLATEDIR)
+ # -$(MKDIRHIER) $(MSIURETEMPLATEDIR)
+- $(GNUCOPY) -ua $(MSIOFFICETEMPLATESOURCE) $(MSIOFFICETEMPLATEDIR:d:d)
+- $(GNUCOPY) -ua $(MSILANGPACKTEMPLATESOURCE) $(MSILANGPACKTEMPLATEDIR:d:d)
+- $(GNUCOPY) -ua $(MSIURETEMPLATESOURCE) $(MSIURETEMPLATEDIR:d:d)
+- $(GNUCOPY) -ua $(MSISDKOOTEMPLATESOURCE) $(MSISDKOOTEMPLATEDIR:d:d)
++ $(GNUCOPY) -Rp $(MSIOFFICETEMPLATESOURCE) $(MSIOFFICETEMPLATEDIR:d:d)
++ $(GNUCOPY) -Rp $(MSILANGPACKTEMPLATESOURCE) $(MSILANGPACKTEMPLATEDIR:d:d)
++ $(GNUCOPY) -Rp $(MSIURETEMPLATESOURCE) $(MSIURETEMPLATEDIR:d:d)
++ $(GNUCOPY) -Rp $(MSISDKOOTEMPLATESOURCE) $(MSISDKOOTEMPLATEDIR:d:d)
+ # $(GNUCOPY) -ua $(MSIURETEMPLATESOURCE) $(MSIURETEMPLATEDIR:d:d)
+ $(RM) $(MSIOFFICETEMPLATEDIR)$/Binary$/Image.bmp
+ $(RM) $(MSILANGPACKTEMPLATEDIR)$/Binary$/Image.bmp
diff --git a/misc/openoffice3/patches/patch-br b/misc/openoffice3/patches/patch-br
new file mode 100644
index 00000000000..88797134452
--- /dev/null
+++ b/misc/openoffice3/patches/patch-br
@@ -0,0 +1,58 @@
+$NetBSD: patch-br,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- scp2/source/ooo/file_library_ooo.scp.orig 2008-07-18 00:34:36.000000000 +0900
++++ scp2/source/ooo/file_library_ooo.scp 2008-07-27 05:30:49.000000000 +0900
+@@ -217,6 +217,8 @@
+ #ifdef UNX
+ #ifdef MACOSX
+ Name = STRING(CONCAT2(libcurl.3,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = STRING(CONCAT6(libcurl,UNXSUFFIX,.,CURL_MAJOR,.,CURL_MINOR));
+ #else
+ Name = STRING(CONCAT8(libcurl,UNXSUFFIX,.,CURL_MAJOR,.,CURL_MINOR,.,CURL_MICRO));
+ #endif
+@@ -1662,6 +1664,8 @@
+ #ifdef UNX
+ #ifdef MACOSX
+ Name = STRING(CONCAT2(libxmlsec1.1.2.6,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = STRING(CONCAT3(libxmlsec1,UNXSUFFIX,.3.6));
+ #else
+ Name = STRING(CONCAT3(libxmlsec1,UNXSUFFIX,.1.2.6));
+ #endif
+@@ -1694,6 +1698,8 @@
+ TXT_FILE_BODY;
+ #ifdef MACOSX
+ Name = STRING(CONCAT2(libxmlsec1-nss.1.2.6,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = STRING(CONCAT3(libxmlsec1-nss,UNXSUFFIX,.3.6));
+ #else
+ Name = STRING(CONCAT3(libxmlsec1-nss,UNXSUFFIX,.1.2.6));
+ #endif
+@@ -1805,6 +1811,8 @@
+ #ifdef UNX
+ #ifdef MACOSX
+ Name = STRING(CONCAT8(libraptor,.,RAPTOR_MAJOR,.,RAPTOR_MINOR,.,RAPTOR_MICRO,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = "libraptor.so.2.0"; /* XXX */
+ #else
+ Name = STRING(CONCAT8(libraptor,UNXSUFFIX,.,RAPTOR_MAJOR,.,RAPTOR_MINOR,.,RAPTOR_MICRO));
+ #endif
+@@ -1824,6 +1832,8 @@
+ #ifdef UNX
+ #ifdef MACOSX
+ Name = STRING(CONCAT8(librasqal,.,RASQAL_MAJOR,.,RASQAL_MINOR,.,RASQAL_MICRO,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = STRING(CONCAT6(librasqal,UNXSUFFIX,.,RASQAL_MAJOR,.,RASQAL_MINOR));
+ #else
+ Name = STRING(CONCAT8(librasqal,UNXSUFFIX,.,RASQAL_MAJOR,.,RASQAL_MINOR,.,RASQAL_MICRO));
+ #endif
+@@ -1843,6 +1853,8 @@
+ #ifdef UNX
+ #ifdef MACOSX
+ Name = STRING(CONCAT8(librdf,.,REDLAND_MAJOR,.,REDLAND_MINOR,.,REDLAND_MICRO,UNXSUFFIX));
++ #elif defined(NETBSD)
++ Name = STRING(CONCAT6(librdf,UNXSUFFIX,.,REDLAND_MAJOR,.,REDLAND_MINOR));
+ #else
+ Name = STRING(CONCAT8(librdf,UNXSUFFIX,.,REDLAND_MAJOR,.,REDLAND_MINOR,.,REDLAND_MICRO));
+ #endif
diff --git a/misc/openoffice3/patches/patch-bs b/misc/openoffice3/patches/patch-bs
new file mode 100644
index 00000000000..4c60f3e028f
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bs
@@ -0,0 +1,36 @@
+$NetBSD: patch-bs,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- xmlsecurity/util/makefile.mk.orig 2008-04-14 05:03:09.000000000 +0000
++++ xmlsecurity/util/makefile.mk 2008-04-14 05:10:23.000000000 +0000
+@@ -101,6 +101,7 @@
+ $(TOOLSLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
++ $(LIBXML_LIBS) \
+ $(XMLOFFLIB)
+
+ .IF "$(SYSTEM_MOZILLA)" == "YES"
+@@ -110,6 +111,9 @@
+ .IF "$(NSS_LIB)" != ""
+ SHL2STDLIBS += $(NSS_LIB)
+ .ENDIF
++.IF "$(MOZ_NSS_LIBS)" != ""
++SHL2STDLIBS += $(MOZ_NSS_LIBS)
++.ENDIF
+ .ENDIF
+
+ .IF "$(CRYPTO_ENGINE)" == "mscrypto"
+@@ -159,11 +163,12 @@
+ $(SOTLIB) \
+ $(SVLLIB) \
+ $(SFXLIB) \
++ $(LIBXML_LIBS) \
+ $(XMLOFFLIB) \
+ $(SVXLIB)
+
+ #MT: Remove libxml2 and xs_comm (above) by cerating service for base encodings
+-SHL4STDLIBS+= $(LIBXML2LIB) $(XMLSECLIB)
++SHL4STDLIBS+= $(LIBXML_LIBS) $(LIBXML2LIB) $(XMLSECLIB)
+
+ SHL4VERSIONMAP = xmlsecurity.map
+ SHL4DEPN=
diff --git a/misc/openoffice3/patches/patch-bv b/misc/openoffice3/patches/patch-bv
new file mode 100644
index 00000000000..2b6b8abd98d
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bv
@@ -0,0 +1,29 @@
+$NetBSD: patch-bv,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- setup_native/scripts/linuxpatchscript.sh.orig 2007-03-04 21:42:59.000000000 +0900
++++ setup_native/scripts/linuxpatchscript.sh 2007-03-04 21:43:36.000000000 +0900
+@@ -25,7 +25,7 @@
+ echo
+ read -p "Patching the installation in ${PRODUCTINSTALLLOCATION}. Continue (y/n) ? " -n 1 reply leftover
+ echo
+-[ "$reply" == "y" ] || exit 1
++[ "$reply" = "y" ] || exit 1
+
+ echo
+ echo "About to update the following packages ..."
+@@ -53,13 +53,13 @@
+ # Check, that $RPMLIST does not contain online update rpm (then it is already installed)
+ ONLINEPDATEINSTALLED=`grep onlineupdate ${RPMLIST}`
+
+- if [ "x$ONLINEPDATEINSTALLED" == "x" ]; then
++ if [ "x$ONLINEPDATEINSTALLED" = "x" ]; then
+ # Ask user, if online update shall be installed
+ echo
+ read -p "Do you want to install the new online update feature (y/n) ? " -n 1 reply leftover
+ echo
+
+- if [ "$reply" == "y" ]; then
++ if [ "$reply" = "y" ]; then
+ # Install the online update rpm
+ rpm --install -v --hash --prefix $PRODUCTINSTALLLOCATION --notriggers $ONLINEUPDATERPM
+ fi
diff --git a/misc/openoffice3/patches/patch-bw b/misc/openoffice3/patches/patch-bw
new file mode 100644
index 00000000000..084640aec87
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bw
@@ -0,0 +1,13 @@
+$NetBSD: patch-bw,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- canvas/source/cairo/makefile.mk.orig 2008-06-24 19:29:01.000000000 +0900
++++ canvas/source/cairo/makefile.mk 2008-07-13 11:05:23.000000000 +0900
+@@ -103,7 +103,7 @@
+ .ELSE
+ # Xlib
+ SLOFILES+= $(SLO)$/cairo_xlib_cairo.obj
+-SHL1STDLIBS+= -lfontconfig $(FREETYPELIB) -lX11 -lXrender
++SHL1STDLIBS+= -lfontconfig $(FREETYPELIB) $(X11_LDFLAGS) -lX11 -lXrender
+ .ENDIF
+
+ .ELSE # "$(GUI)"=="UNX"
diff --git a/misc/openoffice3/patches/patch-bx b/misc/openoffice3/patches/patch-bx
new file mode 100644
index 00000000000..ca162857e01
--- /dev/null
+++ b/misc/openoffice3/patches/patch-bx
@@ -0,0 +1,14 @@
+$NetBSD: patch-bx,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- filter/source/config/fragments/makefile.mk.orig 2007-05-10 22:13:05.000000000 +0900
++++ filter/source/config/fragments/makefile.mk 2007-10-06 13:06:37.000000000 +0900
+@@ -153,7 +153,8 @@
+
+ .IF "$(SOLAR_JAVA)"==""
+ #cmc, hack to workaround the java build requirement
+-MERGE:=python ../tools/merge/pyAltFCFGMerge
++MERGE:=$(PYTHON) ../tools/merge/pyAltFCFGMerge
++PACKLANG:=$(PERL) langfilter.pl
+ .ELSE
+ MERGE := $(JAVAI) -jar $(CLASSDIR)$/FCFGMerge.jar
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-by b/misc/openoffice3/patches/patch-by
new file mode 100644
index 00000000000..df532a892b5
--- /dev/null
+++ b/misc/openoffice3/patches/patch-by
@@ -0,0 +1,23 @@
+$NetBSD: patch-by,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- filter/source/config/fragments/langfilter.pl.orig 2007-03-19 22:40:51.000000000 +0900
++++ filter/source/config/fragments/langfilter.pl 2007-03-19 22:41:34.000000000 +0900
+@@ -0,0 +1,18 @@
++#!/usr/pkg/bin/perl
++
++use strict;
++
++# XXX
++my $infile = $ARGV[1];
++my $lang = $ARGV[4];
++
++open(IN, $infile) || die "cannot open: $!";
++
++while (<IN>) {
++ if (/^\s*<value xml:lang="\s*(.*)\s*".*$/) {
++ next if ($1 ne $lang);
++ }
++ print $_;
++}
++
++close(IN);
diff --git a/misc/openoffice3/patches/patch-ch b/misc/openoffice3/patches/patch-ch
new file mode 100644
index 00000000000..81309b5aa7e
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ch
@@ -0,0 +1,183 @@
+$NetBSD: patch-ch,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/inc/unxbsdi3.mk.orig 2007-10-05 10:11:25.000000000 +0900
++++ solenv/inc/unxbsdi3.mk 2007-10-05 10:14:03.000000000 +0900
+@@ -0,0 +1,178 @@
++#
++# mk file for NetBSD/i386 with gcc 3.4.x and higher.
++#
++
++ASM=
++AFLAGS=
++
++SOLAR_JAVA*=
++JAVAFLAGSDEBUG=-g
++
++# filter for supressing verbose messages from linker
++#not needed at the moment
++#LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
++
++# _PTHREADS is needed for the stl
++CDEFS+= -DX86 $(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
++
++# enable visibility define in "sal/types.h"
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++
++# this is a platform with JAVA support
++.IF "$(SOLAR_JAVA)"!=""
++JAVADEF=-DSOLAR_JAVA
++.IF "$(debug)"==""
++JAVA_RUNTIME=-ljava
++.ELSE
++JAVA_RUNTIME=-ljava_g
++.ENDIF
++.ENDIF
++
++# architecture dependent flags for the C and C++ compiler that can be changed by
++# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
++ARCH_FLAGS*=
++
++# name of C++ Compiler
++CXX*=g++
++# name of C Compiler
++CC*=gcc
++# flags for C and C++ Compiler
++CFLAGS+=-fmessage-length=0 -c
++
++# Compiler flags for enabling optimizations
++.IF "$(PRODUCT)"!=""
++CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products
++.ELSE # "$(PRODUCT)"!=""
++CFLAGSOPT= # no optimizing for non products
++.ENDIF # "$(PRODUCT)"!=""
++
++# flags to enable build with symbols; required for crashdump feature
++.IF "$(ENABLE_SYMBOLS)"=="SMALL"
++CFLAGSENABLESYMBOLS=-g1
++.ELSE
++CFLAGSENABLESYMBOLS=-g
++.ENDIF
++
++# flags for the C++ Compiler
++CFLAGSCC= -pipe $(ARCH_FLAGS)
++# Flags for enabling exception handling
++CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
++# Flags for disabling exception handling
++CFLAGS_NO_EXCEPTIONS=-fno-exceptions
++
++CFLAGSCXX= -pipe $(ARCH_FLAGS)
++PICSWITCH:=-fpic
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CFLAGSCXX += -fvisibility-inlines-hidden
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++
++# Compiler flags for compiling static object in multi threaded environment with graphical user interface
++CFLAGSOBJGUIMT=
++# Compiler flags for compiling static object in multi threaded environment with character user interface
++CFLAGSOBJCUIMT=
++# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
++CFLAGSSLOGUIMT=$(PICSWITCH)
++# Compiler flags for compiling shared object in multi threaded environment with character user interface
++CFLAGSSLOCUIMT=$(PICSWITCH)
++# Compiler flags for profiling
++CFLAGSPROF=
++# Compiler flags for debugging
++CFLAGSDEBUG=-g
++CFLAGSDBGUTIL=
++# Compiler flags for enabling optimizations
++# CFLAGSOPT=-O2
++# reduce to -O1 to avoid optimization problems
++CFLAGSOPT=-O1
++# Compiler flags for disabling optimizations
++CFLAGSNOOPT=-O
++# Compiler flags for describing the output path
++CFLAGSOUTOBJ=-o
++
++CFLAGSWARNCC=
++CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
++# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
++CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
++CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
++CFLAGSWERRCC=-Werror
++
++# switches for dynamic and static linking
++STATIC = -Wl,-Bstatic
++DYNAMIC = -Wl,-Bdynamic
++
++# name of linker
++LINK*=$(CXX)
++LINKC*=$(CC)
++
++# default linker flags
++LINKFLAGSDEFS*=-z defs
++LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
++LINKFLAGS=-z combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
++
++# linker flags for linking applications
++LINKFLAGSAPPGUI= -Wl,-export-dynamic
++LINKFLAGSAPPCUI= -Wl,-export-dynamic
++
++# linker flags for linking shared libraries
++LINKFLAGSSHLGUI= -shared
++LINKFLAGSSHLCUI= -shared
++
++LINKFLAGSTACK=
++LINKFLAGSPROF=
++LINKFLAGSDEBUG=-g
++LINKFLAGSOPT=-L$(SOLARVERSION)$/$(INPATH)$/lib
++
++# linker flags for optimization (symbol hashtable)
++# for now, applied to symbol scoped libraries, only
++LINKFLAGSOPTIMIZE*=-Wl,-O1
++LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
++
++SONAME_SWITCH=-Wl,-h
++
++# Sequence of libs does matter !
++
++STDLIBCPP=-lgcc_s -lstdc++
++
++# default objectfilenames to link
++STDOBJGUI=
++STDSLOGUI=
++STDOBJCUI=
++STDSLOCUI=
++STDOBJVCL=$(L)$/salmain.o
++
++# libraries for linking applications
++STDLIBGUIMT=-lX11 -lm -lc -lgcc_s -lstdc++ -lpthread
++STDLIBCUIMT=-lm -lc -lgcc_s -lstdc++ -lpthread
++# libraries for linking shared libraries
++STDSHLGUIMT=-lX11 -lXext -lm -lc -lgcc_s -lstdc++ -lpthread
++STDSHLCUIMT=-lm -lc -lgcc_s -lstdc++ -lpthread
++
++LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
++
++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lgcc_s -lstdc++
++LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
++
++#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
++
++# name of library manager
++LIBMGR=ar
++LIBFLAGS=-r
++
++# tool for generating import libraries
++IMPLIB=
++IMPLIBFLAGS=
++
++MAPSYM=
++MAPSYMFLAGS=
++
++RC=irc
++RCFLAGS=-fo$@ $(RCFILES)
++RCLINK=
++RCLINKFLAGS=
++RCSETVERSION=
++
++# platform specific identifier for shared libs
++DLLPOSTFIX=bi
++DLLPRE=lib
++DLLPOST=.so
diff --git a/misc/openoffice3/patches/patch-ci b/misc/openoffice3/patches/patch-ci
new file mode 100644
index 00000000000..5b0c31a4de4
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ci
@@ -0,0 +1,19 @@
+$NetBSD: patch-ci,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/inc/unx.mk.orig 2006-07-19 18:26:37.000000000 +0900
++++ solenv/inc/unx.mk 2007-04-05 10:30:18.000000000 +0900
+@@ -151,6 +151,14 @@
+ .INCLUDE : unxbsdi2.mk
+ .ENDIF
+
++.IF "$(COM)$(CVER)$(OS)$(CPU)" == "GCCC341NETBSDI"
++.INCLUDE : unxbsdi3.mk
++.ENDIF
++
++.IF "$(COM)$(CVER)$(OS)$(CPU)" == "GCCC341NETBSDX"
++.INCLUDE : unxbsdx3.mk
++.ENDIF
++
+ .IF "$(COM)$(OS)$(CPU)" == "GCCNETBSDS"
+ .INCLUDE : unxbsds.mk
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-cj b/misc/openoffice3/patches/patch-cj
new file mode 100644
index 00000000000..fdd767adeb3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cj
@@ -0,0 +1,19 @@
+$NetBSD: patch-cj,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- tools/inc/tools/inetdef.hxx.orig 2007-09-26 17:35:00.000000000 +0900
++++ tools/inc/tools/inetdef.hxx 2007-09-26 17:36:01.000000000 +0900
+@@ -51,11 +51,11 @@
+ #elif defined SCO
+ #define TOOLS_INETDEF_OS "SCO"
+ #elif defined NETBSD && defined X86
+-#define TOOLS_INETDEF_OS "NETBSD x86"
++#define TOOLS_INETDEF_OS "NetBSD/i386"
+ #elif defined NETBSD && defined ARM32
+-#define TOOLS_INETDEF_OS "NETBSD ARM32"
++#define TOOLS_INETDEF_OS "NetBSD/arm32"
+ #elif defined NETBSD && defined SPARC
+-#define TOOLS_INETDEF_OS "NETBSD Sparc"
++#define TOOLS_INETDEF_OS "NetBSD/sparc"
+ #elif defined LINUX && defined X86
+ #define TOOLS_INETDEF_OS "Linux"
+ #elif defined FREEBSD && defined X86
diff --git a/misc/openoffice3/patches/patch-ck b/misc/openoffice3/patches/patch-ck
new file mode 100644
index 00000000000..e92c9185876
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ck
@@ -0,0 +1,21 @@
+$NetBSD: patch-ck,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- vcl/unx/gtk/app/gtkinst.cxx.orig 2008-04-11 18:24:19.000000000 +0900
++++ vcl/unx/gtk/app/gtkinst.cxx 2008-08-20 17:57:24.000000000 +0900
+@@ -230,7 +230,7 @@
+ vos::OThread::TThreadIdentifier aCurrentThread = vos::OThread::getCurrentIdentifier();
+ // protect member manipulation
+ OMutex::acquire();
+- if( mnCount > 0 && mnThreadId == aCurrentThread )
++ if( mnThreadId == aCurrentThread )
+ {
+ mnCount++;
+ OMutex::release();
+@@ -331,7 +331,5 @@
+ // that locked the mutex with Grab()
+ OMutex::acquire();
+ mnCount = nGrabs;
+- if( mnCount == 0 )
+- mnThreadId = 0;
+ OMutex::release();
+ }
diff --git a/misc/openoffice3/patches/patch-cn b/misc/openoffice3/patches/patch-cn
new file mode 100644
index 00000000000..2ac7ecec54a
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cn
@@ -0,0 +1,32 @@
+$NetBSD: patch-cn,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- desktop/scripts/soffice.sh.orig 2008-08-07 02:44:36.000000000 +0900
++++ desktop/scripts/soffice.sh 2008-08-27 21:51:39.000000000 +0900
+@@ -49,6 +49,12 @@
+ export JITC_PROCESSOR_TYPE
+ fi
+
++# XXX: Ignore "unlocking unlocked mutex" error.
++if [ "`uname -s`" = "NetBSD" ]; then
++ PTHREAD_DIAGASSERT=AEL
++ export PTHREAD_DIAGASSERT
++fi
++
+ # resolve installation directory
+ sd_cwd="`pwd`"
+ if [ -h "$0" ] ; then
+@@ -64,6 +70,14 @@
+
+ sd_binary=`basename "$0"`.bin
+
++LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${sd_prog}/../basis-link/program:${sd_prog}/../basis-link/ure-link/lib:@JAVA_XAWT_DIR@
++export LD_LIBRARY_PATH
++
++if [ -z ${JAVA_HOME} ]; then
++ JAVA_HOME=@JAVA_HOME@
++ export JAVA_HOME
++fi
++
+ #collect all bootstrap variables specified on the command line
+ #so that they can be passed as arguments to javaldx later on
+ for arg in $@
diff --git a/misc/openoffice3/patches/patch-cp b/misc/openoffice3/patches/patch-cp
new file mode 100644
index 00000000000..51ecd725e05
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cp
@@ -0,0 +1,12 @@
+$NetBSD: patch-cp,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- pyuno/source/module/makefile.mk.orig 2008-01-03 02:29:28.000000000 +0900
++++ pyuno/source/module/makefile.mk 2008-04-07 18:22:21.000000000 +0900
+@@ -96,6 +96,7 @@
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(SALLIB) \
++ $(PYTHON_LIBS) \
+ $(PYTHONLIB) \
+ $(EXTRA_FRAMEWORK_FLAG)
+
diff --git a/misc/openoffice3/patches/patch-cq b/misc/openoffice3/patches/patch-cq
new file mode 100644
index 00000000000..cb8cd0688fb
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cq
@@ -0,0 +1,13 @@
+$NetBSD: patch-cq,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk.orig 2007-10-06 03:53:00.000000000 +0900
++++ bridges/source/cpp_uno/gcc3_netbsd_intel/makefile.mk 2007-10-06 03:53:08.000000000 +0900
+@@ -46,7 +46,7 @@
+
+ # --- Files --------------------------------------------------------
+
+-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDIgcc3"
++.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDIgcc3"
+
+ .IF "$(cppu_no_leak)" == ""
+ CFLAGS += -DLEAK_STATIC_DATA
diff --git a/misc/openoffice3/patches/patch-cr b/misc/openoffice3/patches/patch-cr
new file mode 100644
index 00000000000..b3d2c303dbe
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cr
@@ -0,0 +1,22 @@
+$NetBSD: patch-cr,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- setup_native/scripts/linuxpatchscript.sh.orig 2008-04-07 17:55:52.000000000 +0900
++++ setup_native/scripts/linuxpatchscript.sh 2008-04-07 18:23:25.000000000 +0900
+@@ -49,7 +49,7 @@
+ # Check, that $RPMLIST does not contain search toolbar rpm (then it is already installed)
+ SEARCHTOOLBARINSTALLED=`grep searchtoolbar ${RPMLIST}`
+
+- if [ "x$SEARCHTOOLBARINSTALLED" == "x" ]; then
++ if [ "x$SEARCHTOOLBARINSTALLED" = "x" ]; then
+ # Install the search toolbar rpm
+ RPMLIST="$RPMLIST $SEARCHTOOLBARRPM"
+ fi
+@@ -62,7 +62,7 @@
+ # Check, that $RPMLIST does not contain kde integration rpm (then it is already installed)
+ KDERPMINSTALLED=`grep kde-integration ${RPMLIST}`
+
+- if [ "x$KDERPMINSTALLED" == "x" ]; then
++ if [ "x$KDERPMINSTALLED" = "x" ]; then
+ # Install the kde integration rpm
+ RPMLIST="$RPMLIST $KDERPM"
+ fi
diff --git a/misc/openoffice3/patches/patch-cs b/misc/openoffice3/patches/patch-cs
new file mode 100644
index 00000000000..3683acf40e3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cs
@@ -0,0 +1,183 @@
+$NetBSD: patch-cs,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- solenv/inc/unxbsdx3.mk.orig 2007-10-13 00:24:19.000000000 +0900
++++ solenv/inc/unxbsdx3.mk 2007-10-13 00:28:56.000000000 +0900
+@@ -0,0 +1,178 @@
++#
++# mk file for NetBSD/amd64 with gcc 3.4.x and higher.
++#
++
++ASM=
++AFLAGS=
++
++SOLAR_JAVA*=
++JAVAFLAGSDEBUG=-g
++
++# filter for supressing verbose messages from linker
++#not needed at the moment
++#LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
++
++# _PTHREADS is needed for the stl
++CDEFS+= -DX86 $(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
++
++# enable visibility define in "sal/types.h"
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++
++# this is a platform with JAVA support
++.IF "$(SOLAR_JAVA)"!=""
++JAVADEF=-DSOLAR_JAVA
++.IF "$(debug)"==""
++JAVA_RUNTIME=-ljava
++.ELSE
++JAVA_RUNTIME=-ljava_g
++.ENDIF
++.ENDIF
++
++# architecture dependent flags for the C and C++ compiler that can be changed by
++# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
++ARCH_FLAGS*=
++
++# name of C++ Compiler
++CXX*=g++
++# name of C Compiler
++CC*=gcc
++# flags for C and C++ Compiler
++CFLAGS+=-fmessage-length=0 -c
++
++# Compiler flags for enabling optimizations
++.IF "$(PRODUCT)"!=""
++CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products
++.ELSE # "$(PRODUCT)"!=""
++CFLAGSOPT= # no optimizing for non products
++.ENDIF # "$(PRODUCT)"!=""
++
++# flags to enable build with symbols; required for crashdump feature
++.IF "$(ENABLE_SYMBOLS)"=="SMALL"
++CFLAGSENABLESYMBOLS=-g1
++.ELSE
++CFLAGSENABLESYMBOLS=-g
++.ENDIF
++
++# flags for the C++ Compiler
++CFLAGSCC= -pipe $(ARCH_FLAGS)
++# Flags for enabling exception handling
++CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
++# Flags for disabling exception handling
++CFLAGS_NO_EXCEPTIONS=-fno-exceptions
++
++CFLAGSCXX= -pipe $(ARCH_FLAGS)
++PICSWITCH:=-fpic
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CFLAGSCXX += -fvisibility-inlines-hidden
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++
++# Compiler flags for compiling static object in multi threaded environment with graphical user interface
++CFLAGSOBJGUIMT=
++# Compiler flags for compiling static object in multi threaded environment with character user interface
++CFLAGSOBJCUIMT=
++# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
++CFLAGSSLOGUIMT=$(PICSWITCH)
++# Compiler flags for compiling shared object in multi threaded environment with character user interface
++CFLAGSSLOCUIMT=$(PICSWITCH)
++# Compiler flags for profiling
++CFLAGSPROF=
++# Compiler flags for debugging
++CFLAGSDEBUG=-g
++CFLAGSDBGUTIL=
++# Compiler flags for enabling optimizations
++# CFLAGSOPT=-O2
++# reduce to -O1 to avoid optimization problems
++CFLAGSOPT=-O1
++# Compiler flags for disabling optimizations
++CFLAGSNOOPT=-O
++# Compiler flags for describing the output path
++CFLAGSOUTOBJ=-o
++
++CFLAGSWARNCC=
++CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
++# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
++CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
++CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
++CFLAGSWERRCC=-Werror
++
++# switches for dynamic and static linking
++STATIC = -Wl,-Bstatic
++DYNAMIC = -Wl,-Bdynamic
++
++# name of linker
++LINK*=$(CXX)
++LINKC*=$(CC)
++
++# default linker flags
++LINKFLAGSDEFS*=-z defs
++LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
++LINKFLAGS=-z combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
++
++# linker flags for linking applications
++LINKFLAGSAPPGUI= -Wl,-export-dynamic
++LINKFLAGSAPPCUI= -Wl,-export-dynamic
++
++# linker flags for linking shared libraries
++LINKFLAGSSHLGUI= -shared
++LINKFLAGSSHLCUI= -shared
++
++LINKFLAGSTACK=
++LINKFLAGSPROF=
++LINKFLAGSDEBUG=-g
++LINKFLAGSOPT=-L$(SOLARVERSION)$/$(INPATH)$/lib
++
++# linker flags for optimization (symbol hashtable)
++# for now, applied to symbol scoped libraries, only
++LINKFLAGSOPTIMIZE*=-Wl,-O1
++LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
++
++SONAME_SWITCH=-Wl,-h
++
++# Sequence of libs does matter !
++
++STDLIBCPP=-lgcc_s -lstdc++
++
++# default objectfilenames to link
++STDOBJGUI=
++STDSLOGUI=
++STDOBJCUI=
++STDSLOCUI=
++STDOBJVCL=$(L)$/salmain.o
++
++# libraries for linking applications
++STDLIBGUIMT=-lX11 -lm -lc -lgcc_s -lstdc++ -lpthread
++STDLIBCUIMT=-lm -lc -lgcc_s -lstdc++ -lpthread
++# libraries for linking shared libraries
++STDSHLGUIMT=-lX11 -lXext -lm -lc -lgcc_s -lstdc++ -lpthread
++STDSHLCUIMT=-lm -lc -lgcc_s -lstdc++ -lpthread
++
++LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
++
++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lgcc_s -lstdc++
++LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
++
++#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
++
++# name of library manager
++LIBMGR=ar
++LIBFLAGS=-r
++
++# tool for generating import libraries
++IMPLIB=
++IMPLIBFLAGS=
++
++MAPSYM=
++MAPSYMFLAGS=
++
++RC=irc
++RCFLAGS=-fo$@ $(RCFILES)
++RCLINK=
++RCLINKFLAGS=
++RCSETVERSION=
++
++# platform specific identifier for shared libs
++DLLPOSTFIX=bx
++DLLPRE=lib
++DLLPOST=.so
diff --git a/misc/openoffice3/patches/patch-ct b/misc/openoffice3/patches/patch-ct
new file mode 100644
index 00000000000..17928233e9f
--- /dev/null
+++ b/misc/openoffice3/patches/patch-ct
@@ -0,0 +1,21 @@
+$NetBSD: patch-ct,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- tools/inc/tools/solar.h.orig 2007-11-02 22:00:07.000000000 +0900
++++ tools/inc/tools/solar.h 2008-04-07 18:24:54.000000000 +0900
+@@ -343,6 +343,7 @@
+ #define SYSTEM_UNXSOGI 32
+ #define SYSTEM_UNXMACXI 33
+ #define SYSTEM_OS2GCCI 34
++#define SYSTEM_UNXBSDX 35
+ #define SYSTEM_WNTGCCI 99
+
+ #if defined WNT
+@@ -398,6 +399,8 @@
+ #define __DLLEXTENSION "mxp.dylib"
+ #elif defined MACOSX && defined X86
+ #define __DLLEXTENSION "mxi.dylib"
++#elif defined NETBSD && defined X86_64
++ #define __DLLEXTENSION "bx.so"
+ #else
+ #define __DLLEXTENSION ".so"
+ #endif
diff --git a/misc/openoffice3/patches/patch-cu b/misc/openoffice3/patches/patch-cu
new file mode 100644
index 00000000000..fe6a69a3928
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cu
@@ -0,0 +1,13 @@
+$NetBSD: patch-cu,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk.orig 2007-10-10 11:52:30.000000000 +0900
++++ bridges/source/cpp_uno/gcc3_netbsd_x86-64/makefile.mk 2007-10-10 11:52:51.000000000 +0900
+@@ -46,7 +46,7 @@
+
+ # --- Files --------------------------------------------------------
+
+-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCFREEBSDXgcc3"
++.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDXgcc3"
+
+ .IF "$(cppu_no_leak)" == ""
+ CFLAGS += -DLEAK_STATIC_DATA
diff --git a/misc/openoffice3/patches/patch-cv b/misc/openoffice3/patches/patch-cv
new file mode 100644
index 00000000000..3eed9e9782f
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cv
@@ -0,0 +1,12 @@
+$NetBSD: patch-cv,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- bridges/prj/build.lst.orig 2007-10-12 02:40:55.000000000 +0000
++++ bridges/prj/build.lst 2007-10-12 02:42:54.000000000 +0000
+@@ -22,6 +22,7 @@
+ br bridges\source\cpp_uno\gcc3_solaris_sparc nmake - u br_gcc3sogs br_cppuno_shared br_unotypes br_inc NULL
+ br bridges\source\cpp_uno\gcc3_solaris_intel nmake - u br_gcc3sogi br_cppuno_shared br_unotypes br_inc NULL
+ br bridges\source\cpp_uno\gcc3_netbsd_intel nmake - u br_gccni br_unotypes br_inc NULL
++br bridges\source\cpp_uno\gcc3_netbsd_x86-64 nmake - u br_gcc3nx br_cppuno_shared br_unotypes br_inc NULL
+ br bridges\source\cpp_uno\shared nmake - all br_cppuno_shared br_unotypes br_inc NULL
+ br bridges\source\jni_uno nmake - all br_jni_uno br_unotypes br_inc NULL
+ br bridges\source\jni_uno\java\com\sun\star\bridges\jni_uno nmake - all br_jni_uno_java br_unotypes br_inc NULL
diff --git a/misc/openoffice3/patches/patch-cw b/misc/openoffice3/patches/patch-cw
new file mode 100644
index 00000000000..7e5ee4229e7
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cw
@@ -0,0 +1,30 @@
+$NetBSD: patch-cw,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- i18npool/source/collator/makefile.mk.orig 2008-04-10 17:57:56.000000000 +0900
++++ i18npool/source/collator/makefile.mk 2008-05-17 18:54:31.000000000 +0900
+@@ -42,7 +42,24 @@
+
+ # --- Files --------------------------------------------------------
+
+-txtlist:=$(shell @cd data && ls *.txt)
++txtlist= \
++ dz_charset.txt \
++ hu_charset.txt \
++ ja_charset.txt \
++ ja_phonetic_alphanumeric_first.txt \
++ ja_phonetic_alphanumeric_last.txt \
++ ko_charset.txt \
++ ku_alphanumeric.txt \
++ ln_charset.txt \
++ ne_charset.txt \
++ zh_TW_charset.txt \
++ zh_TW_radical.txt \
++ zh_TW_stroke.txt \
++ zh_charset.txt \
++ zh_pinyin.txt \
++ zh_radical.txt \
++ zh_stroke.txt \
++ zh_zhuyin.txt
+ LOCAL_RULE_LANGS:=$(uniq $(foreach,i,$(txtlist) $(i:s/-/_/:s/_/ /:1)))
+ rules_dependencies:=$(foreach,i,$(txtlist) data$/$i) $(INCCOM)$/lrl_include.hxx
+
diff --git a/misc/openoffice3/patches/patch-cx b/misc/openoffice3/patches/patch-cx
new file mode 100644
index 00000000000..aed9d923ba7
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cx
@@ -0,0 +1,16 @@
+$NetBSD: patch-cx,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- solenv/inc/libs.mk.orig 2008-08-01 05:16:24.000000000 +0900
++++ solenv/inc/libs.mk 2008-08-27 22:33:48.000000000 +0900
+@@ -238,7 +238,11 @@
+ BERKELEYLIB=-ldb-4.2
+ BERKELEYCPPLIB=-ldb_cxx-4.2
+ .ENDIF
++.IF "$(SYSTEM_CURL)" == "YES"
++CURLLIB=$(CURL_LIBS)
++.ELSE
+ CURLLIB=-lcurl
++.ENDIF
+ .ENDIF # "$(GUI)$(COM)"=="WNTGCC"
+ SFX2LIB=-lsfx$(DLLPOSTFIX)
+ SFXLIB=-lsfx$(DLLPOSTFIX)
diff --git a/misc/openoffice3/patches/patch-cy b/misc/openoffice3/patches/patch-cy
new file mode 100644
index 00000000000..ca6391104a4
--- /dev/null
+++ b/misc/openoffice3/patches/patch-cy
@@ -0,0 +1,24 @@
+$NetBSD: patch-cy,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- store/util/makefile.mk.orig 2007-07-05 08:57:12.000000000 +0000
++++ store/util/makefile.mk 2008-02-06 22:10:01.000000000 +0000
+@@ -79,14 +79,16 @@
+ .IF "$(GUI)"=="WNT"
+ SHL1STDLIBS+= -lsupc++
+ .ELSE
+-.IF "$(OS)"=="NETBSD"
+-SHL1STDLIBS+= -lsupc++
+-.ELIF "$(OS)"=="MACOSX"
++.IF "$(OS)"=="MACOSX" || "$(OS)"=="NETBSD"
+ .IF "$(CCNUMVER)"<="000399999999"
+ SHL1STDLIBS+= -lsupc++
+ .ENDIF # CCNUMVER
+ .ELIF "$(CCNUMVER)"<="000400000999"
++.IF "$(OS)"=="FREEBSD"
++SHL1STDLIBS+= -lsupc++ -lgcc
++.ELSE
+ SHL1STDLIBS+= -lsupc++ -lgcc_s
++.ENDIF # FREEBSD
+ .ENDIF
+ .ENDIF
+ .ENDIF
diff --git a/misc/openoffice3/patches/patch-dc b/misc/openoffice3/patches/patch-dc
new file mode 100644
index 00000000000..22903cd9731
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dc
@@ -0,0 +1,35 @@
+$NetBSD: patch-dc,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- icc/SampleICC-1.3.2.patch.orig 2008-01-31 17:07:33.000000000 +0900
++++ icc/SampleICC-1.3.2.patch 2008-09-30 01:29:06.000000000 +0900
+@@ -489,7 +489,7 @@
+ ! }
+ ! }
+ ! }
+---- 1,329 ----
++--- 1,332 ----
+ ! /*
+ ! File: Vetters.cpp
+ !
+@@ -575,7 +575,7 @@
+ ! using namespace std;
+ !
+ ! #ifndef WIN32
+-! #ifdef sun
++! #if 1
+ ! #include <errno.h>
+ ! #else
+ ! #include <sys/errno.h>
+@@ -584,8 +584,11 @@
+ ! #include <string.h>
+ ! #define stat _stat
+ ! #endif
++! #ifdef NETBSD
++! #include <sys/param.h>
++! #endif
+ !
+-! #if defined WIN32 || defined sun
++! #if defined WIN32 || defined sun || (defined(NETBSD) && (__NetBSD_Version__ < 400000000))
+ ! int strerror_r(int errnum, char *str, int strsize)
+ ! {
+ ! const char *errstr = strerror(errnum);
diff --git a/misc/openoffice3/patches/patch-dd b/misc/openoffice3/patches/patch-dd
new file mode 100644
index 00000000000..6179c40e8c1
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dd
@@ -0,0 +1,35 @@
+$NetBSD: patch-dd,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- icc/SampleICC-1.3.2-bendian.patch.orig 2008-01-31 17:07:26.000000000 +0900
++++ icc/SampleICC-1.3.2-bendian.patch 2008-09-30 02:57:56.000000000 +0900
+@@ -489,7 +489,7 @@
+ ! }
+ ! }
+ ! }
+---- 1,329 ----
++--- 1,332 ----
+ ! /*
+ ! File: Vetters.cpp
+ !
+@@ -575,7 +575,7 @@
+ ! using namespace std;
+ !
+ ! #ifndef WIN32
+-! #ifdef sun
++! #if 1
+ ! #include <errno.h>
+ ! #else
+ ! #include <sys/errno.h>
+@@ -584,8 +584,11 @@
+ ! #include <string.h>
+ ! #define stat _stat
+ ! #endif
++! #ifdef NETBSD
++! #include <sys/param.h>
++! #endif
+ !
+-! #if defined WIN32 || defined sun
++! #if defined WIN32 || defined sun || (defined(NETBSD) && (__NetBSD_Version__ < 400000000))
+ ! int strerror_r(int errnum, char *str, int strsize)
+ ! {
+ ! const char *errstr = strerror(errnum);
diff --git a/misc/openoffice3/patches/patch-de b/misc/openoffice3/patches/patch-de
new file mode 100644
index 00000000000..f112e26a506
--- /dev/null
+++ b/misc/openoffice3/patches/patch-de
@@ -0,0 +1,95 @@
+$NetBSD: patch-de,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- lpsolve/lp_solve_5.5.patch.orig 2008-06-16 23:19:46.000000000 +0900
++++ lpsolve/lp_solve_5.5.patch 2008-06-27 18:23:09.000000000 +0900
+@@ -1,12 +1,33 @@
+---- misc/lp_solve_5.5/lpsolve55/ccc Sat Jun 11 21:27:18 2005
+-+++ misc/build/lp_solve_5.5/lpsolve55/ccc Wed May 21 17:19:56 2008
+-@@ -1,5 +1,5 @@
++--- misc/lp_solve_5.5/lpsolve55/ccc 2005-06-12 04:27:18.000000000 +0900
+++++ misc/build/lp_solve_5.5/lpsolve55/ccc 2008-06-27 18:21:52.000000000 +0900
++@@ -1,12 +1,16 @@
+ src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
+ -c=cc
+ +c=$CC
+
+ def=
+ so=
++ if [ "$PLATFORM" = "SCO_UNIX" ]
++ then def='-dy -K PIC -DNOLONGLONG'
++ dl=-lc
++-else dl=-ldl
+++else
+++ if [ x"$OS" = x"NETBSD" -o x"$OS" = x"FREEBSD" ]
+++ then dl=-lc
+++ else dl=-ldl
+++ fi
++ so=y
++ fi
++
++@@ -19,7 +23,7 @@
++ if [ "$so" != "" ]
++ then
++ $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
++- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
+++ $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm $dl
++ fi
++
++ rm *.o 2>/dev/null
+ --- misc/lp_solve_5.5/lpsolve55/ccc.osx Thu Jun 23 22:53:08 2005
+ +++ misc/build/lp_solve_5.5/lpsolve55/ccc.osx Wed May 21 17:19:56 2008
+ @@ -3,6 +3,10 @@
+@@ -72,3 +93,53 @@
+ +fi
+ +
+ +rm *.o 2>/dev/null
++--- misc/lp_solve_5.5/shared/commonlib.c 2007-01-15 03:33:14.000000000 +0900
+++++ misc/build/lp_solve_5.5/shared/commonlib.c 2008-06-27 18:16:17.000000000 +0900
++@@ -4,7 +4,7 @@
++ #ifdef INTEGERTIME
++ # include <time.h>
++ #else
++-# include <sys/timeb.h>
+++# include <sys/time.h>
++ #endif
++
++ #include <stdlib.h>
++@@ -700,10 +700,10 @@
++ #elif defined CLOCKTIME
++ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
++ #else
++- struct timeb buf;
+++ struct timeval buf;
++
++- ftime(&buf);
++- return((double)buf.time+((double) buf.millitm)/1000.0);
+++ gettimeofday(&buf, NULL);
+++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
++ #endif
++ }
++
++--- misc/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2007-01-15 03:29:20.000000000 +0900
+++++ misc/build/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2008-06-27 18:17:35.000000000 +0900
++@@ -4,7 +4,7 @@
++ #ifdef INTEGERTIME
++ # include <time.h>
++ #else
++-# include <sys/timeb.h>
+++# include <sys/time.h>
++ #endif
++
++ #include <stdlib.h>
++@@ -673,10 +673,10 @@
++ #elif defined CLOCKTIME
++ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
++ #else
++- struct timeb buf;
+++ struct timeval buf;
++
++- ftime(&buf);
++- return((double)buf.time+((double) buf.millitm)/1000.0);
+++ gettimeofday(&buf);
+++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
++ #endif
++ }
++
diff --git a/misc/openoffice3/patches/patch-dh b/misc/openoffice3/patches/patch-dh
new file mode 100644
index 00000000000..edd1eb7fbbf
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dh
@@ -0,0 +1,15 @@
+$NetBSD: patch-dh,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- desktop/util/makefile.mk.orig 2008-05-18 01:02:36.000000000 +0000
++++ desktop/util/makefile.mk 2008-05-18 01:03:30.000000000 +0000
+@@ -85,8 +85,8 @@
+ APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj
+ APP1STDLIBS = $(SALLIB) $(SOFFICELIB)
+ .IF "$(GUI)" == "UNX"
+-.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD"
+-APP1STDLIBS+= -lXext -lSM -lICE
++.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" || "$(OS)" == "NETBSD"
++APP1STDLIBS+= $(X11_LDFLAGS) -lXext -lSM -lICE
+ .ENDIF
+ .ENDIF
+
diff --git a/misc/openoffice3/patches/patch-di b/misc/openoffice3/patches/patch-di
new file mode 100644
index 00000000000..0b8d90ea5c3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-di
@@ -0,0 +1,22 @@
+$NetBSD: patch-di,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- desktop/source/pkgchk/unopkg/makefile.mk.orig 2008-06-25 20:10:54.000000000 +0900
++++ desktop/source/pkgchk/unopkg/makefile.mk 2008-07-13 11:06:39.000000000 +0900
+@@ -47,7 +47,7 @@
+
+ APP1TARGET = so$/unopkg
+ APP1OBJS = $(OBJFILES)
+-APP1STDLIBS = $(SALLIB) $(UNOPKGAPPLIB)
++APP1STDLIBS = $(SALLIB) $(UNOPKGAPPLIB) $(DEPLOYMENTMISCLIB)
+ APP1DEPN = $(SHL1TARGETN)
+ APP1NOSAL = TRUE
+ APP1RPATH = BRAND
+@@ -58,7 +58,7 @@
+
+ APP2TARGET = unopkg
+ APP2OBJS = $(OBJFILES)
+-APP2STDLIBS = $(SALLIB) $(UNOPKGAPPLIB)
++APP2STDLIBS = $(SALLIB) $(UNOPKGAPPLIB) $(DEPLOYMENTMISCLIB)
+ APP2DEPN = $(SHL1TARGETN)
+ APP2NOSAL = TRUE
+ APP2RPATH = BRAND
diff --git a/misc/openoffice3/patches/patch-dj b/misc/openoffice3/patches/patch-dj
new file mode 100644
index 00000000000..30456030283
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dj
@@ -0,0 +1,13 @@
+$NetBSD: patch-dj,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- canvas/source/cairo/prex.h.orig 2008-06-03 04:22:47.000000000 +0900
++++ canvas/source/cairo/prex.h 2008-06-03 04:22:59.000000000 +0900
+@@ -51,7 +51,7 @@
+ extern "C" {
+ #endif
+
+-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
++#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) || defined(NETBSD) // should really check for xfree86 or for X11R6.1 and higher
+ #define __XKeyboardExtension__ 1
+ #else
+ #define __XKeyboardExtension__ 0
diff --git a/misc/openoffice3/patches/patch-dk b/misc/openoffice3/patches/patch-dk
new file mode 100644
index 00000000000..6bf2f53f358
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dk
@@ -0,0 +1,13 @@
+$NetBSD: patch-dk,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- vcl/unx/inc/prex.h.orig 2008-06-03 03:30:57.000000000 +0900
++++ vcl/unx/inc/prex.h 2008-06-03 03:31:38.000000000 +0900
+@@ -50,7 +50,7 @@
+ extern "C" {
+ #endif
+
+-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
++#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) || defined(NETBSD) // should really check for xfree86 or for X11R6.1 and higher
+ #define __XKeyboardExtension__ 1
+ #else
+ #define __XKeyboardExtension__ 0
diff --git a/misc/openoffice3/patches/patch-dl b/misc/openoffice3/patches/patch-dl
new file mode 100644
index 00000000000..57e711b9250
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dl
@@ -0,0 +1,16 @@
+$NetBSD: patch-dl,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- hunspell/hunspell-1.1.12.patch.orig 2008-06-27 18:06:37.000000000 +0900
++++ hunspell/hunspell-1.1.12.patch 2008-06-27 18:07:11.000000000 +0900
+@@ -450,3 +450,11 @@
+ i68568utf.test \
+ 1706659.test \
+ digits_in_words.test \
++--- misc/hunspell-1.1.12/tests/test.sh 2007-07-15 22:33:13.000000000 +0900
+++++ misc/build/hunspell-1.1.12/tests/test.sh 2008-06-27 18:05:30.000000000 +0900
++@@ -1,4 +1,4 @@
++-#!/bin/bash
+++#!@BASH@
++ export LC_ALL="C"
++
++ function check_valgrind_log () {
diff --git a/misc/openoffice3/patches/patch-do b/misc/openoffice3/patches/patch-do
new file mode 100644
index 00000000000..07f149baf54
--- /dev/null
+++ b/misc/openoffice3/patches/patch-do
@@ -0,0 +1,22 @@
+$NetBSD: patch-do,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- sal/osl/unx/process.c.orig 2008-06-27 22:16:35.000000000 +0900
++++ sal/osl/unx/process.c 2008-06-27 22:17:20.000000000 +0900
+@@ -44,7 +44,7 @@
+ #endif
+
+
+-#ifdef FREEBSD
++#if defined(FREEBSD) || defined(NETBSD)
+ #include <machine/param.h>
+ #endif
+
+@@ -474,7 +474,7 @@
+
+ if (! INIT_GROUPS(data.m_name, data.m_gid) || (setuid(data.m_uid) != 0))
+ OSL_TRACE("Failed to change uid and guid, errno=%d (%s)\n", errno, strerror(errno));
+-#if defined(LINUX) || defined (FREEBSD)
++#if defined(LINUX) || defined (FREEBSD) || defined(NETBSD)
+ unsetenv("HOME");
+ #else
+ putenv("HOME=");
diff --git a/misc/openoffice3/patches/patch-dp b/misc/openoffice3/patches/patch-dp
new file mode 100644
index 00000000000..9de6fb4749b
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dp
@@ -0,0 +1,13 @@
+$NetBSD: patch-dp,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- vcl/unx/gtk/app/gtkdata.cxx.orig 2008-06-27 22:26:13.000000000 +0900
++++ vcl/unx/gtk/app/gtkdata.cxx 2008-06-27 22:26:34.000000000 +0900
+@@ -44,7 +44,7 @@
+ #include <limits.h>
+ #include <errno.h>
+ #include <poll.h>
+-#ifdef FREEBSD
++#if defined(FREEBSD) || defined(NETBSD)
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <unistd.h>
diff --git a/misc/openoffice3/patches/patch-dt b/misc/openoffice3/patches/patch-dt
new file mode 100644
index 00000000000..5d1a89c2ca2
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dt
@@ -0,0 +1,13 @@
+$NetBSD: patch-dt,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- solenv/inc/settings.mk.orig 2008-07-30 22:35:02.000000000 +0900
++++ solenv/inc/settings.mk 2008-08-28 13:01:00.000000000 +0900
+@@ -1006,6 +1006,8 @@
+ .INCLUDE : os2.mk
+ .ENDIF
+
++.INCLUDE : pkgsrc.mk
++
+ # remove if .Net 2003 support has expired
+ .IF "$(debug)"!=""
+ .IF "$(OS)$(COM)$(CPU)" == "WNTMSCI"
diff --git a/misc/openoffice3/patches/patch-du b/misc/openoffice3/patches/patch-du
new file mode 100644
index 00000000000..60ab5b18fd3
--- /dev/null
+++ b/misc/openoffice3/patches/patch-du
@@ -0,0 +1,23 @@
+$NetBSD: patch-du,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- solenv/inc/pkgsrc.mk.orig 2008-08-28 19:43:59.000000000 +0900
++++ solenv/inc/pkgsrc.mk 2008-08-28 19:44:28.000000000 +0900
+@@ -0,0 +1,18 @@
++#
++# Override/modify variables for pkgsrc.
++#
++
++BERKELEYLIB="-L@BLNK_PREFIX_db4@/lib -Wl,-R@BLNK_PREFIX_db4@/lib -ldb4"
++BERKELEYCPPLIB="-L@BLNK_PREFIX_db4@/lib -Wl,-R@BLNK_PREFIX_db4@/lib -ldb4_cxx"
++
++EXPAT3RDLIB="-L@BLNK_PREFIX_expat@/lib -Wl,-R@BLNK_PREFIX_expat@/lib -lexpat"
++EXPATASCII3RDLIB="-L@BLNK_PREFIX_expat@/lib -Wl,-R@BLNK_PREFIX_expat@/lib -lexpat"
++
++JPEG3RDLIB="-L@BLNK_PREFIX_jpeg@/lib -Wl,-R@BLNK_PREFIX_jpeg@/lib -ljpeg"
++
++ZLIB3RDLIB="-L@BLNK_PREFIX_zlib@/lib -Wl,-R@BLNK_PREFIX_zlib@/lib -lz"
++
++AWTLIB="@RFLAG_AWTLIB@ -ljawt"
++
++STDLIBGUIMT+=${X11_LDFLAGS}
++STDSHLGUIMT+=${X11_LDFLAGS}
diff --git a/misc/openoffice3/patches/patch-dw b/misc/openoffice3/patches/patch-dw
new file mode 100644
index 00000000000..d455e648537
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dw
@@ -0,0 +1,14 @@
+$NetBSD: patch-dw,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- padmin/source/spadmin.sh.orig 2008-09-28 01:39:37.000000000 +0900
++++ padmin/source/spadmin.sh 2008-09-28 01:57:38.000000000 +0900
+@@ -56,6 +56,9 @@
+ esac
+ done
+
++LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${sd_prog}/../basis-link/program:${sd_prog}/../basis-link/ure-link/lib:@JAVA_XAWT_DIR@
++export LD_LIBRARY_PATH
++
+ # extend the ld_library_path for java: javaldx checks the sofficerc for us
+ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
+ my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
diff --git a/misc/openoffice3/patches/patch-dx b/misc/openoffice3/patches/patch-dx
new file mode 100644
index 00000000000..cbcbd26cfa4
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dx
@@ -0,0 +1,14 @@
+$NetBSD: patch-dx,v 1.1.1.1 2008/10/14 11:02:24 hira Exp $
+
+--- desktop/scripts/unopkg.sh.orig 2008-10-02 14:41:08.000000000 +0900
++++ desktop/scripts/unopkg.sh 2008-10-02 14:41:43.000000000 +0900
+@@ -56,6 +56,9 @@
+ esac
+ done
+
++LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${sd_prog}/../basis-link/program:${sd_prog}/../basis-link/ure-link/lib:@JAVA_XAWT_DIR@
++export LD_LIBRARY_PATH
++
+ # extend the ld_library_path for java: javaldx checks the sofficerc for us
+ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
+ my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
diff --git a/misc/openoffice3/patches/patch-dy b/misc/openoffice3/patches/patch-dy
new file mode 100644
index 00000000000..05db07547bd
--- /dev/null
+++ b/misc/openoffice3/patches/patch-dy
@@ -0,0 +1,22 @@
+$NetBSD: patch-dy,v 1.1.1.1 2008/10/14 11:02:25 hira Exp $
+
+--- libxmlsec/xmlsec1-1.2.6.patch.orig 2008-10-03 21:53:36.000000000 +0900
++++ libxmlsec/xmlsec1-1.2.6.patch 2008-10-03 21:54:01.000000000 +0900
+@@ -418,7 +418,7 @@
+
+ XMLSEC_NO_NSS="1"
+ MOZILLA_MIN_VERSION="1.4"
+-+ if test "z$MOZ_FLAVOUR" = "zfirefox" ; then
+++ if test "z$MOZ_FLAVOUR" = "zfirefox" -o "z$MOZ_FLAVOUR" = "zseamonkey"; then
+ + MOZILLA_MIN_VERSION="1.0"
+ + fi
+ NSS_MIN_VERSION="3.2"
+@@ -2705,7 +2705,7 @@
+
+ XMLSEC_NO_NSS="1"
+ MOZILLA_MIN_VERSION="1.4"
+-+ if test "z$MOZ_FLAVOUR" = "zfirefox" ; then
+++ if test "z$MOZ_FLAVOUR" = "zfirefox" -o "z$MOZ_FLAVOUR" = "zseamonkey"; then
+ + MOZILLA_MIN_VERSION="1.0"
+ + fi
+ NSS_MIN_VERSION="3.2"