1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00

Add new port: devel/ada-util (Ada Utility Library)

This Ada05 library contains various utility packages for building
Ada05 applications.  This includes:

 o A logging framework close to Java log4j framework
 o Support for properties
 o A serialization/deserialization framework for XML, JSON, CSV
 o Ada beans framework
 o Encoding/decoding framework (Base16, Base64, SHA, HMAC-SHA)
 o A composing stream framework (raw, files, buffers, pipes, sockets)
 o Several concurrency tools (reference counters, counters, pools,
   fifos, arrays)
 o Process creation and pipes
 o Support for loading shared libraries (on Windows or Unix)
 o HTTP client library on top of CURL or AWS

Ada Util also provides a small test utility library on top of
Ahven to help in writing unit tests.
This commit is contained in:
John Marino 2015-11-22 23:46:51 +00:00
parent 7a43fdf206
commit 8bf524c289
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=402249
6 changed files with 412 additions and 0 deletions

View File

@ -50,6 +50,7 @@
SUBDIR += ace+tao-doc
SUBDIR += acme
SUBDIR += activitymail
SUBDIR += ada-util
SUBDIR += adabooch
SUBDIR += adacurses
SUBDIR += adime

43
devel/ada-util/Makefile Normal file
View File

@ -0,0 +1,43 @@
# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$
PORTNAME= ada-util
PORTVERSION= 1.8.0
CATEGORIES= devel
MAINTAINER= marino@FreeBSD.org
COMMENT= Utility library for Ada 2005 applications
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= gprbuild:${PORTSDIR}/devel/gprbuild \
xmlada>=4.4:${PORTSDIR}/textproc/xmlada \
${LOCALBASE}/lib/gnat/ahven.gpr:${PORTSDIR}/devel/ahven
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
USES= ada gmake
USE_GITHUB= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-ahven
CONFIGURE_ENV= ac_cv_lib_dl_dlopen=no
LDFLAGS= -L${LOCALBASE}/lib
GH_ACCOUNT= stcarrez
GH_TAGNAME= b6612400
post-patch:
@${REINPLACE_CMD} -e 's,freebsd\*,dragonfly*|freebsd*,' \
-e "s/^NR_CPUS=.*/NR_CPUS=${MAKE_JOBS_NUMBER}/" \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|@prefix@|$${DESTDIR}@prefix@|' \
-e '/GPRINSTALL/ \
s|--prefix|--project-subdir=lib/gnat --prefix|' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e '/Content_Type/d' \
${WRKSRC}/src/http/util-http-rest.adb
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/lib/gnat/manifests
.include <bsd.port.mk>

2
devel/ada-util/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (stcarrez-ada-util-1.8.0-b6612400_GH0.tar.gz) = e49fc4da1726726bfea27e03c05b9161bc65d86d5a6509bff611adff3a8a21f4
SIZE (stcarrez-ada-util-1.8.0-b6612400_GH0.tar.gz) = 345837

View File

