Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2006 21:20:06 GMT
From:      Bill Dymek <bdymek@internap.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/93318: New port: x11-toolkits/swt32, Eclipse SWT 3.2M4 Support
Message-ID:  <200607182120.k6ILK63m061592@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/93318; it has been noted by GNATS.

From: Bill Dymek <bdymek@internap.com>
To: bug-followup@FreeBSD.org,
 Bill Dymek <bdymek@ieee.org>
Cc:  
Subject: Re: ports/93318: New port: x11-toolkits/swt32, Eclipse SWT 3.2M4 Support
Date: Tue, 18 Jul 2006 17:19:48 -0400

 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	.
 #	./files
 #	./files/patch-make_freebsd.mak
 #	./files/patch-build.sh
 #	./files/patch-OS.java
 #	./files/patch-build.xml
 #	./Makefile
 #	./distinfo
 #	./pkg-descr
 #
 echo c - .
 mkdir -p . > /dev/null 2>&1
 echo c - ./files
 mkdir -p ./files > /dev/null 2>&1
 echo x - ./files/patch-make_freebsd.mak
 sed 's/^X//' >./files/patch-make_freebsd.mak << 'END-of-./files/patch-
 make_freebsd.mak'
 X--- make_freebsd.mak.orig	Thu Feb  2 10:20:56 2006
 X+++ make_freebsd.mak	Thu Feb  2 10:24:53 2006
 X@@ -9,7 +9,7 @@
 X #     IBM Corporation - initial API and implementation
 X
 #***********************************************************************
 ********
 X
 X-# Makefile for creating SWT libraries for Linux GTK
 X+# Makefile for creating SWT libraries for FreeBSD GTK
 X
 X include make_common.mak
 X
 X@@ -72,7 +72,7 @@
 X 	-fPIC \
 X 	-I. \
 X 	-I$(JAVA_HOME)/include \
 X-	-I$(JAVA_HOME)/include/linux \
 X+	-I$(JAVA_HOME)/include/freebsd \
 X 	${GECKO_INCLUDES} \
 X 	${SWT_PTR_CFLAGS}
 X MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -
 Bsymbolic \
 X@@ -91,15 +91,16 @@
 X CFLAGS = -O -Wall \
 X 		-DSWT_VERSION=$(SWT_VERSION) \
 X 		$(NATIVE_STATS) \
 X-		-DLINUX -DGTK \
 X+		-DFREEBSD -DGTK \
 X 		-I$(JAVA_HOME)/include \
 X-		-I$(JAVA_HOME)/include/linux \
 X-		-fPIC \
 X+		-I$(JAVA_HOME)/include/freebsd \
 X+                -fpic -fPIC \
 X+                -I$(X11BASE)/include \
 X 		${SWT_PTR_CFLAGS}
 X-LIBS = -shared -fPIC -s
 X+LIBS = -shared -fPIC -fpic -s
 X
 X
 X-all: make_swt make_atk make_gnome make_glx
 X+all: make_swt make_atk $(MAKE_GNOME) make_awt $(MAKE_MOZILLA) $
 (MAKE_CAIRO) make_glx
 X
 X #
 X # SWT libs
 X@@ -239,4 +240,4 @@
 X # Clean
 X #
 X clean:
 X-	rm -f *.o *.so
 X+	rm -f *.o *.so *.jar
 END-of-./files/patch-make_freebsd.mak
 echo x - ./files/patch-build.sh
 sed 's/^X//' >./files/patch-build.sh << 'END-of-./files/patch-build.sh'
 X--- build.sh.orig	2005-12-15 15:19:38.000000000 -0500
 X+++ build.sh	2006-01-24 15:27:53.000000000 -0500
 X@@ -12,10 +12,14 @@
 X #     Tom Tromey (Red Hat, Inc.)
 X
 #***********************************************************************
 ********
 X
 X-cd `dirname $0`
 X+#cd `dirname $0`
 X
 X if [ "${JAVA_HOME}" = "" ]; then
 X 	echo "Please set JAVA_HOME to point at a JRE."
 X+else
 X+	JAVA_HOME=`echo \$JAVA_HOME | sed 's/\/jre//g'`
 X+	echo "JAVA_HOME=$JAVA_HOME"
 X+	echo
 X fi
 X if [ "${CC}" = "" ]; then
 X 	CC=gcc
 X@@ -31,6 +35,10 @@
 X 		SWT_OS=solaris
 X 		MAKEFILE=make_solaris.mak
 X 		;;
 X+	"FreeBSD")
 X+		SWT_OS=freebsd
 X+		MAKEFILE=make_freebsd.mak
 X+		;;
 X 	*)
 X 		SWT_OS=`uname -s | tr -s '[:upper:]' '[:lower:]'`
 X 		MAKEFILE=make_linux.mak
 X@@ -61,7 +69,7 @@
 X esac
 X
 X # For 64-bit CPUs, we have a switch
 X-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} =
 'ia64' ]; then
 X+if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64'
 -o ${MODEL} = 'amd64' ]; then
 X 	SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
 X 	export SWT_PTR_CFLAGS
 X 	if [ -d /lib64 ]; then
 X@@ -124,7 +132,8 @@
 X fi
 X
 X if [ "x${1}" = "xclean" ]; then
 X-	make -f $MAKEFILE clean
 X+	gmake -f $MAKEFILE clean
 X else
 X-	make -f $MAKEFILE all $MAKE_GNOME $MAKE_CAIRO $MAKE_AWT
 $MAKE_MOZILLA ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
 X+	gmake -f $MAKEFILE make_swt make_atk make_glx $MAKE_GNOME
 $MAKE_CAIRO $MAKE_AWT $MAKE_MOZILLA ${1} ${2} ${3} ${4} ${5} ${6}
 ${7} ${8} ${9}
 X+
 X fi
 END-of-./files/patch-build.sh
 echo x - ./files/patch-OS.java
 sed 's/^X//' >./files/patch-OS.java << 'END-of-./files/patch-OS.java'
 X--- ./org/eclipse/swt/internal/gtk/OS.java.orig	Thu Dec 15 15:19:38
 2005
 X+++ ./org/eclipse/swt/internal/gtk/OS.java	Mon Jan 23 23:51:20 2006
 X@@ -20,18 +20,20 @@
 X 	}
 X 	
 X 	/** OS Constants */
 X-	public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX;
 X+	public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX,
 IsFreeBSD;
 X 	static {
 X 		
 X 		/* Initialize the OS flags and locale constants */
 X+		/* make bootstrap compatible with `uname -s` for FreeBSD */
 X 		String osName = System.getProperty ("os.name");
 X-		boolean isAIX = false, isSunOS = false, isLinux = false, isHPUX =
 false;
 X+		boolean isAIX = false, isSunOS = false, isLinux = false, isHPUX =
 false, isFreeBSD = false;
 X 		if (osName.equals ("Linux")) isLinux = true;
 X+		if (osName.equals ("FreeBSD")) isFreeBSD = true;
 X 		if (osName.equals ("AIX")) isAIX = true;
 X 		if (osName.equals ("Solaris")) isSunOS = true;
 X 		if (osName.equals ("SunOS")) isSunOS = true;
 X 		if (osName.equals ("HP-UX")) isHPUX = true;
 X-		IsAIX = isAIX;  IsSunOS = isSunOS;  IsLinux = isLinux;  IsHPUX =
 isHPUX;
 X+		IsAIX = isAIX;  IsSunOS = isSunOS;  IsLinux = isLinux;  IsFreeBSD
 = isFreeBSD;  IsHPUX = isHPUX;
 X 	}
 X
 X 	/** Constants */
 END-of-./files/patch-OS.java
 echo x - ./files/patch-build.xml
 sed 's/^X//' >./files/patch-build.xml << 'END-of-./files/patch-
 build.xml'
 X--- build.xml.orig	Thu Dec 15 15:19:38 2005
 X+++ build.xml	Wed Jan 25 01:01:08 2006
 X@@ -1,55 +1,61 @@
 X <?xml version="1.0" encoding="UTF-8"?>
 X+<project name="org.eclipse.swt.gtk.freebsd.x86_64"
 default="build.jar" basedir=".">
 X
 X-<project default="build_gtk_lib" basedir="../../..">
 X+	<target name="init">
 X+		<property name="ws" value="gtk"/>
 X+		<property name="os" value="freebsd"/>
 X+		<property name="arch" value="x86_64"/>
 X+		<property name="version.suffix" value="3.218"/>
 X+		<property name="destination" value="${basedir}"/>
 X+		<property name="path.java.home" value="${java.home}"/>
 X+                <property name="javac.verbose" value="false"/>
 X+                <property name="javac.debug" value="off"/>
 X+		<property name="input.srcdir" value="${basedir}/org"/>
 X+		<property name="output.jar" value="${basedir}/swt.jar"/>
 X+		<property name="output.classes" value="${basedir}/classes"/>
 X+	</target>
 X+
 X+	<target name="all" depends="build.jar"/>
 X+
 X+	<target name="build.classes" depends="init">
 X+		<mkdir dir="${output.classes}"/>
 X+		<!-- -source & -target taken from Eclipse 32M4 CVS build -->
 X+		<javac	srcdir="${input.srcdir}" destdir="${output.classes}"
 X+			debug="${javac.debug}" verbose="${javac.verbose}"
 X+			source="1.3" target="1.2">
 X+		</javac>
 X+	</target>
 X+
 X+	<target name="build.jar" depends="build.nativeLibraries">
 X+		<jar destfile="${output.jar}" index="false">
 X+			<fileset dir="${output.classes}">
 X+				<exclude name="**/*.java"/>
 X+				<exclude name="**/*.o"/>
 X+				<exclude name="**/*.so"/>
 X+				<!-- exclude CVS archive -->
 X+				<exclude name="**/CVS/**"/>
 X+			</fileset>
 X+			<fileset dir="${basedir}">
 X+				<include name="**/version.txt"/>
 X+			</fileset>
 X+		</jar>
 X+	</target>
 X+
 X+	<target name="clean" depends="init">
 X+		<delete dir="${output.classes}"/>
 X+		<delete file="${output.jar}"/>
 X+		<exec  executable="sh" failonerror="true">
 X+			<env key="JAVA_HOME" value="${path.java.home}"/>
 X+			<arg value="build.sh"/>
 X+			<arg value="clean"/>
 X+		</exec>
 X+	</target>
 X+
 X+	<target name="build.nativeLibraries" depends="build.classes">
 X+		<exec  executable="sh" failonerror="true">
 X+			<env key="JAVA_HOME" value="${path.java.home}"/>
 X+			<arg value="build.sh"/>
 X+		</exec>
 X+	</target>
 X
 X-<target name="init">
 X-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
 X-	<eclipse.refreshLocal resource="org.eclipse.swt.tools"
 depth="infinite" />	
 X-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
 X-</target>
 X-	
 X-<!-- Build swt.so for GTK -->
 X-<target name="build_gtk_lib" depends="init">
 X-	<exec dir="./bin/library" executable="sh">
 X-		<arg line="${basedir}/bin/library/build.sh"/>
 X-		<arg line="install"/>
 X-	</exec>
 X-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86"
 depth="infinite" />
 X-</target>
 X-
 X-<!-- Build swt.so for PowerPC 32 bit GTK (no Mozilla)-->
 X-<target name="build_ppc_gtk_lib" depends="init">
 X-	<exec dir="./bin/library" executable="sh">
 X-		<env key="MODEL" value="ppc"/>
 X-		<arg line="${basedir}/bin/library/build.sh"/>
 X-		<arg line="install"/>
 X-	</exec>
 X-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.ppc"
 depth="infinite" />
 X-</target>
 X-
 X-<!-- Build swt.so for Solaris GTK (no Mozilla) -->
 X-<target name="build_solaris_gtk_lib" depends="init">
 X-	<exec dir="./bin/library" executable="sh">
 X-		<arg line="${basedir}/bin/library/build.sh"/>
 X-		<arg line="install"/>
 X-	</exec>
 X-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.solaris.sparc"
 depth="infinite" />
 X-</target>
 X-	
 X-<!-- Build swt.so for GTK 64 -->
 X-<target name="build_gtk64_lib" depends="init">
 X-	<exec dir="./bin/library" executable="sh">
 X-		<arg line="${basedir}/bin/library/build.sh"/>
 X-		<arg line="install"/>
 X-	</exec>
 X-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86_64"
 depth="infinite" />	
 X-</target>
 X-
 X-<target name="clean">
 X-	<exec dir="./bin/library" executable="sh">
 X-		<arg line="${basedir}/bin/library/build.sh"/>
 X-		<arg line="clean"/>
 X-	</exec>
 X-</target>
 X-
 X-</project>
 X\ No newline at end of file
 X+</project>
 END-of-./files/patch-build.xml
 echo x - ./Makefile
 sed 's/^X//' >./Makefile << 'END-of-./Makefile'
 X# New ports collection makefile for:	swt
 X# Date created:				2005-12-15
 X# Whom:					past@ebs.gr
 X#
 X# $FreeBSD $
 X#
 X
 XPORTNAME=	swt
 XPORTVERSION=	3.2
 XCATEGORIES=	x11-toolkits devel java
 XMASTER_SITES=	${MASTER_SITE_ECLIPSE}
 XMASTER_SITE_SUBDIR=	R-${PORTVERSION}-200606291905
 X
 XMAINTAINER=	freebsd-eclipse@freebsd.org
 XCOMMENT=	Standard Widget Toolkit for Java
 X
 XBUILD_DEPENDS+= ant:${PORTSDIR}/devel/apache-ant
 XANT=            ant
 X
 XOUTPUT_JAR=	swt32.jar
 XSWT_VERSION=	3232
 XNO_WRKSUBDIR=	yes
 XONLY_FOR_ARCHS=	i386 amd64
 XUSE_GMAKE=	yes
 XUSE_ZIP=	yes
 XMAKEFILE=	make_freebsd.mak
 XINSTALLS_SHLIB=	yes
 XPLIST_SUB=	BUILD=${SWT_VERSION}
 XPLIST_FILES=	%%JAVAJARDIR%%/${OUTPUT_JAR} \
 X		lib/libswt-atk-gtk-%%BUILD%%.so \
 X		lib/libswt-awt-gtk-%%BUILD%%.so \
 X		lib/libswt-gtk-%%BUILD%%.so \
 X		lib/libswt-glx-gtk-%%BUILD%%.so \
 X		lib/libswt-pi-gtk-%%BUILD%%.so
 X
 XUSE_JAVA=	yes
 XUSE_REINPLACE=	yes
 XJAVA_VERSION=	1.4+
 XJAVA_OS=	native
 X
 X.if !defined(WITHOUT_MOZILLA)
 XPLIST_FILES+=	lib/libswt-mozilla-gtk-%%BUILD%%.so
 XMAKE_MOZILLA=	make_mozilla
 X.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
 XBROWSER=	${WITH_MOZILLA}
 XBUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
 X.else
 XBUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
 XBROWSER=	mozilla
 X.endif
 X.else
 XBROWSER=
 XMAKE_MOZILLA=
 X.endif
 X
 X.if defined(WITHOUT_CAIRO)
 XMAKE_CAIRO=
 X.else
 XLIB_DEPENDS=	cairo.2:${PORTSDIR}/graphics/cairo
 XMAKE_CAIRO=	make_cairo
 XPLIST_FILES+=	lib/libswt-cairo-gtk-%%BUILD%%.so
 X.endif
 X
 X.if defined(WITHOUT_GNOMEVFS)
 XMAKE_GNOME=
 XUSE_GNOME=	gtk20 pkgconfig
 X.else
 XMAKE_GNOME=	make_gnome
 XUSE_GNOME=	gtk20 gnomevfs2 libgnome libgnomeui pkgconfig
 XPLIST_FILES+=	lib/libswt-gnome-gtk-%%BUILD%%.so
 X.endif
 X
 X.include <bsd.port.pre.mk>
 X
 X.if (${ARCH} == "amd64")
 XWRK-EXT=	gtk-linux-x86_64
 XDISTNAME=	swt-${PORTVERSION}-${WRK-EXT}
 X.else
 XWRK-EXT=	gtk-linux-x86
 XDISTNAME=	swt-${PORTVERSION}-${WRK-EXT}
 X.endif
 X
 XMAKE_ENV+=	BROWSER="${BROWSER}" \
 X		JAVA_HOME="${JAVA_HOME}" \
 X		MAKE_GNOME=${MAKE_GNOME} \
 X		MAKE_MOZILLA=${MAKE_MOZILLA} \
 X		MAKE_CAIRO=${MAKE_CAIRO} \
 X		MACHINE_ARCH=${MACHINE_ARCH}
 X
 XWRKSRC= ${WRKDIR}/swt-M20060629-1905-${WRK-EXT}
 X
 Xpost-extract:
 X	@echo ${WRKSRC}
 X	@(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip")
 X	@${CP} ${WRKSRC}/make_linux.mak ${WRKSRC}/make_freebsd.mak
 X
 Xdo-build:
 X	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${ANT} -Doutput.jar=$
 {OUTPUT_JAR} clean all)
 X
 Xdo-install:
 X	${MKDIR} ${JAVAJARDIR}
 X	${INSTALL_DATA} ${WRKSRC}/libswt-*.so ${PREFIX}/lib
 X	${INSTALL_DATA} ${WRKSRC}/${OUTPUT_JAR} ${JAVAJARDIR}/
 X
 X.include <bsd.port.post.mk>
 END-of-./Makefile
 echo x - ./distinfo
 sed 's/^X//' >./distinfo << 'END-of-./distinfo'
 XMD5 (swt-3.2-gtk-linux-x86_64.zip) = e373d904a4f67322b0c1419c22285a5b
 XSHA256 (swt-3.2-gtk-linux-x86_64.zip) =
 fb00c97c488353a10d7842a50b9184851e90870c3ec1b0ee3bfa838e6ac9a665
 XSIZE (swt-3.2-gtk-linux-x86_64.zip) = 2841135
 XMD5 (swt-3.2-gtk-linux-x86.zip) = 2cba80d9bd247fd6985509d96c1540cd
 XSHA256 (swt-3.2-gtk-linux-x86.zip) =
 05701ceb02a4099e035571abb0d005947758de48c47b49cd38a5b3fd5670a13c
 XSIZE (swt-3.2-gtk-linux-x86.zip) = 2935209
 X
 END-of-./distinfo
 echo x - ./pkg-descr
 sed 's/^X//' >./pkg-descr << 'END-of-./pkg-descr'
 XSWT is the software component that delivers native widget functionality
 Xfor the Eclipse platform in an operating system independent manner.
 X
 XThis port provides SWT without requiring a full download and build of
 XEclipse.
 X
 XWWW:	http://www.eclipse.org/swt/
 END-of-./pkg-descr
 exit
 
 
 
 
 
 



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