From 1afb9da9ce28c9ef47d316810c031769da362180 Mon Sep 17 00:00:00 2001 From: John Marino Date: Sat, 15 Mar 2014 23:43:32 +0000 Subject: [PATCH] Add new Ada port: textproc/xml_ez_out XML EZ_Out is a small set of packages intended to aid the creation of XML-formatted output from within Ada programs. It basically wraps the tags and data provided to it with XML syntax and writes them to a user-supplied medium. This medium can be any sort of writable entity, such as a file, a memory buffer, or even a communications link, such as a socket. The only functionality required of the medium is that it supply a meaningful "Put" (for writing a string) and "New_Line" procedure. WWW: http://www.mckae.com/xmlEz.html --- textproc/Makefile | 1 + textproc/xml_ez_out/Makefile | 55 ++++++++++++++++++++++++ textproc/xml_ez_out/distinfo | 2 + textproc/xml_ez_out/files/example.gpr | 12 ++++++ textproc/xml_ez_out/files/runme.sh.in | 17 ++++++++ textproc/xml_ez_out/files/xezo_bld.gpr | 14 ++++++ textproc/xml_ez_out/files/xml_ez_out.gpr | 7 +++ textproc/xml_ez_out/pkg-descr | 11 +++++ textproc/xml_ez_out/pkg-plist | 20 +++++++++ 9 files changed, 139 insertions(+) create mode 100644 textproc/xml_ez_out/Makefile create mode 100644 textproc/xml_ez_out/distinfo create mode 100644 textproc/xml_ez_out/files/example.gpr create mode 100644 textproc/xml_ez_out/files/runme.sh.in create mode 100644 textproc/xml_ez_out/files/xezo_bld.gpr create mode 100644 textproc/xml_ez_out/files/xml_ez_out.gpr create mode 100644 textproc/xml_ez_out/pkg-descr create mode 100644 textproc/xml_ez_out/pkg-plist diff --git a/textproc/Makefile b/textproc/Makefile index a7c2204c195b..eaf673ff54af 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1509,6 +1509,7 @@ SUBDIR += xml-i18n-tools SUBDIR += xml-lite.el SUBDIR += xml-parse.el + SUBDIR += xml_ez_out SUBDIR += xml2 SUBDIR += xml2rfc SUBDIR += xmlada diff --git a/textproc/xml_ez_out/Makefile b/textproc/xml_ez_out/Makefile new file mode 100644 index 000000000000..f2883b5fdc84 --- /dev/null +++ b/textproc/xml_ez_out/Makefile @@ -0,0 +1,55 @@ +# Created by: John Marino +# $FreeBSD$ + +PORTNAME= xml_ez_out +PORTVERSION= 1.06 +CATEGORIES= textproc +MASTER_SITES= http://www.mckae.com/xml_ezout/ +DISTFILES= ${PORTNAME}_${PORTVERSION}.tgz + +MAINTAINER= marino@FreeBSD.org +COMMENT= Library for emitting XML from Ada programs + +LICENSE= GPLv2 GMGPL +LICENSE_COMB= multi + +USES= ada dos2unix +WRKSRC= ${WRKDIR}/${PORTNAME} +BUILD_WRKSRC= ${WRKSRC}/mckae +PORTDOCS= README +PORTEXAMPLES= example.gpr tmeztf.adb runme.sh + +OPTIONS_DEFINE= DOCS EXAMPLES + +.include + +post-extract: + ${CP} ${FILESDIR}/xezo_bld.gpr ${WRKSRC} + ${SED} -e "s,@PREFIX@,${LOCALBASE},g" ${FILESDIR}/runme.sh.in \ + > ${WRKSRC}/runme.sh + +do-build: + (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -p -Pxezo_bld) + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \ + ${STAGEDIR}${PREFIX}/lib/xml_ez_out \ + ${STAGEDIR}${PREFIX}/include/xml_ez_out + ${INSTALL_DATA} ${FILESDIR}/xml_ez_out.gpr \ + ${STAGEDIR}${PREFIX}/lib/gnat + ${INSTALL_DATA} ${BUILD_WRKSRC}/mckae* \ + ${STAGEDIR}${PREFIX}/include/xml_ez_out + ${INSTALL_DATA} ${WRKSRC}/lib/* \ + ${STAGEDIR}${PREFIX}/lib/xml_ez_out +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${BUILD_WRKSRC}/README ${STAGEDIR}${DOCSDIR} +.endif +.if ${PORT_OPTIONS:MEXAMPLES} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/runme.sh ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${BUILD_WRKSRC}/tmeztf.adb \ + ${FILESDIR}/example.gpr ${STAGEDIR}${EXAMPLESDIR} +.endif + +.include diff --git a/textproc/xml_ez_out/distinfo b/textproc/xml_ez_out/distinfo new file mode 100644 index 000000000000..c2229d0cb5ea --- /dev/null +++ b/textproc/xml_ez_out/distinfo @@ -0,0 +1,2 @@ +SHA256 (xml_ez_out_1.06.tgz) = 2473caaddfdbd1e75a1b1e2e3b3b77c6641032a78f281af6bdbd229d26e49f61 +SIZE (xml_ez_out_1.06.tgz) = 12694 diff --git a/textproc/xml_ez_out/files/example.gpr b/textproc/xml_ez_out/files/example.gpr new file mode 100644 index 000000000000..b68a07683b0b --- /dev/null +++ b/textproc/xml_ez_out/files/example.gpr @@ -0,0 +1,12 @@ +with "xml_ez_out"; +project Example is + + for Exec_Dir use "/tmp"; + for Object_Dir use "/tmp"; + for Main use ("tmeztf.adb"); + + package Compiler is + for Default_Switches ("ada") use ("-O2"); + end Compiler; + +end Example; diff --git a/textproc/xml_ez_out/files/runme.sh.in b/textproc/xml_ez_out/files/runme.sh.in new file mode 100644 index 000000000000..4b81040f96ae --- /dev/null +++ b/textproc/xml_ez_out/files/runme.sh.in @@ -0,0 +1,17 @@ +#!/bin/sh + +# This script will: +# 1) Build the example executable in /tmp +# 2) Tell the user how to execute it + +GNATMAKE=@PREFIX@/gcc-aux/bin/gnatmake +ADA_PROJECT_PATH=@PREFIX@/lib/gnat +export ADA_PROJECT_PATH + +${GNATMAKE} -P example + +echo +echo "The source for the example is tmeztf.adb" +echo "The executable example is located in /tmp/tmeztf" +echo "It requires no optons; just run it" +echo 'You may want to execute "rm /tmp/tmeztf*" when you are done.' diff --git a/textproc/xml_ez_out/files/xezo_bld.gpr b/textproc/xml_ez_out/files/xezo_bld.gpr new file mode 100644 index 000000000000..a9a9c409cdd5 --- /dev/null +++ b/textproc/xml_ez_out/files/xezo_bld.gpr @@ -0,0 +1,14 @@ +project XEZO_Bld is + + for Languages use ("ada"); + for Source_Dirs use ("mckae"); + for Object_Dir use "obj"; + for Library_Name use "xml_ez_out"; + for Library_Dir use "lib"; + for Library_Kind use "static"; + + package Builder is + for Default_Switches ("ada") use ("-gnatf", "-gnatws", "-O2"); + end Builder; + +end XEZO_Bld; diff --git a/textproc/xml_ez_out/files/xml_ez_out.gpr b/textproc/xml_ez_out/files/xml_ez_out.gpr new file mode 100644 index 000000000000..800b178be503 --- /dev/null +++ b/textproc/xml_ez_out/files/xml_ez_out.gpr @@ -0,0 +1,7 @@ +project XML_EZ_Out is + for Languages use ("ada"); + for Source_Dirs use ("../../include/xml_ez_out"); + for Library_Name use "xml_ez_out"; + for Library_Dir use "../../lib/xml_ez_out"; + for Externally_Built use "true"; +end XML_EZ_Out; diff --git a/textproc/xml_ez_out/pkg-descr b/textproc/xml_ez_out/pkg-descr new file mode 100644 index 000000000000..bc28b7b5c914 --- /dev/null +++ b/textproc/xml_ez_out/pkg-descr @@ -0,0 +1,11 @@ +XML EZ_Out is a small set of packages intended to aid the creation of +XML-formatted output from within Ada programs. It basically wraps the +tags and data provided to it with XML syntax and writes them to a +user-supplied medium. + +This medium can be any sort of writable entity, such as a file, a +memory buffer, or even a communications link, such as a socket. The +only functionality required of the medium is that it supply a +meaningful "Put" (for writing a string) and "New_Line" procedure. + +WWW: http://www.mckae.com/xmlEz.html diff --git a/textproc/xml_ez_out/pkg-plist b/textproc/xml_ez_out/pkg-plist new file mode 100644 index 000000000000..adf472d5be70 --- /dev/null +++ b/textproc/xml_ez_out/pkg-plist @@ -0,0 +1,20 @@ +include/xml_ez_out/mckae-xml-ez_out-generic_medium.adb +include/xml_ez_out/mckae-xml-ez_out-generic_medium.ads +include/xml_ez_out/mckae-xml-ez_out-string_stream.adb +include/xml_ez_out/mckae-xml-ez_out-string_stream.ads +include/xml_ez_out/mckae-xml-ez_out-text_file.ads +include/xml_ez_out/mckae-xml-ez_out.ads +include/xml_ez_out/mckae-xml.ads +include/xml_ez_out/mckae.ads +lib/gnat/xml_ez_out.gpr +lib/xml_ez_out/libxml_ez_out.a +lib/xml_ez_out/mckae-xml-ez_out-generic_medium.ali +lib/xml_ez_out/mckae-xml-ez_out-string_stream.ali +lib/xml_ez_out/mckae-xml-ez_out-text_file.ali +lib/xml_ez_out/mckae-xml-ez_out.ali +lib/xml_ez_out/mckae-xml.ali +lib/xml_ez_out/mckae.ali +lib/xml_ez_out/tmeztf.ali +@dirrm lib/xml_ez_out +@dirrmtry lib/gnat +@dirrm include/xml_ez_out