summaryrefslogtreecommitdiff
path: root/lang/libBlocksRuntime
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2018-06-02 19:11:01 +0000
committerjoerg <joerg@pkgsrc.org>2018-06-02 19:11:01 +0000
commitbc5d203133f74cdbc2166a1fee72b789d4029faa (patch)
tree2224a4f03e3e77a73bd64c1833206576ff9da953 /lang/libBlocksRuntime
parentad8aa25e27a7526d413dccf8b266dd4c45623483 (diff)
downloadpkgsrc-bc5d203133f74cdbc2166a1fee72b789d4029faa.tar.gz
Add libBlocksRuntime-6.0.0 from compiler-rt, a relatively portable
implementation of Apple's Blocks extension.
Diffstat (limited to 'lang/libBlocksRuntime')
-rw-r--r--lang/libBlocksRuntime/DESCR2
-rw-r--r--lang/libBlocksRuntime/Makefile37
-rw-r--r--lang/libBlocksRuntime/PLIST3
-rw-r--r--lang/libBlocksRuntime/buildlink3.mk12
-rw-r--r--lang/libBlocksRuntime/distinfo8
-rw-r--r--lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_config.h7
-rw-r--r--lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_runtime.c17
7 files changed, 86 insertions, 0 deletions
diff --git a/lang/libBlocksRuntime/DESCR b/lang/libBlocksRuntime/DESCR
new file mode 100644
index 00000000000..a67413dc985
--- /dev/null
+++ b/lang/libBlocksRuntime/DESCR
@@ -0,0 +1,2 @@
+This library provides a target-independ implementation of the runtime
+interface for Apple's "Blocks" extension.
diff --git a/lang/libBlocksRuntime/Makefile b/lang/libBlocksRuntime/Makefile
new file mode 100644
index 00000000000..0e49577ae85
--- /dev/null
+++ b/lang/libBlocksRuntime/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.1 2018/06/02 19:11:01 joerg Exp $
+
+VERS= 6.0.0
+DISTNAME= compiler-rt-${VERS}.src
+PKGNAME= libBlocksRuntime-${VERS}
+CATEGORIES= lang devel
+MASTER_SITES= https://releases.llvm.org/${VERS}/
+
+MAINTAINER= joerg@NetBSD.org
+HOMEPAGE= http://compiler-rt.llvm.org/
+COMMENT= Runtime support for Apple Blocks
+LICENSE= mit
+
+EXTRACT_SUFX= .tar.xz
+
+USE_LANGUAGES= c
+USE_LIBTOOL= yes
+
+INSTALLATION_DIRS+= include lib
+
+do-build:
+ cd ${WRKSRC}/lib/BlocksRuntime && ${SETENV} ${MAKE_ENV} \
+ ${LIBTOOL} --mode=compile ${COMPILE.c} data.c
+ cd ${WRKSRC}/lib/BlocksRuntime && ${SETENV} ${MAKE_ENV} \
+ ${LIBTOOL} --mode=compile ${COMPILE.c} runtime.c
+ cd ${WRKSRC}/lib/BlocksRuntime && ${SETENV} ${MAKE_ENV} \
+ ${LIBTOOL} --mode=link ${LINK.c} -o libBlocksRuntime.la \
+ data.lo runtime.lo -version-info 1:0:0 -rpath ${PREFIX}/lib
+
+do-install:
+ ${SETENV} ${MAKE_ENV} ${LIBTOOL} --mode=install ${INSTALL_LIB} \
+ ${WRKSRC}/lib/BlocksRuntime/libBlocksRuntime.la \
+ ${DESTDIR}${PREFIX}/lib/
+ ${INSTALL_DATA} ${WRKSRC}/lib/BlocksRuntime/Block.h \
+ ${DESTDIR}${PREFIX}/include/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/libBlocksRuntime/PLIST b/lang/libBlocksRuntime/PLIST
new file mode 100644
index 00000000000..d9df6cdd942
--- /dev/null
+++ b/lang/libBlocksRuntime/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2018/06/02 19:11:01 joerg Exp $
+include/Block.h
+lib/libBlocksRuntime.la
diff --git a/lang/libBlocksRuntime/buildlink3.mk b/lang/libBlocksRuntime/buildlink3.mk
new file mode 100644
index 00000000000..d2cf2f53d9f
--- /dev/null
+++ b/lang/libBlocksRuntime/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2018/06/02 19:11:01 joerg Exp $
+
+BUILDLINK_TREE+= libBlocksRuntime
+
+.if !defined(LIBBLOCKSRUNTIME_BUILDLINK3_MK)
+LIBBLOCKSRUNTIME_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libBlocksRuntime+= libBlocksRuntime>=6.0.0
+BUILDLINK_PKGSRCDIR.libBlocksRuntime?= ../../lang/libBlocksRuntime
+.endif # LIBBLOCKSRUNTIME_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libBlocksRuntime
diff --git a/lang/libBlocksRuntime/distinfo b/lang/libBlocksRuntime/distinfo
new file mode 100644
index 00000000000..5fd82abe1b0
--- /dev/null
+++ b/lang/libBlocksRuntime/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2018/06/02 19:11:01 joerg Exp $
+
+SHA1 (compiler-rt-6.0.0.src.tar.xz) = 5725f19be611034e77196461cdb4989f4258cfa4
+RMD160 (compiler-rt-6.0.0.src.tar.xz) = 47a79826fc076f71546700f403a9b488e63d4a3f
+SHA512 (compiler-rt-6.0.0.src.tar.xz) = 717bed116ef43ebb2e18daf6fb737472edf57564947f53fe6368d3bbb080f63e986c0d1b94dbd087be998196ad7be54f4361854f8eb5214600b82449ba02c9c1
+Size (compiler-rt-6.0.0.src.tar.xz) = 1633096 bytes
+SHA1 (patch-lib_BlocksRuntime_config.h) = 8676862a391b671c955b009ee572530a8be9676e
+SHA1 (patch-lib_BlocksRuntime_runtime.c) = 4b3a78441d865df7f0c4249c4152025fef9539cb
diff --git a/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_config.h b/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_config.h
new file mode 100644
index 00000000000..fb88d046136
--- /dev/null
+++ b/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_config.h
@@ -0,0 +1,7 @@
+$NetBSD: patch-lib_BlocksRuntime_config.h,v 1.1 2018/06/02 19:11:01 joerg Exp $
+
+--- lib/BlocksRuntime/config.h.orig 2018-05-07 16:23:52.356787945 +0000
++++ lib/BlocksRuntime/config.h
+@@ -0,0 +1,2 @@
++#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT
++#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_LONG
diff --git a/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_runtime.c b/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_runtime.c
new file mode 100644
index 00000000000..0d4595cba09
--- /dev/null
+++ b/lang/libBlocksRuntime/patches/patch-lib_BlocksRuntime_runtime.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_BlocksRuntime_runtime.c,v 1.1 2018/06/02 19:11:01 joerg Exp $
+
+--- lib/BlocksRuntime/runtime.c.orig 2018-05-07 16:23:23.420191743 +0000
++++ lib/BlocksRuntime/runtime.c
+@@ -69,9 +69,9 @@ static __inline bool OSAtomicCompareAndS
+
+ #elif defined(HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT) && defined(HAVE_SYNC_BOOL_COMPARE_AND_SWAP_LONG)
+
+-static __inline bool OSAtomicCompareAndSwapLong(long oldl, long newl, long volatile *dst) {
+- return __sync_bool_compare_and_swap(dst, oldl, newl);
+-}
++/*static __inline bool OSAtomicCompareAndSwapLong(long oldl, long newl, long volatile *dst) {
++ * return __sync_bool_compare_and_swap(dst, oldl, newl);
++ }*/
+
+ static __inline bool OSAtomicCompareAndSwapInt(int oldi, int newi, int volatile *dst) {
+ return __sync_bool_compare_and_swap(dst, oldi, newi);