aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2017-07-22 03:25:14 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2017-07-22 03:25:14 +0000
commit01dd4241d5bae4496c27f3259766aa81212b3263 (patch)
tree16f2d78cd059fdfc776b499b451071ff8ca40ce8
parent37469fa6f666b92a4e589c547773a9cd7433179c (diff)
Notes
-rw-r--r--devel/Makefile1
-rw-r--r--devel/iz/Makefile33
-rw-r--r--devel/iz/distinfo3
-rw-r--r--devel/iz/files/patch-import_iz_containers.d11
-rw-r--r--devel/iz/files/patch-import_iz_streams.d61
-rw-r--r--devel/iz/pkg-descr5
-rw-r--r--devel/iz/pkg-plist18
7 files changed, 132 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 90a349b4bcf9..7a1201672ffb 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1148,6 +1148,7 @@
SUBDIR += it-eric6
SUBDIR += itext
SUBDIR += ivykis
+ SUBDIR += iz
SUBDIR += jakarta-commons-configuration
SUBDIR += jakarta-commons-daemon
SUBDIR += jakarta-commons-io
diff --git a/devel/iz/Makefile b/devel/iz/Makefile
new file mode 100644
index 000000000000..3ad15fc1df19
--- /dev/null
+++ b/devel/iz/Makefile
@@ -0,0 +1,33 @@
+# Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= iz
+DISTVERSION= 0.6.0beta2
+CATEGORIES= devel
+MASTER_SITES= https://github.com/BBasile/iz/archive/
+DISTNAME= ${DISTVERSION:S/^/v/:S/beta2/-beta.2/}
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT= General purpose library for the D programming language
+
+LICENSE= BSL
+
+BUILD_DEPENDS= ldmd2:lang/ldc \
+ dub:devel/dub
+
+WRKSRC= ${WRKDIR}/iz-${DISTVERSION:S/beta2/-beta.2/}
+DUB_CMD= ${LOCALBASE}/bin/dub build --build=release
+D_INCLUDE_DIR= ${PREFIX}/include/d
+D_LIB_DIR= ${PREFIX}/lib/d
+
+do-build:
+ @cd ${WRKSRC} && ${DUB_CMD}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${D_INCLUDE_DIR}
+ @${MKDIR} ${STAGEDIR}${D_LIB_DIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/libiz.a ${STAGEDIR}${D_LIB_DIR}
+ cd ${WRKSRC}/import && ${COPYTREE_SHARE} . ${STAGEDIR}${D_INCLUDE_DIR} "-name *\.d"
+
+.include <bsd.port.mk>
diff --git a/devel/iz/distinfo b/devel/iz/distinfo
new file mode 100644
index 000000000000..4a5d10df1094
--- /dev/null
+++ b/devel/iz/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1500614018
+SHA256 (iz/v0.6.0-beta.2.tar.gz) = 31cad572b2ec170bfec1b571dfc365cc1e26cb72577658ccbd9d03e452f44a6e
+SIZE (iz/v0.6.0-beta.2.tar.gz) = 242330
diff --git a/devel/iz/files/patch-import_iz_containers.d b/devel/iz/files/patch-import_iz_containers.d
new file mode 100644
index 000000000000..c6f86301f64a
--- /dev/null
+++ b/devel/iz/files/patch-import_iz_containers.d
@@ -0,0 +1,11 @@
+--- import/iz/containers.d 2017-04-03 03:39:24 UTC
++++ import/iz/containers.d
+@@ -103,7 +103,7 @@ private:
+ pragma(inline, true)
+ void postblitElements()()
+ {
+- static if (is(T == struct) && hasMember!(T, "__postblit") && isCopyable!T )
++ static if (is(T == struct) && hasMember!(T, "__postblit") && std.traits.isCopyable!T )
+ {
+ foreach(i; 0.._length)
+ (*rwPtr(i)).__postblit();
diff --git a/devel/iz/files/patch-import_iz_streams.d b/devel/iz/files/patch-import_iz_streams.d
new file mode 100644
index 000000000000..12a022a4c3e7
--- /dev/null
+++ b/devel/iz/files/patch-import_iz_streams.d
@@ -0,0 +1,61 @@
+--- import/iz/streams.d 2017-04-03 03:39:24 UTC
++++ import/iz/streams.d
+@@ -1049,7 +1049,12 @@ abstract class SystemStream: Stream, Str
+ }
+ version(Posix)
+ {
+- return core.sys.posix.unistd.lseek64(_handle, offset, mode);
++ version(FreeBSD)
++ {
++ return core.sys.posix.unistd.lseek(_handle, offset, mode);
++ } else {
++ return core.sys.posix.unistd.lseek64(_handle, offset, mode);
++ }
+ }
+ }
+
+@@ -1085,7 +1090,12 @@ abstract class SystemStream: Stream, Str
+ }
+ version(Posix)
+ {
+- ftruncate64(_handle, value);
++ version(FreeBSD)
++ {
++ ftruncate(_handle, value);
++ } else {
++ ftruncate64(_handle, value);
++ }
+ }
+ }
+
+@@ -1574,7 +1584,12 @@ class MemoryStream: Stream, StreamPersis
+
+ scope(exit) core.sys.posix.unistd.close(hdl);
+ auto immutable numRead = core.sys.posix.unistd.write(hdl, _memory, _size);
+- ftruncate64(hdl, _size);
++ version(FreeBSD)
++ {
++ ftruncate(hdl, _size);
++ } else {
++ ftruncate64(hdl, _size);
++ }
+
+ if (numRead != _size)
+ throw new Exception(format("stream exception: '%s' is corrupted", aFilename));
+@@ -1611,8 +1626,14 @@ class MemoryStream: Stream, StreamPersis
+ throw new Exception(format("stream exception: cannot open '%s'", aFilename));
+
+ scope(exit) core.sys.posix.unistd.close(hdl);
+- size(core.sys.posix.unistd.lseek64(hdl, 0, SEEK_END));
+- core.sys.posix.unistd.lseek64(hdl, 0, SEEK_SET);
++ version(FreeBSD)
++ {
++ size(core.sys.posix.unistd.lseek(hdl, 0, SEEK_END));
++ core.sys.posix.unistd.lseek(hdl, 0, SEEK_SET);
++ } else {
++ size(core.sys.posix.unistd.lseek64(hdl, 0, SEEK_END));
++ core.sys.posix.unistd.lseek64(hdl, 0, SEEK_SET);
++ }
+ const size_t numRead = core.sys.posix.unistd.read(hdl, _memory, _size);
+ position = 0;
+
diff --git a/devel/iz/pkg-descr b/devel/iz/pkg-descr
new file mode 100644
index 000000000000..320cd3ec0f14
--- /dev/null
+++ b/devel/iz/pkg-descr
@@ -0,0 +1,5 @@
+iz is a general purpose library for the D programming language. It includes
+streams, containers, a serializer, property binder, Pascal-like sets,
+Pascal-like properties and more
+
+WWW: https://github.com/BBasile/iz
diff --git a/devel/iz/pkg-plist b/devel/iz/pkg-plist
new file mode 100644
index 000000000000..fb16249ddcd4
--- /dev/null
+++ b/devel/iz/pkg-plist
@@ -0,0 +1,18 @@
+include/d/iz/classes.d
+include/d/iz/containers.d
+include/d/iz/enumset.d
+include/d/iz/logicver.d
+include/d/iz/math.d
+include/d/iz/memory.d
+include/d/iz/observer.d
+include/d/iz/package.d
+include/d/iz/properties.d
+include/d/iz/referencable.d
+include/d/iz/rtti.d
+include/d/iz/serializer.d
+include/d/iz/streams.d
+include/d/iz/strings.d
+include/d/iz/sugar.d
+include/d/iz/testing.d
+include/d/iz/types.d
+lib/d/libiz.a