$NetBSD: patch-ae,v 1.3 2004/06/14 11:47:36 kristerw Exp $

--- packages/pkg-bld.orig	Tue Jan 12 22:03:47 1999
+++ packages/pkg-bld	Mon Jun 14 11:12:14 2004
@@ -39,9 +39,18 @@
 M="`echo $PKG | sed 's/\./_/g'`"
 rsc -P src/pkg packages/$PKG/$P.mcf
 
+if test "$PKG" = "db"
+then
+    # We need to add /usr/include first in the search path, but
+    # buildlink3 is helpful and removes it...  Fool buildlink
+    # by reaching it through a link...
+    ln -s /usr/include src/pkg/db/usrinclude
+    echo "NOSTDINC=-Iusrinclude" >> src/pkg/db/Makefile
+fi
+
 if test -d src/pkg/$PKG
 then cd src/pkg/$PKG
-     make INSTALL_DIR=$INSTALL_DIR install
+     make INSTALL_DIR=$INSTALL_DIR install install.so
 else cp -p src/pkg/modules/$P.mif $INSTALL_DIR/resource/modules
      cp -p src/pkg/modules/$P.mx $INSTALL_DIR/resource/modules
 fi