@ -0,0 +1,50 @@
--- support/utilgen.c.orig 2015-10-11 18:41:42 UTC
+++ support/utilgen.c
@@ -18,6 +18,7 @@
# define _LARGEFILE64_SOURCE
#endif
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
@@ -181,6 +182,39 @@ void gen_stat(void)
printf(" end record;\n");
printf(" pragma Convention (C_Pass_By_Copy, Stat_Type);\n");
printf("\n");
+#elif defined(__DragonFly__)
+ struct stat st;
+
+ gen_type("uint16_t", UNSIGNED, sizeof(uint16_t));
+ gen_type("u_int32_t", UNSIGNED, sizeof(u_int32_t));
+ gen_type("int32_t", SIGNED, sizeof(int32_t));
+ gen_type("int64_t", SIGNED, sizeof(int64_t));
+
+ printf(" STAT_NAME : constant String := \"stat\";\n");
+ printf(" FSTAT_NAME : constant String := \"fstat\";\n");
+ printf(" type Stat_Type is record\n");
+ printf(" st_ino : ino_t;\n");
+ printf(" st_nlink : nlink_t;\n");
+ printf(" st_dev : dev_t;\n");
+ printf(" st_mode : mode_t;\n");
+ printf(" st_padding1 : uint16_t;\n");
+ printf(" st_uid : uid_t;\n");
+ printf(" st_gid : gid_t;\n");
+ printf(" st_rdev : dev_t;\n");
+ printf(" st_atim : Timespec;\n");
+ printf(" st_mtim : Timespec;\n");
+ printf(" st_ctim : Timespec;\n");
+ printf(" st_size : off_t;\n");
+ printf(" st_blocks : int64_t;\n");
+ printf(" st_blksize : u_int32_t;\n");
+ printf(" st_flags : u_int32_t;\n");
+ printf(" st_gen : u_int32_t;\n");
+ printf(" st_lspare : int32_t;\n");
+ printf(" st_qspare1 : int64_t;\n");
+ printf(" st_qspare2 : int64_t;\n");
+ printf(" end record;\n");
+ printf(" pragma Convention (C_Pass_By_Copy, Stat_Type);\n");
+ printf("\n");
#elif defined(__FreeBSD__)
struct stat st;

21
devel/ada-util/pkg-descr Normal file
View File

@ -0,0 +1,21 @@
Ada Utility Library
This Ada05 library contains various utility packages for building
Ada05 applications. This includes:
o A logging framework close to Java log4j framework
o Support for properties
o A serialization/deserialization framework for XML, JSON, CSV
o Ada beans framework
o Encoding/decoding framework (Base16, Base64, SHA, HMAC-SHA)
o A composing stream framework (raw, files, buffers, pipes, sockets)
o Several concurrency tools (reference counters, counters, pools,
fifos, arrays)
o Process creation and pipes
o Support for loading shared libraries (on Windows or Unix)
o HTTP client library on top of CURL or AWS
Ada Util also provides a small test utility library on top of
Ahven to help in writing unit tests.
WWW: https://github.com/stcarrez/ada-util/wiki

295
devel/ada-util/pkg-plist Normal file
View File

