New recipe - libasr

Freddy DISSAUX freddy.dsx at free.fr
Fri May 8 11:52:52 CEST 2015


Hello,

libasr is a free, simple and portable asynchronous resolver library.

It use some code from  https://java.net/projects/solaris/sources (CDDL).

Hope all rules/licences are respected.


Regards,
-------------- next part --------------
Index: libasr/Makefile
===================================================================
--- libasr/Makefile	(revision 0)
+++ libasr/Makefile	(working copy)
@@ -0,0 +1,2 @@
+%:
+	$(MAKE) -C trunk $*
Index: libasr/trunk/Makefile
===================================================================
--- libasr/trunk/Makefile	(revision 0)
+++ libasr/trunk/Makefile	(working copy)
@@ -0,0 +1,59 @@
+# $Id$
+# TODO (release-critical prefixed with !, non release-critical with *)
+#
+NAME = libasr
+VERSION = 201505061057
+GARTYPE = v2
+
+DESCRIPTION = libasr is a free, simple and portable asynchronous resolver library.
+define BLURB
+ libasr is a free, simple and portable asynchronous resolver library.
+ 
+ It allows to run dns queries and perform hostname resolutions in a fully asynchronous fashion. The implementation is thread-less, fork-less, and does not make use of signals or other "tricks" that might get in the developer's way. The API was initially developped for the OpenBSD operating system, where it is natively supported.
+ 
+ This library is intended to bring this interface to other systems. It is originally provided as a support library for the portable version of the OpenSMTPD daemon, but it can be used in any other contexts. It is known to work on the following systems:
+ 
+     * Linux
+     * FreeBSD
+     * NetBSD
+     * DragonFly
+     * MacOSX
+ 
+ The primary source of information about libasr is the github repository.
+endef
+
+MASTER_SITES = http://www.opensmtpd.org/archives/
+DISTFILES  = $(DISTNAME).tar.gz
+
+ifneq ($(GAROSREL),11)
+PATCHFILES += 0001-add-openbsd-compat-getifaddrs.c.patch
+endif
+PATCHFILES += 0002-fix-possible-MAX-redefinition.patch
+
+GARCOMPILER = GNU
+
+PACKAGES += CSWlibasr
+CATALOGNAME_CSWlibasr = libasr
+PKGFILES_CSWlibasr += $(call baseisadirs,$(libdir),libasr\.so(\.\d+)*)
+SPKG_DESC_CSWlibasr += $(DESCRIPTION), libasr.so
+
+PACKAGES += CSWlibasr-dev
+CATALOGNAME_CSWlibasr-dev = libasr_dev
+SPKG_DESC_CSWlibasr-dev += $(DESCRIPTION), development files
+RUNTIME_DEP_PKGS_CSWlibasr-dev += CSWlibasr
+
+CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += --with-mantype=man
+
+include gar/category.mk
+
+ifneq ($(GAROSREL),11)
+# ifaddrs.h    taken from https://java.net/projects/solaris/sources/on-src/content/usr/src/head/ifaddrs.h?raw=true
+# getifaddrs.c taken from https://java.net/projects/solaris/sources/on-src/content/usr/src/lib/libsocket/inet/getifaddrs.c?raw=true
+# libsocket_priv.h is a gruik hack
+pre-build-modulated:
+	cp $(FILEDIR)/openbsd-compat/ifaddrs.h $(WORKSRC)/openbsd-compat/
+	cp $(FILEDIR)/openbsd-compat/getifaddrs.c $(WORKSRC)/openbsd-compat/
+	cp $(FILEDIR)/openbsd-compat/libsocket_priv.h $(WORKSRC)/openbsd-compat/
+	@$(MAKECOOKIE)
+endif

Property changes on: libasr/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: libasr/trunk/checksums
===================================================================
--- libasr/trunk/checksums	(revision 0)
+++ libasr/trunk/checksums	(working copy)
@@ -0,0 +1 @@
+2a4b768b54892465570ef7488e56b737  libasr-201505061057.tar.gz
Index: libasr/trunk/files/0001-add-openbsd-compat-getifaddrs.c.patch
===================================================================
--- libasr/trunk/files/0001-add-openbsd-compat-getifaddrs.c.patch	(revision 0)
+++ libasr/trunk/files/0001-add-openbsd-compat-getifaddrs.c.patch	(working copy)
@@ -0,0 +1,24 @@
+From cf1d038c260ca6fd161174d6c5c42aaee90b1532 Mon Sep 17 00:00:00 2001
+From: Freddy DISSAUX <dsx at bsdsx.fr>
+Date: Thu, 7 May 2015 09:53:12 +0200
+Subject: [PATCH] add openbsd-compat/getifaddrs.c
+
+---
+ src/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 286d382..7121b0b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -11,6 +11,7 @@ libasr_la_SOURCES +=	$(top_srcdir)/openbsd-compat/strlcat.c
+ libasr_la_SOURCES +=	$(top_srcdir)/openbsd-compat/strlcpy.c
+ libasr_la_SOURCES +=	$(top_srcdir)/openbsd-compat/strsep.c
+ libasr_la_SOURCES +=	$(top_srcdir)/openbsd-compat/strtonum.c
++libasr_la_SOURCES +=	$(top_srcdir)/openbsd-compat/getifaddrs.c
+ 
+ include_HEADERS =	asr.h
+ 
+-- 
+2.3.1
+
Index: libasr/trunk/files/0002-fix-possible-MAX-redefinition.patch
===================================================================
--- libasr/trunk/files/0002-fix-possible-MAX-redefinition.patch	(revision 0)
+++ libasr/trunk/files/0002-fix-possible-MAX-redefinition.patch	(working copy)
@@ -0,0 +1,44 @@
+From 104a97a81ae81b29ae5796f9d1e48463b6305635 Mon Sep 17 00:00:00 2001
+From: Freddy DISSAUX <dsx at bsdsx.fr>
+Date: Fri, 8 May 2015 11:01:26 +0200
+Subject: [PATCH] fix possible MAX redefinition
+
+---
+ src/gethostnamadr_async.c | 4 ++++
+ src/getnetnamadr_async.c  | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/gethostnamadr_async.c b/src/gethostnamadr_async.c
+index 2d6ecb7..5d34956 100644
+--- a/src/gethostnamadr_async.c
++++ b/src/gethostnamadr_async.c
+@@ -40,8 +40,12 @@
+ 
+ #include "asr_private.h"
+ 
++#ifndef MAXALIASES
+ #define MAXALIASES	35
++#endif
++#ifndef MAXADDRS
+ #define MAXADDRS	35
++#endif
+ 
+ struct hostent_ext {
+ 	struct hostent	 h;
+diff --git a/src/getnetnamadr_async.c b/src/getnetnamadr_async.c
+index ec14262..cc37ef0 100644
+--- a/src/getnetnamadr_async.c
++++ b/src/getnetnamadr_async.c
+@@ -33,7 +33,9 @@
+ 
+ #include "asr_private.h"
+ 
++#ifndef MAXALIASES
+ #define MAXALIASES	16
++#endif
+ 
+ struct netent_ext {
+ 	struct netent	 n;
+-- 
+2.3.1
+
Index: libasr/trunk
===================================================================
--- libasr/trunk	(revision 0)
+++ libasr/trunk	(working copy)

Property changes on: libasr/trunk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+work


More information about the users mailing list