diff options
author | marino <marino@FreeBSD.org> | 2014-03-24 07:50:06 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-03-24 07:50:06 +0800 |
commit | bb57f8af4d76d9810263a7e8a1c60a51d53b4140 (patch) | |
tree | 796694582955e6d58c3dd11e36f6ab20c3819f24 /misc | |
parent | 9b773e9119d4ebeff4d00746f9f756e18e70abf3 (diff) | |
download | freebsd-ports-gnome-bb57f8af4d76d9810263a7e8a1c60a51d53b4140.tar.gz freebsd-ports-gnome-bb57f8af4d76d9810263a7e8a1c60a51d53b4140.tar.zst freebsd-ports-gnome-bb57f8af4d76d9810263a7e8a1c60a51d53b4140.zip |
Add new Ada port: misc/excel_writer
Excel_Out is a package that can generate basically formatted Excel files.
* Ideal for the automatic production of reports
* Fast: on a HP Mini netbook (Intel Atom, 1.66 GHz), Excel Writer produced
50 sheets per second where each sheet had 10,000 data cells
* Totally portable and no external library required
* No interation with MS Office software
WWW: http://excel-writer.sourceforge.net
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 1 | ||||
-rw-r--r-- | misc/excel-writer/Makefile | 67 | ||||
-rw-r--r-- | misc/excel-writer/distinfo | 2 | ||||
-rw-r--r-- | misc/excel-writer/files/biff_dump.gpr | 13 | ||||
-rw-r--r-- | misc/excel-writer/files/construct.gpr | 14 | ||||
-rw-r--r-- | misc/excel-writer/files/example.gpr | 12 | ||||
-rw-r--r-- | misc/excel-writer/files/excel_writer.gpr | 7 | ||||
-rw-r--r-- | misc/excel-writer/files/runme.sh.in | 17 | ||||
-rw-r--r-- | misc/excel-writer/pkg-descr | 9 | ||||
-rw-r--r-- | misc/excel-writer/pkg-plist | 21 |
10 files changed, 163 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile index 12d4fb600408..bac14f02a9f0 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -82,6 +82,7 @@ SUBDIR += elscreen SUBDIR += esniper SUBDIR += estic + SUBDIR += excel-writer SUBDIR += explosions SUBDIR += fbless SUBDIR += felis diff --git a/misc/excel-writer/Makefile b/misc/excel-writer/Makefile new file mode 100644 index 000000000000..297cf60c72f7 --- /dev/null +++ b/misc/excel-writer/Makefile @@ -0,0 +1,67 @@ +# Created by: John Marino <marino@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= excel-writer +PORTVERSION= 07 +CATEGORIES= misc +MASTER_SITES= http://sourceforge.net/projects/${SFPATH}/ +DISTNAME= excel_writer_${PORTVERSION} + +MAINTAINER= marino@FreeBSD.org +COMMENT= Package for easily creating Excel files with basic formats + +LICENSE= MIT + +USES= ada zip dos2unix +SFPATH= excel-writer/files/excel-writer/excel-writer-${PORTVERSION} +WRKSRC= ${WRKDIR}/Excel_Writer +PORTDOCS= excel_writer.txt +PORTEXAMPLES= example.gpr excel_out_test.adb runme.sh + +OPTIONS_DEFINE= DOCS EXAMPLES + +.include <bsd.port.options.mk> + +post-extract: + ${CP} ${FILESDIR}/construct.gpr ${FILESDIR}/biff_dump.gpr ${WRKSRC} + ${MKDIR} ${WRKSRC}/src ${WRKDIR}/data + ${MV} ${WRKSRC}/Big.xls ${WRKDIR}/data + (cd ${WRKSRC}; ${MV} excel_out.ad[bs] ieee* extras/csv.* src) + ${SED} -e "s,@PREFIX@,${LOCALBASE},g" ${FILESDIR}/runme.sh.in \ + > ${WRKSRC}/runme.sh + +post-patch: + @${REINPLACE_CMD} -e "s|Big.xls|${DATADIR}/Big.xls|" \ + -e 's|\$$Dump\$$|_dump_|g' ${WRKSRC}/extras/biff_dump.adb + ${REINPLACE_CMD} -e 's/"\(.*\.xls\)"/"\/tmp\/\1"/g' \ + ${WRKSRC}/excel_out_test.adb + +do-build: + (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -p -Pconstruct) + (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -p -Pbiff_dump) + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \ + ${STAGEDIR}${PREFIX}/lib/excel_writer \ + ${STAGEDIR}${PREFIX}/include/excel_writer \ + ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${FILESDIR}/excel_writer.gpr \ + ${STAGEDIR}${PREFIX}/lib/gnat + ${INSTALL_DATA} ${WRKSRC}/src/* \ + ${STAGEDIR}${PREFIX}/include/excel_writer + ${INSTALL_DATA} ${WRKSRC}/lib/* \ + ${STAGEDIR}${PREFIX}/lib/excel_writer + ${INSTALL_PROGRAM} ${WRKSRC}/bin/biff_dump ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKDIR}/data/Big.xls ${STAGEDIR}${DATADIR} +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/excel_writer.txt ${STAGEDIR}${DOCSDIR} +.endif +.if ${PORT_OPTIONS:MEXAMPLES} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/runme.sh ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/excel_out_test.adb \ + ${FILESDIR}/example.gpr ${STAGEDIR}${EXAMPLESDIR} +.endif + +.include <bsd.port.mk> diff --git a/misc/excel-writer/distinfo b/misc/excel-writer/distinfo new file mode 100644 index 000000000000..0b8f8d9fc82a --- /dev/null +++ b/misc/excel-writer/distinfo @@ -0,0 +1,2 @@ +SHA256 (excel_writer_07.zip) = 280d49b88b1546a060ff455d63715b006398643eb54a00f36cc656c8a406f008 +SIZE (excel_writer_07.zip) = 33177 diff --git a/misc/excel-writer/files/biff_dump.gpr b/misc/excel-writer/files/biff_dump.gpr new file mode 100644 index 000000000000..c6ab2dcefc7f --- /dev/null +++ b/misc/excel-writer/files/biff_dump.gpr @@ -0,0 +1,13 @@ +project Biff_Dump is + + for Languages use ("ada"); + for Exec_Dir use "bin"; + for Object_Dir use "obj"; + for Source_Dirs use ("extras", "src"); + for Main use ("biff_dump.adb"); + + package Compiler is + for Default_Switches ("ada") use ("-O2", "-gnat05"); + end Compiler; + +end Biff_Dump; diff --git a/misc/excel-writer/files/construct.gpr b/misc/excel-writer/files/construct.gpr new file mode 100644 index 000000000000..c5f7cb9d8bbf --- /dev/null +++ b/misc/excel-writer/files/construct.gpr @@ -0,0 +1,14 @@ +project Construct is + + for Languages use ("ada"); + for Source_Dirs use ("src"); + for Object_Dir use "obj"; + for Library_Name use "excelwriter"; + for Library_Dir use "lib"; + for Library_Kind use "static"; + + package Builder is + for Default_Switches ("ada") use ("-gnatf", "-gnatws", "-O2"); + end Builder; + +end Construct; diff --git a/misc/excel-writer/files/example.gpr b/misc/excel-writer/files/example.gpr new file mode 100644 index 000000000000..62837d5167c6 --- /dev/null +++ b/misc/excel-writer/files/example.gpr @@ -0,0 +1,12 @@ +with "excel_writer"; +project Example is + + for Exec_Dir use "/tmp"; + for Object_Dir use "/tmp"; + for Main use ("excel_out_test.adb"); + + package Compiler is + for Default_Switches ("ada") use ("-O2", "-gnat05"); + end Compiler; + +end Example; diff --git a/misc/excel-writer/files/excel_writer.gpr b/misc/excel-writer/files/excel_writer.gpr new file mode 100644 index 000000000000..af2b49cbc724 --- /dev/null +++ b/misc/excel-writer/files/excel_writer.gpr @@ -0,0 +1,7 @@ +project Excel_Writer is + for Languages use ("ada"); + for Library_Name use "excelwriter"; + for Source_Dirs use ("../../include/excel_writer"); + for Library_Dir use "../../lib/excel_writer"; + for Externally_Built use "true"; +end Excel_Writer; diff --git a/misc/excel-writer/files/runme.sh.in b/misc/excel-writer/files/runme.sh.in new file mode 100644 index 000000000000..32475de8363a --- /dev/null +++ b/misc/excel-writer/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 excel_out_test.adb" +echo "The executable example is located in /tmp/excel_out_test" +echo "It requires no options; just run it" +echo 'You may want to execute "rm /tmp/excel_out*" when you are done.' diff --git a/misc/excel-writer/pkg-descr b/misc/excel-writer/pkg-descr new file mode 100644 index 000000000000..9c0e14d46198 --- /dev/null +++ b/misc/excel-writer/pkg-descr @@ -0,0 +1,9 @@ +Excel_Out is a package that can generate basically formatted Excel files. + +* Ideal for the automatic production of reports +* Fast: on a HP Mini netbook (Intel Atom, 1.66 GHz), Excel Writer produced + 50 sheets per second where each sheet had 10,000 data cells +* Totally portable and no external library required +* No interation with MS Office software + +WWW: http://excel-writer.sourceforge.net diff --git a/misc/excel-writer/pkg-plist b/misc/excel-writer/pkg-plist new file mode 100644 index 000000000000..8a3265f32826 --- /dev/null +++ b/misc/excel-writer/pkg-plist @@ -0,0 +1,21 @@ +bin/biff_dump +include/excel_writer/csv.adb +include/excel_writer/csv.ads +include/excel_writer/excel_out.adb +include/excel_writer/excel_out.ads +include/excel_writer/ieee_754-generic_double_precision.adb +include/excel_writer/ieee_754-generic_double_precision.ads +include/excel_writer/ieee_754-long_floats.ads +include/excel_writer/ieee_754.ads +lib/excel_writer/csv.ali +lib/excel_writer/excel_out.ali +lib/excel_writer/ieee_754-generic_double_precision.ali +lib/excel_writer/ieee_754-long_floats.ali +lib/excel_writer/ieee_754.ali +lib/excel_writer/libexcelwriter.a +lib/gnat/excel_writer.gpr +%%DATADIR%%/Big.xls +@dirrm %%DATADIR%% +@dirrmtry lib/gnat +@dirrm lib/excel_writer +@dirrm include/excel_writer |