$NetBSD: patch-aa,v 1.5 2014/06/29 17:07:18 schmonz Exp $

  Record the path to the zlib library in the executable/library.
  COMPILER_RPATH_FLAG is specific to pkgsrc.

--- Makefile.PL.orig	2014-02-02 19:26:41.000000000 +0000
+++ Makefile.PL
@@ -84,7 +84,7 @@ WriteMakefile( 
     (
       $BUILD_ZLIB
         ? zlib_files($ZLIB_LIB)
-        : (LIBS => [ "-L$ZLIB_LIB -lz " ])
+        : (LIBS => [ "-L$ZLIB_LIB $ENV{'COMPILER_RPATH_FLAG'}$ZLIB_LIB -lz " ])
     ),
     OPTIMIZE => $OPTIMIZE,
 
