New package: re-0.5.8

This commit is contained in:
John 2018-05-06 15:29:33 +02:00 committed by Jürgen Buchmüller
parent 9c784cce53
commit a0a93feb7a
6 changed files with 135 additions and 0 deletions

View File

@ -3380,3 +3380,4 @@ libhtmlcxx.so.3 htmlcxx-0.86_1
libcss_parser_pp.so.0 htmlcxx-0.86_1 libcss_parser_pp.so.0 htmlcxx-0.86_1
libcss_parser.so.0 htmlcxx-0.86_1 libcss_parser.so.0 htmlcxx-0.86_1
libaom.so.0 libaom-1.0.0_1 libaom.so.0 libaom-1.0.0_1
libre.so re-0.5.8_1

1
srcpkgs/re-devel Symbolic link
View File

@ -0,0 +1 @@
re

View File

@ -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 <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
--- 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 <unistd.h>
#include <sys/socket.h>
#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 <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>

View File

@ -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

View File

@ -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;
}

47
srcpkgs/re/template Normal file
View File

@ -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 <johnz@posteo.net>"
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
}
}