From 1be84b827cb88c9eff1eeceb44a8424b317594cd Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 24 Jun 2017 14:32:24 +0200 Subject: dev-util/eclipse-sdk-bin: Fix default lombok jar location (#21) --- .../eclipse-sdk-bin-4.5.2-r1.ebuild | 109 -------------------- .../eclipse-sdk-bin-4.5.2-r2.ebuild | 109 ++++++++++++++++++++ .../eclipse-sdk-bin-4.6.1a-r1.ebuild | 111 ++++++++++++++++++++ .../eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a.ebuild | 111 -------------------- .../eclipse-sdk-bin-4.6.2-r1.ebuild | 113 +++++++++++++++++++++ .../eclipse-sdk-bin/eclipse-sdk-bin-4.6.2.ebuild | 113 --------------------- .../files/eclipse-sdk-bin-4.5.2-eclipserc-bin | 2 +- .../files/eclipse-sdk-bin-4.6.1a-eclipserc-bin | 2 +- .../files/eclipse-sdk-bin-4.6.2-eclipserc-bin | 2 +- 9 files changed, 336 insertions(+), 336 deletions(-) delete mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r1.ebuild create mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r2.ebuild create mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a-r1.ebuild delete mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a.ebuild create mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2-r1.ebuild delete mode 100644 dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2.ebuild diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r1.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r1.ebuild deleted file mode 100644 index 05b6553..0000000 --- a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r1.ebuild +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils versionator java-utils-2 - -SR="$(get_version_component_range 3)" -RNAME="mars" - -SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" - -DESCRIPTION="Eclipse SDK" -HOMEPAGE="http://www.eclipse.org" -SRC_URI=" - amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) - x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) - " - -LICENSE="EPL-1.0" -SLOT="$(get_version_component_range 1-2)" -KEYWORDS="~amd64 ~x86" -IUSE="system-icu lombok" - -CDEPEND=" - >=dev-java/commons-httpclient-3.1:3 - system-icu? ( >=dev-java/icu4j-54.1.1:52 ) - >=dev-java/javax-inject-1:0 - >=dev-java/jsr250-1.2:0 - >=dev-java/xml-commons-resolver-1.2:0 - " -DEPEND="${CDEPEND}" -RDEPEND=">=virtual/jdk-1.6 - x11-libs/gtk+:2 - lombok? ( dev-java/lombok-bin ) - ${CDEPEND}" - -S="${WORKDIR}"/eclipse - -_unbundle_single() { - local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" - local abs_destination_jar="${PWD}/${destination_jar}" - local backup_dir="${T}"/${destination_jar##*/}.dir - - if [[ "${mode}" = delete ]]; then - # Backup META-INF/MANIFEST.MF with checksums - # Then delete .jar file - mkdir -p "${backup_dir}"/META-INF - unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ - | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ - > "${backup_dir}"/META-INF/MANIFEST.MF || die - rm "${destination_jar}" || die - elif [[ "${mode}" = wire ]]; then - einfo "Replacing bundled ${destination_jar}..." - # Create new .jar based on system-wide build - # In the process, apply META-INF/MANIFEST.MF backup - java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" - local source_jar="$(readlink -f "${destination_jar}")" - rm "${destination_jar}" || die - - cp "${source_jar}" "${destination_jar}" || die - ( cd "${backup_dir}" \ - && [[ -f "${abs_destination_jar}" ]] \ - && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null - ) || die - fi -} - -_unbundle_known() { - local mode="${1}" - - # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source - use system-icu && _unbundle_single "${mode}" plugins/com.ibm.icu_54.1.1.v201501272100.jar icu4j-52 icu4j.jar - _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201401042248.jar jsr250 jsr250.jar - _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar - _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar - _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar -} - -src_prepare() { - _unbundle_known delete - - ewarn 'Binary dependencies left to unbundle:' - ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" - - _unbundle_known wire - - cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die - cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die - sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die -} - -src_install() { - local dest=/opt/${PN}-${SLOT} - - insinto ${dest} - doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins - - exeinto ${dest} - doexe eclipse - - dohtml -r readme/* - - dobin "${T}"/eclipse-bin-${SLOT} - insinto /etc - doins "${T}"/eclipserc-bin-${SLOT} - make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" -} diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r2.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r2.ebuild new file mode 100644 index 0000000..05b6553 --- /dev/null +++ b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.5.2-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils versionator java-utils-2 + +SR="$(get_version_component_range 3)" +RNAME="mars" + +SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" + +DESCRIPTION="Eclipse SDK" +HOMEPAGE="http://www.eclipse.org" +SRC_URI=" + amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) + x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) + " + +LICENSE="EPL-1.0" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +IUSE="system-icu lombok" + +CDEPEND=" + >=dev-java/commons-httpclient-3.1:3 + system-icu? ( >=dev-java/icu4j-54.1.1:52 ) + >=dev-java/javax-inject-1:0 + >=dev-java/jsr250-1.2:0 + >=dev-java/xml-commons-resolver-1.2:0 + " +DEPEND="${CDEPEND}" +RDEPEND=">=virtual/jdk-1.6 + x11-libs/gtk+:2 + lombok? ( dev-java/lombok-bin ) + ${CDEPEND}" + +S="${WORKDIR}"/eclipse + +_unbundle_single() { + local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" + local abs_destination_jar="${PWD}/${destination_jar}" + local backup_dir="${T}"/${destination_jar##*/}.dir + + if [[ "${mode}" = delete ]]; then + # Backup META-INF/MANIFEST.MF with checksums + # Then delete .jar file + mkdir -p "${backup_dir}"/META-INF + unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ + | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ + > "${backup_dir}"/META-INF/MANIFEST.MF || die + rm "${destination_jar}" || die + elif [[ "${mode}" = wire ]]; then + einfo "Replacing bundled ${destination_jar}..." + # Create new .jar based on system-wide build + # In the process, apply META-INF/MANIFEST.MF backup + java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" + local source_jar="$(readlink -f "${destination_jar}")" + rm "${destination_jar}" || die + + cp "${source_jar}" "${destination_jar}" || die + ( cd "${backup_dir}" \ + && [[ -f "${abs_destination_jar}" ]] \ + && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null + ) || die + fi +} + +_unbundle_known() { + local mode="${1}" + + # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source + use system-icu && _unbundle_single "${mode}" plugins/com.ibm.icu_54.1.1.v201501272100.jar icu4j-52 icu4j.jar + _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201401042248.jar jsr250 jsr250.jar + _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar + _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar + _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar +} + +src_prepare() { + _unbundle_known delete + + ewarn 'Binary dependencies left to unbundle:' + ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" + + _unbundle_known wire + + cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die + cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die + sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die +} + +src_install() { + local dest=/opt/${PN}-${SLOT} + + insinto ${dest} + doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins + + exeinto ${dest} + doexe eclipse + + dohtml -r readme/* + + dobin "${T}"/eclipse-bin-${SLOT} + insinto /etc + doins "${T}"/eclipserc-bin-${SLOT} + make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" +} diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a-r1.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a-r1.ebuild new file mode 100644 index 0000000..3f7aea6 --- /dev/null +++ b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils versionator java-utils-2 + +SR="$(get_version_component_range 3-)" +RNAME="neon" + +SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" + +DESCRIPTION="Eclipse SDK" +HOMEPAGE="http://www.eclipse.org" +SRC_URI=" + amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) + x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) + " + +LICENSE="EPL-1.0" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +IUSE="lombok" + +CDEPEND=" + >=dev-java/commons-httpclient-3.1:3 + >=dev-java/icu4j-56.1:56 + >=dev-java/javax-inject-1:0 + >=dev-java/jsr250-1.2:0 + >=dev-java/xml-commons-resolver-1.2:0 + " +DEPEND="${CDEPEND}" +RDEPEND=">=virtual/jdk-1.8 + x11-libs/gtk+:3 + lombok? ( dev-java/lombok-bin ) + ${CDEPEND}" + +S="${WORKDIR}"/eclipse + +_unbundle_single() { + local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" + local abs_destination_jar="${PWD}/${destination_jar}" + local backup_dir="${T}"/${destination_jar##*/}.dir + + if [[ "${mode}" = delete ]]; then + # Backup META-INF/MANIFEST.MF with checksums + # Then delete .jar file + mkdir -p "${backup_dir}"/META-INF + unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ + | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ + > "${backup_dir}"/META-INF/MANIFEST.MF || die + rm "${destination_jar}" || die + elif [[ "${mode}" = wire ]]; then + einfo "Replacing bundled ${destination_jar}..." + # Create new .jar based on system-wide build + # In the process, apply META-INF/MANIFEST.MF backup + java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" + local source_jar="$(readlink -f "${destination_jar}")" + rm "${destination_jar}" || die + + cp "${source_jar}" "${destination_jar}" || die + ( cd "${backup_dir}" \ + && [[ -f "${abs_destination_jar}" ]] \ + && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null + ) || die + fi +} + +_unbundle_known() { + local mode="${1}" + + # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source + _unbundle_single "${mode}" plugins/com.ibm.icu_56.1.0.v201601250100.jar icu4j-56 icu4j.jar + _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201602091430.jar jsr250 jsr250.jar + _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar + _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar + _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar +} + +src_prepare() { + _unbundle_known delete + + ewarn 'Binary dependencies left to unbundle:' + ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" + + _unbundle_known wire + + cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die + cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die + sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die + + eapply_user +} + +src_install() { + local dest=/opt/${PN}-${SLOT} + + insinto ${dest} + doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins + + exeinto ${dest} + doexe eclipse + + dohtml -r readme/* + + dobin "${T}"/eclipse-bin-${SLOT} + insinto /etc + doins "${T}"/eclipserc-bin-${SLOT} + make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" +} diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a.ebuild deleted file mode 100644 index 3f7aea6..0000000 --- a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.1a.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils versionator java-utils-2 - -SR="$(get_version_component_range 3-)" -RNAME="neon" - -SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" - -DESCRIPTION="Eclipse SDK" -HOMEPAGE="http://www.eclipse.org" -SRC_URI=" - amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) - x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) - " - -LICENSE="EPL-1.0" -SLOT="$(get_version_component_range 1-2)" -KEYWORDS="~amd64 ~x86" -IUSE="lombok" - -CDEPEND=" - >=dev-java/commons-httpclient-3.1:3 - >=dev-java/icu4j-56.1:56 - >=dev-java/javax-inject-1:0 - >=dev-java/jsr250-1.2:0 - >=dev-java/xml-commons-resolver-1.2:0 - " -DEPEND="${CDEPEND}" -RDEPEND=">=virtual/jdk-1.8 - x11-libs/gtk+:3 - lombok? ( dev-java/lombok-bin ) - ${CDEPEND}" - -S="${WORKDIR}"/eclipse - -_unbundle_single() { - local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" - local abs_destination_jar="${PWD}/${destination_jar}" - local backup_dir="${T}"/${destination_jar##*/}.dir - - if [[ "${mode}" = delete ]]; then - # Backup META-INF/MANIFEST.MF with checksums - # Then delete .jar file - mkdir -p "${backup_dir}"/META-INF - unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ - | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ - > "${backup_dir}"/META-INF/MANIFEST.MF || die - rm "${destination_jar}" || die - elif [[ "${mode}" = wire ]]; then - einfo "Replacing bundled ${destination_jar}..." - # Create new .jar based on system-wide build - # In the process, apply META-INF/MANIFEST.MF backup - java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" - local source_jar="$(readlink -f "${destination_jar}")" - rm "${destination_jar}" || die - - cp "${source_jar}" "${destination_jar}" || die - ( cd "${backup_dir}" \ - && [[ -f "${abs_destination_jar}" ]] \ - && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null - ) || die - fi -} - -_unbundle_known() { - local mode="${1}" - - # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source - _unbundle_single "${mode}" plugins/com.ibm.icu_56.1.0.v201601250100.jar icu4j-56 icu4j.jar - _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201602091430.jar jsr250 jsr250.jar - _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar - _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar - _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar -} - -src_prepare() { - _unbundle_known delete - - ewarn 'Binary dependencies left to unbundle:' - ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" - - _unbundle_known wire - - cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die - cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die - sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die - - eapply_user -} - -src_install() { - local dest=/opt/${PN}-${SLOT} - - insinto ${dest} - doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins - - exeinto ${dest} - doexe eclipse - - dohtml -r readme/* - - dobin "${T}"/eclipse-bin-${SLOT} - insinto /etc - doins "${T}"/eclipserc-bin-${SLOT} - make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" -} diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2-r1.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2-r1.ebuild new file mode 100644 index 0000000..a689cc4 --- /dev/null +++ b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2-r1.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils versionator java-utils-2 + +SR="$(get_version_component_range 3-)" +RNAME="neon" + +SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" + +DESCRIPTION="Eclipse SDK" +HOMEPAGE="http://www.eclipse.org" +SRC_URI=" + amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) + x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) + " + +LICENSE="EPL-1.0" +SLOT="$(get_version_component_range 1-2)" +KEYWORDS="~amd64 ~x86" +IUSE="lombok" + +CDEPEND=" + >=dev-java/commons-httpclient-3.1:3 + >=dev-java/icu4j-56.1:56 + >=dev-java/javax-inject-1:0 + >=dev-java/jsr250-1.2:0 + >=dev-java/xml-commons-resolver-1.2:0 + " +DEPEND="${CDEPEND}" +RDEPEND=">=virtual/jdk-1.8 + x11-libs/gtk+:3 + lombok? ( dev-java/lombok-bin ) + ${CDEPEND}" + +S="${WORKDIR}"/eclipse + +HTML_DOCS="readme/" + +_unbundle_single() { + local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" + local abs_destination_jar="${PWD}/${destination_jar}" + local backup_dir="${T}"/${destination_jar##*/}.dir + + if [[ "${mode}" = delete ]]; then + # Backup META-INF/MANIFEST.MF with checksums + # Then delete .jar file + mkdir -p "${backup_dir}"/META-INF + unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ + | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ + > "${backup_dir}"/META-INF/MANIFEST.MF || die + rm "${destination_jar}" || die + elif [[ "${mode}" = wire ]]; then + einfo "Replacing bundled ${destination_jar}..." + # Create new .jar based on system-wide build + # In the process, apply META-INF/MANIFEST.MF backup + java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" + local source_jar="$(readlink -f "${destination_jar}")" + rm "${destination_jar}" || die + + cp "${source_jar}" "${destination_jar}" || die + ( cd "${backup_dir}" \ + && [[ -f "${abs_destination_jar}" ]] \ + && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null + ) || die + fi +} + +_unbundle_known() { + local mode="${1}" + + # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source + _unbundle_single "${mode}" plugins/com.ibm.icu_56.1.0.v201601250100.jar icu4j-56 icu4j.jar + _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201602091430.jar jsr250 jsr250.jar + _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar + _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar + _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar +} + +src_prepare() { + _unbundle_known delete + + ewarn 'Binary dependencies left to unbundle:' + ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" + + _unbundle_known wire + + cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die + cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die + sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die + + eapply_user +} + +src_install() { + local dest=/opt/${PN}-${SLOT} + + insinto ${dest} + doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins + + exeinto ${dest} + doexe eclipse + + einstalldocs + + dobin "${T}"/eclipse-bin-${SLOT} + insinto /etc + doins "${T}"/eclipserc-bin-${SLOT} + make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" +} diff --git a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2.ebuild b/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2.ebuild deleted file mode 100644 index a689cc4..0000000 --- a/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.6.2.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils versionator java-utils-2 - -SR="$(get_version_component_range 3-)" -RNAME="neon" - -SRC_BASE="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk" - -DESCRIPTION="Eclipse SDK" -HOMEPAGE="http://www.eclipse.org" -SRC_URI=" - amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz ) - x86? ( ${SRC_BASE}.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-${PV}.tar.gz ) - " - -LICENSE="EPL-1.0" -SLOT="$(get_version_component_range 1-2)" -KEYWORDS="~amd64 ~x86" -IUSE="lombok" - -CDEPEND=" - >=dev-java/commons-httpclient-3.1:3 - >=dev-java/icu4j-56.1:56 - >=dev-java/javax-inject-1:0 - >=dev-java/jsr250-1.2:0 - >=dev-java/xml-commons-resolver-1.2:0 - " -DEPEND="${CDEPEND}" -RDEPEND=">=virtual/jdk-1.8 - x11-libs/gtk+:3 - lombok? ( dev-java/lombok-bin ) - ${CDEPEND}" - -S="${WORKDIR}"/eclipse - -HTML_DOCS="readme/" - -_unbundle_single() { - local mode="${1}" destination_jar="${2}" package="${3}" package_jar="${4}" - local abs_destination_jar="${PWD}/${destination_jar}" - local backup_dir="${T}"/${destination_jar##*/}.dir - - if [[ "${mode}" = delete ]]; then - # Backup META-INF/MANIFEST.MF with checksums - # Then delete .jar file - mkdir -p "${backup_dir}"/META-INF - unzip -p "${destination_jar}" META-INF/MANIFEST.MF \ - | sed -e '/^Name:/d' -e '/^SHA1-Digest:/d' -e '/^\s*$/d' \ - > "${backup_dir}"/META-INF/MANIFEST.MF || die - rm "${destination_jar}" || die - elif [[ "${mode}" = wire ]]; then - einfo "Replacing bundled ${destination_jar}..." - # Create new .jar based on system-wide build - # In the process, apply META-INF/MANIFEST.MF backup - java-pkg_jar-from "${package}" "${package_jar}" "${destination_jar}" - local source_jar="$(readlink -f "${destination_jar}")" - rm "${destination_jar}" || die - - cp "${source_jar}" "${destination_jar}" || die - ( cd "${backup_dir}" \ - && [[ -f "${abs_destination_jar}" ]] \ - && zip "${abs_destination_jar}" META-INF/MANIFEST.MF >/dev/null - ) || die - fi -} - -_unbundle_known() { - local mode="${1}" - - # https://wiki.gentoo.org/wiki/Eclipse/Building_From_Source - _unbundle_single "${mode}" plugins/com.ibm.icu_56.1.0.v201601250100.jar icu4j-56 icu4j.jar - _unbundle_single "${mode}" plugins/javax.annotation_1.2.0.v201602091430.jar jsr250 jsr250.jar - _unbundle_single "${mode}" plugins/javax.inject_1.0.0.v20091030.jar javax-inject javax-inject.jar - _unbundle_single "${mode}" plugins/org.apache.commons.httpclient_3.1.0.v201012070820.jar commons-httpclient-3 commons-httpclient.jar - _unbundle_single "${mode}" plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar xml-commons-resolver xml-commons-resolver.jar -} - -src_prepare() { - _unbundle_known delete - - ewarn 'Binary dependencies left to unbundle:' - ewarn "$(find -type f -name '*.jar' -not -wholename '*/org.eclipse*' | sort | sed 's,^\./,,')" - - _unbundle_known wire - - cp "${FILESDIR}"/${P}-eclipse-bin "${T}/eclipse-bin-${SLOT}" || die - cp "${FILESDIR}"/${P}-eclipserc-bin "${T}/eclipserc-bin-${SLOT}" || die - sed "s,%SLOT%,${SLOT},g" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die - - eapply_user -} - -src_install() { - local dest=/opt/${PN}-${SLOT} - - insinto ${dest} - doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins - - exeinto ${dest} - doexe eclipse - - einstalldocs - - dobin "${T}"/eclipse-bin-${SLOT} - insinto /etc - doins "${T}"/eclipserc-bin-${SLOT} - make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${RNAME^}/${PV} (bin)" "${dest}/icon.xpm" -} diff --git a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.2-eclipserc-bin b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.2-eclipserc-bin index ea458d7..7a6957c 100644 --- a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.2-eclipserc-bin +++ b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.2-eclipserc-bin @@ -26,4 +26,4 @@ SWT_GTK3= # Default lombok.jar # can also be unset/overwritten by the user -LOMBOK_JAR=/usr/share/lombok/lombok.jar +LOMBOK_JAR=/usr/share/lombok/lib/lombok.jar diff --git a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.1a-eclipserc-bin b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.1a-eclipserc-bin index ba750e5..2b14824 100644 --- a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.1a-eclipserc-bin +++ b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.1a-eclipserc-bin @@ -26,4 +26,4 @@ SWT_GTK3=1 # Default lombok.jar # can also be unset/overwritten by the user -LOMBOK_JAR=/usr/share/lombok/lombok.jar +LOMBOK_JAR=/usr/share/lombok/lib/lombok.jar diff --git a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.2-eclipserc-bin b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.2-eclipserc-bin index ba750e5..2b14824 100644 --- a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.2-eclipserc-bin +++ b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.6.2-eclipserc-bin @@ -26,4 +26,4 @@ SWT_GTK3=1 # Default lombok.jar # can also be unset/overwritten by the user -LOMBOK_JAR=/usr/share/lombok/lombok.jar +LOMBOK_JAR=/usr/share/lombok/lib/lombok.jar -- cgit v1.2.3-65-gdbad