Package: libsbml / 5.10.0+dfsg-1

perl-installdirs.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Author: gregor herrmann <gregoa@debian.org>
Last-Update: Fri, 12 Sep 2014 14:42:36 +0200
Bug-Debian: http://bugs.debian.org/761134
Description: Fix Perl installation path

--- a/src/bindings/perl/Makefile.PL.in
+++ b/src/bindings/perl/Makefile.PL.in
@@ -58,7 +58,6 @@
               NAME        => "LibSBML",
 	      PREFIX      => "@prefix@",
               MAKEFILE    => 'Makefile-perl',
-              INSTALLDIRS => "site",
               LIBS        => "@XERCES_LDFLAGS@ @EXPAT_LDFLAGS@ @LIBXML_LDFLAGS@ @XERCES_LIBS@ @EXPAT_LIBS@ @LIBXML_LIBS@ @ZLIB_LIBS@ @BZ2_LIBS@ @LIBS@ -lm",
               LDDLFLAGS   => $lddlflags,
               CC          => "@CXX@",
--- a/src/bindings/perl/CMakeLists.txt
+++ b/src/bindings/perl/CMakeLists.txt
@@ -168,7 +168,13 @@
   string(REPLACE "'" "" PERL_PLATFORM ${PERL_PLATFORM})
   string(REPLACE ";" "" PERL_PLATFORM ${PERL_PLATFORM})
   string(REPLACE "archname=" "" PERL_PLATFORM ${PERL_PLATFORM})
-  set(PERL_PACKAGE_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/perl5/site_perl/${PERL_VERSION}/${PERL_PLATFORM})
+  execute_process(COMMAND "${PERL_EXECUTABLE}" -V:vendorarch
+    OUTPUT_VARIABLE PERL_VENDORARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+  string(REPLACE " " "" PERL_VENDORARCH ${PERL_VENDORARCH})
+  string(REPLACE "'" "" PERL_VENDORARCH ${PERL_VENDORARCH})
+  string(REPLACE ";" "" PERL_VENDORARCH ${PERL_VENDORARCH})
+  string(REPLACE "vendorarch=/usr/lib/" "" PERL_VENDORARCH ${PERL_VENDORARCH})
+  set(PERL_PACKAGE_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${PERL_VENDORARCH})
   set(PERL_PACKAGE_INSTALL_BIN_DIR ${PERL_PACKAGE_INSTALL_DIR}/auto/libSBML)
 else()
   set(PERL_PACKAGE_INSTALL_DIR ${MISC_PREFIX}bindings/perl)