diff --git a/java/Makefile b/java/Makefile index 245906c6a8fa..87ab0d699444 100644 --- a/java/Makefile +++ b/java/Makefile @@ -3,6 +3,7 @@ COMMENT = Java language support + SUBDIR += aparapi SUBDIR += avis SUBDIR += berkeley-db SUBDIR += bluej diff --git a/java/aparapi/Makefile b/java/aparapi/Makefile new file mode 100644 index 000000000000..5f9a4a502f82 --- /dev/null +++ b/java/aparapi/Makefile @@ -0,0 +1,34 @@ +# Created by: Johannes Dieterich +# $FreeBSD$ + +PORTNAME= aparapi +PORTVERSION= 1.0.0 +DISTVERSIONSUFFIX= -SNAPSHOT +CATEGORIES= java lang + +MAINTAINER= dieterich@ogolem.org +COMMENT= Open source API for expressing data parallel workflows in Java + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.TXT + +BUILD_DEPENDS= opencl>=0:devel/opencl +LIB_DEPENDS= libOpenCL.so:devel/ocl-icd +RUN_DEPENDS= opencl>=0:devel/opencl + +ONLY_FOR_ARCHS= amd64 i386 + +USE_GITHUB= yes + +USE_JAVA= yes +JAVA_VERSION= 1.7+ +USE_ANT= yes +ALL_TARGET= dist + +USES= dos2unix + +do-install: + (cd ${WRKSRC}/dist_freebsd && ${INSTALL_DATA} aparapi.jar ${STAGEDIR}${JAVAJARDIR}) + (cd ${WRKSRC}/dist_freebsd && ${INSTALL_LIB} libaparapi.so ${STAGEDIR}${PREFIX}/lib) + +.include diff --git a/java/aparapi/distinfo b/java/aparapi/distinfo new file mode 100644 index 000000000000..d114d3ebbbee --- /dev/null +++ b/java/aparapi/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1466929753 +SHA256 (aparapi-aparapi-1.0.0-SNAPSHOT_GH0.tar.gz) = 4b3a4662476746406f2138e372730a64e566b87a464a767dd878e9794f30101a +SIZE (aparapi-aparapi-1.0.0-SNAPSHOT_GH0.tar.gz) = 5431817 diff --git a/java/aparapi/files/patch-build.xml b/java/aparapi/files/patch-build.xml new file mode 100644 index 000000000000..745db07ec9d3 --- /dev/null +++ b/java/aparapi/files/patch-build.xml @@ -0,0 +1,13 @@ +--- build.xml.orig 2015-09-21 01:20:25 UTC ++++ build.xml +@@ -5,8 +5,9 @@ + + + +- ++ + ++ + + + diff --git a/java/aparapi/files/patch-com.amd.aparapi.jni_build.xml b/java/aparapi/files/patch-com.amd.aparapi.jni_build.xml new file mode 100644 index 000000000000..1926d39abaa4 --- /dev/null +++ b/java/aparapi/files/patch-com.amd.aparapi.jni_build.xml @@ -0,0 +1,156 @@ +--- com.amd.aparapi.jni/build.xml.orig 2015-09-21 01:20:25 UTC ++++ com.amd.aparapi.jni/build.xml +@@ -71,6 +71,23 @@ First consider editing the properties in + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -300,9 +317,16 @@ First consider editing the properties in + + + ++ ++ ++ + + + ++ ++ ++ ++ + + + +@@ -352,6 +376,9 @@ First consider editing the properties in + + + ++ ++ ++ + + + +@@ -485,6 +512,45 @@ First consider editing the properties in + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -575,7 +641,7 @@ First consider editing the properties in + + + +- ++ + + + +@@ -627,6 +693,24 @@ First consider editing the properties in + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -674,6 +758,20 @@ First consider editing the properties in + + + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + diff --git a/java/aparapi/files/patch-com.amd.aparapi.jni_src_cpp_Common.h b/java/aparapi/files/patch-com.amd.aparapi.jni_src_cpp_Common.h new file mode 100644 index 000000000000..a162c7512eb4 --- /dev/null +++ b/java/aparapi/files/patch-com.amd.aparapi.jni_src_cpp_Common.h @@ -0,0 +1,11 @@ +--- com.amd.aparapi.jni/src/cpp/Common.h.orig 2015-09-21 01:20:25 UTC ++++ com.amd.aparapi.jni/src/cpp/Common.h +@@ -44,7 +44,7 @@ + #include + #include + +-#ifndef __APPLE__ ++#if not defined __APPLE__ && not defined __FreeBSD__ + #include + #endif + diff --git a/java/aparapi/files/patch-com.amd.aparapi_src_java_com_amd_aparapi_internal_opencl_OpenCLLoader.java b/java/aparapi/files/patch-com.amd.aparapi_src_java_com_amd_aparapi_internal_opencl_OpenCLLoader.java new file mode 100644 index 000000000000..c33b0985d73e --- /dev/null +++ b/java/aparapi/files/patch-com.amd.aparapi_src_java_com_amd_aparapi_internal_opencl_OpenCLLoader.java @@ -0,0 +1,15 @@ +--- com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java.orig 2015-09-21 01:20:26 UTC ++++ com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java +@@ -26,10 +26,8 @@ public class OpenCLLoader extends OpenCL + logger.fine("arch = " + arch); + String aparapiLibraryName = null; + +- if (arch.equals("amd64") || arch.equals("x86_64")) { +- aparapiLibraryName = "aparapi_x86_64"; +- } else if (arch.equals("x86") || arch.equals("i386")) { +- aparapiLibraryName = "aparapi_x86"; ++ if (arch.equals("amd64") || arch.equals("x86_64") || arch.equals("x86") || arch.equals("i386")) { ++ aparapiLibraryName = "aparapi"; + } else { + logger.warning("Expected property os.arch to contain amd64, x86_64, x86 or i386 but instead found " + arch + + " as a result we don't know which aparapi to attempt to load."); diff --git a/java/aparapi/pkg-descr b/java/aparapi/pkg-descr new file mode 100644 index 000000000000..61e04346fb2a --- /dev/null +++ b/java/aparapi/pkg-descr @@ -0,0 +1,8 @@ +aparapi is an open source API for expressing data parallel workflows in Java. + +Originally an AMD product, Aparapi was released to open source on September +14, 2011. Aparapi is an API for expressing data parallel workloads in Java +and a runtime component capable of converting the Java# bytecode of compatible +workloads into OpenCL# so that it can be executed on a variety of GPU devices. + +WWW: https://github.com/aparapi/aparapi diff --git a/java/aparapi/pkg-plist b/java/aparapi/pkg-plist new file mode 100644 index 000000000000..a19866d643ce --- /dev/null +++ b/java/aparapi/pkg-plist @@ -0,0 +1,2 @@ +lib/libaparapi.so +%%JAVAJARDIR%%/aparapi.jar