Files
guru/dev-cpp/wt/wt-4.11.4-r3.ebuild
Nicolas PARLANT 58db7816b1 dev-cpp/wt: rework deps, unrestrict boost
dep :
unrestrict boost version. It builds now with >=1.87.
media-libs/libharu is only required with pdf feature
add media-libs/glew required for opengl
add connector-c for mariadb/mysql
add pkgconfig
use libglvnd[X] instead of virtual/opengl

doc :
generate qch requires qttools[assistant] not qttools[qdoc]
add dev-ruby/asciidoctor for tutorial building
add graphviz for dot

add useflags :
make graphicsmagick (raster image) optional
make Wt::Test optional with wttest
make sqlite optional (but enabled by default) and force system-lib

REQUIRED_USE :
pango is only used with graphicsmagick or libharu
opengl requires graphicsmagick

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/guru/pull/339
Signed-off-by: David Roman <davidroman96@gmail.com>
2025-06-28 22:53:34 +02:00

132 lines
2.9 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic
DESCRIPTION="Wt, C++ Web Toolkit"
HOMEPAGE="https://www.webtoolkit.eu/wt https://github.com/emweb/wt"
SRC_URI="https://github.com/emweb/wt/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="doc +graphicsmagick mysql opengl +pango pdf postgres +sqlite ssl wttest"
REQUIRED_USE="
pango? ( || ( graphicsmagick pdf ) )
opengl? ( graphicsmagick )
"
# TODO: auto-test with wttest
RESTRICT="test"
DEPEND="
dev-libs/boost:=
sys-libs/zlib
graphicsmagick? ( media-gfx/graphicsmagick:=[jpeg,png] )
mysql? (
virtual/mysql
|| (
dev-db/mariadb-connector-c
dev-db/mysql-connector-c
)
)
opengl? (
media-libs/glew:=
media-libs/libglvnd[X]
)
pango? (
dev-libs/glib:2
media-libs/fontconfig
x11-libs/pango
)
pdf? ( media-libs/libharu:= )
postgres? ( dev-db/postgresql )
sqlite? ( dev-db/sqlite:3 )
ssl? ( dev-libs/openssl:= )
"
RDEPEND="${DEPEND}"
BDEPEND="
doc? (
app-text/doxygen
dev-qt/qttools:6[assistant]
dev-ruby/asciidoctor
media-gfx/graphviz[cairo]
)
virtual/pkgconfig
"
PATCHES=( "${FILESDIR}/wt-no-rundir.patch" )
src_prepare() {
cmake_src_prepare
# remove bundled sqlite
rm -r src/Wt/Dbo/backend/amalgamation || die
if use doc; then
doxygen -u Doxyfile 2>/dev/null || die
doxygen -u examples/Doxyfile 2>/dev/null || die
sed -e "/^QHG_LOCATION/s|qhelpgenerator|/usr/$(get_libdir)/qt6/libexec/&|" \
-i Doxyfile || die
fi
}
src_configure() {
local mycmakeargs=(
-DLIB_INSTALL_DIR=$(get_libdir)
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DDOCUMENTATION_DESTINATION="share/doc/${PF}"
-DINSTALL_DOCUMENTATION=$(usex doc)
# will be deprecated
-DCONNECTOR_FCGI=OFF
-DCONNECTOR_HTTP=ON
-DENABLE_SSL=$(usex ssl)
-DENABLE_HARU=$(usex pdf)
-DENABLE_PANGO=$(usex pango)
-DENABLE_SQLITE=$(usex sqlite)
-DENABLE_POSTGRES=$(usex postgres)
-DENABLE_MYSQL=$(usex mysql)
-DENABLE_FIREBIRD=OFF
-DENABLE_LIBWTTEST=$(usex wttest)
# QT is only required for examples
-DENABLE_QT4=OFF
-DENABLE_QT5=OFF
-DENABLE_QT6=OFF
# requires shibboleth and opensaml, not in tree
-DENABLE_SAML=OFF
-DENABLE_OPENGL=$(usex opengl)
-DWT_WRASTERIMAGE_IMPLEMENTATION=$(usex graphicsmagick GraphicsMagick none)
)
if use mysql || use postgres || use sqlite; then
mycmakeargs+=( -DENABLE_LIBWTDBO=ON )
if use sqlite; then
mycmakeargs+=( -DUSE_SYSTEM_SQLITE3=ON )
# DboTest.C: In member function void Sqlite3_Test_Suite::dbo_precision_test2::test_method()
if use wttest; then
append-flags -fno-strict-aliasing
filter-lto
fi
fi
else
mycmakeargs+=( -DENABLE_LIBWTDBO=OFF )
fi
cmake_src_configure
}
src_install() {
cmake_src_install
if use doc; then
find "${ED}" \( \
-iname '*.map' -o \
-iname '*.md5' \
\) -delete || die
docompress -x /usr/share/doc/${PF}/{examples,reference,tutorial}
fi
}