source: packages/libs/wt/Makefile @ 28375

Last change on this file since 28375 was 28375, checked in by florian, 5 years ago

[package] New package: wt (C++ web toolkit: http://www.webtoolkit.eu/wt )

patch from Wade Berrier

File size: 3.8 KB
Line 
1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=wt
11PKG_VERSION:=3.1.9
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/witty/wt/$(PKG_VERSION)
16PKG_MD5SUM:=ee9490d5f24a47766e54f630ba0da2bb
17
18include $(INCLUDE_DIR)/package.mk
19include $(INCLUDE_DIR)/cmake.mk
20
21PKG_INSTALL:=1
22
23define Package/wt/Default
24  SECTION:=libs
25  CATEGORY:=Libraries
26  URL:=http://www.webtoolkit.eu/wt
27endef
28
29define Package/wt
30  $(call Package/wt/Default)
31  MENU:=1
32  DEPENDS:= +libstdcpp +boost-date_time +boost-system +boost-filesystem +boost-thread +boost-program_options +boost-signals +boost-regex +libpthread
33  TITLE:=C++ Web Toolkit
34endef
35
36define Package/wt-resources
37  $(call Package/wt/Default)
38  DEPENDS:=wt
39  TITLE:=Optional Resource Files
40endef
41
42define Package/wt-fcgi
43  $(call Package/wt/Default)
44  DEPENDS:=wt +fcgixx
45  TITLE:=FastCGI Connector
46endef
47
48define Package/wt-http
49  $(call Package/wt/Default)
50  DEPENDS:=wt +PACKAGE_wt_http_zlib:zlib +PACKAGE_wt_http_ssl:libopenssl
51  TITLE:=Built in HTTP Server
52endef
53
54define Package/wt-http/config
55config PACKAGE_wt_http_zlib
56    bool "Enable zlib compression option"
57    depends on PACKAGE_wt-http
58    default n
59config PACKAGE_wt_http_ssl
60    bool "Enable ssl option"
61    depends on PACKAGE_wt-http
62    default n
63endef
64
65define Package/wt-dbo
66  $(call Package/wt/Default)
67  DEPENDS:=wt
68  TITLE:=Object Relational Mapping
69endef
70
71define Package/wt-dbosqlite3
72  $(call Package/wt/Default)
73  DEPENDS:=wt +wt-dbo
74  TITLE:=Sqlite3 Dbo Backend
75endef
76
77define Package/wt-resources/conffiles
78/usr/share/Wt
79endef
80
81# TODO: some parts of the code show that -DHAVE_GNU_REGEX can be defined to avoid dependence or boost-regex
82# But that's turning out not to be the case (some portions still depend on boost-regex)
83TARGET_CFLAGS += $(FPIC)
84CMAKE_OPTIONS += \
85        -DCMAKE_BUILD_TYPE=MinSizeRel \
86        -DCMAKE_CXX_FLAGS_MINSIZEREL:STRING="-DNDEBUG -DWT_NO_SPIRIT -DWT_NO_XSS_FILTER" \
87        -DSHARED_LIBS:BOOL=ON \
88        -DBUILD_TESTS=OFF \
89        -DBUILD_EXAMPLES=OFF \
90        -DINSTALL_RESOURCES=ON \
91        -DENABLE_GM=OFF \
92        -DENABLE_HARU=OFF \
93        -DENABLE_PANGO=OFF \
94        -DENABLE_EXT=OFF \
95        -DENABLE_POSTGRES=OFF \
96        -DENABLE_QT4=OFF \
97        -DWT_NO_STD_LOCALE=ON \
98        -DWT_NO_STD_WSTRING=ON
99
100ifndef CONFIG_PACKAGE_wt-http
101CMAKE_OPTIONS += \
102        -DCONNECTOR_HTTP=OFF
103endif
104
105ifndef CONFIG_PACKAGE_wt_http_zlib
106CMAKE_OPTIONS += \
107        -DHTTP_WITH_ZLIB=OFF
108endif
109
110ifndef CONFIG_PACKAGE_wt_http_ssl
111CMAKE_OPTIONS += \
112        -DHTTP_WITH_SSL=OFF
113endif
114
115ifndef CONFIG_PACKAGE_wt-fcgi
116CMAKE_OPTIONS += \
117        -DCONNECTOR_FCGI=OFF
118endif
119
120define Build/InstallDev
121        $(INSTALL_DIR) $(1)/usr/include
122        $(CP) -a $(PKG_INSTALL_DIR)/usr/include/Wt $(1)/usr/include
123
124        $(INSTALL_DIR) $(1)/usr/share/cmake-2.4/Modules
125        $(CP) $(PKG_INSTALL_DIR)/usr/share/cmake-2.4/Modules/FindWt.cmake $(1)/usr/share/cmake-2.4/Modules
126
127        $(INSTALL_DIR) $(1)/usr/lib
128        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt*.so* $(1)/usr/lib
129endef
130
131define BuildPlugin
132  define Package/$(1)/install
133        $(INSTALL_DIR) $$(1)/usr/lib
134        for m in $(2); do \
135                $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt$$$$$$$${m}.so* $$(1)/usr/lib/ ; \
136        done
137  endef
138
139  $$(eval $$(call BuildPackage,$(1)))
140endef
141
142define Package/wt/install
143        $(INSTALL_DIR) $(1)/etc/wt
144        $(INSTALL_DATA) $(PKG_BUILD_DIR)/wt_config.xml $(1)/etc/wt
145
146        $(INSTALL_DIR) $(1)/usr/lib
147        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwt.so* $(1)/usr/lib
148endef
149
150define Package/wt/conffiles
151/etc/wt
152endef
153
154define Package/wt-resources/install
155        $(INSTALL_DIR) $(1)/usr/share
156        $(CP) -a $(PKG_INSTALL_DIR)/usr/share/Wt $(1)/usr/share
157endef
158
159$(eval $(call BuildPackage,wt))
160$(eval $(call BuildPackage,wt-resources))
161$(eval $(call BuildPlugin,wt-http,http))
162$(eval $(call BuildPlugin,wt-fcgi,fcgi))
163$(eval $(call BuildPlugin,wt-dbo,dbo))
164$(eval $(call BuildPlugin,wt-dbosqlite3,dbosqlite3))
Note: See TracBrowser for help on using the repository browser.