1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils java-pkg-2 java-ant-2
8 DESCRIPTION="Netbeans IDE"
9 HOMEPAGE="http://netbeans.org/"
11 SOURCE_URL="http://download.netbeans.org/netbeans/8.0.2/final/zip/netbeans-8.0.2-201411181905-src.zip"
12 PATCHES_URL="https://dev.gentoo.org/~fordfrog/distfiles/netbeans-8.0.2-build.xml.patch.bz2"
13 L10N_URL="https://dev.gentoo.org/~fordfrog/distfiles/netbeans-l10n-8.0.1-20141110.tar.bz2"
14 ALL_URLS="${SOURCE_URL} ${PATCHES_URL} ${L10N_URL}"
15 SRC_URI="linguas_af? ( ${ALL_URLS} )
16 linguas_ar? ( ${ALL_URLS} )
17 linguas_bg? ( ${ALL_URLS} )
18 linguas_ca? ( ${ALL_URLS} )
19 linguas_cs? ( ${ALL_URLS} )
20 linguas_de? ( ${ALL_URLS} )
21 linguas_el? ( ${ALL_URLS} )
22 linguas_es? ( ${ALL_URLS} )
23 linguas_fr? ( ${ALL_URLS} )
24 linguas_gl? ( ${ALL_URLS} )
25 linguas_hi_IN? ( ${ALL_URLS} )
26 linguas_id? ( ${ALL_URLS} )
27 linguas_it? ( ${ALL_URLS} )
28 linguas_ja? ( ${ALL_URLS} )
29 linguas_ko? ( ${ALL_URLS} )
30 linguas_lt? ( ${ALL_URLS} )
31 linguas_nl? ( ${ALL_URLS} )
32 linguas_pl? ( ${ALL_URLS} )
33 linguas_pt_BR? ( ${ALL_URLS} )
34 linguas_pt_PT? ( ${ALL_URLS} )
35 linguas_ro? ( ${ALL_URLS} )
36 linguas_ru? ( ${ALL_URLS} )
37 linguas_si? ( ${ALL_URLS} )
38 linguas_sq? ( ${ALL_URLS} )
39 linguas_sr? ( ${ALL_URLS} )
40 linguas_sv? ( ${ALL_URLS} )
41 linguas_ta_IN? ( ${ALL_URLS} )
42 linguas_tl? ( ${ALL_URLS} )
43 linguas_tr? ( ${ALL_URLS} )
44 linguas_vi? ( ${ALL_URLS} )
45 linguas_zh_CN? ( ${ALL_URLS} )
46 linguas_zh_TW? ( ${ALL_URLS} )
48 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
50 IUSE_NETBEANS_MODULES="
51 +netbeans_modules_apisupport
53 netbeans_modules_dlight
54 netbeans_modules_enterprise
55 netbeans_modules_ergonomics
56 netbeans_modules_extide
57 netbeans_modules_groovy
58 +netbeans_modules_java
59 netbeans_modules_javacard
60 +netbeans_modules_javafx
61 netbeans_modules_mobility
63 +netbeans_modules_profiler
64 netbeans_modules_webcommon
65 +netbeans_modules_websvccommon"
99 IUSE="doc ${IUSE_NETBEANS_MODULES} ${IUSE_LINGUAS}"
102 DEPEND="virtual/jdk:1.7
104 RDEPEND=">=virtual/jdk-1.7
105 ~dev-java/netbeans-harness-${PV}
106 ~dev-java/netbeans-ide-${PV}
107 ~dev-java/netbeans-nb-${PV}
108 ~dev-java/netbeans-platform-${PV}
109 netbeans_modules_apisupport? ( ~dev-java/netbeans-apisupport-${PV} )
110 netbeans_modules_cnd? ( ~dev-java/netbeans-cnd-${PV} )
111 netbeans_modules_dlight? ( ~dev-java/netbeans-dlight-${PV} )
112 netbeans_modules_enterprise? ( ~dev-java/netbeans-enterprise-${PV} )
113 netbeans_modules_ergonomics? ( ~dev-java/netbeans-ergonomics-${PV} )
114 netbeans_modules_extide? ( ~dev-java/netbeans-extide-${PV} )
115 netbeans_modules_groovy? ( ~dev-java/netbeans-groovy-${PV} )
116 netbeans_modules_java? ( ~dev-java/netbeans-java-${PV} )
117 netbeans_modules_javacard? ( ~dev-java/netbeans-javacard-${PV} )
118 netbeans_modules_javafx? ( ~dev-java/netbeans-javafx-${PV} )
119 netbeans_modules_mobility? ( ~dev-java/netbeans-mobility-${PV} )
120 netbeans_modules_php? ( ~dev-java/netbeans-php-${PV} )
121 netbeans_modules_profiler? ( ~dev-java/netbeans-profiler-${PV} )
122 netbeans_modules_webcommon? ( ~dev-java/netbeans-webcommon-${PV} )
123 netbeans_modules_websvccommon? ( ~dev-java/netbeans-websvccommon-${PV} )
124 doc? ( ~dev-java/netbeans-javadoc-${PV} )"
129 for lingua in ${IUSE_LINGUAS} ; do
130 local lang=${lingua/linguas_/}
132 if [[ "${lang}" = "ar" ]] ; then
134 elif [[ "${lang}" = "es" ]] ; then
136 elif [[ "${lang}" = "gl" ]] ; then
138 elif [[ "${lang}" = "id" ]] ; then
140 elif [[ "${lang}" = "nl" ]] ; then
142 elif [[ "${lang}" = "tl" ]] ; then
146 if use ${lingua} ; then
147 if [ -z "${NBLOCALES}" ] ; then
150 NBLOCALES="${NBLOCALES},${lang}"
159 if [ -n "${NBLOCALES}" ] ; then
160 unpack $(basename ${SOURCE_URL})
161 unpack $(basename ${L10N_URL})
163 einfo "Deleting bundled jars..."
164 find -name "*.jar" -type f -delete
166 unpack netbeans-8.0.2-build.xml.patch.bz2
171 if [ -n "${NBLOCALES}" ] ; then
172 einfo "Deleting bundled class files..."
173 find -name "*.class" -type f | xargs rm -vf
175 epatch netbeans-8.0.2-build.xml.patch
177 # Support for custom patches
178 if [ -n "${NETBEANS80_PATCHES_DIR}" -a -d "${NETBEANS80_PATCHES_DIR}" ] ; then
179 local files=`find "${NETBEANS80_PATCHES_DIR}" -type f`
181 if [ -n "${files}" ] ; then
182 einfo "Applying custom patches:"
184 for file in ${files} ; do
190 einfo "Symlinking external libraries..."
191 java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
194 java-pkg-2_src_prepare
198 if [ -n "${NBLOCALES}" ] ; then
199 einfo "Compiling support for locales: ${NBLOCALES}"
200 eant -f nbbuild/build.xml bootstrap || die
201 eant -Dlocales=${NBLOCALES} -Ddist.dir=../nbbuild/netbeans -Dnbms.dir="" -Dnbms.dist.dir="" \
202 -Dpermit.jdk7.builds=true -f l10n/build.xml build || die
207 if [ -n "${NBLOCALES}" ] ; then
208 pushd "${S}"/nbbuild/netbeans >/dev/null || die
210 for cluster in apisupport cnd dlight enterprise ergonomics groovy harness ide java javacard javafx mobility php platform profiler webcommon websvccommon ; do
211 if [ -d "${cluster}" ] ; then
212 insinto /usr/share/netbeans-${cluster}-${SLOT}
213 doins -r ${cluster}/*
218 insinto /usr/share/netbeans-nb-${SLOT}/nb
222 popd >/dev/null || die
227 if [ -n "${NBLOCALES}" ] ; then
228 einfo "Netbeans automatically starts with the locale you have set in your user profile, if"
229 einfo "the locale is built for Netbeans."
230 einfo "If you want to force specific locale, use --locale argument, for example:"
231 einfo "${PN}-${SLOT} --locale de"
232 einfo "${PN}-${SLOT} --locale pt:BR"
235 if use linguas_ar ; then
237 einfo "You selected Arabic locale so you can choose either ar:EG or ar:SA variant."
240 if use linguas_es ; then
242 einfo "You selected Spanish locale so you can choose either es or es:CO variant."
245 if use linguas_gl ; then
247 einfo "You selected Galician locale which has locale code gl:ES in Netbeans."
250 if use linguas_id ; then
252 einfo "You selected Indonesian locale which has locale code in:ID in Netbeans."
255 if use linguas_nl ; then
257 einfo "You selected Dutch locale so you can choose either nl:BE or nl:NL variant."
260 if use linguas_tl ; then
262 einfo "You selected Tagalog locale which has for Filipino locale code fil:PH in Netbeans."