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
38 # solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
39 # aid=2912590&group_id=11795&atid=311795>
40 # warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
41 # aid=2912630&group_id=11795&atid=311795>
46 # On Windows, CppUnit appears to support either the Unix-style configure/make
47 # approach with cygwin and gcc (and libtool fails miserably if gcc is replaced
48 # by MSVC cl), or a Visual Studio project (CppUnitLibraries.dsw). However, the
49 # latter is too old to work with vcbuild from a wntmsci12 tool chain. So, the
50 # easiest way appears to inject hand-crafted dmake makefiles to build the
51 # relevant parts. (Another approach would be to manually use the Visual Studio
52 # IDE to convert CppUnitLibraries.dsw to modern format, inject the resulting
53 # cppunit_dll.vcproj and DllPlugInTester.vcproj and build those with vcbuild.)
55 CONFIGURE_ACTION
= $(SED
) -e s
:@BACKPATH@
:..
/$(BACK_PATH
): \
56 < ..
/$(BACK_PATH
)$(PATH_IN_MODULE
)/ooo-cppunit_dll.mk \
57 > src
/cppunit
/ooo-cppunit_dll.mk
&& \
58 $(SED
) -e s
:@BACKPATH@
:..
/$(BACK_PATH
): \
59 < ..
/$(BACK_PATH
)$(PATH_IN_MODULE
)/ooo-DllPlugInTester.mk \
60 > src
/DllPlugInTester
/ooo-DllPlugInTester.mk
62 BUILD_ACTION
= cd src
/cppunit
&& dmake
-f ooo-cppunit_dll.mk
&& \
63 cd ..
/DllPlugInTester
&& dmake
-f ooo-DllPlugInTester.mk
65 OUTDIR2INC
= include/cppunit
71 $(PACKAGE_DIR
)/$(CONFIGURE_FLAG_FILE
): ooo-cppunit_dll.mk ooo-DllPlugInTester.mk
75 EXTRA_CFLAGS
+= -mthreads
76 LDFLAGS
+= -Wl
,--enable-runtime-pseudo-reloc-v2
78 .IF
"$(USE_SYSTEM_STL)" != "YES"
80 OOO_STLPORT_CXXFLAGS
= -I
$(SOLARINCDIR
)/stl
81 .IF
"$(USE_STLP_DEBUG)" == "TRUE"
82 OOO_STLPORT_CXXFLAGS
+= -D_STLP_DEBUG
84 OOO_STLPORT_CXXFLAGS
+= -DGXX_INCLUDE_PATH
=$(GXX_INCLUDE_PATH
)
86 OOO_STLPORT_LDFLAGS
= -L
$(SOLARLIBDIR
)
87 OOO_STLPORT_LIBS
= $(LIBSTLPORT
)
91 CONFIGURE_ACTION
= .
/configure
92 CONFIGURE_FLAGS
= --prefix=$(shell cd
$(PACKAGE_DIR
) && \
93 pwd
$(PWDFLAGS
))/$(TARFILE_ROOTDIR
)/ooo-install \
94 --disable-dependency-tracking
--disable-static
--disable-doxygen \
95 --disable-html-docs
--disable-latex-docs CC
='$(CC)' CXX
='$(CXX)' \
96 CXXFLAGS
='$(EXTRA_CFLAGS) $(OOO_STLPORT_CXXFLAGS)' \
97 LDFLAGS
='$(LDFLAGS) $(OOO_STLPORT_LDFLAGS)' \
98 LIBS
='$(OOO_STLPORT_LIBS) $(MY_LIBS)'
100 BUILD_ACTION
= $(GNUMAKE
) -j
$(EXTMAXPROCESS
)
101 BUILD_FLAGS
= install
103 OUTDIR2INC
= ooo-install
/include/cppunit
105 OUT2BIN
= ooo-install
/bin
/DllPlugInTester.exe \
106 ooo-install
/bin
/cygcppunit-1-12-1.dll
107 OUT2LIB
= ooo-install
/lib
/libcppunit.dll.a
113 .ENDIF
# "$(COM)" == "GCC"
114 .ENDIF
# "$(COM)" == "MSC"
118 .IF
"$(USE_SYSTEM_STL)" != "YES"
120 OOO_STLPORT_CXXFLAGS
= -I
$(SOLARINCDIR
)/stl
121 .IF
"$(USE_STLP_DEBUG)" == "TRUE"
122 OOO_STLPORT_CXXFLAGS
+= -D_STLP_DEBUG
124 .IF
"$(COM)" == "GCC"
125 OOO_STLPORT_CXXFLAGS
+= -DGXX_INCLUDE_PATH
=$(GXX_INCLUDE_PATH
)
128 OOO_STLPORT_LDFLAGS
= -L
$(SOLARLIBDIR
)
129 OOO_STLPORT_LIBS
= $(LIBSTLPORT
)
131 # When "checking for C compiler default output file name" configure
132 # unfortunately uses "$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS" to build
133 # a C program that links against $(LIBSTLPORT); at least on one unxlngi6
134 # machine, this has been observed to fail with "/lib/libm.so.6: undefined
135 # reference to `_rtld_global_ro@GLIBC_PRIVATE'" unless -lm is also specified:
136 .IF
"$(OS)" == "LINUX" && "$(COM)" == "GCC" && "$(CPU)" == "I"
137 OOO_STLPORT_LIBS
+= -lm
138 # #i112124# furthermore, STLPort seems to require libstdc++
139 OOO_STLPORT_LIBS
+= -lstdc
++
142 # And later, when "checking whether the C compiler works" configure tries to
143 # execute that program; however, the program would fail to locate the STLport
144 # library (another work-around might be to add something like --as-needed around
146 .IF
"$(OS)" == "FREEBSD" ||
"$(OS)" == "LINUX" ||
"$(OS)" == "SOLARIS"
147 .IF
"$(LD_LIBRARY_PATH)" == ""
148 LD_LIBRARY_PATH
:= $(SOLARLIBDIR
)
149 # strictly speaking, this is incorrect if the LD_LIBRARY_PATH environment
150 # variable is set to the empty string
152 LD_LIBRARY_PATH
:= $(LD_LIBRARY_PATH
):$(SOLARLIBDIR
)
154 .EXPORT
: LD_LIBRARY_PATH
159 # At least on Solaris with Sun CC, linking the cppunit dynamic library fails as
160 # TestAssert.o uses fabs but -lm is missing from the command line (cppunit's
161 # aclocal.m4 contains an unused AC_CHECK_LIBM, maybe using that would be a
163 .IF
"$(OS)" == "SOLARIS" && "$(COM)" == "C52"
167 CONFIGURE_ACTION
= .
/configure
168 CONFIGURE_FLAGS
= --prefix=$(shell cd
$(PACKAGE_DIR
) && \
169 pwd
$(PWDFLAGS
))/$(TARFILE_ROOTDIR
)/ooo-install \
170 --disable-dependency-tracking
--disable-static
--disable-doxygen \
171 --disable-html-docs
--disable-latex-docs CC
='$(CC)' CXX
='$(CXX)' \
172 CXXFLAGS
='$(EXTRA_CFLAGS) $(OOO_STLPORT_CXXFLAGS)' \
173 LDFLAGS
='$(LDFLAGS) $(OOO_STLPORT_LDFLAGS)' \
174 LIBS
='$(OOO_STLPORT_LIBS) $(MY_LIBS)'
176 BUILD_ACTION
= $(GNUMAKE
) -j
$(EXTMAXPROCESS
)
177 BUILD_FLAGS
= install
179 OUTDIR2INC
= ooo-install
/include/cppunit
181 OUT2BIN
= ooo-install
/bin
/DllPlugInTester
182 .IF
"$(OS)" == "MACOSX"
183 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12
.1.dylib
186 OUT2LIB
= ooo-install
/lib
/libcppunit-1.12.so
.1