Remove dependencies on Java 7 from metapackages
[unleashed-userland.git] / components / libglade-java / patches / 01-runExample.patch
blob2d4f1235511e23f3a79b381be82d79d70c40d4d6
1 diff -uNr libglade-java-2.12.7.orig/doc/examples/runExample.sh.in libgtk-java-2.12.7/doc/examples/runExample.sh.in
2 --- libglade-java-2.12.7.orig/doc/examples/runExample.sh.in 2006-11-03 17:10:20.000000000 +0100
3 +++ libglade-java-2.12.7/doc/examples/runExample.sh.in 2006-11-03 17:14:10.000000000 +0100
4 @@ -3,18 +3,10 @@
5 # A small script to help run example apps
8 -prefix=@prefix@
9 -exec_prefix=@exec_prefix@
10 -libdir=@libdir@
11 -classpath=@INSTALLED_CLASSPATH@
13 -GLADE_LIB=$libdir
14 -GLADE_JAR=$classpath
16 -GTK_JAR=@GTKJAR@
18 # You should not need to modify anything below here
20 +JARS="gtk2-java gnome2-java glib-java glade-java"
22 error_message ()
24 echo
25 @@ -29,8 +21,28 @@
26 exit 1;
29 -NEED_LIB="$GLADE_LIB"
30 -NEED_JAR="$GTK_JAR $GLADE_JAR"
31 +for JAR in $JARS; do
32 + CHECK=`pkg-config --variable classpath $JAR`
33 + if ! test -n "$CHECK"; then
34 + echo "Package $JAR was not found in the pkg-config search path."
35 + echo "Perhaps you should add the directory containing '$JAR.pc'"
36 + echo "to the PKG_CONFIG_PATH environment variable"
37 + echo "No package '$JAR' found"
38 + exit 1
39 + fi
40 + NEED_JAR="$NEED_JAR $CHECK";
41 +done;
43 +JGLADE_LIBDIR=`pkg-config --variable libdir glade-java`
44 +if ! test -n "$JGLADE_LIBDIR"; then
45 + echo "Library requirements for glade-java not met;"
46 + echo "consider adjusting the PKG_CONFIG_PATH environment"
47 + echo "variable if your libraries are in a nonstandard prefix"
48 + echo "so pkg-config can find them."
49 + exit 1
50 +fi
52 +NEED_LIB="$JGLADE_LIBDIR"
54 echo "Java-Gnome Example Application Launcher"
55 echo