2 # Copyright (C) 2007-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/witty/wt/$(PKG_VERSION)
16 PKG_MD5SUM:=ee9490d5f24a47766e54f630ba0da2bb
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/cmake.mk
25 define Package/wt/Default
28 URL:=http://www.webtoolkit.eu/wt
32 $(call Package/wt/Default)
34 DEPENDS:= +libstdcpp +boost-date_time +boost-system +boost-filesystem +boost-thread +boost-program_options +boost-signals +boost-regex +libpthread
35 TITLE:=C++ Web Toolkit
38 define Package/wt-resources
39 $(call Package/wt/Default)
41 TITLE:=Optional Resource Files
44 define Package/wt-fcgi
45 $(call Package/wt/Default)
47 TITLE:=FastCGI Connector
50 define Package/wt-http
51 $(call Package/wt/Default)
52 DEPENDS:=wt +PACKAGE_wt_http_zlib:zlib +PACKAGE_wt_http_ssl:libopenssl
53 TITLE:=Built in HTTP Server
56 define Package/wt-http/config
57 config PACKAGE_wt_http_zlib
58 bool "Enable zlib compression option"
59 depends on PACKAGE_wt-http
61 config PACKAGE_wt_http_ssl
62 bool "Enable ssl option"
63 depends on PACKAGE_wt-http
68 $(call Package/wt/Default)
70 TITLE:=Object Relational Mapping
73 define Package/wt-dbosqlite3
74 $(call Package/wt/Default)
76 TITLE:=Sqlite3 Dbo Backend
79 define Package/wt-resources/conffiles
83 # TODO: some parts of the code show that -DHAVE_GNU_REGEX can be defined to avoid dependence or boost-regex
84 # But that's turning out not to be the case (some portions still depend on boost-regex)
85 TARGET_CFLAGS += $(FPIC)
87 -DCMAKE_BUILD_TYPE=MinSizeRel \
88 -DCMAKE_CXX_FLAGS_MINSIZEREL:STRING="-DNDEBUG -DWT_NO_SPIRIT -DWT_NO_XSS_FILTER" \
89 -DSHARED_LIBS:BOOL=ON \
91 -DBUILD_EXAMPLES=OFF \
92 -DINSTALL_RESOURCES=ON \
97 -DENABLE_POSTGRES=OFF \
99 -DWT_NO_STD_LOCALE=ON \
100 -DWT_NO_STD_WSTRING=ON
102 ifndef CONFIG_PACKAGE_wt-http
107 ifndef CONFIG_PACKAGE_wt_http_zlib
112 ifndef CONFIG_PACKAGE_wt_http_ssl
117 ifndef CONFIG_PACKAGE_wt-fcgi
122 define Build/InstallDev
123 $(INSTALL_DIR) $(1)/usr/include
124 $(CP) -a $(PKG_INSTALL_DIR)/usr/include/Wt $(1)/usr/include
126 $(INSTALL_DIR) $(1)/usr/share/cmake-2.4/Modules
127 $(CP) $(PKG_INSTALL_DIR)/usr/share/cmake-2.4/Modules/FindWt.cmake $(1)/usr/share/cmake-2.4/Modules
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt*.so* $(1)/usr/lib
134 define Package/$(1)/install
135 $(INSTALL_DIR) $$(1)/usr/lib
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt$$$$$$$${m}.so* $$(1)/usr/lib/ ; \
141 $$(eval $$(call BuildPackage,$(1)))
144 define Package/wt/install
145 $(INSTALL_DIR) $(1)/etc/wt
146 $(INSTALL_DATA) $(PKG_BUILD_DIR)/wt_config.xml $(1)/etc/wt
148 $(INSTALL_DIR) $(1)/usr/lib
149 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt.so* $(1)/usr/lib
152 define Package/wt/conffiles
156 define Package/wt-resources/install
157 $(INSTALL_DIR) $(1)/usr/share
158 $(CP) -a $(PKG_INSTALL_DIR)/usr/share/Wt $(1)/usr/share
161 $(eval $(call BuildPackage,wt))
162 $(eval $(call BuildPackage,wt-resources))
163 $(eval $(call BuildPlugin,wt-http,http))
164 $(eval $(call BuildPlugin,wt-fcgi,fcgi))
165 $(eval $(call BuildPlugin,wt-dbo,dbo))
166 $(eval $(call BuildPlugin,wt-dbosqlite3,dbosqlite3))