Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2006 23:10:42 -0500 (EST)
From:      "Robert C. Noland III" <rnoland@2hip.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105933: [NEW PORT] x11-toolkits/swt32: Standard Widget Toolkit for Java
Message-ID:  <200611280410.kAS4Agsl024997@bbeng-laptop.acs.internap.com>
Resent-Message-ID: <200611280540.kAS5eG9W030545@freefall.freebsd.org>

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

>Number:         105933
>Category:       ports
>Synopsis:       [NEW PORT] x11-toolkits/swt32: Standard Widget Toolkit for Java
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 28 05:40:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Robert C. Noland III
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD bbeng-laptop.acs.internap.com 7.0-CURRENT FreeBSD 7.0-CURRENT #81: Mon Nov 27 13:51:12 EST 2006
>Description:
SWT is the software component that delivers native widget functionality
for the Eclipse platform in an operating system independent manner.

This port provides SWT without requiring a full download and build of
Eclipse.

WWW:	http://www.eclipse.org/swt/

This supersedes PR# 105586

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- swt32-3.2.1.shar begins here ---
# 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:
#
#	swt32
#	swt32/pkg-descr
#	swt32/Makefile
#	swt32/distinfo
#	swt32/files
#	swt32/files/patch-xpcom_profile.h
#	swt32/files/patch-make_freebsd.mak
#	swt32/files/patch-build.xml
#	swt32/files/patch-build.sh
#	swt32/files/patch-OS.java
#
echo c - swt32
mkdir -p swt32 > /dev/null 2>&1
echo x - swt32/pkg-descr
sed 's/^X//' >swt32/pkg-descr << 'END-of-swt32/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-swt32/pkg-descr
echo x - swt32/Makefile
sed 's/^X//' >swt32/Makefile << 'END-of-swt32/Makefile'
X# New ports collection makefile for:	swt32
X# Date created:				2006-11-16
X# Whom:					Robert C. Noland III <rnoland@2hip.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	swt32
XPORTVERSION=	3.2.1
X#PORTREVISION=
XCATEGORIES=	x11-toolkits devel java
XMASTER_SITES=	${MASTER_SITE_ECLIPSE}
XMASTER_SITE_SUBDIR=	R-${PORTVERSION}-200609210945
XDISTNAME=	swt-${PORTVERSION}-${DIST_EXT}
X
XMAINTAINER=	rnoland@2hip.net
XCOMMENT=	Standard Widget Toolkit for Java
X
XONLY_FOR_ARCHS=	i386 amd64
X
XOUTPUT_JAR=	swt32.jar
XSWT_VERSION=	3235
X
XUSE_ZIP=	yes
XUSE_GL=		yes
XUSE_JAVA=	yes
XJAVA_VERSION=	1.4+
XJAVA_OS=	native
XUSE_ANT=	yes
XMAKE_ARGS+=	-Doutput.jar=${OUTPUT_JAR}
XMAKEFILE=	make_freebsd.mak
XUSE_LDCONFIG=	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
XWRKSRC=		${WRKDIR}/swt-M20060921-0945-${DIST_EXT}
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.if !defined(WITHOUT_MOZILLA)
XPLIST_FILES+=	lib/libswt-mozilla-gtk-%%BUILD%%.so \
X		lib/libswt-mozilla14-profile-gtk-%%BUILD%%.so \
X		lib/libswt-mozilla17-profile-gtk-%%BUILD%%.so \
X		lib/libswt-mozilla18-profile-gtk-%%BUILD%%.so
X
XMAKE_MOZILLA=	make_mozilla
X.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
XBROWSER=	${WITH_MOZILLA}
XBUILD_DEPENDS+=	${BROWSER}:${PORTSDIR}/www/${BROWSER}
X.else
XBROWSER=	mozilla
XBUILD_DEPENDS+=	mozilla:${PORTSDIR}/www/mozilla
X.endif
X.else
XBROWSER=
XMAKE_MOZILLA=
X.endif
X
XMAKE_ENV+=	BROWSER="${BROWSER}" \
X		MAKE_GNOME=${MAKE_GNOME} \
X		MAKE_MOZILLA=${MAKE_MOZILLA} \
X		MAKE_CAIRO=${MAKE_CAIRO}
X
X.include <bsd.port.pre.mk>
X
X.if (${ARCH} == "amd64")
XDIST_EXT=	gtk-linux-x86_64
X.else
XDIST_EXT=	gtk-linux-x86
X.endif
X
Xpost-extract:
X	@(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip")
X	@${RM} -f ${WRKSRC}/*.o ${WRKSRC}/*.so ${WRKSRC}/*.jar
X	@${CP} ${WRKSRC}/make_linux.mak ${WRKSRC}/make_freebsd.mak
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-swt32/Makefile
echo x - swt32/distinfo
sed 's/^X//' >swt32/distinfo << 'END-of-swt32/distinfo'
XMD5 (swt-3.2.1-gtk-linux-x86.zip) = 9c653dbf73787b305a938170cd4335b1
XSHA256 (swt-3.2.1-gtk-linux-x86.zip) = 940a5dd90131fe2fa02bcf04374dc168a136100d058042732272ca8e61349e78
XSIZE (swt-3.2.1-gtk-linux-x86.zip) = 3118312
XMD5 (swt-3.2.1-gtk-linux-x86_64.zip) = 736b05cc0ea679cbdaf98d2245edd38c
XSHA256 (swt-3.2.1-gtk-linux-x86_64.zip) = f7cda0d51a0b01954b96821b1a1053f7b76760286f82756b87963caae2c93cb5
XSIZE (swt-3.2.1-gtk-linux-x86_64.zip) = 2997030
END-of-swt32/distinfo
echo c - swt32/files
mkdir -p swt32/files > /dev/null 2>&1
echo x - swt32/files/patch-xpcom_profile.h
sed 's/^X//' >swt32/files/patch-xpcom_profile.h << 'END-of-swt32/files/patch-xpcom_profile.h'
X--- xpcom_profile.h.orig	Wed Nov 15 17:47:13 2006
X+++ xpcom_profile.h	Wed Nov 15 17:41:25 2006
X@@ -32,7 +32,7 @@
X #define NDEBUG
X 
X #include "nsCOMPtr.h"
X-#include "nsProfileDirServiceProvider.h"
X+#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
X #include "xpcom_stats.h"
X 
X #endif /* INC_xpcom_profile_H */
END-of-swt32/files/patch-xpcom_profile.h
echo x - swt32/files/patch-make_freebsd.mak
sed 's/^X//' >swt32/files/patch-make_freebsd.mak << 'END-of-swt32/files/patch-make_freebsd.mak'
X--- make_freebsd.mak.orig	Wed Nov 15 16:34:25 2006
X+++ make_freebsd.mak	Wed Nov 15 16:36: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@@ -78,7 +78,7 @@
X 	-fPIC \
X 	-I. \
X 	-I$(JAVA_HOME)/include \
X-	-I$(JAVA_HOME)/include/linux \
X+	-I$(JAVA_HOME)/include/freebsd \
X 	${SWT_PTR_CFLAGS}
X MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
X 	
X@@ -98,15 +98,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@@ -220,22 +221,22 @@
X 	$(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp	
X 
X $(PROFILE14_OBJECTS): xpcom_profile.cpp
X-	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
X+	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
X 
X $(PROFILE17_OBJECTS): xpcom_profile.cpp
X-	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
X+	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
X 
X $(PROFILE18_OBJECTS): xpcom_profile.cpp
X-	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
X+	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
X 
X $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
X-	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
X+	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE14_LIBS}
X 
X $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
X-	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
X+	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE17_LIBS}
X 
X $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
X-	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
X+	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE18_LIBS}
X 
X #
X # GLX lib
X@@ -264,4 +265,4 @@
X # Clean
X #
X clean:
X-	rm -f *.o *.so
X+	rm -f *.o *.so *.jar
END-of-swt32/files/patch-make_freebsd.mak
echo x - swt32/files/patch-build.xml
sed 's/^X//' >swt32/files/patch-build.xml << 'END-of-swt32/files/patch-build.xml'
X--- build.xml.orig	Mon Dec  5 15:14:46 2005
X+++ build.xml	Fri Nov 17 23:48:20 2006
X@@ -1,55 +1,56 @@
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="destination" value="${basedir}"/>
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}/swt32.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+			<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+			<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-swt32/files/patch-build.xml
echo x - swt32/files/patch-build.sh
sed 's/^X//' >swt32/files/patch-build.sh << 'END-of-swt32/files/patch-build.sh'
X--- build.sh.orig	Mon Nov 21 23:48:16 2005
X+++ build.sh	Fri Nov 17 23:51:19 2006
X@@ -31,6 +31,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 +65,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@@ -126,5 +130,5 @@
X if [ "x${1}" = "xclean" ]; then
X 	make -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+	make -f $MAKEFILE all ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
X fi
END-of-swt32/files/patch-build.sh
echo x - swt32/files/patch-OS.java
sed 's/^X//' >swt32/files/patch-OS.java << 'END-of-swt32/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-swt32/files/patch-OS.java
exit
--- swt32-3.2.1.shar ends here ---

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



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