diff --git a/www-client/dillo/additional-files/dillo.rdef.in b/www-client/dillo/additional-files/dillo.rdef.in new file mode 100644 index 000000000..541e037ac --- /dev/null +++ b/www-client/dillo/additional-files/dillo.rdef.in @@ -0,0 +1,15 @@ +resource app_flags B_SINGLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "@APP_NAME@", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; diff --git a/www-client/dillo/dillo_plus-3.2.1.recipe b/www-client/dillo/dillo_plus-3.2.1.recipe new file mode 100644 index 000000000..4947b679e --- /dev/null +++ b/www-client/dillo/dillo_plus-3.2.1.recipe @@ -0,0 +1,95 @@ +SUMMARY="A small, fast graphical web browser built on FLTK" +DESCRIPTION="A lightweight web browser based on Dillo but with many improvements, such as: \ +support for http, https, gemini, gopher, epub, reader mode and more..." +HOMEPAGE="https://dillo.org/ + https://github.com/crossbowerbt/dillo-plus" +COPYRIGHT="2023 Dillo and contributors" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/crossbowerbt/dillo-plus/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="b7df80c2742a9b879b9e8894ce317cdb98898f8f81d28db5b3e5cd69d7e8a11d" +SOURCE_DIR="dillo-plus-$portVersion" +PATCHES="dillo_plus-$portVersion.patchset" +ADDITIONAL_FILES="dillo.rdef.in" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +GLOBAL_WRITABLE_FILES=" + settings/etc/dillo directory keep-old + " + +PROVIDES=" + dillo_plus$secondaryArchSuffix = $portVersion + cmd:dillo = $portVersion + cmd:dillo_install_hyphenation = $portVersion + cmd:dpid = $portVersion + cmd:dpidc = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libfltk$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libXext$secondaryArchSuffix + lib:libX11$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + xlibe${secondaryArchSuffix}_devel + devel:libfltk$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + make PREFIX=$prefix LIBDIR=$libDir $jobArgs +} + +INSTALL() +{ + make PREFIX=$prefix \ + DILLO_LIBDIR=$libDir/dillo \ + DILLO_ETCDIR=$settingsDir/etc/dillo \ + DOC_PATH=$docDir \ + MAN_PATH=$manDir/man1 \ + install + + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local APP_NAME="Dillo" + local LONG_INFO="$SUMMARY" + local APP_SIGNATURE="application/x-vnd.dillo" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + -e "s|@APP_NAME@|$APP_NAME|" \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + $portDir/additional-files/dillo.rdef.in > dillo.rdef + + addResourcesToBinaries dillo.rdef $prefix/bin/dillo + + addAppDeskbarSymlink $prefix/bin/dillo Dillo +} + +TEST() +{ + make check +} diff --git a/www-client/dillo/patches/dillo_plus-3.2.1.patchset b/www-client/dillo/patches/dillo_plus-3.2.1.patchset new file mode 100644 index 000000000..48e8b18dc --- /dev/null +++ b/www-client/dillo/patches/dillo_plus-3.2.1.patchset @@ -0,0 +1,183 @@ +From 515a09086d40ac5a7cb0e9f820920a9981af6e99 Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Tue, 5 Dec 2023 12:38:32 +0100 +Subject: Build fixes + +Co-authored-by: coolcoder613 <96163908+coolcoder613eb@users.noreply.github.com> + +diff --git a/Makefile b/Makefile +index 6644e65..22aa4d6 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,8 +19,6 @@ all: config.h + @(cd dpi; make all) + @echo Making all in dls + @(cd dls; make all) +- @echo Making all in test +- @(cd test; make all) + + clean: + @echo Cleaning in lout +diff --git a/Makefile.options b/Makefile.options +index a28796f..fa987de 100644 +--- a/Makefile.options ++++ b/Makefile.options +@@ -7,35 +7,35 @@ RANLIB = ranlib + CC = gcc + CXX = g++ + +-INSTALL = /usr/bin/install ++INSTALL = /bin/install + INSTALL_SH = ../install-sh + + # == COMPILATION FLAGS == + +-COMPILE = $(CC) $(INCLUDES) $(CFLAGS) ++COMPILE = $(CC) $(INCLUDES) $(CFLAGS) -lnetwork + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + + CFLAGS = -g -O2 -DD_DNS_THREADED -D_REENTRANT -DHAVE_CONFIG -D_THREAD_SAFE -Wall -W -Wno-unused-parameter -Waggregate-return -Wl,--no-as-needed + INCLUDES = -I. -I.. -I/usr/local/include +-LDFLAGS = -L/usr/local/lib ++LDFLAGS = -L/usr/local/lib -lnetwork -lbnetapi + + CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) + CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions + + LIBFLTK_CFLAGS = -I/usr/X11R6/include/freetype2 -pipe -I/usr/X11R6/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT + LIBFLTK_CXXFLAGS = $(LIBFLTK_CFLAGS) -fvisibility-inlines-hidden +-LIBFLTK_LDFLAGS = $(LDFLAGS) -Wl,-rpath,/usr/local/lib -L/usr/X11R6/lib -lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lm -lX11 -lXdmcp -lXau ++LIBFLTK_LDFLAGS = $(LDFLAGS) -Wl,-rpath,/usr/local/lib -L/usr/X11R6/lib -lfltk -lXext -lpthread -lm -lX11 -lnetwork -liconv -lz + + HTTPS_LDFLAGS = -lcrypto -lssl + + LIBPNG16_CXXFLAGS = -I/usr/local/include/libpng16 + +-DILLO_LDFLAGS = -ljpeg -L/usr/local/lib -lpng -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/X11R6/lib -lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lm -lX11 -lXdmcp -lXau -lz -liconv -lX11 ++DILLO_LDFLAGS = -ljpeg -L/usr/local/lib -lpng -Wl,-rpath,/usr/local/lib -L/usr/X11R6/lib -lfltk -lXext -lpthread -lm -lX11 -lnetwork -liconv -lz + + # == HTTPS CERTS == + +-CA_CERTS_FILE = /etc/ssl/cert.pem +-CA_CERTS_DIR = /etc/ssl/ ++CA_CERTS_FILE ?= /system/data/ssl/CARootCertificates.pem ++CA_CERTS_DIR ?= /system/data/ssl/certs/ + + # == INSTALL PATHS == + +-- +2.42.1 + + +From b17e3ec503557ffe9c55149fcd52f68fde158aeb Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Tue, 5 Dec 2023 13:15:56 +0100 +Subject: Save settings in ~/config/settings/dillo + + +diff --git a/src/IO/dpi.c b/src/IO/dpi.c +index 1948b0e..4792015 100644 +--- a/src/IO/dpi.c ++++ b/src/IO/dpi.c +@@ -348,7 +348,7 @@ static int Dpi_start_dpid(void) + pid = fork(); + if (pid == 0) { + /* This is the child process. Execute the command. */ +- char *path1 = dStrconcat(dGethomedir(), "/.dillo/dpid", NULL); ++ char *path1 = dStrconcat(dGethomedir(), "/config/settings/dillo/dpid", NULL); + dClose(st_pipe[0]); + if (execl(path1, "dpid", (char*)NULL) == -1) { + dFree(path1); +@@ -396,7 +396,7 @@ static int Dpi_read_comm_keys(int *port) + char *fname, *rcline = NULL, *tail; + int i, ret = -1; + +- fname = dStrconcat(dGethomedir(), "/.dillo/dpid_comm_keys", NULL); ++ fname = dStrconcat(dGethomedir(), "/config/settings/dillo/dpid_comm_keys", NULL); + if ((In = fopen(fname, "r")) == NULL) { + MSG_ERR("[Dpi_read_comm_keys] %s\n", dStrerror(errno)); + } else if ((rcline = dGetline(In)) == NULL) { +diff --git a/src/IO/tls.c b/src/IO/tls.c +index 9b4c2a1..60b9304 100644 +--- a/src/IO/tls.c ++++ b/src/IO/tls.c +@@ -243,7 +243,7 @@ static void Tls_load_certificates(SSL_CTX *ssl_context) + } + } + +- userpath = dStrconcat(dGethomedir(), "/.dillo/certs/", NULL); ++ userpath = dStrconcat(dGethomedir(), "/config/settings/dillo/certs/", NULL); + Tls_load_certificates_from_path(ssl_context, userpath); + dFree(userpath); + +diff --git a/src/cookies.c b/src/cookies.c +index deaae2a..c532034 100644 +--- a/src/cookies.c ++++ b/src/cookies.c +@@ -246,7 +246,7 @@ static int Cookie_control_init(void) + bool_t enabled = FALSE; + + /* Get a file pointer */ +- filename = dStrconcat(dGethomedir(), "/.dillo/cookiesrc", NULL); ++ filename = dStrconcat(dGethomedir(), "/config/settings/dillo/cookiesrc", NULL); + stream = Cookies_fopen(filename, "DEFAULT DENY\n"); + dFree(filename); + +diff --git a/src/cookies.c.orig b/src/cookies.c.orig +index deaae2a..c532034 100644 +--- a/src/cookies.c.orig ++++ b/src/cookies.c.orig +@@ -246,7 +246,7 @@ static int Cookie_control_init(void) + bool_t enabled = FALSE; + + /* Get a file pointer */ +- filename = dStrconcat(dGethomedir(), "/.dillo/cookiesrc", NULL); ++ filename = dStrconcat(dGethomedir(), "/config/settings/dillo/cookiesrc", NULL); + stream = Cookies_fopen(filename, "DEFAULT DENY\n"); + dFree(filename); + +diff --git a/src/paths.cc b/src/paths.cc +index 10b488f..bb92f91 100644 +--- a/src/paths.cc ++++ b/src/paths.cc +@@ -44,7 +44,7 @@ void Paths::init(void) + dStrerror(errno)); + } + +- path = dStrconcat(dGethomedir(), "/.dillo", NULL); ++ path = dStrconcat(dGethomedir(), "/config/settings/dillo", NULL); + if (stat(path, &st) == -1) { + if (errno == ENOENT) { + MSG("paths: Creating directory '%s/'\n", path); +@@ -82,7 +82,7 @@ void Paths::free(void) + FILE *Paths::getPrefsFP(const char *rcFile) + { + FILE *fp; +- char *path = dStrconcat(dGethomedir(), "/.dillo/", rcFile, NULL); ++ char *path = dStrconcat(dGethomedir(), "/config/settings/dillo/", rcFile, NULL); + char *path2 = dStrconcat(DILLO_SYSCONF, rcFile, NULL); + + if (!(fp = fopen(path, "r"))) { +@@ -116,4 +116,4 @@ void Paths::copy_file( char *filename, char *outfile){ + MSG("Read error from %s: %s", outfile, dStrerror(errno)); + if ( close(in_fd) == -1 || close(out_fd) == -1 ) + MSG("Error closing files %s", dStrerror(errno)); +-} +\ No newline at end of file ++} +diff --git a/src/styleengine.cc b/src/styleengine.cc +index 5f20fb3..667af64 100644 +--- a/src/styleengine.cc ++++ b/src/styleengine.cc +@@ -1054,7 +1054,7 @@ void StyleEngine::init () { + + void StyleEngine::buildUserStyle () { + Dstr *style; +- char *filename = dStrconcat(dGethomedir(), "/.dillo/style.css", NULL); ++ char *filename = dStrconcat(dGethomedir(), "/config/settings/dillo/style.css", NULL); + char *sys_filename = DILLO_SYSCONF "style.css"; + + if ((style = a_Misc_file2dstr(filename))) { +-- +2.42.1 +