1 |
commit: ec132de82f98877ea73767ced84ec596bb03d8e3 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 3 11:26:54 2016 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 3 11:27:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec132de8 |
7 |
|
8 |
dev-java/icedtea-bin: Allow usage of newer icedtea-web |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
dev-java/icedtea-bin/icedtea-bin-7.2.6.3-r1.ebuild | 185 +++++++++++++++++++++ |
13 |
1 file changed, 185 insertions(+) |
14 |
|
15 |
diff --git a/dev-java/icedtea-bin/icedtea-bin-7.2.6.3-r1.ebuild b/dev-java/icedtea-bin/icedtea-bin-7.2.6.3-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..1825a68 |
18 |
--- /dev/null |
19 |
+++ b/dev-java/icedtea-bin/icedtea-bin-7.2.6.3-r1.ebuild |
20 |
@@ -0,0 +1,185 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI="5" |
26 |
+ |
27 |
+inherit java-vm-2 multilib prefix toolchain-funcs versionator |
28 |
+ |
29 |
+dist="https://dev.gentoo.org/~chewi/distfiles" |
30 |
+TARBALL_VERSION="${PV}" |
31 |
+ |
32 |
+DESCRIPTION="A Gentoo-made binary build of the IcedTea JDK" |
33 |
+HOMEPAGE="http://icedtea.classpath.org" |
34 |
+SRC_URI="doc? ( ${dist}/${PN}-doc-${TARBALL_VERSION}.tar.xz ) |
35 |
+ source? ( ${dist}/${PN}-src-${TARBALL_VERSION}.tar.xz )" |
36 |
+ |
37 |
+for arch in amd64 arm ppc ppc64 x86; do |
38 |
+ SRC_URI+=" |
39 |
+ ${arch}? ( |
40 |
+ ${dist}/${PN}-core-${TARBALL_VERSION}-${arch}.tar.xz |
41 |
+ examples? ( ${dist}/${PN}-examples-${TARBALL_VERSION}-${arch}.tar.xz ) |
42 |
+ )" |
43 |
+done |
44 |
+ |
45 |
+LICENSE="GPL-2-with-linking-exception" |
46 |
+SLOT="7" |
47 |
+KEYWORDS="-* ~amd64 ~arm ~ppc ~ppc64 ~x86" |
48 |
+ |
49 |
+IUSE="+alsa cjk +cups doc examples +gtk headless-awt nsplugin nss pulseaudio selinux source webstart" |
50 |
+REQUIRED_USE="gtk? ( !headless-awt ) nsplugin? ( !headless-awt )" |
51 |
+ |
52 |
+RESTRICT="preserve-libs strip" |
53 |
+QA_PREBUILT="opt/.*" |
54 |
+ |
55 |
+# gsettings-desktop-schemas is needed for native proxy support. #431972 |
56 |
+RDEPEND=">=dev-libs/glib-2.42:2 |
57 |
+ >=dev-libs/nss-3.16.1-r1 |
58 |
+ >=dev-libs/nspr-4.10 |
59 |
+ >=gnome-base/gsettings-desktop-schemas-3.12.2 |
60 |
+ media-fonts/dejavu |
61 |
+ >=media-libs/fontconfig-2.11:1.0 |
62 |
+ >=media-libs/freetype-2.5.5:2 |
63 |
+ >=media-libs/lcms-2.6:2 |
64 |
+ >=sys-devel/gcc-4.9.3 |
65 |
+ >=sys-libs/glibc-2.21 |
66 |
+ >=sys-libs/zlib-1.2.8-r1 |
67 |
+ virtual/jpeg:62 |
68 |
+ alsa? ( >=media-libs/alsa-lib-1.0 ) |
69 |
+ !headless-awt? ( |
70 |
+ >=media-libs/giflib-4.1.6-r1 |
71 |
+ media-libs/libpng:0/16 |
72 |
+ >=x11-libs/libX11-1.6 |
73 |
+ >=x11-libs/libXext-1.3 |
74 |
+ >=x11-libs/libXi-1.7 |
75 |
+ >=x11-libs/libXrender-0.9.8 |
76 |
+ >=x11-libs/libXtst-1.2 |
77 |
+ ) |
78 |
+ cjk? ( |
79 |
+ media-fonts/arphicfonts |
80 |
+ media-fonts/baekmuk-fonts |
81 |
+ media-fonts/lklug |
82 |
+ media-fonts/lohit-fonts |
83 |
+ media-fonts/sazanami |
84 |
+ ) |
85 |
+ cups? ( >=net-print/cups-2.0 ) |
86 |
+ gtk? ( |
87 |
+ >=dev-libs/atk-2.16.0 |
88 |
+ >=x11-libs/cairo-1.14.2 |
89 |
+ x11-libs/gdk-pixbuf:2 |
90 |
+ >=x11-libs/gtk+-2.24:2 |
91 |
+ >=x11-libs/pango-1.36 |
92 |
+ ) |
93 |
+ selinux? ( sec-policy/selinux-java )" |
94 |
+ |
95 |
+DEPEND="!arm? ( dev-util/patchelf )" |
96 |
+ |
97 |
+PDEPEND="webstart? ( dev-java/icedtea-web:0[icedtea7(+)] ) |
98 |
+ nsplugin? ( dev-java/icedtea-web:0[icedtea7(+),nsplugin] ) |
99 |
+ pulseaudio? ( dev-java/icedtea-sound )" |
100 |
+ |
101 |
+pkg_pretend() { |
102 |
+ if [[ "$(tc-is-softfloat)" != "no" ]]; then |
103 |
+ die "These binaries require a hardfloat system." |
104 |
+ fi |
105 |
+} |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ if ! use alsa; then |
109 |
+ rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die |
110 |
+ fi |
111 |
+ |
112 |
+ if use headless-awt; then |
113 |
+ rm -vr jre/lib/$(get_system_arch)/{xawt,libsplashscreen.*} \ |
114 |
+ {,jre/}bin/policytool bin/appletviewer || die |
115 |
+ fi |
116 |
+ |
117 |
+ if ! use gtk; then |
118 |
+ rm -v jre/lib/$(get_system_arch)/libjavagtk.* || die |
119 |
+ fi |
120 |
+ |
121 |
+ # NSS is already required because of SunEC. The nss flag in the |
122 |
+ # icedtea package just comments or uncomments this line. |
123 |
+ sed -i "/=sun\.security\.pkcs11\.SunPKCS11/s/^#*$(usex nss '/' '/#')/" jre/lib/security/java.security || die |
124 |
+ |
125 |
+ if [[ -n "${EPREFIX}" ]]; then |
126 |
+ # The binaries are built on a non-prefixed system so the |
127 |
+ # fontconfig needs to have prefixes inserted. |
128 |
+ sed -i 's:=/:=@GENTOO_PORTAGE_EPREFIX@/:' jre/lib/fontconfig.Gentoo.properties || die |
129 |
+ eprefixify jre/lib/fontconfig.Gentoo.properties |
130 |
+ fi |
131 |
+ |
132 |
+ # Fix the RPATHs, except on arm. |
133 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=543658#c3 |
134 |
+ # https://github.com/NixOS/patchelf/issues/8 |
135 |
+ if use arm; then |
136 |
+ ewarn "The RPATHs on these binaries are normally modified to avoid" |
137 |
+ ewarn "conflicts with an icedtea installation built from source. This" |
138 |
+ ewarn "is currently not possible on ARM so please refrain from" |
139 |
+ ewarn "installing dev-java/icedtea on the same system." |
140 |
+ else |
141 |
+ local old="/usr/$(get_libdir)/icedtea${SLOT}" |
142 |
+ local new="${EPREFIX}/opt/${P}" |
143 |
+ local elf rpath |
144 |
+ |
145 |
+ for elf in $(find -type f -executable ! -name "*.cgi" || die); do |
146 |
+ rpath=$(patchelf --print-rpath "${elf}" || die "patchelf ${elf}") |
147 |
+ |
148 |
+ if [[ -n "${rpath}" ]]; then |
149 |
+ patchelf --set-rpath "${rpath//${old}/${new}}" "${elf}" || die "patchelf ${elf}" |
150 |
+ fi |
151 |
+ done |
152 |
+ fi |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ local dest="/opt/${P}" |
157 |
+ local ddest="${ED}${dest#/}" |
158 |
+ dodir "${dest}" |
159 |
+ |
160 |
+ # doins doesn't preserve executable bits. |
161 |
+ cp -pRP bin include jre lib man "${ddest}" || die |
162 |
+ |
163 |
+ dodoc doc/{ASSEMBLY_EXCEPTION,AUTHORS,NEWS,README,THIRD_PARTY_README} |
164 |
+ use doc && dodoc -r doc/html |
165 |
+ |
166 |
+ if use examples; then |
167 |
+ cp -pRP demo sample "${ddest}" || die |
168 |
+ fi |
169 |
+ |
170 |
+ if use source; then |
171 |
+ cp src.zip "${ddest}" || die |
172 |
+ fi |
173 |
+ |
174 |
+ if use webstart || use nsplugin; then |
175 |
+ dosym /usr/libexec/icedtea-web/itweb-settings "${dest}/bin/itweb-settings" |
176 |
+ dosym /usr/libexec/icedtea-web/itweb-settings "${dest}/jre/bin/itweb-settings" |
177 |
+ fi |
178 |
+ if use webstart; then |
179 |
+ dosym /usr/libexec/icedtea-web/javaws "${dest}/bin/javaws" |
180 |
+ dosym /usr/libexec/icedtea-web/javaws "${dest}/jre/bin/javaws" |
181 |
+ fi |
182 |
+ |
183 |
+ # Both icedtea itself and the icedtea ebuild set PAX markings but we |
184 |
+ # disable them for the icedtea-bin build because the line below will |
185 |
+ # respect end-user settings when icedtea-bin is actually installed. |
186 |
+ java-vm_set-pax-markings "${ddest}" |
187 |
+ |
188 |
+ set_java_env |
189 |
+ java-vm_revdep-mask "${dest}" |
190 |
+ java-vm_sandbox-predict /proc/self/coredump_filter |
191 |
+} |
192 |
+ |
193 |
+pkg_postinst() { |
194 |
+ if use nsplugin; then |
195 |
+ if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 7.2.4.3 ${REPLACING_VERSIONS} ]]; then |
196 |
+ elog "The nsplugin for icedtea-bin is now provided by the icedtea-web package" |
197 |
+ elog "If you had icedtea-bin-7 nsplugin selected, you may see a related error below" |
198 |
+ elog "The switch should complete properly during the subsequent installation of icedtea-web" |
199 |
+ elog "Afterwards you may verify the output of 'eselect java-nsplugin list' and adjust accordingly'" |
200 |
+ fi |
201 |
+ fi |
202 |
+ |
203 |
+ # Set as default VM if none exists |
204 |
+ java-vm-2_pkg_postinst |
205 |
+} |