commit:     b9fd87d7ac68d3f8e41add0f0004ef36f54bed08
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sat Jun 28 17:50:53 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Sep 15 07:33:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9fd87d7

www-client/dillo: add 3.2.0

Update LICENSE, fix tests, use mbedtls:3.

Closes: https://bugs.gentoo.org/959248
Closes: https://bugs.gentoo.org/955038
Closes: https://bugs.gentoo.org/942051
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42791
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 www-client/dillo/Manifest                          |   1 +
 www-client/dillo/dillo-3.2.0.ebuild                | 116 +++++++++++++++++++++
 www-client/dillo/files/dillo-3.2.0-mbedtls-3.patch |  51 +++++++++
 3 files changed, 168 insertions(+)

diff --git a/www-client/dillo/Manifest b/www-client/dillo/Manifest
index 41538870cff3..e52344fea18e 100644
--- a/www-client/dillo/Manifest
+++ b/www-client/dillo/Manifest
@@ -1 +1,2 @@
 DIST dillo-3.1.1.tar.bz2 1026711 BLAKE2B 
81fbaf527f89160bfddf4bc51048dab8f1487b735e6d9cb9679deb46cda666158bb6b0d469ec28691167cd9d9657a12f5d5f5ed5b6c1cb0102963d611b4e2ece
 SHA512 
2f6ad315c246638e91af13fbeb8a846b756c222aaf2275efb1bff6bae08130bb4b8fda9c09cd33925911c424fe536cf7a587e6657de9a13d63733714c86533c1
+DIST dillo-3.2.0.tar.bz2 1093734 BLAKE2B 
739eb5e3ea3d1fd47b4a7a94c3bef381593707ffbada7f6e18d587981510ea321720e70c1cf2265880611617d92770499879ea1131b314b70f1d23f0dcd0534c
 SHA512 
d797dd24c7312ad607c1d8e7fe2153860eaf1bb2146108a183ad788ea59319ec11d2160b9a7cca673f3d04474121b57d8dfa73bf3921daebe601794b8cbdea09

