aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/swt
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2006-12-02 09:12:16 +0800
committermiwi <miwi@FreeBSD.org>2006-12-02 09:12:16 +0800
commit6deff51ddffb6791308f984f51579f00ef9b0417 (patch)
tree4e8cc990dd7099134aec8574fb9263d21b22881a /x11-toolkits/swt
parent29ffcb86d4becae81edfe99eb5ccc8f01f355fe8 (diff)
downloadfreebsd-ports-gnome-6deff51ddffb6791308f984f51579f00ef9b0417.tar.gz
freebsd-ports-gnome-6deff51ddffb6791308f984f51579f00ef9b0417.tar.zst
freebsd-ports-gnome-6deff51ddffb6791308f984f51579f00ef9b0417.zip
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/ Submitted by: Robert C. Noland III <rnoland at 2hip.net> (on irc)
Diffstat (limited to 'x11-toolkits/swt')
-rw-r--r--x11-toolkits/swt/Makefile102
-rw-r--r--x11-toolkits/swt/distinfo3
-rw-r--r--x11-toolkits/swt/files/patch-OS.java26
-rw-r--r--x11-toolkits/swt/files/patch-build.sh65
-rw-r--r--x11-toolkits/swt/files/patch-build.xml112
-rw-r--r--x11-toolkits/swt/files/patch-make_freebsd.mak77
-rw-r--r--x11-toolkits/swt/files/patch-xpcom_profile.h11
-rw-r--r--x11-toolkits/swt/pkg-descr7
8 files changed, 403 insertions, 0 deletions
diff --git a/x11-toolkits/swt/Makefile b/x11-toolkits/swt/Makefile
new file mode 100644
index 000000000000..5ba204db3625
--- /dev/null
+++ b/x11-toolkits/swt/Makefile
@@ -0,0 +1,102 @@
+# New ports collection makefile for: swt32
+# Date created: 2006-11-16
+# Whom: Robert C. Noland III <rnoland@2hip.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= swt2
+PORTVERSION= 3.2.1
+CATEGORIES= x11-toolkits devel java
+MASTER_SITES= ${MASTER_SITE_ECLIPSE}
+MASTER_SITE_SUBDIR= R-${PORTVERSION}-200609210945
+DISTNAME= swt-${PORTVERSION}-${DIST_EXT}
+
+MAINTAINER= rnoland@2hip.net
+COMMENT= Standard Widget Toolkit for Java
+
+ONLY_FOR_ARCHS= i386 amd64
+
+CONFLICTS= swt-3.1*
+
+SWT_VERSION= 3235
+OUTPUT_JAR= swt.jar
+
+USE_ZIP= yes
+USE_GL= yes
+USE_GNOME= gtk20 pkgconfig
+USE_JAVA= yes
+JAVA_VERSION= 1.4+
+JAVA_OS= native
+USE_ANT= yes
+MAKE_ARGS+= -Doutput.jar=${OUTPUT_JAR}
+MAKEFILE= make_freebsd.mak
+USE_LDCONFIG= yes
+PLIST_SUB= BUILD=${SWT_VERSION}
+PLIST_FILES= %%JAVAJARDIR%%/${OUTPUT_JAR} \
+ lib/libswt-atk-gtk-%%BUILD%%.so \
+ lib/libswt-awt-gtk-%%BUILD%%.so \
+ lib/libswt-gtk-%%BUILD%%.so \
+ lib/libswt-glx-gtk-%%BUILD%%.so \
+ lib/libswt-pi-gtk-%%BUILD%%.so
+
+WRKSRC= ${WRKDIR}/swt-M20060921-0945-${DIST_EXT}
+
+OPTIONS= CAIRO "Cairo Support" on \
+ GNOMEVFS "Gnome VFS Support" on \
+ BROWSER "Gecko Browser Support" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_CAIRO)
+LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo
+PLIST_FILES+= lib/libswt-cairo-gtk-%%BUILD%%.so
+MAKE_CAIRO= make_cairo
+.endif
+
+.if defined(WITH_GNOMEVFS)
+USE_GNOME+= gnomevfs2 libgnome libgnomeui
+PLIST_FILES+= lib/libswt-gnome-gtk-%%BUILD%%.so
+MAKE_GNOME= make_gnome
+.endif
+
+.if defined(WITH_BROWSER)
+USE_GECKO= mozilla firefox seamonkey
+
+.include "${PORTSDIR}/www/mozilla/bsd.gecko.mk"
+
+PLIST_FILES+= lib/libswt-${GECKO}-gtk-%%BUILD%%.so \
+ lib/libswt-${GECKO}14-profile-gtk-%%BUILD%%.so \
+ lib/libswt-${GECKO}17-profile-gtk-%%BUILD%%.so \
+ lib/libswt-${GECKO}18-profile-gtk-%%BUILD%%.so
+
+MAKE_MOZILLA= make_mozilla
+.endif
+
+MAKE_ENV+= MAKE_CAIRO=${MAKE_CAIRO} \
+ MAKE_GNOME=${MAKE_GNOME} \
+ MAKE_MOZILLA=${MAKE_MOZILLA}
+
+.if (${ARCH} == "amd64")
+DIST_EXT= gtk-linux-x86_64
+.else
+DIST_EXT= gtk-linux-x86
+.endif
+
+post-extract:
+ @(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip")
+ @${RM} -f ${WRKSRC}/*.o ${WRKSRC}/*.so ${WRKSRC}/*.jar
+ @${CP} ${WRKSRC}/make_linux.mak ${WRKSRC}/make_freebsd.mak
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|mozilla-|${GECKO}-|' \
+ ${WRKSRC}/build.sh
+ @${REINPLACE_CMD} -e 's|swt-mozilla|swt-${GECKO}|' \
+ ${WRKSRC}/make_freebsd.mak
+
+do-install:
+ ${MKDIR} ${JAVAJARDIR}
+ ${INSTALL_DATA} ${WRKSRC}/libswt-*.so ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/${OUTPUT_JAR} ${JAVAJARDIR}/
+
+.include <bsd.port.post.mk>
diff --git a/x11-toolkits/swt/distinfo b/x11-toolkits/swt/distinfo
new file mode 100644
index 000000000000..146fe27ee9e3
--- /dev/null
+++ b/x11-toolkits/swt/distinfo
@@ -0,0 +1,3 @@
+MD5 (swt-3.2.1-gtk-linux-x86.zip) = 9c653dbf73787b305a938170cd4335b1
+SHA256 (swt-3.2.1-gtk-linux-x86.zip) = 940a5dd90131fe2fa02bcf04374dc168a136100d058042732272ca8e61349e78
+SIZE (swt-3.2.1-gtk-linux-x86.zip) = 3118312
diff --git a/x11-toolkits/swt/files/patch-OS.java b/x11-toolkits/swt/files/patch-OS.java
new file mode 100644
index 000000000000..04dd3008d213
--- /dev/null
+++ b/x11-toolkits/swt/files/patch-OS.java
@@ -0,0 +1,26 @@
+--- ./org/eclipse/swt/internal/gtk/OS.java.orig Thu Dec 15 15:19:38 2005
++++ ./org/eclipse/swt/internal/gtk/OS.java Mon Jan 23 23:51:20 2006
+@@ -20,18 +20,20 @@
+ }
+
+ /** OS Constants */
+- public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX;
++ public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX, IsFreeBSD;
+ static {
+
+ /* Initialize the OS flags and locale constants */
++ /* make bootstrap compatible with `uname -s` for FreeBSD */
+ String osName = System.getProperty ("os.name");
+- boolean isAIX = false, isSunOS = false, isLinux = false, isHPUX = false;
++ boolean isAIX = false, isSunOS = false, isLinux = false, isHPUX = false, isFreeBSD = false;
+ if (osName.equals ("Linux")) isLinux = true;
++ if (osName.equals ("FreeBSD")) isFreeBSD = true;
+ if (osName.equals ("AIX")) isAIX = true;
+ if (osName.equals ("Solaris")) isSunOS = true;
+ if (osName.equals ("SunOS")) isSunOS = true;
+ if (osName.equals ("HP-UX")) isHPUX = true;
+- IsAIX = isAIX; IsSunOS = isSunOS; IsLinux = isLinux; IsHPUX = isHPUX;
++ IsAIX = isAIX; IsSunOS = isSunOS; IsLinux = isLinux; IsFreeBSD = isFreeBSD; IsHPUX = isHPUX;
+ }
+
+ /** Constants */
diff --git a/x11-toolkits/swt/files/patch-build.sh b/x11-toolkits/swt/files/patch-build.sh
new file mode 100644
index 000000000000..07d0e596eae1
--- /dev/null
+++ b/x11-toolkits/swt/files/patch-build.sh
@@ -0,0 +1,65 @@
+--- build.sh.orig Mon Nov 21 23:48:16 2005
++++ build.sh Fri Dec 1 16:34:03 2006
+@@ -31,6 +31,10 @@
+ SWT_OS=solaris
+ MAKEFILE=make_solaris.mak
+ ;;
++ "FreeBSD")
++ SWT_OS=freebsd
++ MAKEFILE=make_freebsd.mak
++ ;;
+ *)
+ SWT_OS=`uname -s | tr -s '[:upper:]' '[:lower:]'`
+ MAKEFILE=make_linux.mak
+@@ -61,7 +65,7 @@
+ esac
+
+ # For 64-bit CPUs, we have a switch
+-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' ]; then
++if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' -o ${MODEL} = 'amd64' ]; then
+ SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64
+ export SWT_PTR_CFLAGS
+ if [ -d /lib64 ]; then
+@@ -70,6 +74,7 @@
+ fi
+ fi
+
++if [ x${MAKE_GNOME} = "xmake_gnome" ]; then
+ if [ x`pkg-config --exists gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 && echo YES` = "xYES" ]; then
+ echo "libgnomeui-2.0 found, compiling SWT program support using GNOME"
+ MAKE_GNOME=make_gnome
+@@ -77,7 +82,9 @@
+ echo "libgnome-2.0 and libgnomeui-2.0 not found:"
+ echo " *** SWT Program support for GNOME will not be compiled."
+ fi
++fi
+
++if [ x${MAKE_CAIRO} = "xmake_cairo" ]; then
+ if [ x`pkg-config --exists cairo && echo YES` = "xYES" ]; then
+ echo "Cairo found, compiling SWT support for the cairo graphics library."
+ MAKE_CAIRO=make_cairo
+@@ -85,7 +92,9 @@
+ echo "Cairo not found:"
+ echo " *** Advanced graphics support using cairo will not be compiled."
+ fi
++fi
+
++if [ x${MAKE_MOZILLA} = "xmake_mozilla" ]; then
+ if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
+ if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
+ GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
+@@ -98,6 +107,7 @@
+ echo " *** Mozilla embedding support will not be compiled."
+ fi
+ fi
++fi
+
+ # Find AWT if available
+ if [ -z "${AWT_LIB_PATH}" ]; then
+@@ -126,5 +136,5 @@
+ if [ "x${1}" = "xclean" ]; then
+ make -f $MAKEFILE clean
+ else
+- make -f $MAKEFILE all $MAKE_GNOME $MAKE_CAIRO $MAKE_AWT $MAKE_MOZILLA ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
++ make -f $MAKEFILE all ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
+ fi
diff --git a/x11-toolkits/swt/files/patch-build.xml b/x11-toolkits/swt/files/patch-build.xml
new file mode 100644
index 000000000000..976b89bd647d
--- /dev/null
+++ b/x11-toolkits/swt/files/patch-build.xml
@@ -0,0 +1,112 @@
+--- build.xml.orig Mon Dec 5 15:14:46 2005
++++ build.xml Fri Nov 17 23:48:20 2006
+@@ -1,55 +1,56 @@
+ <?xml version="1.0" encoding="UTF-8"?>
++<project name="org.eclipse.swt.gtk.freebsd.x86_64" default="build.jar" basedir=".">
+
+-<project default="build_gtk_lib" basedir="../../..">
++ <target name="init">
++ <property name="ws" value="gtk"/>
++ <property name="os" value="freebsd"/>
++ <property name="destination" value="${basedir}"/>
++ <property name="javac.verbose" value="false"/>
++ <property name="javac.debug" value="off"/>
++ <property name="input.srcdir" value="${basedir}/org"/>
++ <property name="output.jar" value="${basedir}/swt32.jar"/>
++ <property name="output.classes" value="${basedir}/classes"/>
++ </target>
++
++ <target name="all" depends="build.jar"/>
++
++ <target name="build.classes" depends="init">
++ <mkdir dir="${output.classes}"/>
++ <!-- -source & -target taken from Eclipse 32M4 CVS build -->
++ <javac srcdir="${input.srcdir}" destdir="${output.classes}"
++ debug="${javac.debug}" verbose="${javac.verbose}"
++ source="1.3" target="1.2">
++ </javac>
++ </target>
++
++ <target name="build.jar" depends="build.nativeLibraries">
++ <jar destfile="${output.jar}" index="false">
++ <fileset dir="${output.classes}">
++ <exclude name="**/*.java"/>
++ <exclude name="**/*.o"/>
++ <exclude name="**/*.so"/>
++ <!-- exclude CVS archive -->
++ <exclude name="**/CVS/**"/>
++ </fileset>
++ <fileset dir="${basedir}">
++ <include name="**/version.txt"/>
++ </fileset>
++ </jar>
++ </target>
++
++ <target name="clean" depends="init">
++ <delete dir="${output.classes}"/>
++ <delete file="${output.jar}"/>
++ <exec executable="sh" failonerror="true">
++ <arg value="build.sh"/>
++ <arg value="clean"/>
++ </exec>
++ </target>
++
++ <target name="build.nativeLibraries" depends="build.classes">
++ <exec executable="sh" failonerror="true">
++ <arg value="build.sh"/>
++ </exec>
++ </target>
+
+-<target name="init">
+- <eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
+- <eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />
+- <eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
+-</target>
+-
+-<!-- Build swt.so for GTK -->
+-<target name="build_gtk_lib" depends="init">
+- <exec dir="./bin/library" executable="sh">
+- <arg line="${basedir}/bin/library/build.sh"/>
+- <arg line="install"/>
+- </exec>
+- <eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86" depth="infinite" />
+-</target>
+-
+-<!-- Build swt.so for PowerPC 32 bit GTK (no Mozilla)-->
+-<target name="build_ppc_gtk_lib" depends="init">
+- <exec dir="./bin/library" executable="sh">
+- <env key="MODEL" value="ppc"/>
+- <arg line="${basedir}/bin/library/build.sh"/>
+- <arg line="install"/>
+- </exec>
+- <eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.ppc" depth="infinite" />
+-</target>
+-
+-<!-- Build swt.so for Solaris GTK (no Mozilla) -->
+-<target name="build_solaris_gtk_lib" depends="init">
+- <exec dir="./bin/library" executable="sh">
+- <arg line="${basedir}/bin/library/build.sh"/>
+- <arg line="install"/>
+- </exec>
+- <eclipse.refreshLocal resource="org.eclipse.swt.gtk.solaris.sparc" depth="infinite" />
+-</target>
+-
+-<!-- Build swt.so for GTK 64 -->
+-<target name="build_gtk64_lib" depends="init">
+- <exec dir="./bin/library" executable="sh">
+- <arg line="${basedir}/bin/library/build.sh"/>
+- <arg line="install"/>
+- </exec>
+- <eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86_64" depth="infinite" />
+-</target>
+-
+-<target name="clean">
+- <exec dir="./bin/library" executable="sh">
+- <arg line="${basedir}/bin/library/build.sh"/>
+- <arg line="clean"/>
+- </exec>
+-</target>
+-
+-</project>
+\ No newline at end of file
++</project>
diff --git a/x11-toolkits/swt/files/patch-make_freebsd.mak b/x11-toolkits/swt/files/patch-make_freebsd.mak
new file mode 100644
index 000000000000..80b981ce1c23
--- /dev/null
+++ b/x11-toolkits/swt/files/patch-make_freebsd.mak
@@ -0,0 +1,77 @@
+--- make_freebsd.mak.orig Wed Nov 15 16:34:25 2006
++++ make_freebsd.mak Wed Nov 15 16:36:53 2006
+@@ -9,7 +9,7 @@
+ # IBM Corporation - initial API and implementation
+ #*******************************************************************************
+
+-# Makefile for creating SWT libraries for Linux GTK
++# Makefile for creating SWT libraries for FreeBSD GTK
+
+ include make_common.mak
+
+@@ -78,7 +78,7 @@
+ -fPIC \
+ -I. \
+ -I$(JAVA_HOME)/include \
+- -I$(JAVA_HOME)/include/linux \
++ -I$(JAVA_HOME)/include/freebsd \
+ ${SWT_PTR_CFLAGS}
+ MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
+
+@@ -98,15 +98,16 @@
+ CFLAGS = -O -Wall \
+ -DSWT_VERSION=$(SWT_VERSION) \
+ $(NATIVE_STATS) \
+- -DLINUX -DGTK \
++ -DFREEBSD -DGTK \
+ -I$(JAVA_HOME)/include \
+- -I$(JAVA_HOME)/include/linux \
+- -fPIC \
++ -I$(JAVA_HOME)/include/freebsd \
++ -fpic -fPIC \
++ -I$(X11BASE)/include \
+ ${SWT_PTR_CFLAGS}
+-LIBS = -shared -fPIC -s
++LIBS = -shared -fPIC -fpic -s
+
+
+-all: make_swt make_atk make_gnome make_glx
++all: make_swt make_atk $(MAKE_GNOME) make_awt $(MAKE_MOZILLA) $(MAKE_CAIRO) make_glx
+
+ #
+ # SWT libs
+@@ -220,22 +221,22 @@
+ $(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp
+
+ $(PROFILE14_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE14_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE17_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE17_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE18_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${GECKO_INCLUDES} ${PROFILE18_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
+- $(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
++ $(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE14_LIBS}
+
+ $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
+- $(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
++ $(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE17_LIBS}
+
+ $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
+- $(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
++ $(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS} ${PROFILE18_LIBS}
+
+ #
+ # GLX lib
+@@ -264,4 +265,4 @@
+ # Clean
+ #
+ clean:
+- rm -f *.o *.so
++ rm -f *.o *.so *.jar
diff --git a/x11-toolkits/swt/files/patch-xpcom_profile.h b/x11-toolkits/swt/files/patch-xpcom_profile.h
new file mode 100644
index 000000000000..fbd5fc768718
--- /dev/null
+++ b/x11-toolkits/swt/files/patch-xpcom_profile.h
@@ -0,0 +1,11 @@
+--- xpcom_profile.h.orig Wed Nov 15 17:47:13 2006
++++ xpcom_profile.h Wed Nov 15 17:41:25 2006
+@@ -32,7 +32,7 @@
+ #define NDEBUG
+
+ #include "nsCOMPtr.h"
+-#include "nsProfileDirServiceProvider.h"
++#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
+ #include "xpcom_stats.h"
+
+ #endif /* INC_xpcom_profile_H */
diff --git a/x11-toolkits/swt/pkg-descr b/x11-toolkits/swt/pkg-descr
new file mode 100644
index 000000000000..d0260cdfa93a
--- /dev/null
+++ b/x11-toolkits/swt/pkg-descr
@@ -0,0 +1,7 @@
+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/