summaryrefslogtreecommitdiff
path: root/java/eclipse-cdt/scripts/pre-patch
blob: 70042434e547a143cf81a4c731080c17f7d647a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/eclipse-cdt/scripts/pre-patch,v 1.2 2006-06-14 16:03:54 glewis Exp $

copy_dir()
{
	srcdir="$1"
	dstdir="$2"

	rm -rf "$dstdir"
	cp -r "$srcdir" "$dstdir" || exit 1

	if [ -d "$dstdir" ]
	then
		find "$dstdir" -name \*.so -delete
	fi 
}

prepare_files()
{
	# 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
		fi
	done
	find ${WRKSRC} -type d -name linux | xargs rm -r
}

COPY_LIST="
eclipse/plugins/org.eclipse.cdt.core.linux.x86_3.0.2
eclipse/plugins/org.eclipse.cdt.core.linux.x86_3.0.2/os/linux
eclipse/plugins/org.eclipse.cdt.core.linux.x86_3.0.2/os/linux/x86
eclipse/plugins/org.eclipse.cdt.core.linux_3.0.2
eclipse/plugins/org.eclipse.cdt.source.linux.gtk.x86_3.0.2
eclipse/plugins/org.eclipse.cdt.source.linux.gtk.x86_3.0.2/src/org.eclipse.cdt.core.linux_3.0.2
"

prepare_files
exit 0