Updated packages to EAPI=7.
This commit is contained in:
parent
31516e5a68
commit
656c4b42a0
|
@ -5,11 +5,6 @@ AUX oracle-jdk-bin.env.sh 833 BLAKE2B 2e8254aff8d35795f073fb599c1c51dcd2ecb0356b
|
|||
DIST UnlimitedJCEPolicyJDK7.zip 7426 BLAKE2B 1cd63919e35248e25e4e104c8f87deed84db70280c7a4262c999d02edc8f9757c8ac6a369ac326686f61da7391f1788ec1da65d253e0bc6ff674c4e0c7dc3fb7 SHA512 02eca7da8f3fffea388431d5352290535a63d53a1f5c795d6511ccba62445787a0ee6ad4bc1852e5262860b6d607ba2a8c6a3dbb0c3e1d7c3a67ac7bbc783204
|
||||
DIST jdk-7u80-linux-i586.tar.gz 154850445 BLAKE2B a94426088fa12456b74b24938279e9415d73cdb45857fa9b6234a9b5de24962690a28cf00097103f1cd94b3b9a7fd3eabb137edcca9572e035d6f27dca8a7608 SHA512 69e2ee7964b18e9e8b57db917b303eb9ea629c432300fe4749177118d2f5c365e72b976649e21354643fe4957120a2b23de025bab4dc45977837d4847a61ffb6
|
||||
DIST jdk-7u80-linux-x64.tar.gz 153530841 BLAKE2B 9ff05c97b65b3b49f4d5088fa4b021aaa58806a1d9937b3c65db8e25bd44465880e66f60b75483bed12b9f562d3bf6430480516a86724a16262776231044a95e SHA512 a772878f740e87835bafc82841e8f4c1dfbe8bc79e072d3f6c5c74d3a206eb9001a53b474d91a22819c7c0d6407ed88993635c39738779c2b08c22c7a1c2e9e9
|
||||
DIST jdk-8u241-linux-i586.tar.gz 195143852 BLAKE2B 595e614fb34122a72fca5ce70a4ed4702e725a2f3a3084c7f6a86be8901799f9b4eb11b04b9b054d59d011a285276922532dbc52a04e33a5c49b9a22fe9bdcb4 SHA512 66edeb10d4ab38e05f74a17f8bdfe681069e2ca14a42b2c0f6159cefed6ccba69581086d0d6209476cb731913451b58a3a503bc28456ac6c5ef68722d124a04d
|
||||
DIST jdk-8u241-linux-x64.tar.gz 194545143 BLAKE2B 13369d68bc0c328c4efbba90697080fe4d65fb8167bc9b20b92b6d4d6845c48486c53f2371e362fdb6195e8ffdb3ad8f4b486115ffbcf3e2f8e2966b6ad46d4c SHA512 1123fb82926ac207fdbfc1dd3efd588832feed15cac755d1ca604e321816c2fb3c695b9ce3f99b5a14f6c45973cc8dadae87d5c79c49d67336f8a5cb50c56050
|
||||
DIST jdk-8u381-linux-x64.tar.gz 139273048 BLAKE2B 630ac0a30daf8bdaddef8d3fe64ee3aa63bd0fa4ab7667d1510a1ba937c94ccf533f905cae9f3a6670370eb8469577a9375a54e4e2540c9fd787722b7c59b2b7 SHA512 c30b905fe47fdb77779e40ba679b262542f071a4444bc5f95ec3e94b116f4604efb29d77e72b2843cd01b999cd25d856bb78f3f36cc7624b1adbc983de4d2a17
|
||||
DIST jdk-8u411-linux-x64.tar.gz 146902735 BLAKE2B c8c1649f806634279a310b475092759f5975b44dda81f61901e6c77c5e6cca66f00d2a54e3b5e7878007cf3bc9832cbd79f8942e862287a88619b1ea937cd2c0 SHA512 5156bf1858d9a5957302c5475b570a2490618597d6f748b66855ad7e5a3e3e235cd728aa1fc331afce908e395c102dd419b9e3878393b1e665cbc77e31303144
|
||||
EBUILD oracle-jdk-bin-1.7.0.80.ebuild 7525 BLAKE2B cf5997f8872494b1334653c7637a72472326f04be56460c5cdce7b318b96867fbd921c2d1a124f29e78d1e0a0c1e5bf9c1841af8e22a8daac22ba55ccb41975b SHA512 5526de842d446d6e78ab783cb905c11733b951e61f2f4b6d0bd2a0bdc5776e6c83b10612d1889dcef139e352fa6f187facb60633ab80496da30bcd8cd70f3508
|
||||
EBUILD oracle-jdk-bin-1.8.0.241.ebuild 8238 BLAKE2B 39a8ef091be7f6195367ae50fb18d7d12f0e9255ce9d04012eb2da8f6be067c096f8f3d17b266c16409391ff6b64236434b273a2c4b36b8aad640af86100aca1 SHA512 e5877fc6bcf3498300e516384434ff423fb7920de365278a1aa104c1147398af1e7b263d2dff94e0321d84d0dfacc0b04b0e337cbcb32339e504a9d44f4fe563
|
||||
EBUILD oracle-jdk-bin-1.8.0.381.ebuild 8234 BLAKE2B 362887a84046649000d5ebce0e32469186085789a956ea3c18923eb888412f23c0a45fb4efeac3b0775fe37961315bbd25edb2d3ba57306e6adbebf09e88343f SHA512 f4975028666de55cc60ec730a8f52aeb601ed354083a03eef3954b2b887721033206a39c6764b5a33d6a894a98aedce4bce26b39b569619bc96eb281decbcaad
|
||||
EBUILD oracle-jdk-bin-1.8.0.411.ebuild 8234 BLAKE2B 362887a84046649000d5ebce0e32469186085789a956ea3c18923eb888412f23c0a45fb4efeac3b0775fe37961315bbd25edb2d3ba57306e6adbebf09e88343f SHA512 f4975028666de55cc60ec730a8f52aeb601ed354083a03eef3954b2b887721033206a39c6764b5a33d6a894a98aedce4bce26b39b569619bc96eb281decbcaad
|
||||
EBUILD oracle-jdk-bin-1.7.0.80.ebuild 7442 BLAKE2B 2220551a04031cb24413ac1b3a467a193c75a73332692a1025e10bf9677190b86f93b74da9d798162d8d4440b0aabe9a35c11be4bd0f4b2edf423ddf54d630e1 SHA512 6a4d8c08fe23384ad352c5fac4ad279c271eb48a5cd13afbcb01ca6ba9a8439dde0116cc3ecf83c88cd201b71f323ff16d8fa3cbfd2eb13620e50384b229ed2d
|
||||
EBUILD oracle-jdk-bin-1.8.0.411.ebuild 8061 BLAKE2B 416c8821749e33f95f6dd958d22b78f3e882ae10629f27ed015fc2ec4fae584e558fdc095b98c8548c68600291f9bc0b9200b7946a86c3c6c115cf7f013123fa SHA512 15bab7aed085740f652d9152287622e825eb955ee77ea5c9fc6e78c00b274b9cfac6a69e63158ea250a363e0fe13105d5b8d35fe80cb55357d59461c14790b73
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="6"
|
||||
EAPI="7"
|
||||
|
||||
inherit eutils java-vm-2 prefix versionator
|
||||
inherit eutils desktop java-vm-2 prefix
|
||||
|
||||
MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)"
|
||||
S_PV="$(replace_version_separator 3 '_')"
|
||||
MY_PV="$(ver_cut 2)u$(ver_cut 4)"
|
||||
S_PV="$(ver_rs 3 '_')"
|
||||
|
||||
# This URIs need to be updated when bumping!
|
||||
JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html#jdk-${MY_PV}-oth-JPR"
|
||||
|
@ -19,7 +19,7 @@ AT_AVAILABLE=( amd64 x86 )
|
|||
# the ebuild when it happens.
|
||||
DEMOS_AVAILABLE=( )
|
||||
#amd64 x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris x86-macos x64-macos )
|
||||
FX_VERSION="2_2_$(get_version_component_range 4)"
|
||||
FX_VERSION="2_2_$(ver_cut 4)"
|
||||
|
||||
AT_x86="jdk-${MY_PV}-linux-i586.tar.gz"
|
||||
AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
|
||||
|
|
|
@ -1,291 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit desktop gnome2-utils java-vm-2 prefix versionator
|
||||
|
||||
KEYWORDS="-* amd64 x86"
|
||||
|
||||
if [[ "$(get_version_component_range 4)" == 0 ]] ; then
|
||||
S_PV="$(get_version_component_range 1-3)"
|
||||
else
|
||||
MY_PV_EXT="u$(get_version_component_range 4)"
|
||||
S_PV="$(get_version_component_range 1-4)"
|
||||
fi
|
||||
|
||||
MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
|
||||
|
||||
declare -A ARCH_FILES
|
||||
ARCH_FILES[amd64]="jdk-${MY_PV}-linux-x64.tar.gz"
|
||||
ARCH_FILES[arm]="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
|
||||
ARCH_FILES[arm64]="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
|
||||
ARCH_FILES[x86]="jdk-${MY_PV}-linux-i586.tar.gz"
|
||||
ARCH_FILES[x64-macos]="jdk-${MY_PV}-macosx-x64.dmg"
|
||||
ARCH_FILES[sparc64-solaris]="jdk-${MY_PV}-solaris-sparcv9.tar.gz"
|
||||
ARCH_FILES[x64-solaris]="jdk-${MY_PV}-solaris-x64.tar.gz"
|
||||
|
||||
for keyword in ${KEYWORDS//-\*} ; do
|
||||
case "${keyword#\~}" in
|
||||
*-linux) continue ;;
|
||||
x64-macos) demo="jdk-${MY_PV}-macosx-x86_64-demos.zip" ;;
|
||||
*) demo=${ARCH_FILES[${keyword#\~}]/./-demos.} ;;
|
||||
esac
|
||||
|
||||
SRC_URI+="
|
||||
${keyword#\~}? (
|
||||
${ARCH_FILES[${keyword#\~}]}
|
||||
)"
|
||||
done
|
||||
|
||||
DESCRIPTION="Oracle's Java SE Development Kit"
|
||||
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
|
||||
LICENSE="Oracle-BCLA-JavaSE"
|
||||
SLOT="1.8"
|
||||
IUSE="alsa commercial cups doc +fontconfig headless-awt javafx jce nsplugin selinux source visualvm"
|
||||
REQUIRED_USE="javafx? ( alsa fontconfig )"
|
||||
RESTRICT="bindist fetch preserve-libs strip"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
# NOTES:
|
||||
#
|
||||
# * cups is dlopened.
|
||||
#
|
||||
# * libpng is also dlopened but only by libsplashscreen, which isn't
|
||||
# important, so we can exclude that.
|
||||
#
|
||||
# * We still need to work out the exact AWT and JavaFX dependencies
|
||||
# under MacOS. It doesn't appear to use many, if any, of the
|
||||
# dependencies below.
|
||||
#
|
||||
RDEPEND="!x64-macos? (
|
||||
!headless-awt? (
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrender
|
||||
x11-libs/libXtst
|
||||
)
|
||||
javafx? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/libxml2:2
|
||||
dev-libs/libxslt
|
||||
media-libs/freetype:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libX11
|
||||
x11-libs/libXtst
|
||||
x11-libs/libXxf86vm
|
||||
x11-libs/pango
|
||||
virtual/opengl
|
||||
)
|
||||
)
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
cups? ( net-print/cups )
|
||||
doc? ( dev-java/java-sdk-docs:${SLOT} )
|
||||
fontconfig? ( media-libs/fontconfig:1.0 )
|
||||
!prefix? ( sys-libs/glibc:* )
|
||||
selinux? ( sec-policy/selinux-java )"
|
||||
|
||||
DEPEND="app-arch/zip"
|
||||
|
||||
S="${WORKDIR}/jdk$(replace_version_separator 3 _ ${S_PV})"
|
||||
|
||||
pkg_nofetch() {
|
||||
local a
|
||||
einfo "Please download these files and move them to your distfiles directory:"
|
||||
einfo
|
||||
for a in ${A} ; do
|
||||
[[ ! -f ${DISTDIR}/${a} ]] && einfo " ${a}"
|
||||
done
|
||||
einfo
|
||||
einfo " http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
|
||||
einfo
|
||||
einfo "If the above mentioned URL does not point to the correct version anymore,"
|
||||
einfo "please download the file from Oracle's Java download archive:"
|
||||
einfo
|
||||
einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html"
|
||||
einfo
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use x64-macos ; then
|
||||
mkdir -p "${T}"/dmgmount || die
|
||||
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
|
||||
-mountpoint "${T}"/dmgmount || die
|
||||
local jdkgen=$(get_version_component_range 2)
|
||||
local uver=$(get_version_component_range 4)
|
||||
( cd "${T}" &&
|
||||
xar -xf "${T}/dmgmount/JDK ${jdkgen} Update ${uver}.pkg" \
|
||||
jdk${PV//.}.pkg/Payload ) || die
|
||||
zcat "${T}"/jdk${PV//.}.pkg/Payload | cpio -idv || die
|
||||
hdiutil detach "${T}"/dmgmount || die
|
||||
mv Contents/Home "${S}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ -n ${JAVA_PKG_STRICT} ]] ; then
|
||||
# Mark this binary early to run it now.
|
||||
pax-mark m ./bin/javap
|
||||
|
||||
eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
|
||||
eqawarn
|
||||
eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
|
||||
fi
|
||||
|
||||
# Remove the hook that calls Oracle's evil usage tracker. Not just
|
||||
# because it's evil but because it breaks the sandbox during builds
|
||||
# and we can't find any other feasible way to disable it or make it
|
||||
# write somewhere else. See bug #559936 for details.
|
||||
zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest="/opt/${P}"
|
||||
local ddest="${ED}${dest#/}"
|
||||
|
||||
# Create files used as storage for system preferences.
|
||||
mkdir jre/.systemPrefs || die
|
||||
touch jre/.systemPrefs/.system.lock || die
|
||||
touch jre/.systemPrefs/.systemRootModFile || die
|
||||
|
||||
if ! use alsa ; then
|
||||
rm -vf jre/lib/*/libjsoundalsa.* || die
|
||||
fi
|
||||
|
||||
if ! use commercial ; then
|
||||
rm -vfr lib/missioncontrol jre/lib/jfr* || die
|
||||
fi
|
||||
|
||||
if use headless-awt ; then
|
||||
rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
|
||||
{,jre/}bin/{javaws,policytool} \
|
||||
bin/appletviewer || die
|
||||
fi
|
||||
|
||||
if ! use javafx ; then
|
||||
rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
|
||||
jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
|
||||
bin/*javafx* bin/javapackager || die
|
||||
fi
|
||||
|
||||
if ! use nsplugin ; then
|
||||
rm -vf jre/lib/*/libnpjp2.* || die
|
||||
else
|
||||
local nsplugin=$(echo jre/lib/*/libnpjp2.*)
|
||||
local nsplugin_link=${nsplugin##*/}
|
||||
nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
|
||||
dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
|
||||
fi
|
||||
|
||||
# Even though plugins linked against multiple ffmpeg versions are
|
||||
# provided, they generally lag behind what Gentoo has available.
|
||||
rm -vf jre/lib/*/libavplugin* || die
|
||||
|
||||
# Prune all fontconfig files so that libfontconfig will be used.
|
||||
rm -v jre/lib/fontconfig.* || die
|
||||
|
||||
# Packaged as dev-util/visualvm but some users prefer this version.
|
||||
use visualvm || find -name "*visualvm*" -exec rm -vfr {} + || die
|
||||
|
||||
# Install desktop file for the Java Control Panel. Using
|
||||
# ${PN}-${SLOT} to prevent file collision with JRE and other slots.
|
||||
if [[ -d jre/lib/desktop/icons ]] ; then
|
||||
local icon
|
||||
pushd jre/lib/desktop/icons >/dev/null || die
|
||||
for icon in */*/apps/sun-jcontrol.png ; do
|
||||
insinto /usr/share/icons/"${icon%/*}"
|
||||
newins "${icon}" sun-jcontrol-${PN}-${SLOT}.png
|
||||
done
|
||||
popd >/dev/null || die
|
||||
make_desktop_entry \
|
||||
"${dest}"/bin/jcontrol \
|
||||
"Java Control Panel for Oracle JDK ${SLOT}" \
|
||||
sun-jcontrol-${PN}-${SLOT} \
|
||||
"Settings;Java;"
|
||||
fi
|
||||
|
||||
dodoc COPYRIGHT
|
||||
dodir "${dest}"
|
||||
cp -pPR bin include jre lib man "${ddest}" || die
|
||||
|
||||
ln -s policy/$(usex jce unlimited limited)/{US_export,local}_policy.jar \
|
||||
"${ddest}"/jre/lib/security/ || die
|
||||
|
||||
if use source ; then
|
||||
cp -v src.zip "${ddest}" || die
|
||||
|
||||
if use javafx ; then
|
||||
cp -v javafx-src.zip "${ddest}" || die
|
||||
fi
|
||||
fi
|
||||
|
||||
# Only install Gentoo-specific fontconfig if flag is disabled.
|
||||
# https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
|
||||
if ! use fontconfig ; then
|
||||
insinto "${dest}"/jre/lib/
|
||||
doins "$(prefixify_ro "${FILESDIR}"/fontconfig.properties)"
|
||||
fi
|
||||
|
||||
# Needs to be done before CDS, bug #215225.
|
||||
java-vm_set-pax-markings "${ddest}"
|
||||
|
||||
# See bug #207282.
|
||||
einfo "Creating the Class Data Sharing archives"
|
||||
case ${ARCH} in
|
||||
arm|ia64)
|
||||
${ddest}/bin/java -client -Xshare:dump || die
|
||||
;;
|
||||
x86)
|
||||
${ddest}/bin/java -client -Xshare:dump || die
|
||||
# limit heap size for large memory on x86 #467518
|
||||
# this is a workaround and shouldn't be needed.
|
||||
${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
|
||||
;;
|
||||
*)
|
||||
${ddest}/bin/java -server -Xshare:dump || die
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove empty dirs we might have copied.
|
||||
find "${D}" -type d -empty -exec rmdir -v {} + || die
|
||||
|
||||
if use x64-macos ; then
|
||||
local lib
|
||||
for lib in lib{decora_sse,glass,prism_{common,es2,sw}}.dylib ; do
|
||||
ebegin "Fixing self-reference of ${lib}"
|
||||
install_name_tool \
|
||||
-id "${EPREFIX}${dest}"/jre/lib/${lib} \
|
||||
"${ddest}"/jre/lib/${lib} || die
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
|
||||
java-vm_install-env "${FILESDIR}"/${PN}.env.sh
|
||||
java-vm_revdep-mask
|
||||
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
java-vm-2_pkg_postinst
|
||||
|
||||
if ! use headless-awt && ! use javafx ; then
|
||||
ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
|
||||
ewarn "require this and they may fail with a confusing error message."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
java-vm-2_pkg_postrm
|
||||
}
|
|
@ -1,291 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit desktop gnome2-utils java-vm-2 prefix versionator
|
||||
|
||||
KEYWORDS="-* amd64"
|
||||
|
||||
if [[ "$(get_version_component_range 4)" == 0 ]] ; then
|
||||
S_PV="$(get_version_component_range 1-3)"
|
||||
else
|
||||
MY_PV_EXT="u$(get_version_component_range 4)"
|
||||
S_PV="$(get_version_component_range 1-4)"
|
||||
fi
|
||||
|
||||
MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
|
||||
|
||||
declare -A ARCH_FILES
|
||||
ARCH_FILES[amd64]="jdk-${MY_PV}-linux-x64.tar.gz"
|
||||
ARCH_FILES[arm]="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
|
||||
ARCH_FILES[arm64]="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
|
||||
ARCH_FILES[x86]="jdk-${MY_PV}-linux-i586.tar.gz"
|
||||
ARCH_FILES[x64-macos]="jdk-${MY_PV}-macosx-x64.dmg"
|
||||
ARCH_FILES[sparc64-solaris]="jdk-${MY_PV}-solaris-sparcv9.tar.gz"
|
||||
ARCH_FILES[x64-solaris]="jdk-${MY_PV}-solaris-x64.tar.gz"
|
||||
|
||||
for keyword in ${KEYWORDS//-\*} ; do
|
||||
case "${keyword#\~}" in
|
||||
*-linux) continue ;;
|
||||
x64-macos) demo="jdk-${MY_PV}-macosx-x86_64-demos.zip" ;;
|
||||
*) demo=${ARCH_FILES[${keyword#\~}]/./-demos.} ;;
|
||||
esac
|
||||
|
||||
SRC_URI+="
|
||||
${keyword#\~}? (
|
||||
${ARCH_FILES[${keyword#\~}]}
|
||||
)"
|
||||
done
|
||||
|
||||
DESCRIPTION="Oracle's Java SE Development Kit"
|
||||
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
|
||||
LICENSE="Oracle-BCLA-JavaSE"
|
||||
SLOT="1.8"
|
||||
IUSE="alsa commercial cups doc +fontconfig headless-awt javafx jce nsplugin selinux source visualvm"
|
||||
REQUIRED_USE="javafx? ( alsa fontconfig )"
|
||||
RESTRICT="bindist fetch preserve-libs strip"
|
||||
QA_PREBUILT="*"
|
||||
|
||||
# NOTES:
|
||||
#
|
||||
# * cups is dlopened.
|
||||
#
|
||||
# * libpng is also dlopened but only by libsplashscreen, which isn't
|
||||
# important, so we can exclude that.
|
||||
#
|
||||
# * We still need to work out the exact AWT and JavaFX dependencies
|
||||
# under MacOS. It doesn't appear to use many, if any, of the
|
||||
# dependencies below.
|
||||
#
|
||||
RDEPEND="!x64-macos? (
|
||||
!headless-awt? (
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
x11-libs/libXi
|
||||
x11-libs/libXrender
|
||||
x11-libs/libXtst
|
||||
)
|
||||
javafx? (
|
||||
dev-libs/glib:2
|
||||
dev-libs/libxml2:2
|
||||
dev-libs/libxslt
|
||||
media-libs/freetype:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/libX11
|
||||
x11-libs/libXtst
|
||||
x11-libs/libXxf86vm
|
||||
x11-libs/pango
|
||||
virtual/opengl
|
||||
)
|
||||
)
|
||||
alsa? ( media-libs/alsa-lib )
|
||||
cups? ( net-print/cups )
|
||||
doc? ( dev-java/java-sdk-docs:${SLOT} )
|
||||
fontconfig? ( media-libs/fontconfig:1.0 )
|
||||
!prefix? ( sys-libs/glibc:* )
|
||||
selinux? ( sec-policy/selinux-java )"
|
||||
|
||||
DEPEND="app-arch/zip"
|
||||
|
||||
S="${WORKDIR}/jdk$(replace_version_separator 3 _ ${S_PV})"
|
||||
|
||||
pkg_nofetch() {
|
||||
local a
|
||||
einfo "Please download these files and move them to your distfiles directory:"
|
||||
einfo
|
||||
for a in ${A} ; do
|
||||
[[ ! -f ${DISTDIR}/${a} ]] && einfo " ${a}"
|
||||
done
|
||||
einfo
|
||||
einfo " http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
|
||||
einfo
|
||||
einfo "If the above mentioned URL does not point to the correct version anymore,"
|
||||
einfo "please download the file from Oracle's Java download archive:"
|
||||
einfo
|
||||
einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html"
|
||||
einfo
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use x64-macos ; then
|
||||
mkdir -p "${T}"/dmgmount || die
|
||||
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
|
||||
-mountpoint "${T}"/dmgmount || die
|
||||
local jdkgen=$(get_version_component_range 2)
|
||||
local uver=$(get_version_component_range 4)
|
||||
( cd "${T}" &&
|
||||
xar -xf "${T}/dmgmount/JDK ${jdkgen} Update ${uver}.pkg" \
|
||||
jdk${PV//.}.pkg/Payload ) || die
|
||||
zcat "${T}"/jdk${PV//.}.pkg/Payload | cpio -idv || die
|
||||
hdiutil detach "${T}"/dmgmount || die
|
||||
mv Contents/Home "${S}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if [[ -n ${JAVA_PKG_STRICT} ]] ; then
|
||||
# Mark this binary early to run it now.
|
||||
pax-mark m ./bin/javap
|
||||
|
||||
eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
|
||||
eqawarn
|
||||
eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
|
||||
fi
|
||||
|
||||
# Remove the hook that calls Oracle's evil usage tracker. Not just
|
||||
# because it's evil but because it breaks the sandbox during builds
|
||||
# and we can't find any other feasible way to disable it or make it
|
||||
# write somewhere else. See bug #559936 for details.
|
||||
zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest="/opt/${P}"
|
||||
local ddest="${ED}${dest#/}"
|
||||
|
||||
# Create files used as storage for system preferences.
|
||||
mkdir jre/.systemPrefs || die
|
||||
touch jre/.systemPrefs/.system.lock || die
|
||||
touch jre/.systemPrefs/.systemRootModFile || die
|
||||
|
||||
if ! use alsa ; then
|
||||
rm -vf jre/lib/*/libjsoundalsa.* || die
|
||||
fi
|
||||
|
||||
if ! use commercial ; then
|
||||
rm -vfr lib/missioncontrol jre/lib/jfr* || die
|
||||
fi
|
||||
|
||||
if use headless-awt ; then
|
||||
rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
|
||||
{,jre/}bin/{javaws,policytool} \
|
||||
bin/appletviewer || die
|
||||
fi
|
||||
|
||||
if ! use javafx ; then
|
||||
rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
|
||||
jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
|
||||
bin/*javafx* bin/javapackager || die
|
||||
fi
|
||||
|
||||
if ! use nsplugin ; then
|
||||
rm -vf jre/lib/*/libnpjp2.* || die
|
||||
else
|
||||
local nsplugin=$(echo jre/lib/*/libnpjp2.*)
|
||||
local nsplugin_link=${nsplugin##*/}
|
||||
nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
|
||||
dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
|
||||
fi
|
||||
|
||||
# Even though plugins linked against multiple ffmpeg versions are
|
||||
# provided, they generally lag behind what Gentoo has available.
|
||||
rm -vf jre/lib/*/libavplugin* || die
|
||||
|
||||
# Prune all fontconfig files so that libfontconfig will be used.
|
||||
rm -v jre/lib/fontconfig.* || die
|
||||
|
||||
# Packaged as dev-util/visualvm but some users prefer this version.
|
||||
use visualvm || find -name "*visualvm*" -exec rm -vfr {} + || die
|
||||
|
||||
# Install desktop file for the Java Control Panel. Using
|
||||
# ${PN}-${SLOT} to prevent file collision with JRE and other slots.
|
||||
if [[ -d jre/lib/desktop/icons ]] ; then
|
||||
local icon
|
||||
pushd jre/lib/desktop/icons >/dev/null || die
|
||||
for icon in */*/apps/sun-jcontrol.png ; do
|
||||
insinto /usr/share/icons/"${icon%/*}"
|
||||
newins "${icon}" sun-jcontrol-${PN}-${SLOT}.png
|
||||
done
|
||||
popd >/dev/null || die
|
||||
make_desktop_entry \
|
||||
"${dest}"/bin/jcontrol \
|
||||
"Java Control Panel for Oracle JDK ${SLOT}" \
|
||||
sun-jcontrol-${PN}-${SLOT} \
|
||||
"Settings;Java;"
|
||||
fi
|
||||
|
||||
dodoc COPYRIGHT
|
||||
dodir "${dest}"
|
||||
cp -pPR bin include jre lib man "${ddest}" || die
|
||||
|
||||
ln -s policy/$(usex jce unlimited limited)/{US_export,local}_policy.jar \
|
||||
"${ddest}"/jre/lib/security/ || die
|
||||
|
||||
if use source ; then
|
||||
cp -v src.zip "${ddest}" || die
|
||||
|
||||
if use javafx ; then
|
||||
cp -v javafx-src.zip "${ddest}" || die
|
||||
fi
|
||||
fi
|
||||
|
||||
# Only install Gentoo-specific fontconfig if flag is disabled.
|
||||
# https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
|
||||
if ! use fontconfig ; then
|
||||
insinto "${dest}"/jre/lib/
|
||||
doins "$(prefixify_ro "${FILESDIR}"/fontconfig.properties)"
|
||||
fi
|
||||
|
||||
# Needs to be done before CDS, bug #215225.
|
||||
java-vm_set-pax-markings "${ddest}"
|
||||
|
||||
# See bug #207282.
|
||||
einfo "Creating the Class Data Sharing archives"
|
||||
case ${ARCH} in
|
||||
arm|ia64)
|
||||
${ddest}/bin/java -client -Xshare:dump || die
|
||||
;;
|
||||
x86)
|
||||
${ddest}/bin/java -client -Xshare:dump || die
|
||||
# limit heap size for large memory on x86 #467518
|
||||
# this is a workaround and shouldn't be needed.
|
||||
${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
|
||||
;;
|
||||
*)
|
||||
${ddest}/bin/java -server -Xshare:dump || die
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove empty dirs we might have copied.
|
||||
find "${D}" -type d -empty -exec rmdir -v {} + || die
|
||||
|
||||
if use x64-macos ; then
|
||||
local lib
|
||||
for lib in lib{decora_sse,glass,prism_{common,es2,sw}}.dylib ; do
|
||||
ebegin "Fixing self-reference of ${lib}"
|
||||
install_name_tool \
|
||||
-id "${EPREFIX}${dest}"/jre/lib/${lib} \
|
||||
"${ddest}"/jre/lib/${lib} || die
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
|
||||
java-vm_install-env "${FILESDIR}"/${PN}.env.sh
|
||||
java-vm_revdep-mask
|
||||
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
java-vm-2_pkg_postinst
|
||||
|
||||
if ! use headless-awt && ! use javafx ; then
|
||||
ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
|
||||
ewarn "require this and they may fail with a confusing error message."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
java-vm-2_pkg_postrm
|
||||
}
|
|
@ -1,20 +1,20 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit desktop gnome2-utils java-vm-2 prefix versionator
|
||||
inherit desktop gnome2-utils java-vm-2 prefix
|
||||
|
||||
KEYWORDS="-* amd64"
|
||||
|
||||
if [[ "$(get_version_component_range 4)" == 0 ]] ; then
|
||||
S_PV="$(get_version_component_range 1-3)"
|
||||
if [[ "$(ver_cut 4)" == 0 ]] ; then
|
||||
S_PV="$(ver_cut 1-3)"
|
||||
else
|
||||
MY_PV_EXT="u$(get_version_component_range 4)"
|
||||
S_PV="$(get_version_component_range 1-4)"
|
||||
MY_PV_EXT="u$(ver_cut 4)"
|
||||
S_PV="$(ver_cut 1-4)"
|
||||
fi
|
||||
|
||||
MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
|
||||
MY_PV="$(ver_cut 2)${MY_PV_EXT}"
|
||||
|
||||
declare -A ARCH_FILES
|
||||
ARCH_FILES[amd64]="jdk-${MY_PV}-linux-x64.tar.gz"
|
||||
|
@ -89,7 +89,7 @@ RDEPEND="!x64-macos? (
|
|||
|
||||
DEPEND="app-arch/zip"
|
||||
|
||||
S="${WORKDIR}/jdk$(replace_version_separator 3 _ ${S_PV})"
|
||||
S="${WORKDIR}/jdk$(ver_rs 3 _ ${S_PV})"
|
||||
|
||||
pkg_nofetch() {
|
||||
local a
|
||||
|
@ -113,8 +113,8 @@ src_unpack() {
|
|||
mkdir -p "${T}"/dmgmount || die
|
||||
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
|
||||
-mountpoint "${T}"/dmgmount || die
|
||||
local jdkgen=$(get_version_component_range 2)
|
||||
local uver=$(get_version_component_range 4)
|
||||
local jdkgen=$(ver_cut 2)
|
||||
local uver=$(ver_cut 4)
|
||||
( cd "${T}" &&
|
||||
xar -xf "${T}/dmgmount/JDK ${jdkgen} Update ${uver}.pkg" \
|
||||
jdk${PV//.}.pkg/Payload ) || die
|
||||
|
@ -147,7 +147,7 @@ src_prepare() {
|
|||
|
||||
src_install() {
|
||||
local dest="/opt/${P}"
|
||||
local ddest="${ED}${dest#/}"
|
||||
local ddest="${ED}${dest}"
|
||||
|
||||
# Create files used as storage for system preferences.
|
||||
mkdir jre/.systemPrefs || die
|
||||
|
|
|
@ -4,5 +4,5 @@ AUX guile-2.0.14-configure-clang16.patch 2083 BLAKE2B db51de35520459eef3b66102a7
|
|||
AUX guile-2.0.14-darwin.patch 1026 BLAKE2B 9193732cfb74931f7bf8e9b55c5c9dd2621ef6271c8d18190e0ed94d90decde85272f271bbbe7d3c4dd0dd509e51fae3f7f0af42872a0b9ebb87396c9e69a9d2 SHA512 151d19f171656105d87336f81dd8c34273d07a3e88aa03ac5ca8d640c79ab317a90ef06097858bf627e4666fba747faea45237c73e7bc6462d19d8f0d1904d53
|
||||
AUX guile-2.0.14-ia64-fix-crash-thread-context-switch.patch 2426 BLAKE2B 5b2073a3780794e9466d8e5434ab98a91a821408ab792abbfaf61d09c95e113b99746b0da850115b4534bda00b1313cef5bb9b08c90c8bf9a04c81b1eb78faa3 SHA512 082f98ac4ee2f40dd3762006bf5c43022088b2286c9a8d63ae9e234d3c8527f3afcfba8076e0c8578e7fbed257294db6ce1a4513661b89f821579dc121d449ae
|
||||
DIST guile-2.0.14.tar.xz 4615196 BLAKE2B 97e26635c941309b713b632371bc9df7361d3d7d524af3d2c67275f3151dc9c51bd774155bd3c1caf6950d4e839afe8b019f553b5a7223c447bb19c8a97d608c SHA512 2cad60ab8aa77be44bc4988eaa3a2f0652637f315322abd6011c18f1800c3a461eefa15a14fd54d0d48031b093bc56dfc6cd15dc0a8260b97b40521bff793db6
|
||||
EBUILD guile-2.0.14-r5.ebuild 2403 BLAKE2B 93eb698786227d385939b4d752582675fbd50806b50d8ed192860e1c1703f00e81aa4a78d42af2c2045221d23fd325fbba213626aec4d7162a0572f5e250382e SHA512 a3915820bd7cd63b96893b282168b76d465914106bf4475404ab3e787438a6ffcdd5deb08ce060167171e6b3c6e34b55b3ffd270e451b4ae8fbcd637c5a31a55
|
||||
EBUILD guile-2.0.14-r5.ebuild 2403 BLAKE2B af75c1de5261576684baff65cbcc85936d95b0c055fa70e5909ce73890e463ed3ed9a075648b5510527bbf20bcf45c88f4af699a277f0b7cf6c2dbed75c2ef8b SHA512 6fee0fedc7b9ff98e46c692b489c52459b1121fbadc5da2d6e952523705e0f063c333dc78fd816dca18e9d2020cad775545ed3cbedb2389bc40df499923793cb
|
||||
MISC metadata.xml 1137 BLAKE2B a7804962f0827541dd7e1d10d962700f32734d5dd4f04688c1f07838109ecf68f68d3601f86786a893c6c68c1f8d5144e254d4c82fcad53f6edc12bba9f6cc51 SHA512 5bb0ed15c972f967899c24e290550fb10bb830222dce3890413d9978870d0f00942ebfec738372418958ee99048017ebd25e8fc4c6d175027eef1448bc12384a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
inherit flag-o-matic autotools
|
||||
|
||||
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
|
||||
|
|
|
@ -497,10 +497,10 @@ cmake-utils_src_prepare() {
|
|||
_cmake_cleanup_cmake
|
||||
else
|
||||
debug-print "$FUNCNAME: PATCHES=$PATCHES"
|
||||
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
|
||||
[[ ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
|
||||
|
||||
debug-print "$FUNCNAME: applying user patches"
|
||||
epatch_user
|
||||
eapply_user
|
||||
fi
|
||||
|
||||
popd > /dev/null || die
|
||||
|
|
|
@ -1,381 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @DEAD
|
||||
# @ECLASS: epatch.eclass
|
||||
# @MAINTAINER:
|
||||
# base-system@gentoo.org
|
||||
# @SUPPORTED_EAPIS: 6
|
||||
# @BLURB: easy patch application functions
|
||||
# @DEPRECATED: eapply from EAPI 7
|
||||
# @DESCRIPTION:
|
||||
# An eclass providing epatch and epatch_user functions to easily apply
|
||||
# patches to ebuilds. Mostly superseded by eapply* in EAPI 6.
|
||||
|
||||
if [[ -z ${_EPATCH_ECLASS} ]]; then
|
||||
|
||||
case ${EAPI} in
|
||||
6) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
||||
inherit estack
|
||||
|
||||
# @VARIABLE: EPATCH_SOURCE
|
||||
# @DESCRIPTION:
|
||||
# Default directory to search for patches.
|
||||
EPATCH_SOURCE="${WORKDIR}/patch"
|
||||
# @VARIABLE: EPATCH_SUFFIX
|
||||
# @DESCRIPTION:
|
||||
# Default extension for patches (do not prefix the period yourself).
|
||||
EPATCH_SUFFIX="patch.bz2"
|
||||
# @VARIABLE: EPATCH_OPTS
|
||||
# @DESCRIPTION:
|
||||
# Options to pass to patch. Meant for ebuild/package-specific tweaking
|
||||
# such as forcing the patch level (-p#) or fuzz (-F#) factor. Note that
|
||||
# for single patch tweaking, you can also pass flags directly to epatch.
|
||||
EPATCH_OPTS=""
|
||||
# @VARIABLE: EPATCH_COMMON_OPTS
|
||||
# @DESCRIPTION:
|
||||
# Common options to pass to `patch`. You probably should never need to
|
||||
# change these. If you do, please discuss it with base-system first to
|
||||
# be sure.
|
||||
# @CODE
|
||||
# -g0 - keep RCS, ClearCase, Perforce and SCCS happy #24571
|
||||
# --no-backup-if-mismatch - do not leave .orig files behind
|
||||
# -E - automatically remove empty files
|
||||
# @CODE
|
||||
EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch"
|
||||
# @VARIABLE: EPATCH_EXCLUDE
|
||||
# @DESCRIPTION:
|
||||
# List of patches not to apply. Note this is only file names,
|
||||
# and not the full path. Globs accepted.
|
||||
EPATCH_EXCLUDE=""
|
||||
# @VARIABLE: EPATCH_MULTI_MSG
|
||||
# @DESCRIPTION:
|
||||
# Change the printed message for multiple patches.
|
||||
EPATCH_MULTI_MSG="Applying various patches (bugfixes/updates) ..."
|
||||
# @VARIABLE: EPATCH_FORCE
|
||||
# @DESCRIPTION:
|
||||
# Only require patches to match EPATCH_SUFFIX rather than the extended
|
||||
# arch naming style.
|
||||
EPATCH_FORCE="no"
|
||||
# @VARIABLE: EPATCH_USER_EXCLUDE
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# List of patches not to apply. Note this is only file names,
|
||||
# and not the full path. Globs accepted.
|
||||
|
||||
# @FUNCTION: epatch
|
||||
# @USAGE: [options] [patches] [dirs of patches]
|
||||
# @DESCRIPTION:
|
||||
# epatch is designed to greatly simplify the application of patches. It can
|
||||
# process patch files directly, or directories of patches. The patches may be
|
||||
# compressed (bzip/gzip/etc...) or plain text. You generally need not specify
|
||||
# the -p option as epatch will automatically attempt -p0 to -p4 until things
|
||||
# apply successfully.
|
||||
#
|
||||
# If you do not specify any patches/dirs, then epatch will default to the
|
||||
# directory specified by EPATCH_SOURCE.
|
||||
#
|
||||
# Any options specified that start with a dash will be passed down to patch
|
||||
# for this specific invocation. As soon as an arg w/out a dash is found, then
|
||||
# arg processing stops.
|
||||
#
|
||||
# When processing directories, epatch will apply all patches that match:
|
||||
# @CODE
|
||||
# if ${EPATCH_FORCE} != "yes"
|
||||
# ??_${ARCH}_foo.${EPATCH_SUFFIX}
|
||||
# else
|
||||
# *.${EPATCH_SUFFIX}
|
||||
# @CODE
|
||||
# The leading ?? are typically numbers used to force consistent patch ordering.
|
||||
# The arch field is used to apply patches only for the host architecture with
|
||||
# the special value of "all" means apply for everyone. Note that using values
|
||||
# other than "all" is highly discouraged -- you should apply patches all the
|
||||
# time and let architecture details be detected at configure/compile time.
|
||||
#
|
||||
# If EPATCH_SUFFIX is empty, then no period before it is implied when searching
|
||||
# for patches to apply.
|
||||
#
|
||||
# Refer to the other EPATCH_xxx variables for more customization of behavior.
|
||||
epatch() {
|
||||
_epatch_draw_line() {
|
||||
# create a line of same length as input string
|
||||
[[ -z $1 ]] && set "$(printf "%65s" '')"
|
||||
echo "${1//?/=}"
|
||||
}
|
||||
|
||||
unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402
|
||||
|
||||
# First process options. We localize the EPATCH_OPTS setting
|
||||
# from above so that we can pass it on in the loop below with
|
||||
# any additional values the user has specified.
|
||||
local EPATCH_OPTS=( ${EPATCH_OPTS[*]} )
|
||||
while [[ $# -gt 0 ]] ; do
|
||||
case $1 in
|
||||
-*) EPATCH_OPTS+=( "$1" ) ;;
|
||||
*) break ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Let the rest of the code process one user arg at a time --
|
||||
# each arg may expand into multiple patches, and each arg may
|
||||
# need to start off with the default global EPATCH_xxx values
|
||||
if [[ $# -gt 1 ]] ; then
|
||||
local m
|
||||
for m in "$@" ; do
|
||||
epatch "${m}"
|
||||
done
|
||||
return 0
|
||||
fi
|
||||
|
||||
local SINGLE_PATCH="no"
|
||||
# no args means process ${EPATCH_SOURCE}
|
||||
[[ $# -eq 0 ]] && set -- "${EPATCH_SOURCE}"
|
||||
|
||||
if [[ -f $1 ]] ; then
|
||||
SINGLE_PATCH="yes"
|
||||
set -- "$1"
|
||||
# Use the suffix from the single patch (localize it); the code
|
||||
# below will find the suffix for us
|
||||
local EPATCH_SUFFIX=$1
|
||||
|
||||
elif [[ -d $1 ]] ; then
|
||||
# We have to force sorting to C so that the wildcard expansion is consistent #471666.
|
||||
evar_push_set LC_COLLATE C
|
||||
# Some people like to make dirs of patches w/out suffixes (vim).
|
||||
set -- "$1"/*${EPATCH_SUFFIX:+."${EPATCH_SUFFIX}"}
|
||||
evar_pop
|
||||
|
||||
elif [[ -f ${EPATCH_SOURCE}/$1 ]] ; then
|
||||
# Re-use EPATCH_SOURCE as a search dir
|
||||
epatch "${EPATCH_SOURCE}/$1"
|
||||
return $?
|
||||
|
||||
else
|
||||
# sanity check ... if it isn't a dir or file, wtf man ?
|
||||
[[ $# -ne 0 ]] && EPATCH_SOURCE=$1
|
||||
echo
|
||||
eerror "Cannot find \$EPATCH_SOURCE! Value for \$EPATCH_SOURCE is:"
|
||||
eerror
|
||||
eerror " ${EPATCH_SOURCE}"
|
||||
eerror " ( ${EPATCH_SOURCE##*/} )"
|
||||
echo
|
||||
die "Cannot find \$EPATCH_SOURCE!"
|
||||
fi
|
||||
|
||||
# Now that we know we're actually going to apply something, merge
|
||||
# all of the patch options back in to a single variable for below.
|
||||
EPATCH_OPTS="${EPATCH_COMMON_OPTS} ${EPATCH_OPTS[*]}"
|
||||
|
||||
local PIPE_CMD
|
||||
case ${EPATCH_SUFFIX##*\.} in
|
||||
xz) PIPE_CMD="xz -dc" ;;
|
||||
lzma) PIPE_CMD="lzma -dc" ;;
|
||||
bz2) PIPE_CMD="bzip2 -dc" ;;
|
||||
gz|Z|z) PIPE_CMD="gzip -dc" ;;
|
||||
ZIP|zip) PIPE_CMD="unzip -p" ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
[[ ${SINGLE_PATCH} == "no" ]] && einfo "${EPATCH_MULTI_MSG}"
|
||||
|
||||
local x
|
||||
for x in "$@" ; do
|
||||
# If the patch dir given contains subdirs, or our EPATCH_SUFFIX
|
||||
# didn't match anything, ignore continue on
|
||||
[[ ! -f ${x} ]] && continue
|
||||
|
||||
local patchname=${x##*/}
|
||||
|
||||
# Apply single patches, or forced sets of patches, or
|
||||
# patches with ARCH dependent names.
|
||||
# ???_arch_foo.patch
|
||||
# Else, skip this input altogether
|
||||
local a=${patchname#*_} # strip the ???_
|
||||
a=${a%%_*} # strip the _foo.patch
|
||||
if ! [[ ${SINGLE_PATCH} == "yes" || \
|
||||
${EPATCH_FORCE} == "yes" || \
|
||||
${a} == all || \
|
||||
${a} == ${ARCH} ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Let people filter things dynamically
|
||||
if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then
|
||||
# let people use globs in the exclude
|
||||
eshopts_push -o noglob
|
||||
|
||||
local ex
|
||||
for ex in ${EPATCH_EXCLUDE} ; do
|
||||
if [[ ${patchname} == ${ex} ]] ; then
|
||||
einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..."
|
||||
eshopts_pop
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
for ex in ${EPATCH_USER_EXCLUDE} ; do
|
||||
if [[ ${patchname} == ${ex} ]] ; then
|
||||
einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..."
|
||||
eshopts_pop
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
eshopts_pop
|
||||
fi
|
||||
|
||||
if [[ ${SINGLE_PATCH} == "yes" ]] ; then
|
||||
ebegin "Applying ${patchname}"
|
||||
else
|
||||
ebegin " ${patchname}"
|
||||
fi
|
||||
|
||||
# Handle aliased patch command #404447 #461568
|
||||
local patch="patch"
|
||||
eval $(alias patch 2>/dev/null | sed 's:^alias ::')
|
||||
|
||||
# most of the time, there will only be one run per unique name,
|
||||
# but if there are more, make sure we get unique log filenames
|
||||
local STDERR_TARGET="${T}/${patchname}.out"
|
||||
if [[ -e ${STDERR_TARGET} ]] ; then
|
||||
STDERR_TARGET="${T}/${patchname}-$$.out"
|
||||
fi
|
||||
|
||||
printf "***** %s *****\nPWD: %s\nPATCH TOOL: %s -> %s\nVERSION INFO:\n%s\n\n" \
|
||||
"${patchname}" \
|
||||
"${PWD}" \
|
||||
"${patch}" \
|
||||
"$(type -P "${patch}")" \
|
||||
"$(${patch} --version)" \
|
||||
> "${STDERR_TARGET}"
|
||||
|
||||
# Decompress the patch if need be
|
||||
local count=0
|
||||
local PATCH_TARGET
|
||||
if [[ -n ${PIPE_CMD} ]] ; then
|
||||
PATCH_TARGET="${T}/$$.patch"
|
||||
echo "PIPE_COMMAND: ${PIPE_CMD} ${x} > ${PATCH_TARGET}" >> "${STDERR_TARGET}"
|
||||
|
||||
if ! (${PIPE_CMD} "${x}" > "${PATCH_TARGET}") >> "${STDERR_TARGET}" 2>&1 ; then
|
||||
echo
|
||||
eerror "Could not extract patch!"
|
||||
#die "Could not extract patch!"
|
||||
count=5
|
||||
break
|
||||
fi
|
||||
else
|
||||
PATCH_TARGET=${x}
|
||||
fi
|
||||
|
||||
# Check for absolute paths in patches. If sandbox is disabled,
|
||||
# people could (accidentally) patch files in the root filesystem.
|
||||
# Or trigger other unpleasantries #237667. So disallow -p0 on
|
||||
# such patches.
|
||||
local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
|
||||
if [[ -n ${abs_paths} ]] ; then
|
||||
count=1
|
||||
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
|
||||
fi
|
||||
# Similar reason, but with relative paths.
|
||||
local rel_paths=$(grep -E -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
|
||||
if [[ -n ${rel_paths} ]] ; then
|
||||
echo
|
||||
eerror "Rejected Patch: ${patchname}!"
|
||||
eerror " ( ${PATCH_TARGET} )"
|
||||
eerror
|
||||
eerror "Your patch uses relative paths '../':"
|
||||
eerror "${rel_paths}"
|
||||
echo
|
||||
die "you need to fix the relative paths in patch"
|
||||
fi
|
||||
|
||||
# Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
|
||||
local patch_cmd
|
||||
while [[ ${count} -lt 5 ]] ; do
|
||||
patch_cmd="${patch} -p${count} ${EPATCH_OPTS}"
|
||||
|
||||
# Generate some useful debug info ...
|
||||
(
|
||||
_epatch_draw_line "***** ${patchname} *****"
|
||||
echo
|
||||
echo "PATCH COMMAND: ${patch_cmd} --dry-run -f < '${PATCH_TARGET}'"
|
||||
echo
|
||||
_epatch_draw_line "***** ${patchname} *****"
|
||||
${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1
|
||||
ret=$?
|
||||
echo
|
||||
echo "patch program exited with status ${ret}"
|
||||
exit ${ret}
|
||||
) >> "${STDERR_TARGET}"
|
||||
|
||||
if [ $? -eq 0 ] ; then
|
||||
(
|
||||
_epatch_draw_line "***** ${patchname} *****"
|
||||
echo
|
||||
echo "ACTUALLY APPLYING ${patchname} ..."
|
||||
echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'"
|
||||
echo
|
||||
_epatch_draw_line "***** ${patchname} *****"
|
||||
${patch_cmd} < "${PATCH_TARGET}" 2>&1
|
||||
ret=$?
|
||||
echo
|
||||
echo "patch program exited with status ${ret}"
|
||||
exit ${ret}
|
||||
) >> "${STDERR_TARGET}"
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo
|
||||
eerror "A dry-run of patch command succeeded, but actually"
|
||||
eerror "applying the patch failed!"
|
||||
#die "Real world sux compared to the dreamworld!"
|
||||
count=5
|
||||
fi
|
||||
break
|
||||
fi
|
||||
|
||||
: $(( count++ ))
|
||||
done
|
||||
|
||||
(( EPATCH_N_APPLIED_PATCHES++ ))
|
||||
|
||||
# if we had to decompress the patch, delete the temp one
|
||||
if [[ -n ${PIPE_CMD} ]] ; then
|
||||
rm -f "${PATCH_TARGET}"
|
||||
fi
|
||||
|
||||
if [[ ${count} -ge 5 ]] ; then
|
||||
echo
|
||||
eerror "Failed patch: ${patchname}!"
|
||||
eerror " ( ${PATCH_TARGET} )"
|
||||
eerror
|
||||
eerror "Include in your bug report the contents of:"
|
||||
eerror
|
||||
eerror " ${STDERR_TARGET}"
|
||||
echo
|
||||
die "Failed patch: ${patchname}!"
|
||||
fi
|
||||
|
||||
# if everything worked, delete the full debug patch log
|
||||
rm -f "${STDERR_TARGET}"
|
||||
|
||||
# then log away the exact stuff for people to review later
|
||||
cat <<-EOF >> "${T}/epatch.log"
|
||||
PATCH: ${x}
|
||||
CMD: ${patch_cmd}
|
||||
PWD: ${PWD}
|
||||
|
||||
EOF
|
||||
eend 0
|
||||
done
|
||||
|
||||
[[ ${SINGLE_PATCH} == "no" ]] && einfo "Done with patching"
|
||||
: # everything worked
|
||||
}
|
||||
|
||||
_EPATCH_ECLASS=1
|
||||
fi #_EPATCH_ECLASS
|
|
@ -13,8 +13,6 @@ _EUTILS_ECLASS=1
|
|||
|
||||
# implicitly inherited (now split) eclasses
|
||||
case ${EAPI} in
|
||||
6) inherit desktop edos2unix epatch eqawarn estack ltprune multilib \
|
||||
preserve-libs strip-linguas toolchain-funcs vcs-clean wrapper ;;
|
||||
7) inherit edos2unix strip-linguas wrapper ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
|
|
@ -1,177 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @DEAD
|
||||
# @ECLASS: ltprune.eclass
|
||||
# @MAINTAINER:
|
||||
# Michał Górny <mgorny@gentoo.org>
|
||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
|
||||
# @BLURB: Smart .la file pruning
|
||||
# @DEPRECATED: none
|
||||
# @DESCRIPTION:
|
||||
# A function to locate and remove unnecessary .la files.
|
||||
#
|
||||
# Discouraged. Whenever possible, please use much simpler:
|
||||
# @CODE
|
||||
# find "${ED}" -type f -name '*.la' -delete || die
|
||||
# @CODE
|
||||
|
||||
if [[ -z ${_LTPRUNE_ECLASS} ]]; then
|
||||
|
||||
case ${EAPI:-0} in
|
||||
0|1|2|3|4|5|6)
|
||||
;;
|
||||
*)
|
||||
die "${ECLASS}: banned in EAPI=${EAPI}; use 'find' instead";;
|
||||
esac
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
# @FUNCTION: prune_libtool_files
|
||||
# @USAGE: [--all|--modules]
|
||||
# @DESCRIPTION:
|
||||
# Locate unnecessary libtool files (.la) and libtool static archives
|
||||
# (.a) and remove them from installation image.
|
||||
#
|
||||
# By default, .la files are removed whenever the static linkage can
|
||||
# either be performed using pkg-config or doesn't introduce additional
|
||||
# flags.
|
||||
#
|
||||
# If '--modules' argument is passed, .la files for modules (plugins) are
|
||||
# removed as well. This is usually useful when the package installs
|
||||
# plugins and the plugin loader does not use .la files.
|
||||
#
|
||||
# If '--all' argument is passed, all .la files are removed without
|
||||
# performing any heuristic on them. You shouldn't ever use that,
|
||||
# and instead report a bug in the algorithm instead.
|
||||
#
|
||||
# The .a files are only removed whenever corresponding .la files state
|
||||
# that they should not be linked to, i.e. whenever these files
|
||||
# correspond to plugins.
|
||||
#
|
||||
# Note: if your package installs both static libraries and .pc files
|
||||
# which use variable substitution for -l flags, you need to add
|
||||
# pkg-config to your DEPEND.
|
||||
prune_libtool_files() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local removing_all removing_modules opt
|
||||
for opt; do
|
||||
case "${opt}" in
|
||||
--all)
|
||||
removing_all=1
|
||||
removing_modules=1
|
||||
;;
|
||||
--modules)
|
||||
removing_modules=1
|
||||
;;
|
||||
*)
|
||||
die "Invalid argument to ${FUNCNAME}(): ${opt}"
|
||||
esac
|
||||
done
|
||||
|
||||
local f
|
||||
local queue=()
|
||||
while IFS= read -r -d '' f; do # for all .la files
|
||||
local archivefile=${f/%.la/.a}
|
||||
|
||||
# The following check is done by libtool itself.
|
||||
# It helps us avoid removing random files which match '*.la',
|
||||
# see bug #468380.
|
||||
if ! sed -n -e '/^# Generated by .*libtool/q0;4q1' "${f}"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
[[ ${f} != ${archivefile} ]] || die 'regex sanity check failed'
|
||||
local reason= pkgconfig_scanned=
|
||||
local snotlink=$(sed -n -e 's:^shouldnotlink=::p' "${f}")
|
||||
|
||||
if [[ ${snotlink} == yes ]]; then
|
||||
|
||||
# Remove static libs we're not supposed to link against.
|
||||
if [[ -f ${archivefile} ]]; then
|
||||
einfo "Removing unnecessary ${archivefile#${D%/}} (static plugin)"
|
||||
queue+=( "${archivefile}" )
|
||||
fi
|
||||
|
||||
# The .la file may be used by a module loader, so avoid removing it
|
||||
# unless explicitly requested.
|
||||
if [[ ${removing_modules} ]]; then
|
||||
reason='module'
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# Remove .la files when:
|
||||
# - user explicitly wants us to remove all .la files,
|
||||
# - respective static archive doesn't exist,
|
||||
# - they are covered by a .pc file already,
|
||||
# - they don't provide any new information (no libs & no flags).
|
||||
|
||||
if [[ ${removing_all} ]]; then
|
||||
reason='requested'
|
||||
elif [[ ! -f ${archivefile} ]]; then
|
||||
reason='no static archive'
|
||||
elif [[ ! $(sed -nre \
|
||||
"s/^(dependency_libs|inherited_linker_flags)='(.*)'$/\2/p" \
|
||||
"${f}") ]]; then
|
||||
reason='no libs & flags'
|
||||
else
|
||||
if [[ ! ${pkgconfig_scanned} ]]; then
|
||||
# Create a list of all .pc-covered libs.
|
||||
local pc_libs=()
|
||||
if [[ ! ${removing_all} ]]; then
|
||||
local pc
|
||||
local tf=${T}/prune-lt-files.pc
|
||||
local pkgconf=$(tc-getPKG_CONFIG)
|
||||
|
||||
while IFS= read -r -d '' pc; do # for all .pc files
|
||||
local arg libs
|
||||
|
||||
# Use pkg-config if available (and works),
|
||||
# fallback to sed.
|
||||
if ${pkgconf} --exists "${pc}" &>/dev/null; then
|
||||
sed -e '/^Requires:/d' "${pc}" > "${tf}"
|
||||
libs=$(${pkgconf} --libs "${tf}")
|
||||
else
|
||||
libs=$(sed -ne 's/^Libs://p' "${pc}")
|
||||
fi
|
||||
|
||||
for arg in ${libs}; do
|
||||
if [[ ${arg} == -l* ]]; then
|
||||
if [[ ${arg} == '*$*' ]]; then
|
||||
eerror "${FUNCNAME}: variable substitution likely failed in ${pc}"
|
||||
eerror "(arg: ${arg})"
|
||||
eerror "Most likely, you need to add virtual/pkgconfig to DEPEND."
|
||||
die "${FUNCNAME}: unsubstituted variable found in .pc"
|
||||
fi
|
||||
|
||||
pc_libs+=( lib${arg#-l}.la )
|
||||
fi
|
||||
done
|
||||
done < <(find "${D}" -type f -name '*.pc' -print0)
|
||||
|
||||
rm -f "${tf}"
|
||||
fi
|
||||
|
||||
pkgconfig_scanned=1
|
||||
fi # pkgconfig_scanned
|
||||
|
||||
has "${f##*/}" "${pc_libs[@]}" && reason='covered by .pc'
|
||||
fi # removal due to .pc
|
||||
|
||||
fi # shouldnotlink==no
|
||||
|
||||
if [[ ${reason} ]]; then
|
||||
einfo "Removing unnecessary ${f#${D%/}} (${reason})"
|
||||
queue+=( "${f}" )
|
||||
fi
|
||||
done < <(find "${D}" -xtype f -name '*.la' -print0)
|
||||
|
||||
if [[ ${queue[@]} ]]; then
|
||||
rm -f "${queue[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
_LTPRUNE_ECLASS=1
|
||||
fi #_LTPRUNE_ECLASS
|
|
@ -8,7 +8,6 @@
|
|||
# @BLURB: convenience class for extracting RPMs
|
||||
|
||||
case ${EAPI} in
|
||||
6) inherit epatch eqawarn ;;
|
||||
7|8) ;;
|
||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||
esac
|
||||
|
@ -19,7 +18,6 @@ _RPM_ECLASS=1
|
|||
inherit estack
|
||||
|
||||
case ${EAPI} in
|
||||
6) DEPEND="app-arch/rpm2targz" ;;
|
||||
*) BDEPEND="app-arch/rpm2targz" ;;
|
||||
esac
|
||||
|
||||
|
@ -88,59 +86,6 @@ rpm_src_unpack() {
|
|||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: rpm_spec_epatch
|
||||
# @USAGE: [spec]
|
||||
# @DEPRECATED: none
|
||||
# @DESCRIPTION:
|
||||
# Read the specified spec (defaults to ${PN}.spec) and attempt to apply
|
||||
# all the patches listed in it. If the spec does funky things like moving
|
||||
# files around, well this won't handle that.
|
||||
rpm_spec_epatch() {
|
||||
# no epatch in EAPI 7 and later
|
||||
[[ ${EAPI} == 6 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
|
||||
|
||||
local p spec=$1
|
||||
local dir
|
||||
|
||||
if [[ -z ${spec} ]] ; then
|
||||
# search likely places for the spec file
|
||||
for spec in "${PWD}" "${S}" "${WORKDIR}" ; do
|
||||
spec+="/${PN}.spec"
|
||||
[[ -e ${spec} ]] && break
|
||||
done
|
||||
fi
|
||||
[[ ${spec} == */* ]] \
|
||||
&& dir=${spec%/*} \
|
||||
|| dir=
|
||||
|
||||
ebegin "Applying patches from ${spec}"
|
||||
|
||||
grep '^%patch' "${spec}" | \
|
||||
while read line ; do
|
||||
# expand the %patch line
|
||||
set -- ${line}
|
||||
p=$1
|
||||
shift
|
||||
|
||||
# process the %patch arguments
|
||||
local arg
|
||||
EPATCH_OPTS=
|
||||
for arg in "$@" ; do
|
||||
case ${arg} in
|
||||
-b) EPATCH_OPTS+=" --suffix" ;;
|
||||
*) EPATCH_OPTS+=" ${arg}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# extract the patch name from the Patch# line
|
||||
set -- $(grep "^P${p#%p}: " "${spec}")
|
||||
shift
|
||||
epatch "${dir:+${dir}/}$*"
|
||||
done
|
||||
|
||||
eend
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
EXPORT_FUNCTIONS src_unpack
|
||||
|
|
|
@ -9,7 +9,7 @@ LICENSE="GPL-2 LGPL-2.1"
|
|||
RESTRICT="strip" # cross-compilers need controlled stripping
|
||||
|
||||
#---->> eclass stuff <<----
|
||||
inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails
|
||||
inherit eutils libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails
|
||||
|
||||
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test pkg_preinst src_install pkg_postinst pkg_prerm pkg_postrm
|
||||
DESCRIPTION="Based on the ${ECLASS} eclass"
|
||||
|
@ -57,22 +57,30 @@ is_crosscompile() {
|
|||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
tc_version_is_at_least() { version_is_at_least "$1" "${2:-${GCC_PV}}" ; }
|
||||
# @FUNCTION: tc_version_is_at_least
|
||||
# @USAGE: ver1 [ver2]
|
||||
# @DESCRIPTION:
|
||||
# General purpose version check. Without a second argument, matches
|
||||
# up to minor version (x.x.x).
|
||||
tc_version_is_at_least() {
|
||||
ver_test "${2:-${GCC_RELEASE_VER}}" -ge "$1"
|
||||
}
|
||||
|
||||
|
||||
|
||||
GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}}
|
||||
GCC_PVR=${GCC_PV}
|
||||
[[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR}
|
||||
GCC_RELEASE_VER=$(get_version_component_range 1-3 ${GCC_PV})
|
||||
GCC_BRANCH_VER=$(get_version_component_range 1-2 ${GCC_PV})
|
||||
GCCMAJOR=$(get_version_component_range 1 ${GCC_PV})
|
||||
GCCMINOR=$(get_version_component_range 2 ${GCC_PV})
|
||||
GCCMICRO=$(get_version_component_range 3 ${GCC_PV})
|
||||
[[ ${BRANCH_UPDATE-notset} == "notset" ]] && BRANCH_UPDATE=$(get_version_component_range 4 ${GCC_PV})
|
||||
GCC_RELEASE_VER=$(ver_cut 1-3 ${GCC_PV})
|
||||
GCC_BRANCH_VER=$(ver_cut 1-2 ${GCC_PV})
|
||||
GCCMAJOR=$(ver_cut 1 ${GCC_PV})
|
||||
GCCMINOR=$(ver_cut 2 ${GCC_PV})
|
||||
GCCMICRO=$(ver_cut 3 ${GCC_PV})
|
||||
[[ ${BRANCH_UPDATE-notset} == "notset" ]] && BRANCH_UPDATE=$(ver_cut 4 ${GCC_PV})
|
||||
|
||||
# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex.
|
||||
# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?
|
||||
GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${GCC_PV})}
|
||||
GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(ver_rs 3 '-' ${GCC_PV})}
|
||||
|
||||
# Pre-release support
|
||||
if [[ ${GCC_PV} != ${GCC_PV/_pre/-} ]] ; then
|
||||
|
@ -1115,19 +1123,19 @@ gcc_src_unpack() {
|
|||
if [[ -n ${PATCH_VER} ]] ; then
|
||||
guess_patch_type_in_dir "${WORKDIR}"/patch
|
||||
EPATCH_MULTI_MSG="Applying Gentoo patches ..." \
|
||||
epatch "${WORKDIR}"/patch
|
||||
eapply "${WORKDIR}"/patch
|
||||
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}"
|
||||
fi
|
||||
if [[ -n ${UCLIBC_VER} ]] ; then
|
||||
guess_patch_type_in_dir "${WORKDIR}"/uclibc
|
||||
EPATCH_MULTI_MSG="Applying uClibc patches ..." \
|
||||
epatch "${WORKDIR}"/uclibc
|
||||
eapply "${WORKDIR}"/uclibc
|
||||
fi
|
||||
fi
|
||||
do_gcc_HTB_patches
|
||||
do_gcc_SSP_patches
|
||||
do_gcc_PIE_patches
|
||||
epatch_user
|
||||
eapply_user
|
||||
do_gcc_ESPF_patches
|
||||
|
||||
${ETYPE}_src_unpack || die "failed to ${ETYPE}_src_unpack"
|
||||
|
@ -1189,7 +1197,7 @@ gcc_src_unpack() {
|
|||
# update configure files
|
||||
local f
|
||||
einfo "Fixing misc issues in configure files"
|
||||
tc_version_is_at_least 4.1 && epatch "${GCC_FILESDIR}"/gcc-configure-texinfo.patch
|
||||
tc_version_is_at_least 4.1 && eapply "${GCC_FILESDIR}"/gcc-configure-texinfo.patch
|
||||
for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
|
||||
ebegin " Updating ${f/${S}\/} [LANG]"
|
||||
patch "${f}" "${GCC_FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \
|
||||
|
@ -2066,7 +2074,7 @@ gcc_quick_unpack() {
|
|||
# We want branch updates to be against a release tarball
|
||||
if [[ -n ${BRANCH_UPDATE} ]] ; then
|
||||
pushd "${S}" > /dev/null
|
||||
epatch "${DISTDIR}"/gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
|
||||
eapply "${DISTDIR}"/gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
|
||||
popd > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
@ -2158,7 +2166,7 @@ do_gcc_stub() {
|
|||
stub_patch=${GCC_FILESDIR}/stubs/gcc-${v}-$1-stub.patch
|
||||
if [[ -e ${stub_patch} ]] && ! use vanilla ; then
|
||||
EPATCH_SINGLE_MSG="Applying stub patch for $1 ..." \
|
||||
epatch "${stub_patch}"
|
||||
eapply "${stub_patch}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
@ -2173,7 +2181,7 @@ do_gcc_HTB_patches() {
|
|||
fi
|
||||
|
||||
# modify the bounds checking patch with a regression patch
|
||||
epatch "${WORKDIR}/bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch"
|
||||
eapply "${WORKDIR}/bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch"
|
||||
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, HTB-${HTB_GCC_VER}-${HTB_VER}"
|
||||
}
|
||||
|
||||
|
@ -2217,10 +2225,10 @@ do_gcc_SSP_patches() {
|
|||
fi
|
||||
|
||||
[[ -z ${ssppatch} ]] && die "Sorry, SSP is not supported in this version"
|
||||
epatch ${ssppatch}
|
||||
eapply ${ssppatch}
|
||||
|
||||
if [[ ${PN} == "gcc" && ${sspdocs} == "no" ]] ; then
|
||||
epatch "${GCC_FILESDIR}"/pro-police-docs.patch
|
||||
eapply "${GCC_FILESDIR}"/pro-police-docs.patch
|
||||
fi
|
||||
|
||||
# Don't build crtbegin/end with ssp
|
||||
|
@ -2232,7 +2240,7 @@ do_gcc_SSP_patches() {
|
|||
# cc1: stack smashing attack in function ix86_split_to_parts()
|
||||
if use build && tc_version_is_at_least 3.4.0 ; then
|
||||
if gcc -dumpspecs | grep -q "fno-stack-protector:" ; then
|
||||
epatch "${GCC_FILESDIR}"/3.4.0/gcc-3.4.0-cc1-no-stack-protector.patch
|
||||
eapply "${GCC_FILESDIR}"/3.4.0/gcc-3.4.0-cc1-no-stack-protector.patch
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -2282,19 +2290,19 @@ do_gcc_PIE_patches() {
|
|||
if tc_version_is_at_least 4.3.2; then
|
||||
guess_patch_type_in_dir "${WORKDIR}"/piepatch/
|
||||
EPATCH_MULTI_MSG="Applying pie patches ..." \
|
||||
epatch "${WORKDIR}"/piepatch/
|
||||
eapply "${WORKDIR}"/piepatch/
|
||||
else
|
||||
guess_patch_type_in_dir "${WORKDIR}"/piepatch/upstream
|
||||
|
||||
# corrects startfile/endfile selection and shared/static/pie flag usage
|
||||
EPATCH_MULTI_MSG="Applying upstream pie patches ..." \
|
||||
epatch "${WORKDIR}"/piepatch/upstream
|
||||
eapply "${WORKDIR}"/piepatch/upstream
|
||||
# adds non-default pie support (rs6000)
|
||||
EPATCH_MULTI_MSG="Applying non-default pie patches ..." \
|
||||
epatch "${WORKDIR}"/piepatch/nondef
|
||||
eapply "${WORKDIR}"/piepatch/nondef
|
||||
# adds default pie support (rs6000 too) if DEFAULT_PIE[_SSP] is defined
|
||||
EPATCH_MULTI_MSG="Applying default pie patches ..." \
|
||||
epatch "${WORKDIR}"/piepatch/def
|
||||
eapply "${WORKDIR}"/piepatch/def
|
||||
|
||||
# we want to be able to control the pie patch logic via something other
|
||||
# than ALL_CFLAGS...
|
||||
|
@ -2311,7 +2319,7 @@ do_gcc_ESPF_patches() {
|
|||
if [[ -n ${ESPF_VER} ]] && ! use vanilla; then
|
||||
guess_patch_type_in_dir "${WORKDIR}"/espf-gcc-"${GCC_RELEASE_VER}"
|
||||
EPATCH_MULTI_MSG="Applying espf patches ..." \
|
||||
epatch "${WORKDIR}"/espf-gcc-"${GCC_RELEASE_VER}"
|
||||
eapply "${WORKDIR}"/espf-gcc-"${GCC_RELEASE_VER}"
|
||||
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, espf-${ESPF_VER}"
|
||||
fi
|
||||
}
|
||||
|
@ -2332,7 +2340,7 @@ should_we_gcc_config() {
|
|||
# for being in the same SLOT, make sure we run gcc-config.
|
||||
local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}')
|
||||
|
||||
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver})
|
||||
local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver})
|
||||
|
||||
# If we're using multislot, just run gcc-config if we're installing
|
||||
# to the same profile as the current one.
|
||||
|
@ -2406,7 +2414,7 @@ should_we_eselect_compiler() {
|
|||
# the version we are installing, then it will probably be uninstalled
|
||||
# for being in the same SLOT, make sure we run gcc-config.
|
||||
local curr_config_ver=$(echo ${curr_config} | cut -f1 -d/ | awk -F - '{ print $5 }')
|
||||
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver})
|
||||
local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver})
|
||||
|
||||
# If we're using multislot, just run gcc-config if we're installing
|
||||
# to the same profile as the current one.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
AUX hpacucli-wrapper-r1 541 BLAKE2B 102c1957b78ed5a465ec7e6205f5bace8d1f37e03ea163c968d377724141abb5a895e4ae0360393c4e4c31d63a0dec538ec627445aee207f9f9e64f9d8b3a364 SHA512 8b5a96eaa53fcf8b0f118d34d8bc3e94c67a2dbef7b5cdd79fa10c74b42ac9c9ae1b41f530d47d8130cdedf1a5c755fcde42223739ca16dc30498d8d99405a02
|
||||
DIST hpacucli-9.40-12.0.i386.rpm 6824495 BLAKE2B 48fd1294eac0bc9eeab4479be07ce75c61cd5f846e5eabab04c22d154bc06051961b0094d421915b79b4b37526b15dceb8e015302373f2fb0bcbb37b4e5b045a SHA512 93ae6c170e14e187ce33522a7f7d4e0970f8443758aa76f4eb72c6b818eeeff7720e9869473b62e4b088ced0bb9a198afecf7ff62da2fc73e67208f5cc680158
|
||||
DIST hpacucli-9.40-12.0.x86_64.rpm 6800521 BLAKE2B 468ac943ddd477616345d982767bd23552f75d4a906c7e21248a1efa867952cd8929a0449fadb28234032b2d4ad57cf1ef56ae7e0eab9308ee4bb1055b131f0b SHA512 a7de22febc0261bdb60a5fee250d42455dc0ac152541f34eb91df81b4e57472ae96ee2972e3a4c44ff409e3d1c2b364054818c7ea610c3b2a20c913a51df2ed4
|
||||
EBUILD hpacucli-9.40.12.0.ebuild 1524 BLAKE2B a3e1e8272c38a7564fecebd4e287b5c1935aa1466c649d252fb63cba77e2d48c87f75bb7a5dc435e7f902a0e143f439e4cb88970e69af3a5df1ba5d706363899 SHA512 bd5ef0929fabf76848e75d5f238bbf56f3b10e1080e2c6d4e1ab295eb8caf0ae873397c29c72ab82fa35b95e8585b86d089e20dd9e426b4f877d7b3f8851c81b
|
||||
EBUILD hpacucli-9.40.12.0.ebuild 1446 BLAKE2B fdff0e489c33c7ad86b3f51aefc1962e8862077699cc0294994e5138bcba399e8b0943e8db53f464643aa78cb51e16e4bf6000951bfd4ebbda32cc551a8a5d12 SHA512 60674172877220ef5cfc6d6b1a1e6f5fbd9209d219af7ede9aeded5a7361baea51ca1cb655e7c201c942369c2a5f60c2224c2101b378c4f28dc264cbf95ab5bf
|
||||
MISC metadata.xml 168 BLAKE2B 2e0e000b4c3b6ca04c12903fdbe278415c05a822623c52e9aa95cbbf3d50bcb1246b7edbda7d2f6b559af8950c6374e6e0a69b76319964cfe686bf50b0604a57 SHA512 4dcf45d1809e8390a2d8155c8ebfe0dd610203e392aeab0ccd8a10f42cc8532a4925eff32b35e7a6c35598a4efd288229034ec0732299dbd8cfa0acff705fed3
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit rpm versionator pax-utils
|
||||
inherit rpm
|
||||
|
||||
MY_PV=$(replace_version_separator 2 '-')
|
||||
MY_PV=$(ver_rs 2 '-')
|
||||
|
||||
SRC_URI_BASE="ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux"
|
||||
AMD64_PID="1257348637"
|
||||
|
@ -56,6 +56,4 @@ src_install() {
|
|||
LDPATH=${HPACUCLI_BASEDIR}
|
||||
EOF
|
||||
doenvd "${T}"/45${PN}
|
||||
|
||||
pax-mark m "${D}opt/hp/hpacucli/"*
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue