1SUMMARY="A small, fast graphical web browser built on FLTK"
2DESCRIPTION="A lightweight web browser based on Dillo but with many improvements, such as: \
3support for http, https, gemini, gopher, epub, reader mode and more..."
4HOMEPAGE="https://dillo.org/
5	https://github.com/crossbowerbt/dillo-plus"
6COPYRIGHT="2023 Dillo and contributors"
7LICENSE="GNU GPL v3"
8REVISION="2"
9SOURCE_URI="https://github.com/crossbowerbt/dillo-plus/archive/refs/tags/v$portVersion.tar.gz"
10CHECKSUM_SHA256="b7df80c2742a9b879b9e8894ce317cdb98898f8f81d28db5b3e5cd69d7e8a11d"
11SOURCE_DIR="dillo-plus-$portVersion"
12PATCHES="dillo_plus-$portVersion.patchset"
13ADDITIONAL_FILES="dillo.rdef.in"
14
15ARCHITECTURES="all !x86_gcc2"
16SECONDARY_ARCHITECTURES="x86"
17
18GLOBAL_WRITABLE_FILES="
19	settings/etc/dillo directory keep-old
20	"
21
22PROVIDES="
23	dillo_plus$secondaryArchSuffix = $portVersion
24	cmd:dillo = $portVersion
25	cmd:dillo_install_hyphenation = $portVersion
26	cmd:dpid = $portVersion
27	cmd:dpidc = $portVersion
28	"
29REQUIRES="
30	haiku$secondaryArchSuffix
31	lib:libcrypto$secondaryArchSuffix
32	lib:libfltk$secondaryArchSuffix
33	lib:libiconv$secondaryArchSuffix
34	lib:libjpeg$secondaryArchSuffix
35	lib:libpng16$secondaryArchSuffix
36	lib:libssl$secondaryArchSuffix
37	lib:libXext$secondaryArchSuffix
38	lib:libX11$secondaryArchSuffix
39	lib:libz$secondaryArchSuffix
40	"
41
42BUILD_REQUIRES="
43	haiku${secondaryArchSuffix}_devel
44	xlibe${secondaryArchSuffix}_devel
45	devel:libfltk$secondaryArchSuffix
46	devel:libfontconfig$secondaryArchSuffix
47	devel:libiconv$secondaryArchSuffix
48	devel:libjpeg$secondaryArchSuffix
49	devel:libpng16$secondaryArchSuffix
50	devel:libssl$secondaryArchSuffix
51	devel:libz$secondaryArchSuffix
52	"
53BUILD_PREREQUIRES="
54	cmd:gcc$secondaryArchSuffix
55	cmd:make
56	"
57
58BUILD()
59{
60	make PREFIX=$prefix LIBDIR=$libDir $jobArgs
61}
62
63INSTALL()
64{
65	make PREFIX=$prefix \
66		DILLO_LIBDIR=$libDir/dillo \
67		DILLO_ETCDIR=$settingsDir/etc/dillo \
68		DOC_PATH=$docDir \
69		MAN_PATH=$manDir/man1 \
70		install
71
72	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
73	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
74	local MINOR="`echo "$portVersion" | cut -d. -f3`"
75	local APP_NAME="Dillo"
76	local LONG_INFO="$SUMMARY"
77	local APP_SIGNATURE="application/x-vnd.dillo"
78	sed \
79		-e "s|@MAJOR@|$MAJOR|" \
80		-e "s|@MIDDLE@|$MIDDLE|" \
81		-e "s|@MINOR@|$MINOR|" \
82		-e "s|@LONG_INFO@|$LONG_INFO|" \
83		-e "s|@APP_NAME@|$APP_NAME|" \
84		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
85		$portDir/additional-files/dillo.rdef.in > dillo.rdef
86
87	addResourcesToBinaries dillo.rdef $prefix/bin/dillo
88
89	addAppDeskbarSymlink $prefix/bin/dillo Dillo
90}
91
92TEST()
93{
94	make check
95}
96