ports/java/eclipse/scripts/pre-patch
Greg Lewis 34968d4761 . Update to 3.4.2, including:
. We are now installing a real eclipse product.
  . Only the jar files for the platform are built, dramatically reducing
    the time necessary to build (thanks to the Fedora devs for the idea
    and the basic procedure).
  . Lot of small fixes to the build procedure to make future imports easier
  . Some of the bundles are pre-extracted during install to improve
    launching time.
  . JDK 1.6 is required to build but any jre (1.5 or 1.6) can be used in
    Preferences->Java->Installed JREs. JDK 1.4 is unfortunately not
    supported at this time.
  . Switch to x86_64 architecture name instead of amd64 to be more in-line
    with mainline eclipse.

Note that after this update you will need to reinstall any plugins you've
installed with the built in Update Manager.  This is a one time thing.

Submitted by:	sepotvin@ (maintainer)
2009-06-06 20:58:22 +00:00

116 lines
3.7 KiB
Bash

#!/bin/sh
# $FreeBSD$
copy_file()
{
srcfile="$1"
dstfile="$2"
case $distfile in
*.zip)
#We may not want to push all files through sed echo "zip file"
mv $srcfile $dstfile
;;
*)
rm -f $dstfile
cat "$srcfile" | sed 's/linux/freebsd/g; s/Linux/FreeBSD/g' > "$dstfile"
;;
esac
}
copy_dir()
{
srcdir="$1"
dstdir="$2"
rm -rf "$dstdir"
cp -r "$srcdir" "$dstdir" || exit 1
if [ -d "$dstdir" ]
then
find "$dstdir" -name \*.so -delete
find "$dstdir" -name \*.so.\* -delete
find "$dstdir" -type f -print0 | \
xargs -0 sed -i '.bak' 's/linux/freebsd/g; s/Linux/FreeBSD/g'
find "$dstdir" -name \*.bak -delete
find -d "$dstdir" -type d -name "linux" -exec rm -rf {} \;
fi
}
prepare_files()
{
mkdir ${WRKSRC}/features/org.eclipse.equinox.executable/bin/gtk/freebsd
# Copy the files and rename/change them appropriately
for src in $COPY_LIST
do
dst=`echo $src | sed 's/linux/freebsd/g; s/Linux/FreeBSD/g'`
echo Copying $src into $dst
if [ -d ${WRKSRC}/$src ]
then
copy_dir ${WRKSRC}/$src ${WRKSRC}/$dst
else
copy_file ${WRKSRC}/$src ${WRKSRC}/$dst
fi
done
# Files with spaces in their path...
src="${SWTGTK}/make_linux.mak"
dst=`echo $src | sed 's/linux/freebsd/g; s/Linux/FreeBSD/g'`
echo Copying $src into $dst
copy_file "${WRKSRC}/$src" "${WRKSRC}/$dst"
# New x86_64 fragment
src="plugins/org.eclipse.core.net.freebsd.x86"
dst="plugins/org.eclipse.core.net.freebsd.x86_64"
echo Copying $src into $dst
copy_dir "${WRKSRC}/$src" "${WRKSRC}/$dst"
find ${WRKSRC} -name \*.so -delete
find ${WRKSRC} -name \*.so.\* -delete
}
COPY_LIST="
assemble.org.eclipse.sdk.linux.gtk.x86.xml
assemble.org.eclipse.sdk.linux.gtk.x86_64.xml
package.org.eclipse.sdk.linux.gtk.x86.xml
package.org.eclipse.sdk.linux.gtk.x86_64.xml
features/org.eclipse.platform/about_files/linux.gtk.x86
features/org.eclipse.platform/about_files/linux.gtk.x86_64
features/org.eclipse.equinox.executable/bin/gtk/linux
features/org.eclipse.equinox.executable/bin/gtk/linux/x86
features/org.eclipse.equinox.executable/bin/gtk/linux/x86_64
features/org.eclipse.equinox.executable/library/gtk/make_linux.mak
plugins/org.eclipse.core.filesystem/natives/unix/linux
plugins/org.eclipse.core.filesystem.linux.x86
plugins/org.eclipse.core.filesystem.linux.x86_64
plugins/org.eclipse.core.filesystem.linux.x86/os/linux
plugins/org.eclipse.core.filesystem.linux.x86_64/os/linux
plugins/org.eclipse.core.net.linux.x86
plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86
plugins/org.eclipse.equinox.launcher.gtk.linux.x86
plugins/org.eclipse.equinox.launcher.gtk.linux.x86/launcher.gtk.linux.x86.properties
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64/launcher.gtk.linux.x86_64.properties
plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86
plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86/launcher.gtk.linux.x86.properties
plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64
plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64/launcher.gtk.linux.x86_64.properties
plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux.properties
plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux_gtk.properties
plugins/org.eclipse.swt.gtk.linux.x86
plugins/org.eclipse.swt.gtk.linux.x86
plugins/org.eclipse.swt.gtk.linux.x86.source
plugins/org.eclipse.swt.gtk.linux.x86_64
plugins/org.eclipse.swt.gtk.linux.x86_64.source
plugins/org.eclipse.update.core.linux
plugins/org.eclipse.update.core.linux/os/linux
plugins/org.eclipse.update.core.linux.source
"
SWTGTK="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library"
prepare_files
exit 0