ports/java/eclipse/scripts/pre-build
Jonathan Chen a0c13b4a90 java/eclipse: update 4.16 -> 4.21
This release is 1.5 years overdue and 6 months out-of-date, but is
an important interim step to the 4.24 release due in June 2022.

Massive thanks go to Patrick Mackinlay who resolved the 2 critical
bugs preventing update from coming out sooner!

Author:	Jonathan Chen <jonc@chen.org.nz>
PR:	264400
2022-06-03 12:06:36 +02:00

37 lines
923 B
Bash

#!/bin/sh
#
# Build quirks
#
cd ${WRKSRC}
ARCHS="aarch64 amd64 powerpc64 powerpc64le"
# Create dummy repo for jgit
if [ ! -d .git ]
then
mkdir ${WRKDIR}/githome
(
export HOME=${WRKDIR}/githome
git config --global user.email "eclipse@freebsd.org"
git config --global user.name "Eclipse"
git init
git add .
git commit -q --message="java/eclipse" --author="Eclipse <eclipse@freebsd.org>"
)
fi
# Create dummy targets
GTK_EXE="rt.equinox.binaries/org.eclipse.equinox.executable/bin/gtk"
for A in ${ARCHS}
do
mkdir -p ${GTK_EXE}/freebsd/${A}
touch ${GTK_EXE}/freebsd/${A}/eclipse
done
arch=`uname -p`
if [ "$arch" == "powerpc64" ]
then
sed -i '' -e 's/ppc64le/ppc64/g' eclipse.platform.swt/bundles/org.eclipse.swt/'Eclipse SWT'/gtk/org/eclipse/swt/graphics/Device.java
sed -i '' -e 's/ppc64le/ppc64/g' eclipse.platform.swt/bundles/org.eclipse.swt/'Eclipse SWT'/gtk/org/eclipse/swt/widgets/Control.java
fi