mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-java/jamvm: Sort out patch naming convention. Fixes bug 563988.
Package-Manager: portage-2.2.20.1 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
27
dev-java/jamvm/files/jamvm-1.5.4-classes-location.patch
Normal file
27
dev-java/jamvm/files/jamvm-1.5.4-classes-location.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff -ur jamvm-1.5.0.old/configure.ac jamvm-1.5.0/configure.ac
|
||||
--- jamvm-1.5.0.old/configure.ac 2008-03-03 17:31:46.000000000 +0200
|
||||
+++ jamvm-1.5.0/configure.ac 2008-03-03 17:36:14.000000000 +0200
|
||||
@@ -208,6 +208,7 @@
|
||||
install_dir=$prefix
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(INSTALL_DIR, "$install_dir", [Installation directory (prefix)])
|
||||
+AC_DEFINE_UNQUOTED(PKGDATADIR, "$datadir/$PACKAGE", [Package data directory (pkgdatadir)])
|
||||
|
||||
AC_ARG_ENABLE(zip,
|
||||
[AS_HELP_STRING(--disable-zip,turn-off zip support in the bootstrap loader)],,)
|
||||
diff -ur jamvm-1.5.0.old/src/class.h jamvm-1.5.0/src/class.h
|
||||
--- jamvm-1.5.0.old/src/class.h 2008-03-03 17:31:46.000000000 +0200
|
||||
+++ jamvm-1.5.0/src/class.h 2008-03-03 17:36:51.000000000 +0200
|
||||
@@ -39,10 +39,10 @@
|
||||
separate class files in a directory structure */
|
||||
|
||||
#ifdef USE_ZIP
|
||||
-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
|
||||
+#define JAMVM_CLASSES PKGDATADIR"/classes.zip"
|
||||
#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
|
||||
#else
|
||||
-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
|
||||
+#define JAMVM_CLASSES PKGDATADIR"/classes"
|
||||
#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
|
||||
#endif
|
||||
|
||||
@@ -21,9 +21,13 @@ DEPEND="dev-java/gnu-classpath:${CLASSPATH_SLOT}
|
||||
amd64? ( virtual/libffi )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/"${P}-classes-location.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# without this patch, classes.zip is not found at runtime
|
||||
epatch "${FILESDIR}/classes-location.patch"
|
||||
epatch "${PATCHES[@]}"
|
||||
eautoreconf
|
||||
|
||||
# These come precompiled.
|
||||
@@ -76,7 +80,7 @@ src_install() {
|
||||
|
||||
dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README
|
||||
|
||||
set_java_env "${FILESDIR}/${PN}-1.5.4-r2.env"
|
||||
set_java_env "${FILESDIR}/${P}-env.file"
|
||||
|
||||
dosym /usr/bin/jamvm ${INSTALL_DIR}/bin/java
|
||||
dosym ${CLASSPATH_DIR}/share/classpath/glibj.zip ${INSTALL_DIR}/jre/lib/rt.jar
|
||||
|
||||
@@ -22,10 +22,14 @@ DEPEND="dev-java/gnu-classpath:0.98
|
||||
sparc? ( virtual/libffi )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/"${P}-classes-location.patch"
|
||||
"${FILESDIR}"/"${P}-noexecstack.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# without this patch, classes.zip is not found at runtime
|
||||
epatch "${FILESDIR}/classes-location.patch"
|
||||
epatch "${FILESDIR}/noexecstack.patch"
|
||||
epatch "${PATCHES[@]}"
|
||||
eautoreconf
|
||||
|
||||
# These come precompiled.
|
||||
@@ -65,7 +69,7 @@ create_launcher() {
|
||||
-Xbootclasspath/p:/usr/share/classpath/tools.zip" \
|
||||
gnu.classpath.tools.${1}.Main "\$@"
|
||||
EOF
|
||||
chmod +x "${script}"
|
||||
chmod +x "${script}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
@@ -77,7 +81,7 @@ src_install() {
|
||||
|
||||
dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README
|
||||
|
||||
set_java_env "${FILESDIR}/${PN}.env"
|
||||
set_java_env "${FILESDIR}/${P}-env.file"
|
||||
|
||||
dodir ${JDK_DIR}/bin
|
||||
dosym /usr/bin/jamvm ${JDK_DIR}/bin/java
|
||||
@@ -97,11 +101,11 @@ src_install() {
|
||||
|
||||
local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
|
||||
exeinto ${JDK_DIR}/bin
|
||||
cat "${FILESDIR}"/javac.in | sed -e "s#@JAVA@#/usr/bin/jamvm#" \
|
||||
sed -e "s#@JAVA@#/usr/bin/jamvm#" \
|
||||
-e "s#@ECJ_JAR@#${ecj_jar}#" \
|
||||
-e "s#@RT_JAR@#/usr/share/classpath/glibj.zip#" \
|
||||
-e "s#@TOOLS_JAR@#/usr/share/classpath/tools.zip#" \
|
||||
| newexe - javac
|
||||
"${FILESDIR}"/"${P}-javac.in" | newexe - javac
|
||||
|
||||
local libarch="${ARCH}"
|
||||
[ ${ARCH} == x86 ] && libarch="i386"
|
||||
|
||||
Reference in New Issue
Block a user