summaryrefslogtreecommitdiffstats
path: root/network/dillo
diff options
context:
space:
mode:
author Ruben Schuller <sb@rbn.im>2021-04-17 16:05:33 +0200
committer Robby Workman <rworkman@slackbuilds.org>2021-04-17 23:18:56 -0500
commit1152660bd586f47d3cdb6f9ba1fa552178e7b4ca (patch)
tree3ec014c0d5aa516eae218caab2dc2230ddbe0625 /network/dillo
parent40761f4e35540d3f96908791aa181a4e59ec4d50 (diff)
downloadslackbuilds-1152660bd586f47d3cdb6f9ba1fa552178e7b4ca.tar.gz
slackbuilds-1152660bd586f47d3cdb6f9ba1fa552178e7b4ca.tar.xz
network/dillo: Patched for openssl >= 1.1.x and gcc >= 10.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/dillo')
-rw-r--r--network/dillo/dillo-3.0.5-fno-common.patch100
-rw-r--r--network/dillo/dillo-3.0.5-openssl-1.1.patch26
-rw-r--r--network/dillo/dillo.SlackBuild12
3 files changed, 135 insertions, 3 deletions
diff --git a/network/dillo/dillo-3.0.5-fno-common.patch b/network/dillo/dillo-3.0.5-fno-common.patch
new file mode 100644
index 0000000000..df80f55afa
--- /dev/null
+++ b/network/dillo/dillo-3.0.5-fno-common.patch
@@ -0,0 +1,100 @@
+--- a/dpid/dpid.c
++++ b/dpid/dpid.c
+@@ -41,6 +41,26 @@
+ volatile sig_atomic_t caught_sigchld = 0;
+ char *SharedKey = NULL;
+
++char *srs_name;
++
++/*! dpid's service request socket file descriptor */
++int srs_fd;
++
++/*! Number of available plugins */
++int numdpis;
++
++/*! Number of sockets being watched */
++int numsocks;
++
++/*! State information for each plugin. */
++struct dp *dpi_attr_list;
++
++/*! service served for each plugin */
++Dlist *services_list;
++
++/*! Set of sockets watched for connections */
++fd_set sock_set;
++
+ /*! Remove dpid_comm_keys file.
+ * This avoids that dillo instances connect to a stale port after dpid
+ * has exited (e.g. after a reboot).
+--- a/dpid/dpid.h
++++ b/dpid/dpid.h
+@@ -25,10 +25,10 @@
+
+ /*! \TODO: Should read this from dillorc */
+ #define SRS_NAME "dpid.srs"
+-char *srs_name;
++extern char *srs_name;
+
+ /*! dpid's service request socket file descriptor */
+-int srs_fd;
++extern int srs_fd;
+
+ /*! plugin state information
+ */
+@@ -49,19 +49,19 @@
+ };
+
+ /*! Number of available plugins */
+-int numdpis;
++extern int numdpis;
+
+ /*! Number of sockets being watched */
+-int numsocks;
++extern int numsocks;
+
+ /*! State information for each plugin. */
+-struct dp *dpi_attr_list;
++extern struct dp *dpi_attr_list;
+
+ /*! service served for each plugin */
+-Dlist *services_list;
++extern Dlist *services_list;
+
+ /*! Set of sockets watched for connections */
+-fd_set sock_set;
++extern fd_set sock_set;
+
+ /*! Set to 1 by the SIGCHLD handler dpi_sigchld */
+ extern volatile sig_atomic_t caught_sigchld;
+--- a/dpid/dpid_common.c
++++ b/dpid/dpid_common.c
+@@ -14,6 +14,9 @@
+ #include <unistd.h>
+ #include "dpid_common.h"
+
++/*! Error codes for dpid */
++dpi_errno_t dpi_errno;
++
+ /*
+ * Send a verbose error message.
+ */
+--- a/dpid/dpid_common.h
++++ b/dpid/dpid_common.h
+@@ -35,12 +35,13 @@
+ #define CKD_WRITE(fd, msg) ckd_write(fd, msg, __FILE__, __LINE__)
+ #define CKD_CLOSE(fd) ckd_close(fd, __FILE__, __LINE__)
+
+-
+ /*! Error codes for dpid */
+-enum {
++typedef enum {
+ no_errors,
+ dpid_srs_addrinuse /* dpid service request socket address already in use */
+-} dpi_errno;
++} dpi_errno_t;
++
++extern dpi_errno_t dpi_errno;
+
+ /*! Intended for identifying dillo plugins
+ * and related files
diff --git a/network/dillo/dillo-3.0.5-openssl-1.1.patch b/network/dillo/dillo-3.0.5-openssl-1.1.patch
new file mode 100644
index 0000000000..f21694113c
--- /dev/null
+++ b/network/dillo/dillo-3.0.5-openssl-1.1.patch
@@ -0,0 +1,26 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -286,7 +286,7 @@
+
+ if test "x$ssl_ok" = "xyes"; then
+ old_libs="$LIBS"
+- AC_CHECK_LIB(ssl, SSL_library_init, ssl_ok=yes, ssl_ok=no, -lcrypto)
++ AC_CHECK_LIB(ssl, OPENSSL_config, ssl_ok=yes, ssl_ok=no, -lcrypto)
+ LIBS="$old_libs"
+ fi
+
+--- a/dpi/https.c
++++ b/dpi/https.c
+@@ -476,7 +476,11 @@
+ case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
+ /*Either self signed and untrusted*/
+ /*Extract CN from certificate name information*/
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) {
++#else
++ if ((cn = strstr(X509_get_subject_name(remote_cert), "/CN=")) == NULL) {
++#endif
+ strcpy(buf, "(no CN given)");
+ } else {
+ char *cn_end;
+
diff --git a/network/dillo/dillo.SlackBuild b/network/dillo/dillo.SlackBuild
index cee153a1b1..8490846142 100644
--- a/network/dillo/dillo.SlackBuild
+++ b/network/dillo/dillo.SlackBuild
@@ -31,7 +31,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -71,6 +71,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Thanks gentoo!
+patch -p1 < $CWD/dillo-3.0.5-openssl-1.1.patch
+patch -p1 < $CWD/dillo-3.0.5-fno-common.patch
+
+autoreconf -fi
+
#https and ssl are in the alpha stage, but if you don't want to try and use it
#just delete or comment out --enable-ssl