ports/115384: [MAINTAINER] x11-toolkits/swt-devel: Fix build on amd64
Robert Noland
rnoland at 2hip.net
Fri Aug 10 16:10:01 UTC 2007
>Number: 115384
>Category: ports
>Synopsis: [MAINTAINER] x11-toolkits/swt-devel: Fix build on amd64
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 10 16:10:00 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Robert Noland
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD rnoland-ibm.2hip.net 7.0-CURRENT FreeBSD 7.0-CURRENT #105: Mon Jul 30 17:10:59 EDT 2007
>Description:
Fix build on amd64
Added file(s):
- files/extra-patch-amd64-os.c
- files/extra-patch-i386-os.c
Removed file(s):
- files/patch-os.c
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- swt-devel-3.3_1,1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/swt-devel/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile 3 Aug 2007 21:53:44 -0000 1.8
+++ Makefile 10 Aug 2007 15:57:58 -0000
@@ -19,6 +19,8 @@
ONLY_FOR_ARCHS= i386 amd64
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-${ARCH}-os.c
+
SWT_VERSION= 3346
OUTPUT_JAR= swt-devel.jar
Index: files/extra-patch-amd64-os.c
===================================================================
RCS file: files/extra-patch-amd64-os.c
diff -N files/extra-patch-amd64-os.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/extra-patch-amd64-os.c 10 Aug 2007 15:57:58 -0000
@@ -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;
+ }
Index: files/extra-patch-i386-os.c
===================================================================
RCS file: files/extra-patch-i386-os.c
diff -N files/extra-patch-i386-os.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/extra-patch-i386-os.c 10 Aug 2007 15:57:58 -0000
@@ -0,0 +1,20 @@
+--- 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);
+ 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 = (jint)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;
+ }
Index: files/patch-os.c
===================================================================
RCS file: files/patch-os.c
diff -N files/patch-os.c
--- files/patch-os.c 3 Aug 2007 21:53:45 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
---- ./os.c 2007-07-22 11:53:22.000000000 +0400
-+++ ./os.c 2007-07-22 11:57:56.000000000 +0400
-@@ -17397,11 +17397,16 @@
- jint 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 = (jint)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;
- }
-
--- swt-devel-3.3_1,1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list