Ticket #8149: 09_perl_bindings_prefix.2

File 09_perl_bindings_prefix.2, 2.4 KB (added by Andres Mejia <mcitadel@…>, 10 years ago)

Perl bindings installation fix

Line 
1Use prefix for Perl bindings. Also allow more options to be passed when setting
2config options for Perl bindings.
3==========================================================================
4--- a/bindings/perl/perl.pro
5+++ b/bindings/perl/perl.pro
6@@ -4,13 +4,7 @@
7 
8 mythperlbindings.target = Makefile.perl
9 mythperlbindings.depends = Makefile.PL
10-contains(PREFIX, ^/usr(/local)?/?$) {
11-    mythperlbindings.commands = perl Makefile.PL MAKEFILE=Makefile.perl
12-}
13-else {
14-    mythperlbindings.commands = perl Makefile.PL MAKEFILE=Makefile.perl PREFIX=$${PREFIX}
15-}
16-
17+mythperlbindings.commands = perl Makefile.PL MAKEFILE=Makefile.perl PREFIX=$${PREFIX} $${PERL_CONFIG_OPTS}
18 mythperbindingsbuild.target = perl_build
19 mythperbindingsbuild.depends = Makefile.perl
20 mythperbindingsbuild.commands = @-$(MAKE) -f Makefile.perl
21@@ -20,7 +14,7 @@
22 
23 perl_install.target = install
24 perl_install.depends = all
25-perl_install.commands = $(MAKE) -f Makefile.perl pure_install PERL_INSTALL_ROOT=\"$(INSTALL_ROOT)\"
26+perl_install.commands = $(MAKE) -f Makefile.perl pure_install PERL_INSTALL_ROOT=\"$(INSTALL_ROOT)\" PREFIX=$${PREFIX}
27 
28 QMAKE_LINK=@-echo
29 PRE_TARGETDEPS += perl_build
30--- a/configure
31+++ b/configure
32@@ -141,6 +141,8 @@
33                            Supported bindings: perl, python
34                            comma-separated list
35   --python=PATH            Force a specific python executable to use [$python_default]
36+  --perl-config-opts=OPTS  Additional options to pass when generating
37+                           Makefile.perl for building Perl bindings.
38 EOF
39 
40 #following is ffmpeg's configure help text
41@@ -2020,6 +2022,9 @@
42             fi
43         done
44     ;;
45+    --perl-config-opts=*)
46+      PERL_CONFIG_OPTS=`echo ${optval}`
47+    ;;
48     --disable-devices) disable $INDEV_LIST $OUTDEV_LIST
49     ;;
50     --enable-debug=*) debuglevel="$optval"
51@@ -4250,6 +4255,9 @@
52 
53 echo "# Bindings"
54 echo "bindings_perl             ${bindings_perl-no}"
55+if test x"$PERL_CONFIG_OPTS" != x""; then
56+  echo "Perl config options       $PERL_CONFIG_OPTS"
57+fi
58 echo "bindings_python           ${bindings_python-no}"
59 echo ""
60 
61@@ -4565,6 +4573,10 @@
62   echo "CONFIG_OPENGL_LIBS=-lGL -lGLU" >> $MYTH_CONFIG_MAK
63 fi
64 
65+if test x"$PERL_CONFIG_OPTS" != x"" ; then
66+  echo "PERL_CONFIG_OPTS=$PERL_CONFIG_OPTS" >> $MYTH_CONFIG_MAK
67+fi
68+
69 if test x"$CCONFIG" != x"" ; then
70   echo "CCONFIG=$CCONFIG" >> $MYTH_CONFIG_MAK
71   echo "#define MYTH_BUILD_CONFIG \"$CCONFIG\"" >>$TMPH