Perl lib path

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
joshuanekl
Posts: 5
Joined: Sun Nov 15, 2009 3:19 am

Perl lib path

Post by joshuanekl »

I tried to install under /usr/local/zoneminder-1.24.2 using the ./configure --prefix option. However, the perl 'use lib' paths are not correct when I do this. It installs to /usr/local/zoneminder-1.24.2/share/perl/5.10.0/ but the scripts in /usr/local/zoneminder-1.24.2/bin/*.pl all have 'use lib /usr/local/zoneminder-1.24.2/local/share/perl/5.10.2/', they have an extra '/local' after the prefix.

From the looks of it, I'm guessing my system's (Ubuntu 9.10) perl installation siteprefix != prefix, which the zoneminder configure script assumes. From looking at the generated scripts/Zoneminder/Makefile, it appears INSTALLSITELIB uses SITEPREFIX which defaults to PREFIX, but could be overridden.

I patched the configure.ac script to strip siteprefix from sitelib instead of installprefix.
You'll need to re-run `autoconfigure` after applying the patch.

Josh

Code: Select all

diff -ur orig/ZoneMinder-1.24.2/configure.ac ZoneMinder-1.24.2/configure.ac
--- orig/ZoneMinder-1.24.2/configure.ac 2009-06-24 06:22:23.000000000 -0400
+++ ZoneMinder-1.24.2/configure.ac      2009-11-15 11:43:00.972748480 -0500
@@ -327,9 +327,9 @@
 
 # Slight hack for non-standard perl install paths
 if test "$prefix" != "NONE"; then
-    PERL_PREFIX=`perl -V:installprefix | sed -e "s/.*='\(.*\)';/\1/"`
+    PERL_SITE_PREFIX=`perl -V:siteprefix | sed -e "s/.*='\(.*\)';/\1/"`
     PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
-    PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_PREFIX||"`
+    PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
     EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
     PERL_MM_PARMS="PREFIX=$prefix"
 else
Post Reply