diff --git a/common/shlibs b/common/shlibs index c7a1c68adc..750865910c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3380,3 +3380,4 @@ libhtmlcxx.so.3 htmlcxx-0.86_1 libcss_parser_pp.so.0 htmlcxx-0.86_1 libcss_parser.so.0 htmlcxx-0.86_1 libaom.so.0 libaom-1.0.0_1 +libre.so re-0.5.8_1 diff --git a/srcpkgs/re-devel b/srcpkgs/re-devel new file mode 120000 index 0000000000..977f19446d --- /dev/null +++ b/srcpkgs/re-devel @@ -0,0 +1 @@ +re \ No newline at end of file diff --git a/srcpkgs/re/patches/bsdnet.diff b/srcpkgs/re/patches/bsdnet.diff new file mode 100644 index 0000000000..2fcef23474 --- /dev/null +++ b/srcpkgs/re/patches/bsdnet.diff @@ -0,0 +1,30 @@ +--- src/net/posix/pif.c.orig 2016-12-03 15:21:22.000000000 +0100 ++++ src/net/posix/pif.c 2016-12-03 15:21:39.000000000 +0100 +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2010 Creytiv.com + */ ++#define _GNU_SOURCE + #include + #include + #include +--- src/net/ifaddrs.c.orig 2016-12-03 15:24:22.000000000 +0100 ++++ src/net/ifaddrs.c 2016-12-03 15:24:39.000000000 +0100 +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2010 Creytiv.com + */ ++#define _GNU_SOURCE + #include + #include + #define __USE_MISC 1 /**< Use MISC code */ +--- src/tcp/tcp.c.orig 2016-12-03 15:30:06.000000000 +0100 ++++ src/tcp/tcp.c 2016-12-03 15:29:46.000000000 +0100 +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2010 Creytiv.com + */ ++#define _GNU_SOURCE + #include + #ifdef HAVE_UNISTD_H + #include diff --git a/srcpkgs/re/patches/musl.patch b/srcpkgs/re/patches/musl.patch new file mode 100644 index 0000000000..eb5156b809 --- /dev/null +++ b/srcpkgs/re/patches/musl.patch @@ -0,0 +1,28 @@ +--- re_types.h 2018-01-14 21:33:25.561341291 +0100 ++++ include/re_types.h 2018-01-14 21:34:45.444384148 +0100 +@@ -37,20 +37,25 @@ + typedef signed long long int int64_t; + + #ifndef __uint32_t_defined ++#ifdef __GLIBC__ + #define __uint32_t_defined + typedef unsigned char uint8_t; + typedef unsigned short int uint16_t; + typedef unsigned int uint32_t; + typedef unsigned long long int uint64_t; + #endif ++#endif + + #endif /* __BIT_TYPES_DEFINED__ */ + + #endif /* __int8_t_defined */ + #ifndef __ssize_t_defined ++#ifndef __DEFINED_ssize_t + typedef long ssize_t; ++#define __DEFINED_ssize_t + #define __ssize_t_defined + #endif ++#endif + + + #ifndef WIN32 diff --git a/srcpkgs/re/patches/resolver.diff b/srcpkgs/re/patches/resolver.diff new file mode 100644 index 0000000000..1365b70ff5 --- /dev/null +++ b/srcpkgs/re/patches/resolver.diff @@ -0,0 +1,28 @@ +--- src/dns/res.c.orig 2016-12-03 15:17:53.000000000 +0100 ++++ src/dns/res.c 2016-12-03 15:18:30.000000000 +0100 +@@ -25,13 +25,9 @@ int get_resolv_dns(char *domain, size_t + uint32_t i; + int ret, err; + +-#ifdef OPENBSD + ret = res_init(); + state = _res; +-#else +- memset(&state, 0, sizeof(state)); +- ret = res_ninit(&state); +-#endif ++ + if (0 != ret) + return ENOENT; + +@@ -56,10 +52,5 @@ int get_resolv_dns(char *domain, size_t + *n = i; + + out: +-#ifdef OPENBSD +-#else +- res_nclose(&state); +-#endif +- + return err; + } diff --git a/srcpkgs/re/template b/srcpkgs/re/template new file mode 100644 index 0000000000..31c79735f6 --- /dev/null +++ b/srcpkgs/re/template @@ -0,0 +1,47 @@ +# Template file for 're' +pkgname="re" +version="0.5.8" +revision=1 +build_style=gnu-makefile +make_build_args="RELEASE=1 EXTRA_CFLAGS=$CFLAGS + EXTRA_LFLAGS=$LDFLAGS USE_OPENSSL=yes USE_DTLS=yes USE_DTLS_SRTP=yes" +make_install_args="$make_build_args" +makedepends="libressl-devel" +short_desc="Portable library for real-time communications" +maintainer="JohnZ " +license="BSD-3-Clause" +homepage="http://www.creytiv.com/" +distfiles="http://www.creytiv.com/pub/re-${version}.tar.gz" +checksum=190fd652da167d8d6351b7a26fa0aef2ddab75fe5e8d5de77edf023988440e70 +make_use_env=1 +shlib_provides="libre.so" + +case $XBPS_TARGET_MACHINE in + i686*) arch="i686";; + x86_64*) arch="x86_64";; + armv6*) arch="arm6";; + aarch64*) arch="arm64";; + arm*) arch="arm";; + mips*) arch="mips";; +esac +make_build_args+=" ARCH=$arch" +make_install_args+=" ARCH=$arch" + +pre_build() { + make ${make_build_args} info +} + +post_install() { + vlicense docs/COPYING +} + +re-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/pkgconfig + vmove usr/share/re/re.mk + } +}