summaryrefslogtreecommitdiffstats
path: root/network/barrier
diff options
context:
space:
mode:
Diffstat (limited to 'network/barrier')
-rw-r--r--network/barrier/barrier-2.4.0-cert-creation.patch11
-rw-r--r--network/barrier/barrier-2.4.0-gcc-13.patch38
-rw-r--r--network/barrier/barrier-2.4.0-includes.patch39
-rw-r--r--network/barrier/barrier.SlackBuild36
-rw-r--r--network/barrier/barrier.info12
5 files changed, 124 insertions, 12 deletions
diff --git a/network/barrier/barrier-2.4.0-cert-creation.patch b/network/barrier/barrier-2.4.0-cert-creation.patch
new file mode 100644
index 0000000000..817ed63fff
--- /dev/null
+++ b/network/barrier/barrier-2.4.0-cert-creation.patch
@@ -0,0 +1,11 @@
+--- src/lib/net/SecureUtils.cpp 2021-11-01 21:46:43.000000000 +0100
++++ src/lib/net/SecureUtils.cpp 2024-02-06 22:12:48.553673626 +0100
+@@ -190,7 +190,7 @@
+
+ X509_sign(cert, private_key, EVP_sha256());
+
+- auto fp = fopen_utf8_path(path.c_str(), "r");
++ auto fp = fopen_utf8_path(path.c_str(), "w");
+ if (!fp) {
+ throw std::runtime_error("Could not open certificate output path");
+ }
diff --git a/network/barrier/barrier-2.4.0-gcc-13.patch b/network/barrier/barrier-2.4.0-gcc-13.patch
new file mode 100644
index 0000000000..5b17590491
--- /dev/null
+++ b/network/barrier/barrier-2.4.0-gcc-13.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/895088
+https://github.com/debauchee/barrier/pull/1886
+
+From d376d23d534e053a160c32ee1170d237a2f3d6bd Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 26 Jan 2023 09:25:59 -0500
+Subject: [PATCH] Add missing #include directives needed for GCC 13
+
+---
+ src/lib/base/String.h | 1 +
+ src/lib/net/FingerprintData.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/lib/base/String.h b/src/lib/base/String.h
+index 9c5a53bac4..fa37f8f0dc 100644
+--- a/src/lib/base/String.h
++++ b/src/lib/base/String.h
+@@ -18,6 +18,7 @@
+
+ #pragma once
+
++#include <cstdint>
+ #include "common/common.h"
+ #include "common/stdstring.h"
+
+diff --git a/src/lib/net/FingerprintData.h b/src/lib/net/FingerprintData.h
+index 938a69538d..522a481353 100644
+--- a/src/lib/net/FingerprintData.h
++++ b/src/lib/net/FingerprintData.h
+@@ -18,6 +18,7 @@
+ #ifndef BARRIER_LIB_NET_FINGERPRINT_DATA_H
+ #define BARRIER_LIB_NET_FINGERPRINT_DATA_H
+
++#include <cstdint>
+ #include <string>
+ #include <vector>
+
+
diff --git a/network/barrier/barrier-2.4.0-includes.patch b/network/barrier/barrier-2.4.0-includes.patch
new file mode 100644
index 0000000000..048a3b0680
--- /dev/null
+++ b/network/barrier/barrier-2.4.0-includes.patch
@@ -0,0 +1,39 @@
+From aa0a2998e8894716644ea5fb29fc6f0165add956 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Tue, 2 Nov 2021 20:59:51 +0000
+Subject: [PATCH] Add missing cstddef includes for NULL
+
+---
+ src/lib/base/Event.cpp | 2 ++
+ src/lib/base/Event.h | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/src/lib/base/Event.cpp b/src/lib/base/Event.cpp
+index cc548fc6..08c5e98f 100644
+--- a/src/lib/base/Event.cpp
++++ b/src/lib/base/Event.cpp
+@@ -19,6 +19,8 @@
+ #include "base/Event.h"
+ #include "base/EventQueue.h"
+
++#include <cstddef>
++
+ //
+ // Event
+ //
+diff --git a/src/lib/base/Event.h b/src/lib/base/Event.h
+index 38a2cf11..cb00dccb 100644
+--- a/src/lib/base/Event.h
++++ b/src/lib/base/Event.h
+@@ -21,6 +21,8 @@
+ #include "common/basic_types.h"
+ #include "common/stdmap.h"
+
++#include <cstddef>
++
+ class EventData {
+ public:
+ EventData() { }
+--
+2.32.0
+
diff --git a/network/barrier/barrier.SlackBuild b/network/barrier/barrier.SlackBuild
index b03281061c..ff2bd84449 100644
--- a/network/barrier/barrier.SlackBuild
+++ b/network/barrier/barrier.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for Barrier (Synergy fork)
# Written by Mario Antunes (mariolpantunes@gmail.com)
+# Updated 2024 Ruben Schuller <sb@rbn.im>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=barrier
-VERSION=${VERSION:-2.1.2}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.4.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -34,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -61,6 +72,12 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+
+# these are submodules in the barrier git repository.
+tar -v -C ./ext/gulrak-filesystem --strip-components=1 -x -f $CWD/filesystem*.tar.gz
+tar -v -C ./ext/gmock --strip-components=1 -x -f $CWD/googlemock*.tar.gz
+tar -v -C ./ext/gtest --strip-components=1 -x -f $CWD/googletest*.tar.gz
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -68,9 +85,16 @@ 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 {} \;
+# borrowed from gentoo https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-misc/barrier/files
+patch -p1 < $CWD/barrier-2.4.0-includes.patch
+patch -p1 < $CWD/barrier-2.4.0-gcc-13.patch
+patch -p0 < $CWD/barrier-2.4.0-cert-creation.patch
+
mkdir -p build
cd build
- cmake \
+cmake \
+ -DBARRIER_BUILD_INSTALLER=OFF \
+ -DBARRIER_BUILD_TESTS=OFF \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_BUILD_TYPE="Release" \
@@ -91,4 +115,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/barrier/barrier.info b/network/barrier/barrier.info
index 1382632fdb..c776bebf23 100644
--- a/network/barrier/barrier.info
+++ b/network/barrier/barrier.info
@@ -1,10 +1,10 @@
PRGNAM="barrier"
-VERSION="2.1.2"
+VERSION="2.4.0"
HOMEPAGE="https://github.com/debauchee/barrier"
-DOWNLOAD="https://github.com/debauchee/barrier/archive/v2.1.2/barrier-2.1.2.tar.gz"
-MD5SUM="8cc0d40bc7da7f7e33c8c063157084b5"
+DOWNLOAD="https://github.com/debauchee/barrier/archive/v2.4.0/barrier-2.4.0.tar.gz https://github.com/gulrak/filesystem/archive/614bbe87b80435d87ab8791564370e0c1d13627d/filesystem.tar.gz https://github.com/google/googlemock/archive/7d33fee11ec480beae4c28ad09ca56d974140a72/googlemock.tar.gz https://github.com/google/googletest/archive/800f5422ac9d9e0ad59cd860a2ef3a679588acb4/googletest.tar.gz"
+MD5SUM="6f9b98a12a53cf8d0aa3b6b159aeb64f 3f5cfad2938ce8c3b8c8b9c4e49abc90 918ca93e15d4f589beb278d9b0093f1f b0b23c6e3137c995ed842b6fbae37e7b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="avahi qt5"
-MAINTAINER="Mário Antunes"
-EMAIL="mariolpantunes@gmail.com"
+REQUIRES="avahi"
+MAINTAINER="Ruben Schuller"
+EMAIL="sb@rbn.im"