diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2010-02-03 13:51:29 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2010-02-03 13:51:29 +0000 |
commit | 99e54d2baba86e8db66eb5169894484d25d31200 (patch) | |
tree | 0bd9fdfb944a1c63c200d5b8e3de5a4b668b9a24 /devel | |
parent | e0a5304f909df818954b21cb93add7da0af0211e (diff) | |
download | pkgsrc-99e54d2baba86e8db66eb5169894484d25d31200.tar.gz |
Initial import of swt version 3.5.1.3555
SWT is an open source widget toolkit for Java designed to provide efficient,
portable access to the user-interface facilities of the operating systems
on which it is implemented.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/swt/DESCR | 3 | ||||
-rw-r--r-- | devel/swt/Makefile | 70 | ||||
-rw-r--r-- | devel/swt/PLIST | 10 | ||||
-rw-r--r-- | devel/swt/buildlink3.mk | 13 | ||||
-rw-r--r-- | devel/swt/distinfo | 5 | ||||
-rw-r--r-- | devel/swt/files/make_pkgsrc.mak | 301 |
6 files changed, 402 insertions, 0 deletions
diff --git a/devel/swt/DESCR b/devel/swt/DESCR new file mode 100644 index 00000000000..47f15560d46 --- /dev/null +++ b/devel/swt/DESCR @@ -0,0 +1,3 @@ +SWT is an open source widget toolkit for Java designed to provide efficient, +portable access to the user-interface facilities of the operating systems +on which it is implemented. diff --git a/devel/swt/Makefile b/devel/swt/Makefile new file mode 100644 index 00000000000..2943e53b6b0 --- /dev/null +++ b/devel/swt/Makefile @@ -0,0 +1,70 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/02/03 13:51:29 jmcneill Exp $ +# + +SWTREL= 3.5.1 +SWTVER= 3555 +SWTDATE= 200909170800 + +PKGNAME= swt-${SWTREL}.${SWTVER} +DISTNAME= swt-${SWTREL}-gtk-linux-x86 +CATEGORIES= devel +MASTER_SITES= http://download.eclipse.org/eclipse/downloads/drops/R-${SWTVER}-${SWTDATE}/ +EXTRACT_SUFX= .zip + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.eclipse.org/ +COMMENT= Open source widget toolkit for Java +#LICENSE= # TODO: (see mk/license.mk) + +PKG_DESTDIR_SUPPORT= user-destdir + +WRKSRC= ${WRKDIR} +USE_TOOLS+= gmake +USE_LANGUAGES= c c++ +USE_JAVA2= yes + +BUILD_DEPENDS+= apache-ant>=1.7.1:../../devel/apache-ant + +BUILD_TARGETS= all make_awt make_cairo make_xulrunner +BUILD_LIBS= swt-atk-gtk swt-awt-gtk swt-cairo-gtk swt-glx-gtk \ + swt-gnome-gtk swt-gtk swt-pi-gtk swt-xulrunner-gtk + +PLIST_SUBST+= SWTVER=${SWTVER} + +INSTALLATION_DIRS+= share/java +INSTALLATION_DIRS+= lib/jni + +post-extract: + cd ${WRKSRC} && jar -xf ${WRKSRC}/src.zip + cp ${FILESDIR}/make_pkgsrc.mak ${WRKSRC} + +do-build: +.for target in ${BUILD_TARGETS} + cd ${WRKSRC} && ${GMAKE} \ + JAVA_HOME=${PKG_JAVA_HOME} \ + LOWER_OPSYS=${LOWER_OPSYS} \ + -f make_pkgsrc.mak ${target} +.endfor + ${TEST} -d ${WRKSRC}/bin || mkdir ${WRKSRC}/bin + cd ${WRKSRC} && find org/eclipse/swt -type f -name \*.java | \ + xargs ${JAVA_BINPREFIX}-javac -source 1.4 -target 1.4 -d bin + cd ${WRKSRC}/bin && ${JAVA_BINPREFIX}-jar -cf ${WRKSRC}/swt.jar . + +do-install: + ${INSTALL_DATA} ${WRKSRC}/swt.jar \ + ${DESTDIR}${PREFIX}/share/java/swt.jar +.for libname in ${BUILD_LIBS} + ${INSTALL_LIB} ${WRKSRC}/lib${libname}-${SWTVER}.so \ + ${DESTDIR}${PREFIX}/lib/jni/lib${libname}-${SWTVER}.so +.endfor + +.include "../../devel/atk/buildlink3.mk" +.include "../../devel/libgnome/buildlink3.mk" +.include "../../devel/libgnomeui/buildlink3.mk" +.include "../../devel/xulrunner/buildlink3.mk" +.include "../../graphics/MesaLib/buildlink3.mk" +.include "../../graphics/cairo/buildlink3.mk" +.include "../../sysutils/gnome-vfs/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../mk/java-vm.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/swt/PLIST b/devel/swt/PLIST new file mode 100644 index 00000000000..4e66aa0434f --- /dev/null +++ b/devel/swt/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/02/03 13:51:29 jmcneill Exp $ +share/java/swt.jar +lib/jni/libswt-atk-gtk-${SWTVER}.so +lib/jni/libswt-awt-gtk-${SWTVER}.so +lib/jni/libswt-cairo-gtk-${SWTVER}.so +lib/jni/libswt-glx-gtk-${SWTVER}.so +lib/jni/libswt-gnome-gtk-${SWTVER}.so +lib/jni/libswt-gtk-${SWTVER}.so +lib/jni/libswt-pi-gtk-${SWTVER}.so +lib/jni/libswt-xulrunner-gtk-${SWTVER}.so diff --git a/devel/swt/buildlink3.mk b/devel/swt/buildlink3.mk new file mode 100644 index 00000000000..a5d0c791fd8 --- /dev/null +++ b/devel/swt/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/02/03 13:51:29 jmcneill Exp $ + +BUILDLINK_TREE+= swt + +.if !defined(SWT_BUILDLINK3_MK) +SWT_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.swt+= swt>=3.5.1.3555 +BUILDLINK_PKGSRCDIR.swt?= ../../devel/swt + +.endif # SWT_BUILDLINK3_MK + +BUILDLINK_TREE+= -swt diff --git a/devel/swt/distinfo b/devel/swt/distinfo new file mode 100644 index 00000000000..ecc6ea3214e --- /dev/null +++ b/devel/swt/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/02/03 13:51:29 jmcneill Exp $ + +SHA1 (swt-3.5.1-gtk-linux-x86.zip) = 654744a3a2bc7eadfd807d2f1238580ac31571ee +RMD160 (swt-3.5.1-gtk-linux-x86.zip) = 2b0723130751a700bbe14004587a5a4f801a07df +Size (swt-3.5.1-gtk-linux-x86.zip) = 4879027 bytes diff --git a/devel/swt/files/make_pkgsrc.mak b/devel/swt/files/make_pkgsrc.mak new file mode 100644 index 00000000000..3334660b226 --- /dev/null +++ b/devel/swt/files/make_pkgsrc.mak @@ -0,0 +1,301 @@ +# $NetBSD: make_pkgsrc.mak,v 1.1.1.1 2010/02/03 13:51:29 jmcneill Exp $ +#******************************************************************************* +# Copyright (c) 2000, 2009 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +#******************************************************************************* + +# Makefile for creating SWT libraries for Linux GTK + +include make_common.mak + +SWT_VERSION=$(maj_ver)$(min_ver) + +# Define the various shared libraries to be build. +WS_PREFIX = gtk +SWT_PREFIX = swt +CDE_PREFIX = swt-cde +AWT_PREFIX = swt-awt +SWTPI_PREFIX = swt-pi +CAIRO_PREFIX = swt-cairo +ATK_PREFIX = swt-atk +GNOME_PREFIX = swt-gnome +MOZILLA_PREFIX = swt-mozilla$(GCC_VERSION) +XULRUNNER_PREFIX = swt-xulrunner +XPCOMINIT_PREFIX = swt-xpcominit +GLX_PREFIX = swt-glx + +SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +CDE_LIB = lib$(CDE_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +SWTPI_LIB = lib$(SWTPI_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +CAIRO_LIB = lib$(CAIRO_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +ATK_LIB = lib$(ATK_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +GNOME_LIB = lib$(GNOME_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +MOZILLA_LIB = lib$(MOZILLA_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +XULRUNNER_LIB = lib$(XULRUNNER_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +XPCOMINIT_LIB = lib$(XPCOMINIT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so +GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so + +CAIROCFLAGS = `pkg-config --cflags cairo` +CAIROLIBS = `pkg-config --libs-only-L cairo` `pkg-config --libs-only-other cairo` -lcairo + +# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) +GTKCFLAGS = `pkg-config --cflags gtk+-2.0` +GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` `pkg-config --libs-only-other gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -lXtst + +CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc + +AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -shared + +ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0` +ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` `pkg-config --libs-only-other atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 + +GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` +GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` `pkg-config --libs-only-other gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 + +GLXCFLAGS = `pkg-config --cflags gl` +GLXLIBS = -shared -fPIC `pkg-config --libs gl x11` -lGLU -lm + +# Uncomment for Native Stats tool +#NATIVE_STATS = -DNATIVE_STATS + +MOZILLACFLAGS = -O \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ + -fno-rtti \ + -fno-exceptions \ + -Wall \ + -Wno-non-virtual-dtor \ + -fPIC \ + -I. \ + -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/$(LOWER_OPSYS) \ + ${SWT_PTR_CFLAGS} +MOZILLALIBS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic +MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \ + -DNO__1XPCOMGlueStartup \ + -DNO__1XPCOMGlueLoadXULFunctions \ + -DNO_memmove__ILorg_eclipse_swt_internal_mozilla_nsDynamicFunctionLoad_2I \ + -DNO_memmove__JLorg_eclipse_swt_internal_mozilla_nsDynamicFunctionLoad_2J \ + -DNO_nsDynamicFunctionLoad_1sizeof \ + -DNO__1Call__IIIIII \ + -DNO__1Call__JJJJJI \ + -DNO_nsDynamicFunctionLoad +XULRUNNEREXCLUDES = -DNO__1NS_1InitXPCOM2 + +XULRUNNER_INCLUDES = `pkg-config --cflags libxul-embedding` +XULRUNNER_LIBS = `pkg-config --libs libxul-embedding` + +SWT_OBJECTS = swt.o c.o c_stats.o callback.o +CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o +AWT_OBJECTS = swt_awt.o +SWTPI_OBJECTS = swt.o os.o os_structs.o os_custom.o os_stats.o +CAIRO_OBJECTS = swt.o cairo.o cairo_structs.o cairo_stats.o +ATK_OBJECTS = swt.o atk.o atk_structs.o atk_custom.o atk_stats.o +GNOME_OBJECTS = swt.o gnome.o gnome_structs.o gnome_stats.o +MOZILLA_OBJECTS = swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o +XULRUNNER_OBJECTS = swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o +XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o +GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +CFLAGS = -O -Wall \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DLINUX -DGTK \ + -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/$(LOWER_OPSYS) \ + -fPIC \ + ${SWT_PTR_CFLAGS} +LIBS = -shared -fPIC + +ifndef NO_STRIP + AWT_LIBS := $(AWT_LIBS) -s + MOZILLALIBS := $(MOZILLALIBS) -s + LIBS := $(LIBS) -s +endif + +all: make_swt make_atk make_gnome make_glx + +# +# SWT libs +# +make_swt: $(SWT_LIB) $(SWTPI_LIB) + +$(SWT_LIB): $(SWT_OBJECTS) + $(CC) $(LIBS) -o $(SWT_LIB) $(SWT_OBJECTS) + +callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + +$(SWTPI_LIB): $(SWTPI_OBJECTS) + $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) + +swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +os.o: os.c os.h swt.h os_custom.h + $(CC) $(CFLAGS) $(GTKCFLAGS) -c os.c +os_structs.o: os_structs.c os_structs.h os.h swt.h + $(CC) $(CFLAGS) $(GTKCFLAGS) -c os_structs.c +os_custom.o: os_custom.c os_structs.h os.h swt.h + $(CC) $(CFLAGS) $(GTKCFLAGS) -c os_custom.c +os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h + $(CC) $(CFLAGS) $(GTKCFLAGS) -c os_stats.c + +# +# CAIRO libs +# +make_cairo: $(CAIRO_LIB) + +$(CAIRO_LIB): $(CAIRO_OBJECTS) + $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) + +cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +cairo_structs.o: cairo_structs.c cairo_structs.h cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo_structs.c +cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo_stats.c + +# +# CDE lib +# + +make_cde: $(CDE_LIB) + +$(CDE_LIB): $(CDE_OBJECTS) + $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) + +# +# AWT lib +# +make_awt:$(AWT_LIB) + +$(AWT_LIB): $(AWT_OBJECTS) + $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS) + +# +# Atk lib +# +make_atk: $(ATK_LIB) + +$(ATK_LIB): $(ATK_OBJECTS) + $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS) + +atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +atk_structs.o: atk_structs.c atk_structs.h atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_structs.c +atk_custom.o: atk_custom.c atk_structs.h atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_custom.c +atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_stats.c + +# +# Gnome lib +# +make_gnome: $(GNOME_LIB) + +$(GNOME_LIB): $(GNOME_OBJECTS) + $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) + +gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c + +gnome_structs.o: gnome_structs.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome_structs.c + +gnome_stats.o: gnome_stats.c gnome_stats.h + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome_stats.c + +# +# Mozilla lib +# +make_mozilla:$(MOZILLA_LIB) + +$(MOZILLA_LIB): $(MOZILLA_OBJECTS) + $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS} + +xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp + +xpcom_structs.o: xpcom_structs.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_structs.cpp + +xpcom_custom.o: xpcom_custom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_custom.cpp + +xpcom_stats.o: xpcom_stats.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom_stats.cpp + +# +# XULRunner lib +# +make_xulrunner:$(XULRUNNER_LIB) + +$(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) + $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + +xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp + +xpcomxul_structs.o: xpcom_structs.cpp + $(CXX) -o xpcomxul_structs.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_structs.cpp + +xpcomxul_custom.o: xpcom_custom.cpp + $(CXX) -o xpcomxul_custom.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_custom.cpp + +xpcomxul_stats.o: xpcom_stats.cpp + $(CXX) -o xpcomxul_stats.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom_stats.cpp + +# +# XPCOMInit lib +# +make_xpcominit:$(XPCOMINIT_LIB) + +$(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) + $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + +xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp + +xpcominit_structs.o: xpcominit_structs.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit_structs.cpp + +xpcominit_stats.o: xpcominit_stats.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit_stats.cpp + +# +# GLX lib +# +make_glx: $(GLX_LIB) + +$(GLX_LIB): $(GLX_OBJECTS) + $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS) + +glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c + +glx_structs.o: glx_structs.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx_structs.c + +glx_stats.o: glx_stats.c glx_stats.h + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx_stats.c + +# +# Install +# +install: all + cp *.so $(OUTPUT_DIR) + +# +# Clean +# +clean: + rm -f *.o *.so |