diff --git a/www-client/dillo/dillo-3.2.0.ebuild 
b/www-client/dillo/dillo-3.2.0.ebuild
new file mode 100644
index 000000000000..9146ea7cf57b
--- /dev/null
+++ b/www-client/dillo/dillo-3.2.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs virtualx xdg-utils
+
+DESCRIPTION="Lean FLTK based web browser"
+HOMEPAGE="https://dillo-browser.github.io/";
+
+SRC_URI="https://github.com/dillo-browser/dillo/releases/download/v${PV}/${P}.tar.bz2";
+LICENSE="GPL-3+"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +gif +jpeg mbedtls +png +ssl +openssl +xembed"
+REQUIRED_USE="
+       ssl? ( || ( openssl mbedtls ) )
+"
+
+RDEPEND="
+       =x11-libs/fltk-1.3*:1=
+       sys-libs/zlib
+       x11-libs/libX11
+       jpeg? ( media-libs/libjpeg-turbo:= )
+       png? ( >=media-libs/libpng-1.2:= )
+       ssl? (
+               mbedtls? ( net-libs/mbedtls:3= )
+               openssl? ( dev-libs/openssl:= )
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       doc? (
+               app-text/doxygen[dot]
+               app-text/texlive
+       )
+       test? (
+               media-fonts/dejavu
+               media-gfx/imagemagick[X]
+               x11-apps/xwd
+               x11-apps/xwininfo
+               x11-base/xorg-server[xvfb]
+       )
+"
+
+DOCS="AUTHORS ChangeLog README NEWS doc/*.txt doc/README"
+
+PATCHES=(
+       "${FILESDIR}/dillo-3.2.0-mbedtls-3.patch"
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               $(use_enable debug rtfl)
+               $(use_enable gif)
+               $(use_enable jpeg)
+               $(use_enable mbedtls)
+               $(use_enable openssl)
+               $(use_enable png)
+               $(use_enable ssl tls)
+               $(use_enable xembed)
+               --enable-ipv6
+       )
+
+       use mbedtls && myeconfargs+=(
+               --with-mbedtls-inc="${ESYSROOT}/usr/include/mbedtls3"
+       )
+       use test && myeconfargs+=( --enable-html-tests=yes )
+
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       emake AR="$(tc-getAR)"
+
+       if use doc; then
+               doxygen Doxyfile || die
+       fi
+}
+
+src_test() {
+       # Prepare test framework (#942051)
+       local test_dir="${WORKDIR}/build-test"
+       emake DESTDIR="${test_dir}" install
+       mkdir -p "${HOME}/.dillo/" || die
+
+       # dillo expects dpid binary in homedir
+       cp "${test_dir}"/etc/dillo/* dpid/dpid "${HOME}/.dillo/" || die
+       sed -e 
"s|[@]libdir[@]|${test_dir}/usr/$(get_libdir)|;s|[@]EXEEXT[@]||g" \
+               dpid/dpidrc.in > "${HOME}/.dillo/dpidrc" || die
+
+       # The test suite consistently fails with -jN in portage
+       DILLOBIN="${test_dir}/usr/bin/dillo" virtx emake -j1 check
+}
+
+src_install() {
+       default
+
+       use doc && dodoc -r html
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+}

diff --git a/www-client/dillo/files/dillo-3.2.0-mbedtls-3.patch 
b/www-client/dillo/files/dillo-3.2.0-mbedtls-3.patch
new file mode 100644
index 000000000000..ba9956754719
--- /dev/null
+++ b/www-client/dillo/files/dillo-3.2.0-mbedtls-3.patch
@@ -0,0 +1,51 @@
+From https://github.com/dillo-browser/dillo/pull/414
+From: "Azamat H. Hackimov" <[email protected]>
+Date: Sat, 28 Jun 2025 16:28:54 +0300
+Subject: [PATCH] Add options to search custom MbedTLS installations
+
+Some Linux distributions (like Gentoo or Arch) allows to install
+MbedTLS 2.x and 3.x branches simultaneously. This change helps to
+inding custom MbedTLS locations.
+
+Signed-off-by: Azamat H. Hackimov <[email protected]>
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,6 +21,14 @@ AC_ARG_WITH([jpeg-inc],
+   [AS_HELP_STRING([--with-jpeg-inc=DIR], [Specify where to find libjpeg 
headers])],
+   LIBJPEG_INCDIR=$withval)
+ 
++AC_ARG_WITH([mbedtls-lib],
++  [AS_HELP_STRING([--with-mbedtls-lib=DIR], [Specify where to find MbedTLS 
libraries])],
++  [LDFLAGS="$LDFLAGS -L$withval"])
++
++AC_ARG_WITH([mbedtls-inc],
++  [AS_HELP_STRING([--with-mbedtls-inc=DIR], [Specify where to find MbedTLS 
headers])],
++  [CFLAGS="$CFLAGS -I$withval" CXXFLAGS="$CXXFLAGS -I$withval"])
++
+ AC_ARG_ENABLE([efence],
+   [AS_HELP_STRING([--enable-efence], [Try to compile and run with Electric 
Fence])],
+   [enable_efence=$enableval],
+@@ -489,17 +497,20 @@ if test "x$enable_tls" = "xyes"; then
+       dnl If the headers are found, try to link with mbedTLS
+       if test "x$mbedtls_ok" = "xyes"; then
+         old_libs="$LIBS"
+-        AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, mbedtls_ok=yes, 
mbedtls_ok=no, -lmbedx509 -lmbedcrypto)
++        AC_SEARCH_LIBS(mbedtls_ssl_init, [mbedtls-3 mbedtls], mbedtls_ok=yes, 
mbedtls_ok=no)
++        AC_SEARCH_LIBS(mbedtls_pk_get_name, [mbedcrypto-3 mbedcrypto], 
mbedcrypto_ok=yes, mbedcrypto_ok=no)
++        AC_SEARCH_LIBS(mbedtls_x509_crt_init, [mbedx509-3 mbedx509], 
mbedx509_ok=yes, mbedx509_ok=no)
+         LIBS="$old_libs"
+       fi
+ 
+       dnl If it went good, use it, otherwise disable TLS support
+-      if test "x$mbedtls_ok" = "xyes"; then
++      if test "x$mbedtls_ok" = "xyes" && test "x$mbedcrypto_ok" = "xyes" && 
test "x$mbedx509_ok" = "xyes" ; then
+         AC_MSG_NOTICE([Using mbedTLS as TLS library.])
+         tls_impl="mbedTLS"
+         AC_DEFINE([HAVE_MBEDTLS], [1], [mbedTLS works])
+-        LIBSSL_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto"
++        LIBSSL_LIBS="$ac_cv_search_mbedtls_ssl_init 
$ac_cv_search_mbedtls_pk_get_name $ac_cv_search_mbedtls_x509_crt_init"
+       else
++        mbedtls_ok=no
+         AC_MSG_NOTICE([Cannot find mbedTLS])
+       fi
+     fi

Reply via email to