cppcms: fix build with uClibc
authorLucile Quirion <lucile.quirion@savoirfairelinux.com>
Mon, 7 Apr 2014 19:17:24 +0000 (15:17 -0400)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 8 Apr 2014 20:53:58 +0000 (22:53 +0200)
This patch modifies the cppcms package in order to support uClibc-based
toolchains.

The booster library by default compiles with the posix backend under
Linux, but this needs monetary.h which isn't provided by uClibc, so
work around that with the help of the DISABLE_POSIX_LOCALE configure
option.

Signed-off-by: Lucile Quirion <lucile.quirion@savoirfairelinux.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/cppcms/Config.in
package/cppcms/cppcms.mk

index c88ae1ed82b1693dc9b92e0656b11cd55a96adb4..2b99b521c88fd5b1fc35f268f1f6a0512a03efd3 100644 (file)
@@ -4,8 +4,6 @@ config BR2_PACKAGE_CPPCMS
        select BR2_PACKAGE_PCRE
        select BR2_PACKAGE_LIBGCRYPT
        depends on BR2_INSTALL_LIBSTDCPP
-       # cppcms uses <monetary.h> which doesn't exist in uClibc
-       depends on BR2_TOOLCHAIN_USES_GLIBC
        help
          CppCMS is a Free High Performance Web Development Framework
          (not a CMS) aimed for Rapid Web Application Development. It
@@ -33,5 +31,5 @@ config BR2_PACKAGE_CPPCMS_ICU
 
 endif
 
-comment "cppcms needs an (e)glibc toolchain w/ C++"
-       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC
+comment "cppcms needs a toolchain w/ C++"
+       depends on !BR2_INSTALL_LIBSTDCPP
index 4068df70a1c7ef852d61b3d125090c51407a715b..206b30fcbeca09fe4c3db15078dd7e19a0408586 100644 (file)
@@ -18,6 +18,11 @@ CPPCMS_CONF_OPT += -DDISABLE_ICONV=ON
 CPPCMS_DEPENDENCIES += icu
 endif
 
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+# posix backend needs monetary.h which isn't available on uClibc
+CPPCMS_CONF_OPT += -DDISABLE_POSIX_LOCALE=on
+endif
+
 # We copy cppcms_tmpl_cc from staging to host because this file can be
 # needed for compiling packages using cppcms. And it is not worth
 # creating a host package just for a python script.