9a5e4eb82f
Submitted by: Ken Yamada <ken@tydfam.jp>
111 lines
3.8 KiB
Bash
111 lines
3.8 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; s/x86_64/amd64/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; s/x86_64/amd64/g'
|
|
find "$dstdir" -name \*.bak -delete
|
|
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; s/x86_64/amd64/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; s/x86_64/amd64/g'`
|
|
echo Copying $src into $dst
|
|
copy_file "${WRKSRC}/$src" "${WRKSRC}/$dst"
|
|
|
|
find ${WRKSRC} -name \*.so -delete
|
|
find ${WRKSRC} -name \*.so.\* -delete
|
|
}
|
|
#features/org.eclipse.platform.launchers/library/gtk/make_linux.mak
|
|
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.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.filesystem/natives/unix/linux
|
|
plugins/org.eclipse.jdt.source.linux.gtk.x86
|
|
plugins/org.eclipse.jdt.source.linux.gtk.x86_64
|
|
plugins/org.eclipse.pde.source.linux.gtk.x86
|
|
plugins/org.eclipse.pde.source.linux.gtk.x86_64
|
|
plugins/org.eclipse.platform.source.linux.gtk.x86
|
|
plugins/org.eclipse.platform.source.linux.gtk.x86_64
|
|
plugins/org.eclipse.rcp.source.linux.gtk.x86
|
|
plugins/org.eclipse.rcp.source.linux.gtk.x86_64
|
|
plugins/org.eclipse.swt.gtk.linux.x86
|
|
plugins/org.eclipse.swt.gtk.linux.x86_64
|
|
plugins/org.eclipse.update.core.linux
|
|
plugins/org.eclipse.update.core.linux/os/linux
|
|
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_64
|
|
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/launcher.gtk.linux.x86_64.properties
|
|
plugins/org.eclipse.equinox.launcher.gtk.linux.x86
|
|
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.gtk.linux.x86/launcher.gtk.linux.x86.properties
|
|
plugins/org.eclipse.cvs.source.linux.gtk.x86
|
|
plugins/org.eclipse.cvs.source.linux.gtk.x86_64
|
|
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
|
|
"
|
|
|
|
SWTGTK="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library"
|
|
|
|
prepare_files
|
|
exit 0
|