@ -0,0 +1,295 @@
include/util.static/util-algorithms.ads
include/util.static/util-beans-basic-lists.adb
include/util.static/util-beans-basic-lists.ads
include/util.static/util-beans-basic-ranges.adb
include/util.static/util-beans-basic-ranges.ads
include/util.static/util-beans-basic.ads
include/util.static/util-beans-factory.ads
include/util.static/util-beans-lists-strings.ads
include/util.static/util-beans-lists.ads
include/util.static/util-beans-methods.ads
include/util.static/util-beans-objects-datasets.ads
include/util.static/util-beans-objects-enums.adb
include/util.static/util-beans-objects-enums.ads
include/util.static/util-beans-objects-hash.ads
include/util.static/util-beans-objects-lists.ads
include/util.static/util-beans-objects-maps.ads
include/util.static/util-beans-objects-pairs.ads
include/util.static/util-beans-objects-records.adb
include/util.static/util-beans-objects-records.ads
include/util.static/util-beans-objects-time.ads
include/util.static/util-beans-objects-to_access.adb
include/util.static/util-beans-objects-to_access.ads
include/util.static/util-beans-objects-vectors.ads
include/util.static/util-beans-objects.ads
include/util.static/util-beans-ranges.ads
include/util.static/util-beans.ads
include/util.static/util-concurrent-arrays.adb
include/util.static/util-concurrent-arrays.ads
include/util.static/util-concurrent-copies.adb
include/util.static/util-concurrent-copies.ads
include/util.static/util-concurrent-counters.adb
include/util.static/util-concurrent-counters.ads
include/util.static/util-concurrent-fifos.adb
include/util.static/util-concurrent-fifos.ads
include/util.static/util-concurrent-locks.ads
include/util.static/util-concurrent-pools.adb
include/util.static/util-concurrent-pools.ads
include/util.static/util-concurrent.ads
include/util.static/util-dates-formats.ads
include/util.static/util-dates-iso8601.ads
include/util.static/util-dates-rfc7231.ads
include/util.static/util-dates.ads
include/util.static/util-encoders-base16.adb
include/util.static/util-encoders-base16.ads
include/util.static/util-encoders-base64.ads
include/util.static/util-encoders-hmac-sha1.ads
include/util.static/util-encoders-hmac.ads
include/util.static/util-encoders-sha1.ads
include/util.static/util-encoders.ads
include/util.static/util-events-channels.ads
include/util.static/util-events.ads
include/util.static/util-files.ads
include/util.static/util-http-clients-mockups.ads
include/util.static/util-http-clients.ads
include/util.static/util-http-cookies.ads
include/util.static/util-http-mockups.ads
include/util.static/util-http-parts.ads
include/util.static/util-http-rest-rest_get_vector.adb
include/util.static/util-http-rest-rest_get_vector.ads
include/util.static/util-http-rest.adb
include/util.static/util-http-rest.ads
include/util.static/util-http-tools.ads
include/util.static/util-http.ads
include/util.static/util-listeners-lifecycles.adb
include/util.static/util-listeners-lifecycles.ads
include/util.static/util-listeners-observers.adb
include/util.static/util-listeners-observers.ads
include/util.static/util-listeners.ads
include/util.static/util-locales.ads
include/util.static/util-log-appenders.ads
include/util.static/util-log-loggers-traceback-gnat.adb
include/util.static/util-log-loggers.ads
include/util.static/util-log.ads
include/util.static/util-measures.ads
include/util.static/util-processes-os.ads
include/util.static/util-processes.ads
include/util.static/util-properties-basic.ads
include/util.static/util-properties-bundles.ads
include/util.static/util-properties-discrete.adb
include/util.static/util-properties-discrete.ads
include/util.static/util-properties-factories.ads
include/util.static/util-properties-hash.ads
include/util.static/util-properties-json.ads
include/util.static/util-properties.ads
include/util.static/util-refs.adb
include/util.static/util-refs.ads
include/util.static/util-serialize-contexts.ads
include/util.static/util-serialize-io-csv.ads
include/util.static/util-serialize-io-json.ads
include/util.static/util-serialize-io-xml-get_location-xmlada-4.adb
include/util.static/util-serialize-io-xml.ads
include/util.static/util-serialize-io.ads
include/util.static/util-serialize-mappers-record_mapper.adb
include/util.static/util-serialize-mappers-record_mapper.ads
include/util.static/util-serialize-mappers-vector_mapper.adb
include/util.static/util-serialize-mappers-vector_mapper.ads
include/util.static/util-serialize-mappers.ads
include/util.static/util-serialize-tools.ads
include/util.static/util-serialize.ads
include/util.static/util-stacks.adb
include/util.static/util-stacks.ads
include/util.static/util-streams-buffered.ads
include/util.static/util-streams-files.ads
include/util.static/util-streams-pipes.ads
include/util.static/util-streams-raw.ads
include/util.static/util-streams-sockets.ads
include/util.static/util-streams-texts.ads
include/util.static/util-streams.ads
include/util.static/util-strings-builders-transforms.ads
include/util.static/util-strings-builders.ads
include/util.static/util-strings-maps.ads
include/util.static/util-strings-sets.ads
include/util.static/util-strings-tokenizers.ads
include/util.static/util-strings-transforms.ads
include/util.static/util-strings-vectors.ads
include/util.static/util-strings.adb
include/util.static/util-strings.ads
include/util.static/util-systems-constants.ads
include/util.static/util-systems-dlls.ads
include/util.static/util-systems-os.ads
include/util.static/util-systems-types.ads
include/util.static/util-systems.ads
include/util.static/util-texts-builders.adb
include/util.static/util-texts-builders.ads
include/util.static/util-texts-formats.adb
include/util.static/util-texts-formats.ads
include/util.static/util-texts-tokenizers.adb
include/util.static/util-texts-tokenizers.ads
include/util.static/util-texts-transforms.adb
include/util.static/util-texts-transforms.ads
include/util.static/util-texts.ads
include/util.static/util.ads
include/util_http_curl.static/util-http-clients-curl-constants.ads
include/util_http_curl.static/util-http-clients-curl.ads
include/util_unit.static/ahven-astrings.ads
include/util_unit.static/ahven-framework.adb
include/util_unit.static/ahven-framework.ads
include/util_unit.static/ahven-listeners-basic.ads
include/util_unit.static/ahven-listeners.ads
include/util_unit.static/ahven-long_astrings.ads
include/util_unit.static/ahven-parameters.ads
include/util_unit.static/ahven-results.ads
include/util_unit.static/ahven-runner.ads
include/util_unit.static/ahven-slist.adb
include/util_unit.static/ahven-slist.ads
include/util_unit.static/ahven-tap_runner.ads
include/util_unit.static/ahven-temporary_output.ads
include/util_unit.static/ahven-text_runner.ads
include/util_unit.static/ahven-xml_runner.ads
include/util_unit.static/ahven.adb
include/util_unit.static/ahven.ads
include/util_unit.static/ahven_compat.ads
include/util_unit.static/util-assertions.adb
include/util_unit.static/util-assertions.ads
include/util_unit.static/util-test_caller.adb
include/util_unit.static/util-test_caller.ads
include/util_unit.static/util-tests-servers.ads
include/util_unit.static/util-tests.adb
include/util_unit.static/util-tests.ads
include/util_unit.static/util-xunit.adb
include/util_unit.static/util-xunit.ads
lib/gnat/util.gpr
lib/gnat/util_http.gpr
lib/gnat/util_http_curl.gpr
lib/gnat/util_unit.gpr
lib/util.static/libada_util.a
lib/util.static/util-algorithms.ali
lib/util.static/util-beans-basic-lists.ali
lib/util.static/util-beans-basic-ranges.ali
lib/util.static/util-beans-basic.ali
lib/util.static/util-beans-factory.ali
lib/util.static/util-beans-lists-strings.ali
lib/util.static/util-beans-lists.ali
lib/util.static/util-beans-methods.ali
lib/util.static/util-beans-objects-datasets.ali
lib/util.static/util-beans-objects-enums.ali
lib/util.static/util-beans-objects-hash.ali
lib/util.static/util-beans-objects-lists.ali
lib/util.static/util-beans-objects-maps.ali
lib/util.static/util-beans-objects-pairs.ali
lib/util.static/util-beans-objects-records.ali
lib/util.static/util-beans-objects-time.ali
lib/util.static/util-beans-objects-to_access.ali
lib/util.static/util-beans-objects-vectors.ali
lib/util.static/util-beans-objects.ali
lib/util.static/util-beans-ranges.ali
lib/util.static/util-beans.ali
lib/util.static/util-concurrent-arrays.ali
lib/util.static/util-concurrent-copies.ali
lib/util.static/util-concurrent-counters.ali
lib/util.static/util-concurrent-fifos.ali
lib/util.static/util-concurrent-locks.ali
lib/util.static/util-concurrent-pools.ali
lib/util.static/util-concurrent.ali
lib/util.static/util-dates-formats.ali
lib/util.static/util-dates-iso8601.ali
lib/util.static/util-dates-rfc7231.ali
lib/util.static/util-dates.ali
lib/util.static/util-encoders-base16.ali
lib/util.static/util-encoders-base64.ali
lib/util.static/util-encoders-hmac-sha1.ali
lib/util.static/util-encoders-hmac.ali
lib/util.static/util-encoders-sha1.ali
lib/util.static/util-encoders.ali
lib/util.static/util-events-channels.ali
lib/util.static/util-events.ali
lib/util.static/util-files.ali
lib/util.static/util-http-clients-mockups.ali
lib/util.static/util-http-clients.ali
lib/util.static/util-http-cookies.ali
lib/util.static/util-http-mockups.ali
lib/util.static/util-http-parts.ali
lib/util.static/util-http-rest-rest_get_vector.ali
lib/util.static/util-http-rest.ali
lib/util.static/util-http-tools.ali
lib/util.static/util-http.ali
lib/util.static/util-listeners-lifecycles.ali
lib/util.static/util-listeners-observers.ali
lib/util.static/util-listeners.ali
lib/util.static/util-locales.ali
lib/util.static/util-log-appenders.ali
lib/util.static/util-log-loggers.ali
lib/util.static/util-log.ali
lib/util.static/util-measures.ali
lib/util.static/util-processes-os.ali
lib/util.static/util-processes.ali
lib/util.static/util-properties-basic.ali
lib/util.static/util-properties-bundles.ali
lib/util.static/util-properties-discrete.ali
lib/util.static/util-properties-factories.ali
lib/util.static/util-properties-hash.ali
lib/util.static/util-properties-json.ali
lib/util.static/util-properties.ali
lib/util.static/util-refs.ali
lib/util.static/util-serialize-contexts.ali
lib/util.static/util-serialize-io-csv.ali
lib/util.static/util-serialize-io-json.ali
lib/util.static/util-serialize-io-xml.ali
lib/util.static/util-serialize-io.ali
lib/util.static/util-serialize-mappers-record_mapper.ali
lib/util.static/util-serialize-mappers-vector_mapper.ali
lib/util.static/util-serialize-mappers.ali
lib/util.static/util-serialize-tools.ali
lib/util.static/util-serialize.ali
lib/util.static/util-stacks.ali
lib/util.static/util-streams-buffered.ali
lib/util.static/util-streams-files.ali
lib/util.static/util-streams-pipes.ali
lib/util.static/util-streams-raw.ali
lib/util.static/util-streams-sockets.ali
lib/util.static/util-streams-texts.ali
lib/util.static/util-streams.ali
lib/util.static/util-strings-builders-transforms.ali
lib/util.static/util-strings-builders.ali
lib/util.static/util-strings-maps.ali
lib/util.static/util-strings-sets.ali
lib/util.static/util-strings-tokenizers.ali
lib/util.static/util-strings-transforms.ali
lib/util.static/util-strings-vectors.ali
lib/util.static/util-strings.ali
lib/util.static/util-systems-constants.ali
lib/util.static/util-systems-dlls.ali
lib/util.static/util-systems-os.ali
lib/util.static/util-systems-types.ali
lib/util.static/util-systems.ali
lib/util.static/util-texts-builders.ali
lib/util.static/util-texts-formats.ali
lib/util.static/util-texts-tokenizers.ali
lib/util.static/util-texts-transforms.ali
lib/util.static/util-texts.ali
lib/util.static/util.ali
lib/util_http_curl.static/libada_util_curl.a
lib/util_http_curl.static/util-http-clients-curl-constants.ali
lib/util_http_curl.static/util-http-clients-curl.ali
lib/util_unit.static/ahven-astrings.ali
lib/util_unit.static/ahven-framework.ali
lib/util_unit.static/ahven-listeners-basic.ali
lib/util_unit.static/ahven-listeners.ali
lib/util_unit.static/ahven-long_astrings.ali
lib/util_unit.static/ahven-parameters.ali
lib/util_unit.static/ahven-results.ali
lib/util_unit.static/ahven-runner.ali
lib/util_unit.static/ahven-slist.ali
lib/util_unit.static/ahven-tap_runner.ali
lib/util_unit.static/ahven-temporary_output.ali
lib/util_unit.static/ahven-text_runner.ali
lib/util_unit.static/ahven-xml_runner.ali
lib/util_unit.static/ahven.ali
lib/util_unit.static/ahven_compat.ali
lib/util_unit.static/libada_util_unit.a
lib/util_unit.static/util-assertions.ali
lib/util_unit.static/util-test_caller.ali
lib/util_unit.static/util-tests-servers.ali
lib/util_unit.static/util-tests.ali
lib/util_unit.static/util-xunit.ali