diff --git a/packages/gnunet/build.sh b/packages/gnunet/build.sh new file mode 100644 index 000000000..f928ba334 --- /dev/null +++ b/packages/gnunet/build.sh @@ -0,0 +1,32 @@ +TERMUX_PKG_HOMEPAGE=http://gnunet.org +TERMUX_PKG_DESCRIPTION="A framework for secure peer-to-peer networking" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_VERSION=0.12.1 +TERMUX_PKG_DEPENDS="gnurl, libgcrypt, libgmp, libidn, libjansson, libltdl, libmicrohttpd, libsqlite, libunistring" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_have_decl_struct_in6_ifreq=yes" + +termux_step_extract_package() { + local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION + if [ ! -d $CHECKED_OUT_FOLDER ]; then + local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout + rm -Rf $TMP_CHECKOUT + mkdir -p $TMP_CHECKOUT + + git clone --depth 1 \ + --branch v$TERMUX_PKG_VERSION \ + https://gnunet.org/git/gnunet.git \ + $TMP_CHECKOUT + cd $TMP_CHECKOUT + git submodule update --init # --depth 1 + mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER + fi + + mkdir $TERMUX_PKG_SRCDIR + cd $TERMUX_PKG_SRCDIR + cp -Rf $CHECKED_OUT_FOLDER/* . +} + +termux_step_pre_configure() { + ./bootstrap +} diff --git a/packages/gnunet/no-in6_ifreq-redef.patch b/packages/gnunet/no-in6_ifreq-redef.patch new file mode 100644 index 000000000..033152b27 --- /dev/null +++ b/packages/gnunet/no-in6_ifreq-redef.patch @@ -0,0 +1,26 @@ +diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c +index d460326..03beecc 100644 +--- a/src/exit/gnunet-helper-exit.c ++++ b/src/exit/gnunet-helper-exit.c +@@ -85,7 +85,7 @@ static const char *sbin_sysctl; + static const char *sbin_iptables; + + +-#if ! defined(_LINUX_IN6_H) && defined(__linux__) ++#if ! defined(_LINUX_IN6_H) && !defined(__ANDROID__) + /** + * This is in linux/include/net/ipv6.h, but not always exported. + */ +diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c +index 4e35fa2..34eb018 100644 +--- a/src/vpn/gnunet-helper-vpn.c ++++ b/src/vpn/gnunet-helper-vpn.c +@@ -59,7 +59,7 @@ + */ + #define MAX_SIZE 65536 + +-#ifndef _LINUX_IN6_H ++#if !defined(_LINUX_IN6_H) && !defined(__ANDROID__) + /** + * This is in linux/include/net/ipv6.h, but not always exported... + */ diff --git a/packages/gnunet/no-librt.patch b/packages/gnunet/no-librt.patch new file mode 100644 index 000000000..463704d02 --- /dev/null +++ b/packages/gnunet/no-librt.patch @@ -0,0 +1,13 @@ +diff --git a/src/cadet/Makefile.am b/src/cadet/Makefile.am +index d8d81bf..cfc182b 100644 +--- a/src/cadet/Makefile.am ++++ b/src/cadet/Makefile.am +@@ -72,7 +72,7 @@ gnunet_service_cadet_LDADD = \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/block/libgnunetblock.la + if LINUX +- gnunet_service_cadet_LDFLAGS = -lrt \ ++ gnunet_service_cadet_LDFLAGS = \ + $(GN_LIBINTL) + endif + diff --git a/packages/gnurl/build.sh b/packages/gnurl/build.sh new file mode 100644 index 000000000..95650a716 --- /dev/null +++ b/packages/gnurl/build.sh @@ -0,0 +1,39 @@ +TERMUX_PKG_HOMEPAGE=https://gnunet.org/gnurl +TERMUX_PKG_DESCRIPTION="Fork of libcurl, which is mostly for GNUnet" +TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_VERSION=7.67.0 +TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/gnunet/gnurl-$TERMUX_PKG_VERSION.tar.Z +TERMUX_PKG_SHA256=e0982d3226895a2d46a01e92ced1f32ab12e92540ba7ef2edbf28b7cadf8526b +TERMUX_PKG_DEPENDS="libgnutls, libnghttp2" + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +--disable-dict \ +--disable-file \ +--disable-ftp \ +--disable-gopher \ +--disable-imap \ +--disable-ldap \ +--disable-ldaps \ +--disable-ntlm-wb \ +--disable-pop3 \ +--disable-rtsp \ +--disable-smb \ +--disable-smtp \ +--disable-telnet \ +--disable-tftp \ +--enable-ipv6 \ +--enable-manual \ +--enable-versioned-symbols \ +--enable-threaded-resolver \ +--without-gssapi \ +--with-gnutls \ +--without-libidn \ +--without-libpsl \ +--without-librtmp \ +--without-ssl \ +--disable-ftp \ +--disable-file \ +--with-random=/dev/urandom \ +--with-ca-bundle=$TERMUX_PREFIX/etc/tls/cert.pem +--with-ca-path=$TERMUX_PREFIX/etc/tls/certs +"