mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-12-21 22:18:48 -05:00
Update + patch dino-git for bigger font
This commit is contained in:
parent
15fd43e88f
commit
4883b4b1b5
@ -2,13 +2,13 @@
|
|||||||
# Contributor: svalo <me@valo.space>
|
# Contributor: svalo <me@valo.space>
|
||||||
|
|
||||||
pkgname=dino-git
|
pkgname=dino-git
|
||||||
pkgver=r578.f9c69a2
|
pkgver=r640.3b0a27e
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Simple and modern Jabber/XMPP client written in vala"
|
pkgdesc="Simple and modern Jabber/XMPP client written in vala"
|
||||||
arch=('i686' 'x86_64' 'aarch64')
|
arch=('i686' 'x86_64' 'aarch64')
|
||||||
url="https://github.com/dino/dino"
|
url="https://github.com/dino/dino"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
depends=('glib2>=2.38' 'glib-networking' 'gtk3>=3.22' 'gpgme' 'libgee>=0.10' 'libgcrypt' 'libsoup' 'sqlite' 'qrencode')
|
depends=('glib2>=2.38' 'glib-networking' 'gtk3>=3.22' 'gpgme' 'libgee>=0.10' 'libgcrypt' 'libsoup' 'sqlite' 'qrencode' 'libsignal-protocol-c' )
|
||||||
makedepends=('git' 'cmake' 'vala>=0.34' 'ninja')
|
makedepends=('git' 'cmake' 'vala>=0.34' 'ninja')
|
||||||
optdepends=('libcanberra: audio notification support')
|
optdepends=('libcanberra: audio notification support')
|
||||||
provides=("${pkgname%-git}")
|
provides=("${pkgname%-git}")
|
||||||
@ -25,6 +25,9 @@ sha512sums=('SKIP')
|
|||||||
|
|
||||||
#_ENABLE_PLUGINS="--enable-plugin='notification-sound'"
|
#_ENABLE_PLUGINS="--enable-plugin='notification-sound'"
|
||||||
|
|
||||||
|
### Since 55b148a0f78c1abef57c21b2a84d97cad32b2290 dino uses by default the shared libsignal library.
|
||||||
|
# To restore the old behaviour add '--with-libsignal-in-tree' flag to configure
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "${srcdir}/${pkgname%-git}"
|
cd "${srcdir}/${pkgname%-git}"
|
||||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
@ -32,8 +35,9 @@ pkgver() {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}/${pkgname%-git}"
|
cd "${srcdir}/${pkgname%-git}"
|
||||||
./configure $_DISABLE_PLUGINS $_ENABLE_PLUGINS --prefix="/usr" --with-tests CC="$CC" CFLAGS="$CFLAGS" VALACFLAGS="$VALACFLAGS"
|
./configure $_DISABLE_PLUGINS $_ENABLE_PLUGINS --with-tests --prefix="/usr" CC="$CC" CFLAGS="$CFLAGS" VALACFLAGS="$VALACFLAGS"
|
||||||
sed -i '/SrvRecordsTls/d' libdino/src/service/module_manager.vala
|
sed -i '/SrvRecordsTls/d' libdino/src/service/module_manager.vala
|
||||||
|
sed -i 's/try{/try{\n GLib.Environment.set_variable("GDK_DPI_SCALE", "1.5", false);/' main/src/main.vala
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +50,4 @@ check() {
|
|||||||
cd "${srcdir}/${pkgname%-git}"
|
cd "${srcdir}/${pkgname%-git}"
|
||||||
echo "Executing xmpp-vala-test:"
|
echo "Executing xmpp-vala-test:"
|
||||||
build/xmpp-vala-test
|
build/xmpp-vala-test
|
||||||
echo
|
|
||||||
echo "Executing signal-protocol-vala-test:"
|
|
||||||
build/signal-protocol-vala-test
|
|
||||||
}
|
}
|
||||||
|
59
src/libsignal-protocol-c/PKGBUILD
Normal file
59
src/libsignal-protocol-c/PKGBUILD
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Maintainer: Moritz Lipp <mlq@pwmt.org>
|
||||||
|
|
||||||
|
pkgname=libsignal-protocol-c
|
||||||
|
pkgver=2.3.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Signal Protocol C Library"
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url="https://github.com/WhisperSystems/libsignal-protocol-c"
|
||||||
|
license=('GPL3')
|
||||||
|
makedepends=('cmake')
|
||||||
|
checkdepends=('check' 'openssl>=1.0')
|
||||||
|
source=(https://github.com/WhisperSystems/$pkgname/archive/v$pkgver.tar.gz)
|
||||||
|
md5sums=('ad742a03263c29a468d00c3dcc0269cf')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
mkdir -p build && cd build
|
||||||
|
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_TESTING=0 \
|
||||||
|
..
|
||||||
|
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver"
|
||||||
|
mkdir -p build && cd build
|
||||||
|
|
||||||
|
# Build with tests
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_TESTING=1 \
|
||||||
|
..
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
# Build tests
|
||||||
|
cd tests
|
||||||
|
make
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
ctest
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$pkgname-$pkgver/build"
|
||||||
|
make DESTDIR="$pkgdir/" install
|
||||||
|
}
|
210
src/libsignal-protocol-c/openssl1.1.patch
Normal file
210
src/libsignal-protocol-c/openssl1.1.patch
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
From 0dbc7bdbe1ad3b42fed52d2a326db6fa40204a06 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Derek Konigsberg <dkonigsberg@whatsapp.com>
|
||||||
|
Date: Thu, 4 May 2017 09:22:35 -0700
|
||||||
|
Subject: [PATCH] Added support for building against OpenSSL 1.1
|
||||||
|
|
||||||
|
OpenSSL 1.1 introduced some minor API changes in how certain context
|
||||||
|
objects could be created. This update uses preprocessor macros to adapt
|
||||||
|
to those changes, while preserving backwards compatibility.
|
||||||
|
|
||||||
|
Referencing #66
|
||||||
|
---
|
||||||
|
tests/test_common_openssl.c | 79 +++++++++++++++++++++++++++++++++++++--------
|
||||||
|
1 file changed, 65 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_common_openssl.c b/tests/test_common_openssl.c
|
||||||
|
index da3fb87..90d4b0c 100644
|
||||||
|
--- a/tests/test_common_openssl.c
|
||||||
|
+++ b/tests/test_common_openssl.c
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
#include "test_common.h"
|
||||||
|
|
||||||
|
+#include <openssl/opensslv.h>
|
||||||
|
#include <openssl/evp.h>
|
||||||
|
#include <openssl/hmac.h>
|
||||||
|
#include <openssl/rand.h>
|
||||||
|
@@ -17,11 +18,19 @@ int test_random_generator(uint8_t *data, size_t len, void *user_data)
|
||||||
|
|
||||||
|
int test_hmac_sha256_init(void **hmac_context, const uint8_t *key, size_t key_len, void *user_data)
|
||||||
|
{
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ HMAC_CTX *ctx = HMAC_CTX_new();
|
||||||
|
+ if(!ctx) {
|
||||||
|
+ return SG_ERR_NOMEM;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
HMAC_CTX *ctx = malloc(sizeof(HMAC_CTX));
|
||||||
|
if(!ctx) {
|
||||||
|
return SG_ERR_NOMEM;
|
||||||
|
}
|
||||||
|
HMAC_CTX_init(ctx);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
*hmac_context = ctx;
|
||||||
|
|
||||||
|
if(HMAC_Init_ex(ctx, key, key_len, EVP_sha256(), 0) != 1) {
|
||||||
|
@@ -65,8 +74,12 @@ void test_hmac_sha256_cleanup(void *hmac_context, void *user_data)
|
||||||
|
{
|
||||||
|
if(hmac_context) {
|
||||||
|
HMAC_CTX *ctx = hmac_context;
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ HMAC_CTX_free(ctx);
|
||||||
|
+#else
|
||||||
|
HMAC_CTX_cleanup(ctx);
|
||||||
|
free(ctx);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -188,6 +201,7 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
void *user_data)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
+ EVP_CIPHER_CTX *ctx = 0;
|
||||||
|
uint8_t *out_buf = 0;
|
||||||
|
|
||||||
|
const EVP_CIPHER *evp_cipher = aes_cipher(cipher, key_len);
|
||||||
|
@@ -206,10 +220,22 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
return SG_ERR_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
- EVP_CIPHER_CTX ctx;
|
||||||
|
- EVP_CIPHER_CTX_init(&ctx);
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if(!ctx) {
|
||||||
|
+ result = SG_ERR_NOMEM;
|
||||||
|
+ goto complete;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
+ ctx = malloc(sizeof(EVP_CIPHER_CTX));
|
||||||
|
+ if(!ctx) {
|
||||||
|
+ result = SG_ERR_NOMEM;
|
||||||
|
+ goto complete;
|
||||||
|
+ }
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
- result = EVP_EncryptInit_ex(&ctx, evp_cipher, 0, key, iv);
|
||||||
|
+ result = EVP_EncryptInit_ex(ctx, evp_cipher, 0, key, iv);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot initialize cipher\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -217,7 +243,7 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cipher == SG_CIPHER_AES_CTR_NOPADDING) {
|
||||||
|
- result = EVP_CIPHER_CTX_set_padding(&ctx, 0);
|
||||||
|
+ result = EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot set padding\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -233,7 +259,7 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
int out_len = 0;
|
||||||
|
- result = EVP_EncryptUpdate(&ctx,
|
||||||
|
+ result = EVP_EncryptUpdate(ctx,
|
||||||
|
out_buf, &out_len, plaintext, plaintext_len);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot encrypt plaintext\n");
|
||||||
|
@@ -242,7 +268,7 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
int final_len = 0;
|
||||||
|
- result = EVP_EncryptFinal_ex(&ctx, out_buf + out_len, &final_len);
|
||||||
|
+ result = EVP_EncryptFinal_ex(ctx, out_buf + out_len, &final_len);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot finish encrypting plaintext\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -252,7 +278,13 @@ int test_encrypt(signal_buffer **output,
|
||||||
|
*output = signal_buffer_create(out_buf, out_len + final_len);
|
||||||
|
|
||||||
|
complete:
|
||||||
|
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
|
+ if(ctx) {
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ EVP_CIPHER_CTX_free(ctx);
|
||||||
|
+#else
|
||||||
|
+ free(ctx);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
if(out_buf) {
|
||||||
|
free(out_buf);
|
||||||
|
}
|
||||||
|
@@ -267,6 +299,7 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
void *user_data)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
+ EVP_CIPHER_CTX *ctx = 0;
|
||||||
|
uint8_t *out_buf = 0;
|
||||||
|
|
||||||
|
const EVP_CIPHER *evp_cipher = aes_cipher(cipher, key_len);
|
||||||
|
@@ -285,10 +318,22 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
return SG_ERR_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
- EVP_CIPHER_CTX ctx;
|
||||||
|
- EVP_CIPHER_CTX_init(&ctx);
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if(!ctx) {
|
||||||
|
+ result = SG_ERR_NOMEM;
|
||||||
|
+ goto complete;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
+ ctx = malloc(sizeof(EVP_CIPHER_CTX));
|
||||||
|
+ if(!ctx) {
|
||||||
|
+ result = SG_ERR_NOMEM;
|
||||||
|
+ goto complete;
|
||||||
|
+ }
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
- result = EVP_DecryptInit_ex(&ctx, evp_cipher, 0, key, iv);
|
||||||
|
+ result = EVP_DecryptInit_ex(ctx, evp_cipher, 0, key, iv);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot initialize cipher\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -296,7 +341,7 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cipher == SG_CIPHER_AES_CTR_NOPADDING) {
|
||||||
|
- result = EVP_CIPHER_CTX_set_padding(&ctx, 0);
|
||||||
|
+ result = EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot set padding\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -312,7 +357,7 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
int out_len = 0;
|
||||||
|
- result = EVP_DecryptUpdate(&ctx,
|
||||||
|
+ result = EVP_DecryptUpdate(ctx,
|
||||||
|
out_buf, &out_len, ciphertext, ciphertext_len);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot decrypt ciphertext\n");
|
||||||
|
@@ -321,7 +366,7 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
}
|
||||||
|
|
||||||
|
int final_len = 0;
|
||||||
|
- result = EVP_DecryptFinal_ex(&ctx, out_buf + out_len, &final_len);
|
||||||
|
+ result = EVP_DecryptFinal_ex(ctx, out_buf + out_len, &final_len);
|
||||||
|
if(!result) {
|
||||||
|
fprintf(stderr, "cannot finish decrypting ciphertext\n");
|
||||||
|
result = SG_ERR_UNKNOWN;
|
||||||
|
@@ -331,7 +376,13 @@ int test_decrypt(signal_buffer **output,
|
||||||
|
*output = signal_buffer_create(out_buf, out_len + final_len);
|
||||||
|
|
||||||
|
complete:
|
||||||
|
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
|
+ if(ctx) {
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
|
||||||
|
+ EVP_CIPHER_CTX_free(ctx);
|
||||||
|
+#else
|
||||||
|
+ free(ctx);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
if(out_buf) {
|
||||||
|
free(out_buf);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user