/[gentoo-x86]/dev-java/netbeans-platform/netbeans-platform-7.1.1.ebuild
Gentoo

Contents of /dev-java/netbeans-platform/netbeans-platform-7.1.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon May 7 06:32:55 2012 UTC (2 years, 6 months ago) by phajdan.jr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
x86 stable wrt bug #414387

(Portage version: 2.1.10.49/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/netbeans-platform/netbeans-platform-7.1.1.ebuild,v 1.2 2012/05/06 12:11:10 ago Exp $
4
5 EAPI="4"
6 WANT_ANT_TASKS="ant-nodeps"
7 inherit eutils java-pkg-2 java-ant-2
8
9 DESCRIPTION="Netbeans Platform"
10 HOMEPAGE="http://netbeans.org/features/platform/"
11 SLOT="7.1"
12 SOURCE_URL="http://dlc.sun.com.edgesuite.net/netbeans/7.1.1/final/zip/netbeans-7.1.1-201203012225-src.zip"
13 SRC_URI="${SOURCE_URL}
14 http://dev.gentoo.org/~fordfrog/distfiles/netbeans-9999-r1-build.xml.patch.bz2
15 http://hg.netbeans.org/binaries/F1C19117B73A6819FA91EB646ECBA7F41073DC2A-felix-3.2.2.jar
16 http://hg.netbeans.org/binaries/1D63B972926D053DFA427CA03841F67D4EAC6DB2-org.eclipse.osgi_3.6.0.v20100517.jar
17 http://hg.netbeans.org/binaries/972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD-osgi.cmpn-4.2.jar
18 http://hg.netbeans.org/binaries/986195A7E31034EE73F7A896A36B24169692F142-osgi.core-4.2.jar
19 http://hg.netbeans.org/binaries/1C7FE319052EF49126CF07D0DB6953CB7007229E-swing-layout-1.0.4-doc.zip"
20 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
21 KEYWORDS="amd64 x86"
22 IUSE=""
23 S="${WORKDIR}"
24
25 CDEPEND="dev-java/javahelp:0
26 >=dev-java/jna-3.2.7:0
27 dev-java/swing-layout:1[source]"
28 DEPEND="virtual/jdk:1.6
29 app-arch/unzip
30 ${CDEPEND}"
31 RDEPEND=">=virtual/jdk-1.6
32 ${CDEPEND}"
33
34 INSTALL_DIR="/usr/share/${PN}-${SLOT}"
35
36 EANT_BUILD_XML="nbbuild/build.xml"
37 EANT_BUILD_TARGET="rebuild-cluster"
38 EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.platform -Dext.binaries.downloaded=true -Djava.awt.headless=true"
39 EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
40 JAVA_PKG_BSFIX="off"
41
42 src_unpack() {
43 unpack $(basename ${SOURCE_URL})
44
45 einfo "Deleting bundled jars..."
46 find -name "*.jar" -type f -delete
47
48 unpack netbeans-9999-r1-build.xml.patch.bz2
49
50 pushd "${S}" >/dev/null || die
51 ln -s "${DISTDIR}"/F1C19117B73A6819FA91EB646ECBA7F41073DC2A-felix-3.2.2.jar libs.felix/external/felix-3.2.2.jar || die
52 ln -s "${DISTDIR}"/1D63B972926D053DFA427CA03841F67D4EAC6DB2-org.eclipse.osgi_3.6.0.v20100517.jar netbinox/external/org.eclipse.osgi_3.6.0.v20100517.jar || die
53 ln -s "${DISTDIR}"/972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD-osgi.cmpn-4.2.jar libs.osgi/external/osgi.cmpn-4.2.jar || die
54 ln -s "${DISTDIR}"/986195A7E31034EE73F7A896A36B24169692F142-osgi.core-4.2.jar libs.osgi/external/osgi.core-4.2.jar || die
55 ln -s "${DISTDIR}"/1C7FE319052EF49126CF07D0DB6953CB7007229E-swing-layout-1.0.4-doc.zip o.jdesktop.layout/external/swing-layout-1.0.4-doc.zip || die
56 popd >/dev/null || die
57 }
58
59 src_prepare() {
60 einfo "Deleting bundled class files..."
61 find -name "*.class" -type f | xargs rm -vf
62
63 epatch netbeans-9999-r1-build.xml.patch
64 # upstream jna jar contains bundled binary libraries so we disable that feature
65
66 # Support for custom patches
67 if [ -n "${NETBEANS9999_PATCHES_DIR}" -a -d "${NETBEANS9999_PATCHES_DIR}" ] ; then
68 local files=`find "${NETBEANS9999_PATCHES_DIR}" -type f`
69
70 if [ -n "${files}" ] ; then
71 einfo "Applying custom patches:"
72
73 for file in ${files} ; do
74 epatch "${file}"
75 done
76 fi
77 fi
78
79 einfo "Symlinking external libraries..."
80 java-pkg_jar-from --into core.nativeaccess/external jna platform.jar platform-3.2.7.jar
81 java-pkg_jar-from --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
82 java-pkg_jar-from --into libs.jna/external jna jna.jar jna-3.2.7.jar
83 java-pkg_jar-from --into o.jdesktop.layout/external swing-layout-1 swing-layout.jar swing-layout-1.0.4.jar
84 ln -s /usr/share/swing-layout-1/sources/swing-layout-src.zip o.jdesktop.layout/external/swing-layout-1.0.4-src.zip || die
85
86 java-pkg-2_src_prepare
87 }
88
89 src_compile() {
90 unset DISPLAY
91 eant -f ${EANT_BUILD_XML} ${EANT_EXTRA_ARGS} ${EANT_BUILD_TARGET} || die "Compilation failed"
92 }
93
94 src_install() {
95 pushd nbbuild/netbeans/platform >/dev/null || die
96
97 java-pkg_dojar lib/*.jar
98 grep -E "/platform$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
99
100 insinto ${INSTALL_DIR}
101 doins -r *
102 rm "${D}"/${INSTALL_DIR}/docs/swing-layout-1.0.4-src.zip || die
103 dosym /usr/share/swing-layout-1/sources/swing-layout-src.zip ${INSTALL_DIR}/docs/swing-layout-1.0.4-src.zip
104 find "${D}"/${INSTALL_DIR} -name "*.exe" -delete
105 find "${D}"/${INSTALL_DIR} -name "*.dll" -delete
106 rm -fr "${D}"/modules/lib || die
107
108 popd >/dev/null || die
109
110 fperms 775 ${INSTALL_DIR}/lib/nbexec
111 dosym ${INSTALL_DIR}/lib/nbexec /usr/bin/nbexec-${SLOT}
112
113 local instdir=${INSTALL_DIR}/modules/ext
114 pushd "${D}"/${instdir} >/dev/null || die
115 # felix-main-2.0.2.jar
116 # felix-2.0.3.jar
117 rm jhall-2.0_05.jar && dosym /usr/share/javahelp/lib/jhall.jar ${instdir}/jhall-2.0_05.jar || die
118 rm jna-3.2.7.jar && dosym /usr/share/jna/lib/jna.jar ${instdir}/jna-3.2.7.jar || die
119 # osgi.cmpn-4.2.jar
120 # osgi.core-4.2.jar
121 rm platform-3.2.7.jar && dosym /usr/share/jna/lib/platform.jar ${instdir}/platform-3.2.7.jar || die
122 rm swing-layout-1.0.4.jar && dosym /usr/share/swing-layout-1/lib/swing-layout.jar ${instdir}/swing-layout-1.0.4.jar || die
123 # updater.jar
124 popd >/dev/null || die
125
126 dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/platform
127 }

  ViewVC Help
Powered by ViewVC 1.1.20