- protect against null pointer dereference in hi_ary.cxx

- use new style C++ includes
- clean up some patches
- use __alignof__ for OpenBSD too
- fix destpath in packagelist.txt for sdkoo and ure
- don't generate core file on intentional segfault test in typesconfig.c
- add missing unxobsdi section in stand.lst
- num_put_float.cpp fix in STLport
- add sysconfig.get_config_var('LIBS') to PYTHON_LIBS
- don't hardcode Linux path to 'sum' let path find it

All corrections submitted by or inspired by patches from Fritz Elfert
<fritz at fritz-elfert.de>
This commit is contained in:
kurt 2006-10-25 22:49:50 +00:00
parent 2f8db30b2c
commit c65335346c
13 changed files with 213 additions and 61 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2006/10/21 22:20:50 kurt Exp $
# $OpenBSD: Makefile,v 1.15 2006/10/25 22:49:50 kurt Exp $
ONLY_FOR_ARCHS= i386
@ -7,7 +7,7 @@ COMMENT= "a multi-platform productivity suite"
VERSION= 2.0.4
DISTNAME= OOo_${VERSION}_src
WRKDIST= ${WRKDIR}/OOD680_m5
PKGNAME= openoffice-${VERSION}p5
PKGNAME= openoffice-${VERSION}p6
CATEGORIES= editors productivity
SHARED_LIBS= icudata 26.0 \
@ -50,7 +50,7 @@ LIB_DEPENDS= gdk-x11-2.0.>=400.14,gdk_pixbuf-2.0.>=400.14,gtk-x11-2.0.>=400.14::
WANTLIB= ICE SM X11 Xext atk-1.0 c cairo expat fontconfig \
freetype glib-2.0 gmodule-2.0 gobject-2.0 \
gthread-2.0 iconv intl jpeg m pango-1.0 \
pangocairo-1.0 pangoft2-1.0 pthread stdc++ xml2 z
pangocairo-1.0 pangoft2-1.0 pthread stdc++ util xml2 z
USE_X11= Yes
USE_GMAKE= Yes
@ -84,7 +84,6 @@ CONFIGURE_ARGS= --disable-gnome-vfs \
--with-system-db \
--with-system-sndfile \
--with-epm=internal \
--with-package-format=portable \
--with-alloc=system \
--without-java

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-autodoc_source_display_idl_hi_ary_cxx,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- autodoc/source/display/idl/hi_ary.cxx.orig.port Wed Sep 7 13:50:24 2005
+++ autodoc/source/display/idl/hi_ary.cxx Tue Oct 24 14:06:38 2006
@@ -177,7 +177,7 @@ AryAccess::Search_Ce( StringVector &
o_mainEntity = sNextName;
// Find member:
- if ( *pNext == 0 )
+ if ( *pNext == '\0' )
return true;
nextName(pNext, o_memberEntity);
if (strchr(o_memberEntity,':') != 0)
@@ -185,7 +185,7 @@ AryAccess::Search_Ce( StringVector &
int nMemberLen = o_memberEntity.length();
if ( nMemberLen > 2
- ? *(pNext + nMemberLen - 2) == '('
+ ? (*pNext && *(pNext + nMemberLen - 2) == '(')
: false )
{
o_memberEntity.assign(o_memberEntity,nMemberLen-2);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-binfilter_inc_bf_starmath_rect_hxx,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- binfilter/inc/bf_starmath/rect.hxx.orig.port Tue Oct 24 16:47:40 2006
+++ binfilter/inc/bf_starmath/rect.hxx Tue Oct 24 16:47:49 2006
@@ -36,7 +36,7 @@
#ifndef RECT_HXX
#define RECT_HXX
-#include <new.h>
+#include <new>
#ifndef _GEN_HXX //autogen

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-config_office_configure_in,v 1.4 2006/10/20 14:59:26 kurt Exp $
$OpenBSD: patch-config_office_configure_in,v 1.5 2006/10/25 22:49:50 kurt Exp $
--- config_office/configure.in.orig.port Mon Aug 28 04:37:20 2006
+++ config_office/configure.in Thu Oct 19 11:37:12 2006
+++ config_office/configure.in Wed Oct 25 14:53:40 2006
@@ -773,6 +773,15 @@ case "$build_os" in
AC_MSG_RESULT([$PTHREAD_LIBS])
_os=FreeBSD
@ -31,18 +31,32 @@ $OpenBSD: patch-config_office_configure_in,v 1.4 2006/10/20 14:59:26 kurt Exp $
AC_PROG_CXXCPP
fi
@@ -2501,8 +2510,8 @@ if test "$_os" != "WINNT" -a \( "z$enabl
@@ -2501,6 +2510,9 @@ if test "$_os" != "WINNT" -a \( "z$enabl
AIX)
PKGFORMAT=aix
;;
- *BSD)
- PKGFORMAT=bsd
+ OpenBSD)
+ PKGFORMAT=portable
+ ;;
*BSD)
PKGFORMAT=bsd
;;
OSF1)
PKGFORMAT=setld
@@ -2903,16 +2912,13 @@ if test -n "$with_system_db" -o -n "$wit
@@ -2873,12 +2885,13 @@ if test -n "$with_system_python" && test
python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
+ python_libs=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBS');"`
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_libs"
fi
dnl check if the headers really work:
@@ -2903,16 +2916,13 @@ if test -n "$with_system_db" -o -n "$wit
test "$with_system_db" != "no"; then
SYSTEM_DB=YES
AC_MSG_RESULT([external])
@ -63,7 +77,7 @@ $OpenBSD: patch-config_office_configure_in,v 1.4 2006/10/20 14:59:26 kurt Exp $
for v in 1 2; do
AC_TRY_RUN([
#include <db.h>
@@ -2923,6 +2929,7 @@ int main(int argc, char **argv) {
@@ -2923,6 +2933,7 @@ int main(int argc, char **argv) {
}
], [DB_VERSION_MINOR=$v], [])
done
@ -71,7 +85,7 @@ $OpenBSD: patch-config_office_configure_in,v 1.4 2006/10/20 14:59:26 kurt Exp $
if test "$DB_VERSION_MINOR" -gt "1"; then
AC_MSG_RESULT([OK])
DB_VERSION=4.$DB_VERSION_MINOR
@@ -3578,7 +3585,7 @@ elif test "$_os" != "WINNT" ; then
@@ -3578,7 +3589,7 @@ elif test "$_os" != "WINNT" ; then
AC_MSG_ERROR([No X includes found]) # Exit
fi
CFLAGS=$X_CFLAGS

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-cppu_test_alignment_diagnose_h,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- cppu/test/alignment/diagnose.h.orig.port Thu Sep 8 05:00:29 2005
+++ cppu/test/alignment/diagnose.h Tue Oct 24 16:53:06 2006
@@ -38,7 +38,7 @@
#include <sal/types.h>
#include <stdio.h>
-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL)
+#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD) || defined(OPENBSD)) && defined(INTEL)
#define ALIGNMENT(s, n) __alignof__ (s)
#else
#define ALIGNMENT(s, n) n

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-instsetoo_native_inc_sdkoo_unix_packagelist_txt,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- instsetoo_native/inc_sdkoo/unix/packagelist.txt.orig.port Tue Oct 24 16:54:44 2006
+++ instsetoo_native/inc_sdkoo/unix/packagelist.txt Tue Oct 24 16:56:21 2006
@@ -35,5 +35,5 @@ packagename = "openoffice.org-sdk"
copyright = "2005-2006 by OpenOffice.org"
vendor = "OpenOffice.org"
description = "OpenOffice.org %PRODUCTVERSION SDK"
-destpath = "/opt/openoffice.org%PRODUCTVERSION_sdk"
+destpath = "openoffice-sdk"
End

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-instsetoo_native_inc_ure_unix_packagelist_txt,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- instsetoo_native/inc_ure/unix/packagelist.txt.orig.port Tue Oct 24 16:57:09 2006
+++ instsetoo_native/inc_ure/unix/packagelist.txt Tue Oct 24 16:57:21 2006
@@ -40,5 +40,5 @@ packagename = "openoffice.org-ure"
copyright = "2005-2006 by OpenOffice.org"
vendor = "OpenOffice.org"
description = "UNO Runtime Environment"
-destpath = "/opt/openoffice.org/ure"
+destpath = "openoffice/ure"
End

