summaryrefslogtreecommitdiff
path: root/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'cppunit')
-rw-r--r--cppunit/aix.patch21
-rw-r--r--cppunit/avoid-synthetised-destructor.patch29
-rw-r--r--cppunit/makefile.mk76
-rw-r--r--cppunit/prj/build.lst2
-rw-r--r--cppunit/prj/d.lst6
-rw-r--r--cppunit/windows.patch42
6 files changed, 103 insertions, 73 deletions
diff --git a/cppunit/aix.patch b/cppunit/aix.patch
new file mode 100644
index 000000000000..2bc78f3f9224
--- /dev/null
+++ b/cppunit/aix.patch
@@ -0,0 +1,21 @@
+--- misc/cppunit-1.12.1.orig/config/config.guess 2010-09-15 10:25:54.000000000 -0500
++++ misc/build/cppunit-1.12.1/config/config.guess 2010-09-15 10:26:50.000000000 -0500
+@@ -532,7 +532,7 @@
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+- *:AIX:*:[456])
++ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+@@ -544,6 +544,9 @@
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
++ if [ "$IBM_REV" == "V7BETA" ]; then
++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
diff --git a/cppunit/avoid-synthetised-destructor.patch b/cppunit/avoid-synthetised-destructor.patch
new file mode 100644
index 000000000000..82b79291c998
--- /dev/null
+++ b/cppunit/avoid-synthetised-destructor.patch
@@ -0,0 +1,29 @@
+rhbz#641350 impl. destructor of CppUnit::Message causes segfault when test
+is built with debug. STL
+
+diff -up cppunit-1.12.1/include/cppunit/Message.h.dt cppunit-1.12.1/include/cppunit/Message.h
+--- misc/build/cppunit-1.12.1/include/cppunit/Message.h.dt 2010-10-08 14:02:26.514477964 +0200
++++ misc/build/cppunit-1.12.1/include/cppunit/Message.h 2010-10-08 14:02:15.411948098 +0200
+@@ -57,6 +57,8 @@ public:
+ const std::string &detail2,
+ const std::string &detail3 );
+
++ ~Message();
++
+ Message &operator =( const Message &other );
+
+ /*! \brief Returns the short description.
+diff -up cppunit-1.12.1/src/cppunit/Message.cpp.dt cppunit-1.12.1/src/cppunit/Message.cpp
+--- misc/build/cppunit-1.12.1/src/cppunit/Message.cpp.dt 2010-10-08 14:02:39.421768852 +0200
++++ misc/build/cppunit-1.12.1/src/cppunit/Message.cpp 2010-10-08 14:02:54.066829633 +0200
+@@ -47,6 +47,10 @@ Message::Message( const std::string &sho
+ addDetail( detail1, detail2, detail3 );
+ }
+
++Message::~Message()
++{
++}
++
+ Message &
+ Message::operator =( const Message &other )
+ {
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index 043ce740655d..a842e425e7be 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -34,7 +34,7 @@ TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19
# from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
# cppunit-1.12.1.tar.gz/download>
-PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch
+PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch
# solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912590&group_id=11795&atid=311795>
# warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
@@ -59,8 +59,8 @@ CONFIGURE_ACTION = $(SED) -e s:@BACKPATH@:../$(BACK_PATH): \
< ../$(BACK_PATH)$(PATH_IN_MODULE)/ooo-DllPlugInTester.mk \
> src/DllPlugInTester/ooo-DllPlugInTester.mk
-BUILD_ACTION = cd src/cppunit && dmake -f ooo-cppunit_dll.mk && \
- cd ../DllPlugInTester && dmake -f ooo-DllPlugInTester.mk
+BUILD_ACTION = cd src/cppunit && dmake -f ooo-cppunit_dll.mk debug=$(debug) verbose=$(verbose) && \
+ cd ../DllPlugInTester && dmake -f ooo-DllPlugInTester.mk debug=$(debug) verbose=$(verbose)
OUTDIR2INC = include/cppunit
@@ -75,27 +75,14 @@ $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE): ooo-cppunit_dll.mk ooo-DllPlugInTester.mk
EXTRA_CFLAGS += -mthreads
LDFLAGS += -Wl,--enable-runtime-pseudo-reloc-v2
-.IF "$(USE_SYSTEM_STL)" != "YES"
-
-OOO_STLPORT_CXXFLAGS = -I$(SOLARINCDIR)/stl
-.IF "$(USE_STLP_DEBUG)" == "TRUE"
-OOO_STLPORT_CXXFLAGS += -D_STLP_DEBUG
-.END
-OOO_STLPORT_CXXFLAGS += -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH)
-
-OOO_STLPORT_LDFLAGS = -L$(SOLARLIBDIR)
-OOO_STLPORT_LIBS = $(LIBSTLPORT)
-
-.END
-
CONFIGURE_ACTION = ./configure
CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \
pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install \
--disable-dependency-tracking --disable-static --disable-doxygen \
--disable-html-docs --disable-latex-docs CC='$(CC)' CXX='$(CXX)' \
- CXXFLAGS='$(EXTRA_CFLAGS) $(OOO_STLPORT_CXXFLAGS)' \
- LDFLAGS='$(LDFLAGS) $(OOO_STLPORT_LDFLAGS)' \
- LIBS='$(OOO_STLPORT_LIBS) $(MY_LIBS)'
+ CXXFLAGS='$(EXTRA_CFLAGS)' \
+ LDFLAGS='$(LDFLAGS)' \
+ LIBS='$(MY_LIBS)'
BUILD_ACTION = $(GNUMAKE) -j$(EXTMAXPROCESS)
BUILD_FLAGS = install
@@ -115,47 +102,6 @@ OUT2LIB = ooo-install/lib/libcppunit.dll.a
.ELSE
-.IF "$(USE_SYSTEM_STL)" != "YES"
-
-OOO_STLPORT_CXXFLAGS = -I$(SOLARINCDIR)/stl
-.IF "$(USE_STLP_DEBUG)" == "TRUE"
-OOO_STLPORT_CXXFLAGS += -D_STLP_DEBUG
-.END
-.IF "$(COM)" == "GCC"
-OOO_STLPORT_CXXFLAGS += -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH)
-.END
-
-OOO_STLPORT_LDFLAGS = -L$(SOLARLIBDIR)
-OOO_STLPORT_LIBS = $(LIBSTLPORT)
-
-# When "checking for C compiler default output file name" configure
-# unfortunately uses "$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS" to build
-# a C program that links against $(LIBSTLPORT); at least on one unxlngi6
-# machine, this has been observed to fail with "/lib/libm.so.6: undefined
-# reference to `_rtld_global_ro@GLIBC_PRIVATE'" unless -lm is also specified:
-.IF "$(OS)" == "LINUX" && "$(COM)" == "GCC" && "$(CPU)" == "I"
-OOO_STLPORT_LIBS += -lm
-# #i112124# furthermore, STLPort seems to require libstdc++
-OOO_STLPORT_LIBS += -lstdc++
-.END
-
-# And later, when "checking whether the C compiler works" configure tries to
-# execute that program; however, the program would fail to locate the STLport
-# library (another work-around might be to add something like --as-needed around
-# $(LIBSTLPORT)):
-.IF "$(OS)" == "FREEBSD" || "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS"
-.IF "$(LD_LIBRARY_PATH)" == ""
-LD_LIBRARY_PATH := $(SOLARLIBDIR)
- # strictly speaking, this is incorrect if the LD_LIBRARY_PATH environment
- # variable is set to the empty string
-.ELSE
-LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(SOLARLIBDIR)
-.END
-.EXPORT: LD_LIBRARY_PATH
-.END
-
-.END
-
# At least on Solaris with Sun CC, linking the cppunit dynamic library fails as
# TestAssert.o uses fabs but -lm is missing from the command line (cppunit's
# aclocal.m4 contains an unused AC_CHECK_LIBM, maybe using that would be a
@@ -169,9 +115,9 @@ CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \
pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install \
--disable-dependency-tracking --disable-static --disable-doxygen \
--disable-html-docs --disable-latex-docs CC='$(CC)' CXX='$(CXX)' \
- CXXFLAGS='$(EXTRA_CFLAGS) $(OOO_STLPORT_CXXFLAGS)' \
- LDFLAGS='$(LDFLAGS) $(OOO_STLPORT_LDFLAGS)' \
- LIBS='$(OOO_STLPORT_LIBS) $(MY_LIBS)'
+ CXXFLAGS='$(EXTRA_CFLAGS)' \
+ LDFLAGS='$(LDFLAGS)' \
+ LIBS='$(MY_LIBS)'
BUILD_ACTION = $(GNUMAKE) -j$(EXTMAXPROCESS)
BUILD_FLAGS = install
@@ -182,6 +128,10 @@ OUT2BIN = ooo-install/bin/DllPlugInTester
.IF "$(OS)" == "MACOSX"
OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib
EXTRPATH = NONE
+.ELIF "$(OS)" == "AIX"
+OUT2LIB = ooo-install/lib/libcppunit-1.12.a
+.ELIF "$(OS)" == "OPENBSD"
+OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1.0
.ELSE
OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1
.END
diff --git a/cppunit/prj/build.lst b/cppunit/prj/build.lst
index 9bfcb57f9e89..21e2b437803b 100644
--- a/cppunit/prj/build.lst
+++ b/cppunit/prj/build.lst
@@ -1,2 +1,2 @@
-c5t cppunit : stlport NULL
+c5t cppunit : NULL
c5t cppunit nmake - all cppunit NULL
diff --git a/cppunit/prj/d.lst b/cppunit/prj/d.lst
index fb7c1195fc0a..29dac2bc6ed7 100644
--- a/cppunit/prj/d.lst
+++ b/cppunit/prj/d.lst
@@ -25,6 +25,12 @@ symlink: %_DEST%\lib%_EXT%\libcppunit-1.12.1.dylib %_DEST%\lib%_EXT%\libcppunit.
..\%__SRC%\lib\libcppunit-1.12.so.1 %_DEST%\lib%_EXT%\libcppunit-1.12.so.1
symlink: %_DEST%\lib%_EXT%\libcppunit-1.12.so.1 %_DEST%\lib%_EXT%\libcppunit.so
+..\%__SRC%\lib\libcppunit-1.12.so.1.0 %_DEST%\lib%_EXT%\libcppunit-1.12.so.1.0
+symlink: %_DEST%\lib%_EXT%\libcppunit-1.12.so.1.0 %_DEST%\lib%_EXT%\libcppunit.so
+
+..\%__SRC%\lib\libcppunit-1.12.a %_DEST%\lib%_EXT%\libcppunit-1.12.a
+symlink: %_DEST%\lib%_EXT%\libcppunit-1.12.a %_DEST%\lib%_EXT%\libcppunit.a
+
..\%__SRC%\bin\DllPlugInTester %_DEST%\bin%_EXT%\DllPlugInTester
..\%__SRC%\bin\DllPlugInTester.exe %_DEST%\bin%_EXT%\DllPlugInTester.exe
..\%__SRC%\bin\DllPlugInTester_dll.exe %_DEST%\bin%_EXT%\DllPlugInTester_dll.exe
diff --git a/cppunit/windows.patch b/cppunit/windows.patch
index da346924ea44..fdd760710f02 100644
--- a/cppunit/windows.patch
+++ b/cppunit/windows.patch
@@ -1,12 +1,36 @@
--- misc/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100
+++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:18.660706180 +0100
-@@ -149,6 +149,9 @@
- #define NOMINMAX
- #define BLENDFUNCTION void // for mingw & gcc
- #include <windows.h>
-+#if defined(OPTIONAL) // set within windows.h
-+#undef OPTIONAL
-+#endif
- #endif
+@@ -133,9 +133,8 @@
+ /*! \def CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
+ * \brief Implements the 'main' function for the plug-in.
+ *
+- * This macros implements the main() function for dynamic library.
+- * For example, WIN32 requires a DllMain function, while some Unix
+- * requires a main() function. This macros takes care of the implementation.
++ * This macro implements the main() function for dynamic library
++ * on Unix for some weird reason.
+ */
+
+ // Win32
+@@ -149,21 +149,7 @@
+
+ // Win32
+ #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
+-#if !defined(APIENTRY)
+-#define WIN32_LEAN_AND_MEAN
+-#define NOGDI
+-#define NOUSER
+-#define NOKERNEL
+-#define NOSOUND
+-#define NOMINMAX
+-#define BLENDFUNCTION void // for mingw & gcc
+-#include <windows.h>
+-#endif
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
- BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
+- BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
+- { \
+- return TRUE; \
+- } \
+ typedef char __CppUnitPlugInImplementMainDummyTypeDef
+
+ // Unix