/[gentoo-x86]/net-libs/wt/wt-3.3.1.ebuild
Gentoo

Contents of /net-libs/wt/wt-3.3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun Dec 28 16:30:23 2014 UTC (5 years, 7 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Rename virtual/postgresql to dev-db/postgresql

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D1BBFDA0)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/wt/wt-3.3.1.ebuild,v 1.5 2014/11/03 13:40:50 titanofold Exp $
4
5 EAPI="3"
6
7 inherit cmake-utils versionator eutils user
8
9 DESCRIPTION="C++ library for developing interactive web applications"
10 MY_P=${P/_/-}
11 HOMEPAGE="http://webtoolkit.eu/"
12 SRC_URI="mirror://sourceforge/witty/wt/3.3.0/${MY_P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="doc +extjs fcgi graphicsmagick mysql pdf postgres resources +server ssl +sqlite test zlib"
18
19 RDEPEND="
20 >=dev-libs/boost-1.41
21 graphicsmagick? ( media-gfx/graphicsmagick )
22 pdf? (
23 media-libs/libharu
24 x11-libs/pango
25 )
26 postgres? ( dev-db/postgresql )
27 mysql? ( virtual/mysql )
28 sqlite? ( dev-db/sqlite:3 )
29 fcgi? (
30 dev-libs/fcgi
31 virtual/httpd-fastcgi
32 )
33 server? (
34 ssl? ( dev-libs/openssl )
35 zlib? ( sys-libs/zlib )
36 )
37 "
38 DEPEND="
39 ${RDEPEND}
40 >=dev-util/cmake-2.6
41 "
42
43 DOCS="Changelog INSTALL"
44 S=${WORKDIR}/${MY_P}
45
46 pkg_setup() {
47 if use !server && use !fcgi; then
48 ewarn "You have to select at least built-in server support or fcgi support."
49 ewarn "Invalid use flag combination, enable at least one of: server, fcgi"
50 fi
51
52 if use test && use !sqlite; then
53 ewarn "Tests need sqlite, disabling."
54 fi
55
56 enewgroup wt
57 enewuser wt -1 -1 /var/lib/wt/home wt
58 }
59
60 src_prepare() {
61 # just to be sure
62 rm -rf Wt/Dbo/backend/amalgamation
63
64 # fix png linking
65 if use pdf; then
66 sed -e 's/-lpng12/-lpng/' \
67 -i cmake/WtFindHaru.txt || die
68 fi
69
70 cmake-utils_src_prepare
71 }
72
73 src_configure() {
74 BOOST_PKG="$(best_version ">=dev-libs/boost-1.41.0")"
75 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
76 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
77 BOOST_INC="/usr/include/boost-${BOOST_VER}"
78
79 local mycmakeargs=(
80 -DDESTDIR="${D}"
81 -DLIB_INSTALL_DIR=$(get_libdir)
82 $(cmake-utils_use test BUILD_TESTS)
83 -DSHARED_LIBS=ON
84 -DMULTI_THREADED=ON
85 -DUSE_SYSTEM_SQLITE3=ON
86 -DWEBUSER=wt
87 -DWEBGROUP=wt
88 $(cmake-utils_use extjs ENABLE_EXT)
89 $(cmake-utils_use graphicsmagick ENABLE_GM)
90 $(cmake-utils_use pdf ENABLE_HARU)
91 $(cmake-utils_use postgres ENABLE_POSTGRES)
92 $(cmake-utils_use sqlite ENABLE_SQLITE)
93 $(cmake-utils_use mysql ENABLE_MYSQL)
94 $(cmake-utils_use fcgi CONNECTOR_FCGI)
95 $(cmake-utils_use server CONNECTOR_HTTP)
96 $(cmake-utils_use ssl WT_WITH_SSL)
97 $(cmake-utils_use zlib HTTP_WITH_ZLIB)
98 -DBUILD_EXAMPLES=OFF
99 $(cmake-utils_use resources INSTALL_RESOURCES)
100 )
101
102 cmake-utils_src_configure
103 }
104
105 src_test() {
106 # Tests need sqlite
107 if use sqlite; then
108 pushd "${CMAKE_BUILD_DIR}" > /dev/null
109 ./test/test || die
110 popd > /dev/null
111 fi
112 }
113
114 src_install() {
115
116 dodir \
117 /var/lib/wt \
118 /var/lib/wt/home
119
120 cmake-utils_src_install
121
122 use doc && dohtml -A pdf,xhtml -r doc/*
123
124 }
125
126 pkg_postinst() {
127 if use fcgi; then
128 elog "You selected fcgi support. Please make sure that the web-server"
129 elog "has fcgi support and access to the fcgi socket."
130 elog "You can use spawn-fcgi to spawn the witty-processes and run them"
131 elog "in a chroot environment."
132 fi
133
134 chown -R wt:wt \
135 "${ROOT}"/var/lib/wt
136
137 chmod 0750 \
138 "${ROOT}"/var/lib/wt \
139 "${ROOT}"/var/lib/wt/home
140
141 }

  ViewVC Help
Powered by ViewVC 1.1.20