View File

@ -1,15 +1,6 @@
$OpenBSD: patch-instsetoo_native_util_makefile_mk,v 1.2 2006/08/20 03:36:52 kurt Exp $
$OpenBSD: patch-instsetoo_native_util_makefile_mk,v 1.3 2006/10/25 22:49:50 kurt Exp $
--- instsetoo_native/util/makefile.mk.orig.port Thu Jul 13 11:15:45 2006
+++ instsetoo_native/util/makefile.mk Sat Aug 19 09:34:50 2006
@@ -108,7 +108,7 @@ ALLTAR : $(LOCALPYFILES)
.IF "$(BUILD_TYPE)"=="$(BUILD_TYPE:s/ODK//)"
ALLTAR : openoffice
.ELSE
-ALLTAR : openoffice sdkoo_en-US ure_en-US
+ALLTAR : openoffice
.ENDIF
.ELSE # "$(UPDATER)"=="" || "$(USE_PACKAGER)"==""
ALLTAR : updatepack
+++ instsetoo_native/util/makefile.mk Tue Oct 24 21:12:54 2006
@@ -189,7 +189,7 @@ openoffice_%{$(PKGFORMAT:^".")} :
openoffice_% :
.ENDIF # "$(PKGFORMAT)"!=""

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-sal_typesconfig_typesconfig_c,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- sal/typesconfig/typesconfig.c.orig.port Thu Sep 8 12:49:50 2005
+++ sal/typesconfig/typesconfig.c Tue Oct 24 17:12:30 2006
@@ -167,6 +167,16 @@ void SignalHdl( int sig )
int check( TestFunc func, Type eT, void* p )
{
#ifdef USE_FORK_TO_CHECK
+
+#ifdef OPENBSD
+ /* avoid generating a core file (probably for other OS too?! */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+ struct rlimit rl;
+ memset(&rl, 0, sizeof(rl));
+ setrlimit(RLIMIT_CORE, &rl);
+#endif
pid_t nChild = fork();
if ( nChild )
{

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-solenv_bin_modules_installer_download_pm,v 1.1 2006/10/25 22:49:50 kurt Exp $
--- solenv/bin/modules/installer/download.pm.orig.port Wed Oct 25 15:22:15 2006
+++ solenv/bin/modules/installer/download.pm Wed Oct 25 15:25:19 2006
@@ -145,7 +145,7 @@ sub put_checksum_and_size_into_script
}
else
{
- installer::exiter::exit_program("ERROR: Incorrect return value from /usr/bin/sum: $sumout", "put_checksum_and_size_into_script");
+ installer::exiter::exit_program("ERROR: Incorrect return value from sum: $sumout", "put_checksum_and_size_into_script");
}
my $infoline = "Adding checksum $checksum and size $size into download shell script\n";
@@ -233,12 +233,12 @@ sub call_sum
# my $ownerstring = "";
# if ( $installer::globals::islinuxrpmbuild ) { $ownerstring = "--owner=0"; }
-# my $systemcall = "cd $installdir; tar $ownerstring -cf - * | /usr/bin/sum |";
+# my $systemcall = "cd $installdir; tar $ownerstring -cf - * | sum |";
my $ldpreloadstring = "";
if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; }
- my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - * | /usr/bin/sum |";
+ my $systemcall = "cd $installdir; $ldpreloadstring tar -cf - * | sum |";
my $sumoutput = "";

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-solenv_config_stand_lst,v 1.4 2006/10/19 15:16:50 kurt Exp $
$OpenBSD: patch-solenv_config_stand_lst,v 1.5 2006/10/25 22:49:50 kurt Exp $
--- solenv/config/stand.lst.orig.port Fri Aug 25 10:39:02 2006
+++ solenv/config/stand.lst Thu Oct 19 10:47:54 2006
+++ solenv/config/stand.lst Tue Oct 24 10:45:06 2006
@@ -37,6 +37,11 @@ SRC680
}
Environments
@ -13,15 +13,27 @@ $OpenBSD: patch-solenv_config_stand_lst,v 1.4 2006/10/19 15:16:50 kurt Exp $
unxfbsdi.pro
{
prio 12
@@ -96,6 +101,11 @@ SRC680
{
@@ -97,6 +102,11 @@ SRC680
prio 15
setsolar -SRC680 -pro -bsclient unxsols64b1
+ }
}
+ unxobsdi
+ {
+ prio 15
+ setsolar -SRC680 -bsclient unxobsdi
}
+ }
unxfbsdi
{
prio 15
@@ -996,6 +1006,11 @@ OOD680
{
prio 12
setsolar -OOD680 -pro -bsclient unxfbsdi
+ }
+ unxobsdi.pro
+ {
+ prio 12
+ setsolar -OOD680 -pro -bsclient unxobsdi
}
unxlngi5.pro
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-stlport_STLport-4_5_patch,v 1.2 2006/08/20 03:36:53 kurt Exp $
$OpenBSD: patch-stlport_STLport-4_5_patch,v 1.3 2006/10/25 22:49:50 kurt Exp $
--- stlport/STLport-4.5.patch.orig.port Thu Apr 27 03:47:20 2006
+++ stlport/STLport-4.5.patch Fri Aug 18 15:47:45 2006
+++ stlport/STLport-4.5.patch Tue Oct 24 20:47:05 2006
@@ -141,7 +141,7 @@
! #
! #
@ -19,7 +19,7 @@ $OpenBSD: patch-stlport_STLport-4_5_patch,v 1.2 2006/08/20 03:36:53 kurt Exp $
!
! OBJEXT=o
! DYNEXT=so
@@ -848,3 +848,79 @@
@@ -848,3 +848,115 @@
# define _STLP_MUTEX_INITIALIZER
# endif
@ -99,3 +99,39 @@ $OpenBSD: patch-stlport_STLport-4_5_patch,v 1.2 2006/08/20 03:36:53 kurt Exp $
+
+ # define _Locale_CNTRL _C
+ # define _Locale_UPPER _U
+*** misc/STLport-4.5/src/num_put_float.cpp Tue Sep 4 13:10:12 2001
+--- misc/build/STLport-4.5/src/num_put_float.cpp Tue Oct 24 18:47:18 2006
+***************
+*** 219,225 ****
+ inline bool _Stl_is_inf(double x) { return isinf(x); }
+ // inline bool _Stl_is_neg_inf(double x) { return isinf(x) < 0; }
+ inline bool _Stl_is_neg_inf(double x) { return isinf(x) && x < 0; }
+! #elif defined(__unix) && !defined(__FreeBSD__) && !defined(__NetBSD__) \
+ && !defined(__APPLE__) && !defined(__DJGPP) && !defined(__osf__)
+ inline bool _Stl_is_nan_or_inf(double x) { return IsNANorINF(x); }
+ inline bool _Stl_is_inf(double x) { return IsNANorINF(x) && IsINF(x); }
+--- 219,225 ----
+ inline bool _Stl_is_inf(double x) { return isinf(x); }
+ // inline bool _Stl_is_neg_inf(double x) { return isinf(x) < 0; }
+ inline bool _Stl_is_neg_inf(double x) { return isinf(x) && x < 0; }
+! #elif defined(__unix) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) \
+ && !defined(__APPLE__) && !defined(__DJGPP) && !defined(__osf__)
+ inline bool _Stl_is_nan_or_inf(double x) { return IsNANorINF(x); }
+ inline bool _Stl_is_inf(double x) { return IsNANorINF(x) && IsINF(x); }
+***************
+*** 343,349 ****
+ inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf)
+ { LOCK_CVT RETURN_CVT(fcvt, x, n, pt, sign, buf) }
+ # endif
+! #elif defined (__unix) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
+ inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)
+ { return ecvt_r(x, n, pt, sign, buf); }
+ inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)
+--- 343,349 ----
+ inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf)
+ { LOCK_CVT RETURN_CVT(fcvt, x, n, pt, sign, buf) }
+ # endif
+! #elif defined (__unix) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__)
+ inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)
+ { return ecvt_r(x, n, pt, sign, buf); }
+ inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)

