initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

79
wvstreams/PKGBUILD Normal file
View File

@@ -0,0 +1,79 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=wvstreams
pkgver=4.6.1
_debver=$pkgver
_debrel=15
pkgrel=14
pkgdesc="A network programming library written in C++"
arch=('i686' 'x86_64')
license=('LGPL-2')
depends=('zlib' 'xplc' 'libressl' 'readline')
makedepends=('quilt')
source=("${pkgname}-${pkgver}.tar.gz::https://deb.debian.org/debian/pool/main/w/wvstreams/wvstreams_${pkgver}.orig.tar.gz"
"https://deb.debian.org/debian/pool/main/w/wvstreams/wvstreams_${_debver}-${_debrel}.debian.tar.xz"
"wvstreams-4.6.1-glibc212.patch"
"wvstreams-4.6.1-gcc47.patch"
"openssl-buildfix.patch"
"gcc-6.patch"
"libressl.patch")
sha512sums=('59d64e527d86394b768b35254bf95ea59c412c0e092393ea3c84ec3202949150439bb6093bd7350b64ad4767acdb8feb38806c03de4e5cf238ed893f41db4a4a'
'f10196953ead78f6c58d8930ef4ad6565a8b0900d5ecb90defb6b76cd0c114f78651ef01bbb9ca5215c231f427ed5b5e883ae1ac8da6ed128ad3424d31ce5ced'
'4ed90339730f36d3ad932b17561c5222ba63c4158b21050f52e80da8a150c8f16e15bd0826ed41d1e39a0ba88096eb19d7c93af403f8db9369ce56cd62b2db93'
'306a20b2b822d79ccf26498863a9d5e45b2f2a35e0cf6dacbc73d80dcfc8cec2d7ed9a80417a74ac32f82daa03ef905ef70f9e70971468c2223a28dd355c35fc'
'a04ecb47e243ad6d0249bc053463fabd4c07ec68e55ec0f57cfca1418bb36eb989bc5eb91016a7433c3cb5f73561c430b7c0227c72c8673fbd59bbb28f5721d3'
'9d72bcbfcdeedf96a183689540f9f7be4a098b819e0b2a41e8412543d4b827e02a2fc9eb45116f66789949985488a802b0e81733843fa7c297e2874d5d007f3a'
'9acba01c1c9b4653686fabecac4334ff6995f0c6b6aedff140d4b70eb56b8204ee3007dadabe66ce73609c40592d607d9fa4bb0fc886ef919fdc67bc47dd814c')
options=('!makeflags')
prepare() {
cd ${pkgname}-${pkgver}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
# Doesn't apply and seems unimportant
rm -v debian/patches/01_kfreebsd_ftbfs.diff || true
rm -v debian/patches/wvstreams_openssl1.1.patch || true
quilt push -av
else
patch -p0 -i "$srcdir/wvstreams-4.6.1-glibc212.patch"
patch -p0 -i "$srcdir/wvstreams-4.6.1-gcc47.patch"
patch -p1 -i "$srcdir/openssl-buildfix.patch"
patch -p1 -i "$srcdir/gcc-6.patch"
fi
patch -p1 -i "$srcdir/libressl.patch"
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-openssl \
--without-dbus \
--without-pam \
--without-tcl \
--without-qt
make COPTS="$CFLAGS -fPIC" CXXOPTS="$CXXFLAGS -fPIC -fpermissive -fno-tree-dce -fno-optimize-sibling-calls" VERBOSE=1
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# --without-dbus still installs the pkg-config file
rm "${pkgdir}/usr/lib/pkgconfig/libwvdbus.pc"
# --without-qt still installs the pkg-config file
rm "${pkgdir}/usr/lib/pkgconfig/libwvqt.pc"
}

42
wvstreams/gcc-6.patch Normal file
View File

@@ -0,0 +1,42 @@
Description: Fix compilation with gcc-6
Author: Gert Wollny <gw.fossdev@gmail.com>
Last-Updated: 2016-07-26
Forwarded: No
Bug-Debian: https://bugs.debian.org/811659
Bug-Debian: https://bugs.debian.org/831146
--- a/streams/wvstream.cc
+++ b/streams/wvstream.cc
@@ -907,9 +907,9 @@
if (forceable)
{
- si.wants.readable = readcb;
- si.wants.writable = writecb;
- si.wants.isexception = exceptcb;
+ si.wants.readable = static_cast<bool>(readcb);
+ si.wants.writable = static_cast<bool>(writecb);
+ si.wants.isexception = static_cast<bool>(exceptcb);
}
else
{
@@ -1019,7 +1019,8 @@
IWvStream::SelectRequest WvStream::get_select_request()
{
- return IWvStream::SelectRequest(readcb, writecb, exceptcb);
+ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb),
+ static_cast<bool>(exceptcb));
}
@@ -1107,7 +1108,8 @@
// inefficient, because if the alarm was expired then pre_select()
// returned true anyway and short-circuited the previous select().
TRACE("hello-%p\n", this);
- return !alarm_was_ticking || select(0, readcb, writecb, exceptcb);
+ return !alarm_was_ticking || select(0, static_cast<bool>(readcb),
+ static_cast<bool>(writecb), static_cast<bool>(exceptcb));
}

