aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-03-24 07:55:27 +0800
committermarino <marino@FreeBSD.org>2014-03-24 07:55:27 +0800
commit91d4f6e68290d3d6ea033b68143afe608070bdc6 (patch)
tree0bfa5e18978dec5e40a2aaea23fe938321be6eb0 /graphics
parent20b8e788655c8868065ad971ea856a93473f102a (diff)
downloadfreebsd-ports-gnome-91d4f6e68290d3d6ea033b68143afe608070bdc6.tar.gz
freebsd-ports-gnome-91d4f6e68290d3d6ea033b68143afe608070bdc6.tar.zst
freebsd-ports-gnome-91d4f6e68290d3d6ea033b68143afe608070bdc6.zip
Add new Ada port: graphics/generic_image_decoder
The Generic Image Decoder (GID) is an Ada package for decoding a broad variety on image formats from any data stream to any kind of medium. Examples include in-memory bitmap, a GUI objecct, another stream, floating point data for scientific calculations, a browser element or a device. Animations are also supported. GID features: * Standalone; requires no other libraries or bindings * Completely portable - no OS, CPU, or compiler dependencies * Task safe * Endian-neutral * Free and open source * Pure Ada95 (suitable for Ada2005 and Ada2012 projects) Currently supports BMP, GIF, JPEG, PNG and TGA formats. WWW: http://gen-img-dec.sourceforge.net/
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/generic_image_decoder/Makefile56
-rw-r--r--graphics/generic_image_decoder/distinfo2
-rw-r--r--graphics/generic_image_decoder/files/construct.gpr20
-rw-r--r--graphics/generic_image_decoder/files/generic_image_decoder.gpr7
-rw-r--r--graphics/generic_image_decoder/files/patch-gid.gpr11
-rw-r--r--graphics/generic_image_decoder/pkg-descr16
-rw-r--r--graphics/generic_image_decoder/pkg-plist37
8 files changed, 150 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 5c32e6a64e65..f92ed3d1505f 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -246,6 +246,7 @@
SUBDIR += gdtclft
SUBDIR += geeqie
SUBDIR += gegl
+ SUBDIR += generic_image_decoder
SUBDIR += geoapi
SUBDIR += geomorph
SUBDIR += geomview
diff --git a/graphics/generic_image_decoder/Makefile b/graphics/generic_image_decoder/Makefile
new file mode 100644
index 000000000000..ae57fea00342
--- /dev/null
+++ b/graphics/generic_image_decoder/Makefile
@@ -0,0 +1,56 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= generic_image_decoder
+PORTVERSION= 02
+CATEGORIES= graphics
+MASTER_SITES= http://sourceforge.net/projects/${SFPATH}/
+DISTNAME= gid-${PORTVERSION}
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= Ada library for decoding various image formats inc. animations
+
+LICENSE= MIT
+
+USES= ada zip dos2unix
+SFPATH= gen-img-dec/files
+WRKSRC= ${WRKDIR}/gid
+MAKE_ENV+= Build_Mode=Fast_but_checked
+PORTDOCS= gid.txt
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+post-extract:
+ ${CP} ${FILESDIR}/construct.gpr ${WRKSRC}
+ ${MKDIR} ${WRKSRC}/src ${WRKDIR}/data
+ ${MV} ${WRKSRC}/gid_work.xls ${WRKDIR}/data
+ (cd ${WRKSRC}; ${MV} *.ad[bs] src)
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|-j2|-j${MAKE_JOBS_NUMBER}|" \
+ ${WRKSRC}/gid.gpr
+
+do-build:
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -p -Pconstruct)
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -Pgid)
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \
+ ${STAGEDIR}${PREFIX}/lib/generic_image_decoder \
+ ${STAGEDIR}${PREFIX}/include/generic_image_decoder
+ ${INSTALL_DATA} ${FILESDIR}/generic_image_decoder.gpr \
+ ${STAGEDIR}${PREFIX}/lib/gnat
+ ${INSTALL_DATA} ${WRKSRC}/src/* \
+ ${STAGEDIR}${PREFIX}/include/generic_image_decoder
+ ${INSTALL_DATA} ${WRKSRC}/lib/* \
+ ${STAGEDIR}${PREFIX}/lib/generic_image_decoder
+ (cd ${WRKSRC}/test && ${INSTALL_PROGRAM} to_bmp mini \
+ ${STAGEDIR}${PREFIX}/bin)
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/gid.txt ${STAGEDIR}${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/generic_image_decoder/distinfo b/graphics/generic_image_decoder/distinfo
new file mode 100644
index 000000000000..4118b6a0cd6b
--- /dev/null
+++ b/graphics/generic_image_decoder/distinfo
@@ -0,0 +1,2 @@
+SHA256 (gid-02.zip) = 0f7955c4bf3846161461b7e11072446fba5d3e7aaba4fce105987acb0bcdaa9d
+SIZE (gid-02.zip) = 95702
diff --git a/graphics/generic_image_decoder/files/construct.gpr b/graphics/generic_image_decoder/files/construct.gpr
new file mode 100644
index 000000000000..37522170249a
--- /dev/null
+++ b/graphics/generic_image_decoder/files/construct.gpr
@@ -0,0 +1,20 @@
+project Construct is
+
+ for Languages use ("ada");
+ for Source_Dirs use ("src");
+ for Object_Dir use "obj_safer";
+ for Library_Name use "genimgdec";
+ for Library_Dir use "lib";
+ for Library_Kind use "static";
+
+ package Compiler is
+ for Default_Switches ("ada") use ("-O3", "-gnato", "-ffunction-sections",
+ "-funroll-loops", "-fpeel-loops", "-ftracer", "-funswitch-loops",
+ "-fweb", "-frename-registers");
+ end Compiler;
+
+ package Builder is
+ for Default_Switches ("ada") use ("-C");
+ end Builder;
+
+end Construct;
diff --git a/graphics/generic_image_decoder/files/generic_image_decoder.gpr b/graphics/generic_image_decoder/files/generic_image_decoder.gpr
new file mode 100644
index 000000000000..b27fdf7cb4ab
--- /dev/null
+++ b/graphics/generic_image_decoder/files/generic_image_decoder.gpr
@@ -0,0 +1,7 @@
+project Generic_Image_Decoder is
+ for Languages use ("ada");
+ for Library_Name use "genimgdec";
+ for Source_Dirs use ("../../include/generic_image_decoder");
+ for Library_Dir use "../../lib/generic_image_decoder";
+ for Externally_Built use "true";
+end Generic_Image_Decoder;
diff --git a/graphics/generic_image_decoder/files/patch-gid.gpr b/graphics/generic_image_decoder/files/patch-gid.gpr
new file mode 100644
index 000000000000..25730604dfd0
--- /dev/null
+++ b/graphics/generic_image_decoder/files/patch-gid.gpr
@@ -0,0 +1,11 @@
+--- gid.gpr.orig 2014-03-21 21:26:29.000000000 +0000
++++ gid.gpr
+@@ -4,7 +4,7 @@
+ --
+ project GID is
+
+- for Source_Dirs use (".", "test");
++ for Source_Dirs use ("src", "test");
+ for Exec_Dir use "test";
+ type Build_Mode_Type is
+ ("Debug", "Fast_but_checked", "Fast", "Small", "Smallest", "Profiling");
diff --git a/graphics/generic_image_decoder/pkg-descr b/graphics/generic_image_decoder/pkg-descr
new file mode 100644
index 000000000000..e027d97e5bef
--- /dev/null
+++ b/graphics/generic_image_decoder/pkg-descr
@@ -0,0 +1,16 @@
+The Generic Image Decoder (GID) is an Ada package for decoding a broad
+variety on image formats from any data stream to any kind of medium.
+Examples include in-memory bitmap, a GUI objecct, another stream, floating
+point data for scientific calculations, a browser element or a device.
+Animations are also supported. GID features:
+
+ * Standalone; requires no other libraries or bindings
+ * Completely portable - no OS, CPU, or compiler dependencies
+ * Task safe
+ * Endian-neutral
+ * Free and open source
+ * Pure Ada95 (suitable for Ada2005 and Ada2012 projects)
+
+Currently supports BMP, GIF, JPEG, PNG and TGA formats.
+
+WWW: http://gen-img-dec.sourceforge.net/
diff --git a/graphics/generic_image_decoder/pkg-plist b/graphics/generic_image_decoder/pkg-plist
new file mode 100644
index 000000000000..de8351a420e0
--- /dev/null
+++ b/graphics/generic_image_decoder/pkg-plist
@@ -0,0 +1,37 @@
+bin/mini
+bin/to_bmp
+include/generic_image_decoder/gid-buffering.adb
+include/generic_image_decoder/gid-buffering.ads
+include/generic_image_decoder/gid-color_tables.adb
+include/generic_image_decoder/gid-color_tables.ads
+include/generic_image_decoder/gid-decoding_bmp.adb
+include/generic_image_decoder/gid-decoding_bmp.ads
+include/generic_image_decoder/gid-decoding_gif.adb
+include/generic_image_decoder/gid-decoding_gif.ads
+include/generic_image_decoder/gid-decoding_jpg.adb
+include/generic_image_decoder/gid-decoding_jpg.ads
+include/generic_image_decoder/gid-decoding_png-huffman.adb
+include/generic_image_decoder/gid-decoding_png-huffman.ads
+include/generic_image_decoder/gid-decoding_png.adb
+include/generic_image_decoder/gid-decoding_png.ads
+include/generic_image_decoder/gid-decoding_tga.adb
+include/generic_image_decoder/gid-decoding_tga.ads
+include/generic_image_decoder/gid-headers.adb
+include/generic_image_decoder/gid-headers.ads
+include/generic_image_decoder/gid.adb
+include/generic_image_decoder/gid.ads
+lib/generic_image_decoder/gid-buffering.ali
+lib/generic_image_decoder/gid-color_tables.ali
+lib/generic_image_decoder/gid-decoding_bmp.ali
+lib/generic_image_decoder/gid-decoding_gif.ali
+lib/generic_image_decoder/gid-decoding_jpg.ali
+lib/generic_image_decoder/gid-decoding_png-huffman.ali
+lib/generic_image_decoder/gid-decoding_png.ali
+lib/generic_image_decoder/gid-decoding_tga.ali
+lib/generic_image_decoder/gid-headers.ali
+lib/generic_image_decoder/gid.ali
+lib/generic_image_decoder/libgenimgdec.a
+lib/gnat/generic_image_decoder.gpr
+@dirrmtry lib/gnat
+@dirrm lib/generic_image_decoder
+@dirrm include/generic_image_decoder