Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2006 14:08:17 +0200
From:      "\"Panagiotis Astithas\" <Panagiotis Astithas" <past@ebs.gr>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/91825: [patch] Fixes for java/eclipse-cdt
Message-ID:  <1137326897.88142@ajax.ebs.gr>
Resent-Message-ID: <200601151210.k0FCAAeA090081@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91825
>Category:       ports
>Synopsis:       [patch] Fixes for java/eclipse-cdt
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 15 12:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Panagiotis Astithas
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
EBS Ltd. 
>Environment:


System: FreeBSD 6.0-STABLE #5: Thu Jan 12 23:51:38 EET 2006
    root@ajax.ebs.gr:/usr/obj/usr/src/sys/AJAX



>Description:


This patches fixes two issues for java/eclipse-cdt:
- building on amd64, although without the native libraries present for i386
- executing programs in debug mode or not, that currently results in a crash


>How-To-Repeat:


- Try to build eclipse-cdt on an amd64 system.
- Try to build a C/C++ project from eclipse and launch the execulatble using the "Run" or "Debug" menu options.


>Fix:


--- eclipse-cdt.patch begins here ---
diff -ruN /usr/ports/java/eclipse-cdt/Makefile eclipse-cdt/Makefile
--- /usr/ports/java/eclipse-cdt/Makefile	Tue Jan  3 05:26:38 2006
+++ eclipse-cdt/Makefile	Tue Jan 10 09:45:09 2006
@@ -10,7 +10,7 @@
 CATEGORIES=	java devel
 MASTER_SITES=	http://download.eclipse.org/tools/cdt/releases/eclipse3.1/dist/${PORTVERSION}/
 PKGNAMEPREFIX=	eclipse-
-DISTNAME=	org.eclipse.cdt.sdk-${PORTVERSION}-linux.${ECLIPSE_ARCH}
+DISTNAME=	org.eclipse.cdt.sdk-${PORTVERSION}-linux.x86
 DIST_SUBDIR=	eclipse
 
 MAINTAINER=	freebsd-eclipse@FreeBSD.org
@@ -31,6 +31,8 @@
 ECLIPSE_ARCH=	amd64
 .else
 ECLIPSE_ARCH=	x86
+PLIST_FILES+=	eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/os/freebsd/x86/libpty.so \
+		eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/os/freebsd/x86/libspawner.so
 .endif
 
 MAKE_ENV+=	ECLIPSE_ARCH=${ECLIPSE_ARCH} \
@@ -44,8 +46,10 @@
 		@${RM} ${WRKSRC}/eclipse/plugins/org.eclipse.cdt.core.freebsd_${PORTVERSION}/*.orig
 		@${RM} ${WRKSRC}/eclipse/plugins/org.eclipse.cdt.core_${PORTVERSION}/*.orig
 		@${RM} ${WRKSRC}/eclipse/plugins/org.eclipse.cdt.managedbuilder.gnu.ui_${PORTVERSION}/*.orig
+.if (${ARCH} == "i386")
 		@(cd ${WRKSRC}/eclipse/plugins/org.eclipse.cdt.source.freebsd.gtk.x86_${PORTVERSION}/src/org.eclipse.cdt.core.freebsd_${PORTVERSION}/library; \
 		${SETENV} ${MAKE_ENV} ${GMAKE})
+.endif
 
 do-install:
 		@${MKDIR} ${PREFIX}/eclipse
diff -ruN /usr/ports/java/eclipse-cdt/files/patch-cdt.core-openpty.c eclipse-cdt/files/patch-cdt.core-openpty.c
--- /usr/ports/java/eclipse-cdt/files/patch-cdt.core-openpty.c	Tue Jan  3 05:26:38 2006
+++ eclipse-cdt/files/patch-cdt.core-openpty.c	Wed Jan 11 22:55:34 2006
@@ -1,5 +1,5 @@
---- eclipse/plugins/org.eclipse.cdt.source.freebsd.gtk.x86_3.0.1/src/org.eclipse.cdt.core.freebsd_3.0.1/library/openpty.c.orig	Sat Dec  3 01:10:16 2005
-+++ eclipse/plugins/org.eclipse.cdt.source.freebsd.gtk.x86_3.0.1/src/org.eclipse.cdt.core.freebsd_3.0.1/library/openpty.c	Sat Dec  3 01:13:46 2005
+--- eclipse/plugins/org.eclipse.cdt.source.freebsd.gtk.x86_3.0.1/src/org.eclipse.cdt.core.freebsd_3.0.1/library/openpty.c.orig	Wed Jan 11 22:04:49 2006
++++ eclipse/plugins/org.eclipse.cdt.source.freebsd.gtk.x86_3.0.1/src/org.eclipse.cdt.core.freebsd_3.0.1/library/openpty.c	Wed Jan 11 22:52:35 2006
 @@ -20,7 +20,6 @@
  #include <grp.h>
  
@@ -8,3 +8,12 @@
  
  /**
   * This is taken from R. W. Stevens book.
+@@ -84,7 +83,7 @@
+ 	char *ptr;
+ 
+ 	strcpy(pts_name, "/dev/ptmx");
+-	fdm = getpt();
++	fdm = posix_openpt(O_RDWR);
+ 	if (fdm < 0)
+ 		return -1;
+ 	if (grantpt(fdm) < 0) { /* grant access to slave */
diff -ruN /usr/ports/java/eclipse-cdt/pkg-plist eclipse-cdt/pkg-plist
--- /usr/ports/java/eclipse-cdt/pkg-plist	Tue Jan  3 05:28:05 2006
+++ eclipse-cdt/pkg-plist	Tue Jan 10 09:44:27 2006
@@ -531,8 +531,6 @@
 eclipse/plugins/org.eclipse.cdt.core_3.0.1/plugin.properties
 eclipse/plugins/org.eclipse.cdt.core_3.0.1/about.html
 eclipse/plugins/org.eclipse.cdt.core_3.0.1/plugin.xml
-eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/os/freebsd/x86/libspawner.so
-eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/os/freebsd/x86/libpty.so
 eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/about.html
 eclipse/plugins/org.eclipse.cdt.core.freebsd.x86_3.0.1/fragment.xml
 eclipse/plugins/org.eclipse.cdt.core.freebsd_3.0.1/cdt_linux.jar
--- eclipse-cdt.patch ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1137326897.88142>