View File

@ -1,60 +1,48 @@
$OpenBSD: patch-vcl_util_makefile_mk,v 1.2 2006/08/20 03:36:53 kurt Exp $
--- vcl/util/makefile.mk.orig.port Thu Jun 29 07:25:18 2006
+++ vcl/util/makefile.mk Fri Aug 18 15:47:46 2006
@@ -186,8 +186,7 @@ SHL1USE_EXPORTS=ordinal
$OpenBSD: patch-vcl_util_makefile_mk,v 1.3 2006/10/25 22:49:50 kurt Exp $
--- vcl/util/makefile.mk.orig.port Tue Aug 1 05:30:37 2006
+++ vcl/util/makefile.mk Wed Oct 25 09:14:34 2006
@@ -186,7 +186,7 @@ SHL1USE_EXPORTS=ordinal
SHL1LIBS= $(LIB1TARGET)
.IF "$(GUI)"!="UNX"
SHL1OBJS= $(SLO)$/salshl.obj
-.ELIF "$(OS)"!="FREEBSD"
-SHL1STDLIBS+=-ldl
+.ELIF "$(OS)"!="FREEBSD" && "$(OS)"!="OPENBSD"
SHL1STDLIBS+=-ldl
.ENDIF
.IF "$(GUI)" != "MAC"
@@ -226,8 +225,7 @@ LINKFLAGSSHL += /ENTRY:LibMain@12
@@ -226,7 +226,7 @@ LINKFLAGSSHL += /ENTRY:LibMain@12
.IF "$(GUI)"=="UNX"
-.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD"
-SHL1STDLIBS+= -ldl
+.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="OPENBSD"
SHL1STDLIBS+= -ldl
.ENDIF
.IF "$(GUIBASE)"=="aqua"
@@ -315,9 +313,8 @@ SHL2STDLIBS+=$(LIBSN_LIBS)
@@ -315,7 +315,7 @@ SHL2STDLIBS+=$(LIBSN_LIBS)
.ENDIF
SHL2STDLIBS += -lXext -lSM -lICE -lX11
-.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD"
+.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="OPENBSD"
# needed by salprnpsp.cxx
-SHL2STDLIBS+= -ldl
SHL2STDLIBS+= -ldl
.ENDIF
.ENDIF # "$(GUIBASE)"=="unx"
@@ -371,10 +368,10 @@ SHL4NOCHECK=TRUE
@@ -371,7 +371,7 @@ SHL4NOCHECK=TRUE
SHL4STDLIBS+=-l$(SHL2TARGET)
-.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX"
+.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX" || "$(OS)"!="OPENBSD"
+.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX" || "$(OS)"=="OPENBSD"
SHL4STDLIBS+=$(SHL3STDLIBS) -lX11
.ELSE
-SHL4STDLIBS+=$(SHL3STDLIBS) -lX11 -ldl
+SHL4STDLIBS+=$(SHL3STDLIBS) -lX11
.ENDIF # "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX"
.ENDIF # "$(ENABLE_GTK)" != ""
@@ -389,10 +386,10 @@ SHL5DEPN=$(SHL2TARGETN)
SHL4STDLIBS+=$(SHL3STDLIBS) -lX11 -ldl
@@ -389,7 +389,7 @@ SHL5DEPN=$(SHL2TARGETN)
# libs for KDE plugin
SHL5STDLIBS=$(KDE_LIBS)
SHL5STDLIBS+=-l$(SHL2TARGET)
-.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX"
+.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX" || "$(OS)"!="OPENBSD"
+.IF "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX" || "$(OS)"=="OPENBSD"
SHL5STDLIBS+=$(SHL3STDLIBS) -lX11
.ELSE
-SHL5STDLIBS+=$(SHL3STDLIBS) -lX11 -ldl
+SHL5STDLIBS+=$(SHL3STDLIBS) -lX11
.ENDIF # "$(OS)"=="FREEBSD" || "$(OS)"=="MACOSX"
.ENDIF # "$(ENABLE_KDE)" != ""
SHL5STDLIBS+=$(SHL3STDLIBS) -lX11 -ldl