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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Oct 17 11:07:54 2012 UTC (2 years, 1 month ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Stable for amd64, wrt bug #433215

(Portage version: 2.1.11.9/cvs/Linux x86_64)

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.2.ebuild,v 1.2 2012/10/17 03:04:58 phajdan.jr 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.2"
12 SOURCE_URL="http://download.netbeans.org/netbeans/7.2/final/zip/netbeans-7.2-201207171143-src.zip"
13 SRC_URI="${SOURCE_URL}
14 http://dev.gentoo.org/~fordfrog/distfiles/netbeans-7.2-r1-build.xml.patch.bz2
15 http://hg.netbeans.org/binaries/14F630EDF137F54188636B5139432986D5FB19B7-felix-4.0.2.jar
16 http://hg.netbeans.org/binaries/2D80F93B8803250F232902C46EBA850BF1F3E67F-org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar
17 http://hg.netbeans.org/binaries/972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD-osgi.cmpn-4.2.jar
18 http://hg.netbeans.org/binaries/1C7FE319052EF49126CF07D0DB6953CB7007229E-swing-layout-1.0.4-doc.zip
19 http://hg.netbeans.org/binaries/CFF0A34484AAF26F18BC15D0B2C226FD66769EAA-testng-6.5.1-dist.jar
20 http://hg.netbeans.org/binaries/D9B2EEC6413BDD174D047F9B7804C2EA440B79A5-testng-6.5.1-javadoc.zip"
21 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
22 KEYWORDS="amd64 x86"
23 IUSE=""
24 S="${WORKDIR}"
25
26 CDEPEND="dev-java/javahelp:0
27 >=dev-java/jna-3.4:0
28 dev-java/osgi-core-api:0
29 dev-java/swing-layout:1[source]"
30 DEPEND="virtual/jdk:1.6
31 app-arch/unzip
32 ${CDEPEND}"
33 RDEPEND=">=virtual/jdk-1.6
34 ${CDEPEND}"
35
36 INSTALL_DIR="/usr/share/${PN}-${SLOT}"
37
38 EANT_BUILD_XML="nbbuild/build.xml"
39 EANT_BUILD_TARGET="rebuild-cluster"
40 EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.platform -Dext.binaries.downloaded=true -Djava.awt.headless=true"
41 EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
42 JAVA_PKG_BSFIX="off"
43
44 src_unpack() {
45 unpack $(basename ${SOURCE_URL})
46
47 einfo "Deleting bundled jars..."
48 find -name "*.jar" -type f -delete
49
50 unpack netbeans-7.2-r1-build.xml.patch.bz2
51
52 pushd "${S}" >/dev/null || die
53 ln -s "${DISTDIR}"/14F630EDF137F54188636B5139432986D5FB19B7-felix-4.0.2.jar libs.felix/external/felix-4.0.2.jar || die
54 ln -s "${DISTDIR}"/2D80F93B8803250F232902C46EBA850BF1F3E67F-org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar netbinox/external/org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar || die
55 ln -s "${DISTDIR}"/972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD-osgi.cmpn-4.2.jar libs.osgi/external/osgi.cmpn-4.2.jar || die
56 ln -s "${DISTDIR}"/1C7FE319052EF49126CF07D0DB6953CB7007229E-swing-layout-1.0.4-doc.zip o.jdesktop.layout/external/swing-layout-1.0.4-doc.zip || die
57 ln -s "${DISTDIR}"/CFF0A34484AAF26F18BC15D0B2C226FD66769EAA-testng-6.5.1-dist.jar libs.testng/external/testng-6.5.1-dist.jar || die
58 ln -s "${DISTDIR}"/D9B2EEC6413BDD174D047F9B7804C2EA440B79A5-testng-6.5.1-javadoc.zip libs.testng/external/testng-6.5.1-javadoc.zip || die
59 popd >/dev/null || die
60 }
61
62 src_prepare() {
63 einfo "Deleting bundled class files..."
64 find -name "*.class" -type f | xargs rm -vf
65
66 # upstream jna jar contains bundled binary libraries so we disable that feature
67 epatch netbeans-7.2-r1-build.xml.patch
68
69 # Support for custom patches
70 if [ -n "${NETBEANS72_PATCHES_DIR}" -a -d "${NETBEANS72_PATCHES_DIR}" ] ; then
71 local files=`find "${NETBEANS72_PATCHES_DIR}" -type f`
72
73 if [ -n "${files}" ] ; then
74 einfo "Applying custom patches:"
75
76 for file in ${files} ; do
77 epatch "${file}"
78 done
79 fi
80 fi
81
82 einfo "Symlinking external libraries..."
83 java-pkg_jar-from --into core.nativeaccess/external jna platform.jar platform-3.4.0.jar
84 java-pkg_jar-from --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
85 java-pkg_jar-from --into libs.jna/external jna jna.jar jna-3.4.0.jar
86 java-pkg_jar-from --into libs.osgi/external osgi-core-api osgi-core-api.jar osgi.core-4.3.jar
87 java-pkg_jar-from --into o.jdesktop.layout/external swing-layout-1 swing-layout.jar swing-layout-1.0.4.jar
88 ln -s /usr/share/swing-layout-1/sources/swing-layout-src.zip o.jdesktop.layout/external/swing-layout-1.0.4-src.zip || die
89
90 java-pkg-2_src_prepare
91 }
92
93 src_compile() {
94 unset DISPLAY
95 eant -f ${EANT_BUILD_XML} ${EANT_EXTRA_ARGS} ${EANT_BUILD_TARGET} || die "Compilation failed"
96 }
97
98 src_install() {
99 pushd nbbuild/netbeans/platform >/dev/null || die
100
101 java-pkg_dojar lib/*.jar
102 grep -E "/platform$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
103
104 insinto ${INSTALL_DIR}
105 doins -r *
106 rm "${D}"/${INSTALL_DIR}/docs/swing-layout-1.0.4-src.zip || die
107 dosym /usr/share/swing-layout-1/sources/swing-layout-src.zip ${INSTALL_DIR}/docs/swing-layout-1.0.4-src.zip
108 find "${D}"/${INSTALL_DIR} -name "*.exe" -delete
109 find "${D}"/${INSTALL_DIR} -name "*.dll" -delete
110 rm -fr "${D}"/modules/lib || die
111
112 popd >/dev/null || die
113
114 fperms 775 ${INSTALL_DIR}/lib/nbexec
115 dosym ${INSTALL_DIR}/lib/nbexec /usr/bin/nbexec-${SLOT}
116
117 local instdir=${INSTALL_DIR}/modules/ext
118 pushd "${D}"/${instdir} >/dev/null || die
119 rm jhall-2.0_05.jar && dosym /usr/share/javahelp/lib/jhall.jar ${instdir}/jhall-2.0_05.jar || die
120 rm jna-3.4.0.jar && dosym /usr/share/jna/lib/jna.jar ${instdir}/jna-3.4.0.jar || die
121 rm osgi.core-4.3.jar && dosym /usr/share/osgi-core-api/lib/osgi-core-api.jar ${instdir}/osgi.core-4.3.jar || die
122 rm platform-3.4.0.jar && dosym /usr/share/jna/lib/platform.jar ${instdir}/platform-3.4.0.jar || die
123 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
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