46
wvstreams/libressl.patch Normal file
View File

@@ -0,0 +1,46 @@
diff --git a/include/wvtripledes.h b/include/wvtripledes.h
index 185fe8a..a442e7a 100644
--- a/include/wvtripledes.h
+++ b/include/wvtripledes.h
@@ -70,11 +70,11 @@ protected:
private:
Mode mode;
- des_cblock key;
- des_key_schedule deskey1;
- des_key_schedule deskey2;
- des_key_schedule deskey3;
- des_cblock ivec; // initialization vector
+ DES_cblock key;
+ DES_key_schedule deskey1;
+ DES_key_schedule deskey2;
+ DES_key_schedule deskey3;
+ DES_cblock ivec; // initialization vector
int ivecoff; // current offset into initvec
};
--- a/crypto/wvx509.cc 2022-01-28 12:55:29.000000000 +0100
+++ b/crypto/wvx509.cc 2022-01-28 13:01:17.276681510 +0100
@@ -1446,19 +1446,19 @@
{
CHECK_CERT_EXISTS_SET("ski");
- ASN1_OCTET_STRING *oct = M_ASN1_OCTET_STRING_new();
+ ASN1_OCTET_STRING *oct = ASN1_OCTET_STRING_new();
ASN1_BIT_STRING *pk = cert->cert_info->key->public_key;
unsigned char pkey_dig[EVP_MAX_MD_SIZE];
unsigned int diglen;
EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL);
- M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
+ ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
X509_EXTENSION *ext = X509V3_EXT_i2d(NID_subject_key_identifier, 0,
oct);
X509_add_ext(cert, ext, -1);
X509_EXTENSION_free(ext);
- M_ASN1_OCTET_STRING_free(oct);
+ ASN1_OCTET_STRING_free(oct);
}

View File

@@ -0,0 +1,14 @@
--- wvstreams-4.6.1/crypto/wvx509.cc 2008-10-23 22:23:49.000000000 +0200
+++ wvstreams-4.6.1-1/crypto/wvx509.cc 2010-01-27 11:09:06.000000000 +0100
@@ -1157,7 +1157,11 @@
if (ext)
{
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
+#else
X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
+#endif
if (!method)
{
WvDynBuf buf;

View File

@@ -0,0 +1,50 @@
http://bugs.gentoo.org/419563
http://bugs.gentoo.org/419971
See -gcc47-patch and -magic.patch in Fedora git:
http://pkgs.fedoraproject.org/gitweb/?p=libwvstreams.git;a=tree
--- include/wvtask.h
+++ include/wvtask.h
@@ -45,7 +45,8 @@
typedef void TaskFunc(void *userdata);
static int taskcount, numtasks, numrunning;
- int magic_number, *stack_magic;
+ int volatile magic_number;
+ int *stack_magic;
WvString name;
int tid;
@@ -84,7 +85,7 @@
static WvTaskMan *singleton;
static int links;
- static int magic_number;
+ static int volatile magic_number;
static WvTaskList all_tasks, free_tasks;
static void get_stack(WvTask &task, size_t size);
--- include/wvuid.h
+++ include/wvuid.h
@@ -7,6 +7,7 @@
#ifndef __WVUID_H
#define __WVUID_H
+#include <unistd.h>
#include "wvstring.h"
#if WIN32
--- utils/wvtask.cc
+++ utils/wvtask.cc
@@ -58,7 +58,8 @@
int WvTask::taskcount, WvTask::numtasks, WvTask::numrunning;
WvTaskMan *WvTaskMan::singleton;
-int WvTaskMan::links, WvTaskMan::magic_number;
+int WvTaskMan::links;
+int volatile WvTaskMan::magic_number;
WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks;
ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return,
WvTaskMan::toplevel;

View File

@@ -0,0 +1,24 @@
http://bugs.gentoo.org/333301
https://bugs.archlinux.org/task/27188
--- ipstreams/wvunixdgsocket.cc
+++ ipstreams/wvunixdgsocket.cc
@@ -1,5 +1,5 @@
#include "wvunixdgsocket.h"
-#ifdef MACOS
+#if defined(MACOS) || defined(__GNUC__)
#include <sys/types.h>
#include <sys/stat.h>
#endif
--- streams/wvatomicfile.cc
+++ streams/wvatomicfile.cc
@@ -11,7 +11,8 @@
#include "wvfileutils.h"
#include "wvstrutils.h"
-#ifdef MACOS
+#if defined(MACOS) || defined(__GNUC__)
+#include <sys/types.h>
#include <sys/stat.h>
#endif