aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-08-11 23:26:43 +0800
committerrafan <rafan@FreeBSD.org>2007-08-11 23:26:43 +0800
commit673278d6ac86d38aa7b26bd612d8809077e1171f (patch)
tree32e61bd953622c1abe2ded94846c249eabf4a72e /x11-toolkits
parenta6d198ab12c54350f05ce92e83852be247787fc2 (diff)
downloadfreebsd-ports-graphics-673278d6ac86d38aa7b26bd612d8809077e1171f.tar.gz
freebsd-ports-graphics-673278d6ac86d38aa7b26bd612d8809077e1171f.tar.zst
freebsd-ports-graphics-673278d6ac86d38aa7b26bd612d8809077e1171f.zip
- Fix build on amd64
PR: ports/115384 Submitted by: Robert Noland <rnoland at 2hip.net> (maintainer)
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/swt-devel/Makefile2
-rw-r--r--x11-toolkits/swt-devel/files/extra-patch-amd64-os.c20
-rw-r--r--x11-toolkits/swt-devel/files/extra-patch-i386-os.c (renamed from x11-toolkits/swt-devel/files/patch-os.c)5
3 files changed, 24 insertions, 3 deletions
diff --git a/x11-toolkits/swt-devel/Makefile b/x11-toolkits/swt-devel/Makefile
index 99b4b041618..2313fff4faf 100644
--- a/x11-toolkits/swt-devel/Makefile
+++ b/x11-toolkits/swt-devel/Makefile
@@ -19,6 +19,8 @@ COMMENT= Standard Widget Toolkit for Java
ONLY_FOR_ARCHS= i386 amd64
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-${ARCH}-os.c
+
SWT_VERSION= 3346
OUTPUT_JAR= swt-devel.jar
diff --git a/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c b/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c
new file mode 100644
index 00000000000..8b23b836383
--- /dev/null
+++ b/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c
@@ -0,0 +1,20 @@
+--- os.c.orig 2007-06-25 16:06:14.000000000 -0400
++++ os.c 2007-08-10 11:54:37.000000000 -0400
+@@ -17397,11 +17397,16 @@
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, realpath_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
++ if (arg1) {
++ if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
++ } else
++ lparg1 = malloc(PATH_MAX);
+ rc = (jlong)realpath((const char *)lparg0, (char *)lparg1);
+ fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
++ if (!arg1 && lparg1 && rc == 0)
++ free(lparg1);
+ OS_NATIVE_EXIT(env, that, realpath_FUNC);
+ return rc;
+ }
diff --git a/x11-toolkits/swt-devel/files/patch-os.c b/x11-toolkits/swt-devel/files/extra-patch-i386-os.c
index c0f465f7780..f7c566df9a8 100644
--- a/x11-toolkits/swt-devel/files/patch-os.c
+++ b/x11-toolkits/swt-devel/files/extra-patch-i386-os.c
@@ -1,5 +1,5 @@
---- ./os.c 2007-07-22 11:53:22.000000000 +0400
-+++ ./os.c 2007-07-22 11:57:56.000000000 +0400
+--- os.c.orig 2007-04-26 14:03:00.000000000 -0400
++++ os.c 2007-08-10 11:56:22.000000000 -0400
@@ -17397,11 +17397,16 @@
jint rc = 0;
OS_NATIVE_ENTER(env, that, realpath_FUNC);
@@ -18,4 +18,3 @@
OS_NATIVE_EXIT(env, that, realpath_FUNC);
return rc;
}
-