/[gentoo-x86]/net-libs/wt/wt-3.2.2_p1-r1.ebuild
Gentoo

Contents of /net-libs/wt/wt-3.2.2_p1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Dec 28 16:30:23 2014 UTC (5 years, 6 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +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.2.2_p1-r1.ebuild,v 1.7 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.2.2/${MY_P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="doc +extjs fcgi graphicsmagick pdf postgres resources +server ssl +sqlite test zlib"
18
19 RDEPEND="
20 >=dev-libs/boost-1.36
21 graphicsmagick? ( media-gfx/graphicsmagick )
22 pdf? ( media-libs/libharu )
23 postgres? ( dev-db/postgresql )
24 sqlite? ( dev-db/sqlite:3 )
25 fcgi? (
26 dev-libs/fcgi
27 virtual/httpd-fastcgi
28 )
29 server? (
30 ssl? ( dev-libs/openssl )
31 zlib? ( sys-libs/zlib )
32 )
33 "
34 DEPEND="${RDEPEND}"
35
36 DOCS="Changelog INSTALL"
37 S=${WORKDIR}/${MY_P}
38
39 pkg_setup() {
40 if use !server && use !fcgi; then
41 ewarn "You have to select at least built-in server support or fcgi support."
42 ewarn "Invalid use flag combination, enable at least one of: server, fcgi"
43 fi
44
45 if use test && use !sqlite; then
46 ewarn "Tests need sqlite, disabling."
47 fi
48
49 enewgroup wt
50 enewuser wt -1 -1 /var/lib/wt/home wt
51 }
52
53 src_prepare() {
54 epatch "$FILESDIR/cmakelist.patch"
55
56 # just to be sure
57 rm -rf Wt/Dbo/backend/amalgamation
58
59 # fix png linking
60 if use pdf; then
61 sed -e 's/-lpng12/-lpng/' \
62 -i cmake/WtFindHaru.txt || die
63 fi
64
65 cmake-utils_src_prepare
66 }
67
68 src_configure() {
69 BOOST_PKG="$(best_version ">=dev-libs/boost-1.36.0")"
70 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
71 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
72 BOOST_INC="/usr/include/boost-${BOOST_VER}"
73
74 local mycmakeargs=(
75 -DDESTDIR="${D}"
76 -DLIB_INSTALL_DIR=$(get_libdir)
77 $(cmake-utils_use test BUILD_TESTS)
78 -DSHARED_LIBS=ON
79 -DMULTI_THREADED=ON
80 -DUSE_SYSTEM_SQLITE3=ON
81 -DWEBUSER=wt
82 -DWEBGROUP=wt
83 $(cmake-utils_use extjs ENABLE_EXT)
84 $(cmake-utils_use graphicsmagick ENABLE_GM)
85 $(cmake-utils_use pdf ENABLE_HARU)
86 $(cmake-utils_use postgres ENABLE_POSTGRES)
87 $(cmake-utils_use sqlite ENABLE_SQLITE)
88 $(cmake-utils_use fcgi CONNECTOR_FCGI)
89 $(cmake-utils_use server CONNECTOR_HTTP)
90 $(cmake-utils_use ssl WT_WITH_SSL)
91 $(cmake-utils_use zlib HTTP_WITH_ZLIB)
92 -DBUILD_EXAMPLES=OFF
93 $(cmake-utils_use resources INSTALL_RESOURCES)
94 )
95
96 cmake-utils_src_configure
97 }
98
99 src_test() {
100 # Tests need sqlite
101 if use sqlite; then
102 pushd "${CMAKE_BUILD_DIR}" > /dev/null
103 ./test/test || die
104 popd > /dev/null
105 fi
106 }
107
108 src_install() {
109
110 dodir \
111 /var/lib/wt \
112 /var/lib/wt/home
113
114 cmake-utils_src_install
115
116 use doc && dohtml -A pdf,xhtml -r doc/*
117
118 }
119
120 pkg_postinst() {
121 if use fcgi; then
122 elog "You selected fcgi support. Please make sure that the web-server"
123 elog "has fcgi support and access to the fcgi socket."
124 elog "You can use spawn-fcgi to spawn the witty-processes and run them"
125 elog "in a chroot environment."
126 fi
127
128 chown -R wt:wt \
129 "${ROOT}"/var/lib/wt
130
131 chmod 0750 \
132 "${ROOT}"/var/lib/wt \
133 "${ROOT}"/var/lib/wt/home
134
135 }

  ViewVC Help
Powered by ViewVC 1.1.20