Subject: pkg/9812: p5-pgsql package broken.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <taca@kyoto.jepro.co.jp>
List: netbsd-bugs
Date: 04/06/2000 13:40:32
>Number:         9812
>Category:       pkg
>Synopsis:       p5-pgsql package broken.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 06 03:14:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Takahiro Kambe
>Release:        NetBSD-current 2000/4/4
>Organization:
	
>Environment:
	
System: NetBSD cygnus.kyoto.jepro.co.jp 1.4X NetBSD 1.4X (COMPAQ) #7: Wed Apr 5 12:37:29 JST 2000 taca@cygnus.kyoto.jepro.co.jp:/usr/src/sys/arch/i386/compile/COMPAQ i386


>Description:
	p5-pgsql package failed to make, since its Makefile.PL refered
	the non-existing directory.  (Is it was old postgresql?)
>How-To-Repeat:
	Try create p5-pgsql package.

	# cd /usr/pkgsrc/database/p5-pgsql
	# make
>Fix:
	I succeed to compile with the patch bellow, but I don't check it
	really works with postgresql.

	Sadly, ExtUtils::Liblist.pm dosen't know -Wl option, so I ommited
	to specify it.


--- Makefile.PL.orig	Fri Jan 15 03:45:34 1999
+++ Makefile.PL	Thu Apr  6 17:59:28 2000
@@ -5,6 +5,6 @@
 use Config;
 use strict;
 
 print "\nConfiguring Pg\n";
 print "Remember to actually read the README file !\n";
 die "\nYou didn't read the README file !\n" unless ($] >= 5.002);
@@ -19,7 +20,7 @@
     }
 }
 
-if (-d "$ENV{POSTGRES_HOME}/lib") {
+if (-d "$ENV{POSTGRES_HOME}") {
     print "Found PostgreSQL in $ENV{POSTGRES_HOME}\n";
 } else {
     die "Unable to find PostgreSQL\nplease set environment variable POSTGRES_HOME\n";
@@ -29,9 +29,9 @@
 my %opts = (
     NAME         => 'Pg',
     VERSION_FROM => 'Pg.pm',
-    INC          => "-I$ENV{POSTGRES_HOME}/include",
+    INC          => "-I$ENV{'PREFIX'}/include",
     OBJECT       => "Pg\$(OBJ_EXT)",
-    LIBS         => ["-L$ENV{POSTGRES_HOME}/lib -lpq"],
+    LIBS         => ["-R$ENV{'PREFIX'}/lib,-L$ENV{'PREFIX'}/lib -lpq"],
 );
 
 my $os = $^O;

>Release-Note:
>Audit-Trail:
>Unformatted: