1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/java/eclipse/scripts/pre-patch
Kurt Jaeger 0596259cb6 java/eclipse: 4.5.2 -> 4.6
- new MASTER_SITE

PR:		211764
Changes:	http://www.eclipse.org/neon/noteworthy/
		https://www.eclipse.org/eclipse/development/readme_eclipse_4.6.php
Submitted by:	Jimmy Kelley <ljboiler@gmail.com> (maintainer)
Reviewed by:	Michael Zhilin <mizhka@gmail.com>, kappei84@gmail.com
2016-10-06 20:05:06 +00:00

51 lines
2.0 KiB
Bash

#!/bin/sh
# Copy the Linux 'native' code for the FreeBSD versions
# At this point, just make sure the directory and file names are "freebsd"
# These files will be patched in the do-patch step.
check_freebsd_mak ()
{
local d
d=`dirname "$1"`
[ -e "${d}/make_freebsd.mak" ] && return
cp -p "$1" "${d}/make_freebsd.mak"
}
for d in \
${WRKSRC}/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.${ECLIPSE_ARCH} \
${WRKSRC}/eclipse.platform.resources/bundles/org.eclipse.core.filesystem/natives/unix/linux \
${WRKSRC}/eclipse.platform.team/bundles/org.eclipse.core.net/natives/unix/linux \
${WRKSRC}/rt.equinox.binaries/org.eclipse.equinox.launcher.gtk.linux.${ECLIPSE_ARCH} \
${WRKSRC}/rt.equinox.binaries/org.eclipse.equinox.executable/bin/gtk/linux/${ECLIPSE_ARCH} \
${WRKSRC}/rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.${ECLIPSE_ARCH}
do
mkdir -p `echo $d | sed -e 's/linux/freebsd/'`
[ -d $d ] && ( cd $d; tar cf - . ) | ( cd `echo $d | sed -e 's/linux/freebsd/'`; tar xf - )
done
# "fragments" pieces
for d in \
${WRKSRC}/eclipse.platform.team/bundles/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.${ECLIPSE_ARCH}
do
mkdir -p `echo $d | sed -e 's/linux/freebsd/'`
[ -d $d ] && ( cd $d; tar cf - . ) | ( cd `echo $d | sed -e 's/linux/freebsd/'`; tar xf - )
done
for d in \
${WRKSRC}/eclipse.platform.resources/bundles/org.eclipse.core.filesystem.linux.${ECLIPSE_ARCH}
do
mkdir -p `dirname $d`/`basename $d | sed -e 's/\.linux.*$//'`/fragments/`basename $d | sed -e 's/linux/freebsd/'`
[ -d $d ] && ( cd $d; tar cf - . ) | ( cd `dirname $d`/`basename $d | sed -e 's/\.linux.*$//'`/fragments/`basename $d | sed -e 's/linux/freebsd/'`; tar xf - )
done
for d in `find ${WRKSRC} -type d -name \*freebsd\*`
do
for f in `find $d -name \*linux\*`
do
mv $f `echo $f | sed -e 's/linux/freebsd/'`
done
find $d -type f \( -name \*.so -o -name eclipse -o -name launcher \) -delete
done
find ${WRKSRC} -type f -name make_linux.mak | while read file; do check_freebsd_mak "$file"; done