1 #*************************************************************************
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 # Copyright 2000, 2010 Oracle and/or its affiliates.
6 # OpenOffice.org - a multi-platform office productivity suite
8 # This file is part of OpenOffice.org.
10 # OpenOffice.org is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU Lesser General Public License version 3
12 # only, as published by the Free Software Foundation.
14 # OpenOffice.org is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU Lesser General Public License version 3 for more details
18 # (a copy is included in the LICENSE file that accompanied this code).
20 # You should have received a copy of the GNU Lesser General Public License
21 # version 3 along with OpenOffice.org. If not, see
22 # <http://www.openoffice.org/license.html>
23 # for a copy of the LGPLv3 License.
24 #***********************************************************************/
32 TARFILE_NAME
= cppunit-1.12
.1
33 TARFILE_MD5
=bd30e9cf5523cdfc019b94f5e1d7fd19
34 # from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
35 # cppunit-1.12.1.tar.gz/download>
37 PATCH_FILES
= solarisfinite.patch warnings.patch windows.patch
ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch cppunit-1.12
.1-unused-parameters.patch cppunit-1.12
.1-warnings.patch
38 # solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
39 # aid=2912590&group_id=11795&atid=311795>; upstreamed as
40 # <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
41 # a76125c7dd07f79c82f3fed9be5c0a5627089e00>
42 # warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
43 # aid=2912630&group_id=11795&atid=311795>; upstreamed as
44 # <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
45 # 9cfcff6c2195ae25be4022654990c9eea6fbb2f8>
47 # ldflags.patch: upstreamed as <http://cgit.freedesktop.org/libreoffice/
48 # cppunit/commit/?id=3acfc24e54a9f6d1b2121dda1942e882549870e4>
50 # avoid-synthetised-destructor.patch: upstreamed as
51 # <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
52 # 05b202fc3edce92d8343cb0964d9d15134cd8f1d>
54 # cppunit-1.12.1-unused-parameters.patch: help static analysis tools (see
55 # SAL_UNUSED_PARAMETER in sal/types.h); upstreamed as
56 # <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
57 # 7a09bf3a88e99d85c4dec2ad296309dbec2987c3>
58 # cppunit-1.12.1-warnings.patch: work around additional warnings (found when
59 # converting module unotest to gbuild); upstreamed as
60 # <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
61 # 0f75eaa0b8de3d68e8b5b5447fbc009531183cb5>
63 .IF
"$(OS)" == "ANDROID"
64 PATCH_FILES
+= android.patch
70 # On Windows, CppUnit appears to support either the Unix-style configure/make
71 # approach with cygwin and gcc (and libtool fails miserably if gcc is replaced
72 # by MSVC cl), or a Visual Studio project (CppUnitLibraries.dsw). However, the
73 # latter is too old to work with vcbuild from a wntmsci12 tool chain. So, the
74 # easiest way appears to inject hand-crafted dmake makefiles to build the
75 # relevant parts. (Another approach would be to manually use the Visual Studio
76 # IDE to convert CppUnitLibraries.dsw to modern format, inject the resulting
77 # cppunit_dll.vcproj and DllPlugInTester.vcproj and build those with vcbuild.)
79 CONFIGURE_ACTION
= $(SED
) -e s
:@BACKPATH@
:..
/$(BACK_PATH
): \
80 < ..
/$(BACK_PATH
)$(PATH_IN_MODULE
)/ooo-cppunit_dll.mk \
81 > src
/cppunit
/ooo-cppunit_dll.mk
&& \
82 $(SED
) -e s
:@BACKPATH@
:..
/$(BACK_PATH
): \
83 < ..
/$(BACK_PATH
)$(PATH_IN_MODULE
)/ooo-DllPlugInTester.mk \
84 > src
/DllPlugInTester
/ooo-DllPlugInTester.mk
86 BUILD_ACTION
= cd src
/cppunit
&& dmake
-f ooo-cppunit_dll.mk debug
=$(debug
) verbose
=$(verbose
) && \
87 cd ..
/DllPlugInTester
&& dmake
-f ooo-DllPlugInTester.mk debug
=$(debug
) verbose
=$(verbose
)
89 OUTDIR2INC
= include/cppunit
95 $(PACKAGE_DIR
)/$(CONFIGURE_FLAG_FILE
): ooo-cppunit_dll.mk ooo-DllPlugInTester.mk
99 EXTRA_CFLAGS
+= -mthreads
100 LDFLAGS
+= -Wl
,--enable-runtime-pseudo-reloc-v2
102 CONFIGURE_ACTION
= .
/configure
103 CONFIGURE_FLAGS
= --prefix=$(shell cd
$(PACKAGE_DIR
) && \
104 pwd
$(PWDFLAGS
))/$(TARFILE_ROOTDIR
)/ooo-install \
105 --disable-dependency-tracking
--disable-static
--disable-doxygen \
106 --disable-html-docs
--disable-latex-docs CC
='$(CC)' CXX
='$(CXX)' \
107 CXXFLAGS
='$(EXTRA_CFLAGS)' \
108 LDFLAGS
='$(LDFLAGS)' \
111 .IF
"$(CROSS_COMPILING)"=="YES"
112 CONFIGURE_FLAGS
+= --build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
115 BUILD_ACTION
= $(GNUMAKE
) -j
$(EXTMAXPROCESS
)
116 BUILD_FLAGS
= install
118 OUTDIR2INC
= ooo-install
/include/cppunit
120 # WTF? A *Cygwin* DLL?
121 #OUT2BIN = ooo-install/bin/DllPlugInTester.exe \
122 # ooo-install/bin/cygcppunit-1-12-1.dll
123 OUT2BIN
= ooo-install
/bin
/DllPlugInTester.exe \
124 ooo-install
/bin
/libcppunit-1-12-1.dll
125 OUT2LIB
= ooo-install
/lib
/libcppunit.dll.a
131 .ENDIF
# "$(COM)" == "GCC"
132 .ENDIF
# "$(COM)" == "MSC"
136 # At least on Solaris with Sun CC, linking the cppunit dynamic library fails as
137 # TestAssert.o uses fabs but -lm is missing from the command line (cppunit's
138 # aclocal.m4 contains an unused AC_CHECK_LIBM, maybe using that would be a
140 .IF
"$(OS)" == "SOLARIS" && "$(COM)" == "C52"
144 .IF
"$(OS)" == "ANDROID"
145 MY_LIBS
= -lgnustl_shared
148 CONFIGURE_ACTION
= .
/configure
150 .IF
"$(COM)" == "GCC"
151 .IF
"$(OS)" == "LINUX" ||
"$(OS)" == "FREEBSD" ||
"$(OS)" == "OPENBSD" ||
"$(OS)" == "NETBSD" ||
"$(OS)" == "DRAGONFLY" ||
"$(OS)" == "ANDROID"
152 .IF
"$(PRODUCT)"!="full"
154 EXTRA_CDEFS
+= -D_GLIBCXX_DEBUG
163 CONFIGURE_FLAGS
= --prefix=$(shell cd
$(PACKAGE_DIR
) && \
164 pwd
$(PWDFLAGS
))/$(TARFILE_ROOTDIR
)/ooo-install \
165 --libdir=$(shell cd
$(PACKAGE_DIR
) && \
166 pwd
$(PWDFLAGS
))/$(TARFILE_ROOTDIR
)/ooo-install
/lib \
167 --disable-dependency-tracking
--disable-static
--disable-doxygen \
168 --disable-html-docs
--disable-latex-docs CC
='$(CC)' CXX
='$(CXX)' \
169 CXXFLAGS
='$(EXTRA_CFLAGS) $(DEBUGFLAG) $(EXTRA_CDEFS)' \
170 LDFLAGS
='$(LDFLAGS)' \
174 CONFIGURE_FLAGS
+=--disable-shared
176 CONFIGURE_FLAGS
+=--disable-static
179 .IF
"$(CROSS_COMPILING)"=="YES"
180 CONFIGURE_FLAGS
+= --build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
183 BUILD_ACTION
= $(GNUMAKE
) -j
$(EXTMAXPROCESS
)
184 BUILD_FLAGS
= install
186 OUTDIR2INC
= ooo-install
/include/cppunit ooo-install
/lib
/pkgconfig
188 OUT2BIN
= ooo-install
/bin
/DllPlugInTester
189 .IF
"$(OS)" == "MACOSX"
190 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12
.1.dylib
193 $(MISC
)/@.__________________________________________________
$(EXTRPATH
)
194 .ELIF
"$(OS)" == "AIX"
195 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12.a
196 .ELIF
"$(OS)" == "OPENBSD"
197 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12.so
.1.0
198 .ELIF
"$(OS)" == "IOS"
199 OUT2LIB
= ooo-install
/lib
/libcppunit.a
200 .ELIF
"$(OS)" == "ANDROID"
201 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12.so
203 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12.so
.1