Gwenhywfar: new recipe (#11294)

Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>
Co-authored-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Javier Steinaker
2024-11-19 05:30:55 -03:00
committed by GitHub
parent a1f91f3685
commit c89689ce74
2 changed files with 184 additions and 0 deletions

View File

@@ -0,0 +1,136 @@
SUMMARY="Multi-platform helper library for security applications and libraries"
DESCRIPTION="OS abstraction functions for various projects"
HOMEPAGE="http://www.aqbanking.de"
COPYRIGHT="Martin Preuss"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://github.com/aqbanking/gwenhywfar/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="2b0b9dd49b95f025f4e0c0346ba88e20b893407c444fccf6403a4da349954f04"
PATCHES="gwenhywfar-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="79.10.2"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
gwenhywfar$secondaryArchSuffix = $portVersion
lib:libgwengui_cpp$secondaryArchSuffix = $libVersionCompat
lib:libgwengui_gtk3$secondaryArchSuffix = $libVersionCompat
lib:libgwenhywfar$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libatk_1.0$secondaryArchSuffix
lib:libcairo$secondaryArchSuffix
lib:libcairo_gobject$secondaryArchSuffix
lib:libgcrypt$secondaryArchSuffix
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
lib:libgpg_error$secondaryArchSuffix
lib:libgtk_3$secondaryArchSuffix
lib:libharfbuzz$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libpango_1.0$secondaryArchSuffix
lib:libpangocairo_1.0$secondaryArchSuffix
"
PROVIDES_devel="
gwenhywfar${secondaryArchSuffix}_devel = $portVersion
cmd:gwenhywfar_config$commandSuffix
devel:libgwengui_cpp$secondaryArchSuffix = $libVersionCompat
devel:libgwengui_gtk3$secondaryArchSuffix = $libVersionCompat
devel:libgwenhywfar$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
gwenhywfar$secondaryArchSuffix == $portVersion base
devel:libgcrypt$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
devel:libgtk_3$secondaryArchSuffix
"
SUMMARY_tools="Command line utilities for gwenhywfar"
PROVIDES_tools="
gwenhywfar${secondaryArchSuffix}_tools = $portVersion
cmd:gct_tool$commandSuffix
cmd:gsa$commandSuffix
cmd:gwbuild$commandSuffix
cmd:mklistdoc$commandSuffix
cmd:typemaker$commandSuffix
cmd:typemaker2$commandSuffix
cmd:xmlmerge$commandSuffix
"
REQUIRES_tools="
haiku$secondaryArchSuffix
gwenhywfar$secondaryArchSuffix == $portVersion base
lib:libgcrypt$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
lib:libgpg_error$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgcrypt$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
devel:libgtk_3$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:gettext$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
autoreconf -if
runConfigure --omit-dirs "binDir" ./configure \
--bindir=$commandBinDir \
--with-guis=gtk3 \
LDFLAGS="-lnetwork"
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/lib*.la
prepareInstalledDevelLibs \
libgwengui-cpp \
libgwengui-gtk3 \
libgwenhywfar
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$commandBinDir/gwenhywfar-config \
$dataDir/aclocal \
$libDir/cmake
# tools package
packageEntries tools \
$commandBinDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,48 @@
From 83e8464a86e7653b8c21ed3470a24a7a27c0aed2 Mon Sep 17 00:00:00 2001
From: Javier Steinaker <jsteinaker@gmail.com>
Date: Thu, 7 Nov 2024 12:07:29 -0300
Subject: Test http, https and TLS against a working domain
diff --git a/checks/syncio_http.c b/checks/syncio_http.c
index 3ad79e1..3b88c2f 100644
--- a/checks/syncio_http.c
+++ b/checks/syncio_http.c
@@ -33,7 +33,7 @@ static int check_syncio_http1()
"ERROR in check_syncio_http1: Could not create socket io layer.\n");
return 2;
}
- GWEN_SyncIo_Socket_SetAddress(sio, "devel.aqbanking.de");
+ GWEN_SyncIo_Socket_SetAddress(sio, "google.com");
GWEN_SyncIo_Socket_SetPort(sio, 80);
baseLayer=sio;
diff --git a/checks/syncio_https.c b/checks/syncio_https.c
index 827264b..bb1339d 100644
--- a/checks/syncio_https.c
+++ b/checks/syncio_https.c
@@ -34,7 +34,7 @@ static int check_syncio_https1()
"ERROR in check_syncio_http1: Could not create socket io layer.\n");
return 2;
}
- GWEN_SyncIo_Socket_SetAddress(sio, "devel.aqbanking.de");
+ GWEN_SyncIo_Socket_SetAddress(sio, "google.com");
GWEN_SyncIo_Socket_SetPort(sio, 443);
baseLayer=sio;
diff --git a/checks/syncio_tls.c b/checks/syncio_tls.c
index 6ee1dab..cfe4e4f 100644
--- a/checks/syncio_tls.c
+++ b/checks/syncio_tls.c
@@ -40,7 +40,7 @@ static int check_syncio_tls1()
"ERROR in check_io_tls1: Could not create socket io layer.\n");
return 2;
}
- GWEN_SyncIo_Socket_SetAddress(sio, "sourceforge.net");
+ GWEN_SyncIo_Socket_SetAddress(sio, "google.com");
GWEN_SyncIo_Socket_SetPort(sio, 443);
baseLayer=sio;
--
2.45.2