#! /bin/sh -e
## 04_hackg2c.dpatch by Junichi Uekawa <dancer@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Hack to link libg2c to libpmpich
## DP: not sent upstream yet.

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
       -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
       -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
	*)
		echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac

exit 0
				    
diff -urNad 04.tmp/util/makesharedlib 04/util/makesharedlib
--- 04.tmp/util/makesharedlib	2002-12-21 03:26:04.000000000 +0900
+++ 04/util/makesharedlib	2003-01-13 19:05:33.000000000 +0900
@@ -149,7 +149,7 @@
     # Include any other libraries needed to link with in case they are
     # needed to resolve any symbols.  This is needed for Scyld and should
     # be harmless in general.
-    OtherLibs="$BASE_LIB_LIST"
+    OtherLibs="$BASE_LIB_LIST -lg2c "
     for libname in $SHLIBS ; do
         $Verbose "Making a shared library of $libname"
         rm -rf .tmp
