Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 326306 Details for
Bug 404129
dev-perl/JavaScript-SpiderMonkey: compatiblity with dev-lang/spidermonkey
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use pkgconfig to get correct info from newer spidermonkeys
pkgconfig.patch (text/plain), 3.27 KB, created by
Ian Stakenvicius (RETIRED)
on 2012-10-11 17:31:22 UTC
(
hide
)
Description:
use pkgconfig to get correct info from newer spidermonkeys
Filename:
MIME Type:
Creator:
Ian Stakenvicius (RETIRED)
Created:
2012-10-11 17:31:22 UTC
Size:
3.27 KB
patch
obsolete
>--- Makefile.PL 2012-10-11 13:21:34.000000000 -0400 >+++ /tmp/Makefile.PL 2012-10-11 13:21:22.000000000 -0400 >@@ -12,6 +12,7 @@ > ###################################################################### > > use ExtUtils::MakeMaker; >+use ExtUtils::PkgConfig; > use Getopt::Long; > > # Get the right lib and include dirs for different platforms >@@ -28,8 +29,6 @@ > libjs.a > js32.dll > libmozjs.so >- libmozjs185.so >- libmozjs187.so > ); > > my %possible_install_paths = ( >@@ -39,7 +38,7 @@ > "/usr/lib/firefox" => "/usr/include/firefox", > ); > >-my ($JS_LIB_DIR, @JS_INCL_DIRS, $JS_LIB_NAME); >+my ($JS_LIB_DIR, @JS_INCL_DIRS, $JS_LIB_NAME, $JS_LIBS, $JS_INCLUDES); > > #### Determine compile options > ############################## >@@ -59,6 +58,19 @@ > "JS_LIB_DIR=s" => \$JS_LIB_DIR, > "JS_LIB_NAME=s" => \$JS_LIB_NAME, > ); >+ >+# try to find spidermonkey via pkg-config first >+ >+$JS_LIBS = ExtUtils::PkgConfig->libs ('mozjs187'); >+if ("".$JS_LIBS ne "") { >+ $JS_INCLUDES = ExtUtils::PkgConfig->cflags ('mozjs187'); >+} else { >+ $JS_LIBS = ExtUtils::PkgConfig->libs ('mozjs185'); >+ if ("".$JS_LIBS ne "") { >+ $JS_INCLUDES = ExtUtils::PkgConfig->cflags ('mozjs185'); >+ } else { >+ >+# pkg-config did not work, use the old (direct) way to find older libs > if ($JS_LIB_DIR) { > push @JS_INCL_DIRS, $JS_LIB_DIR; > } >@@ -80,13 +92,15 @@ > } > } > if (scalar(@JS_INCL_DIRS) == scalar(@c_header_files)) { >- $JS_LIB_DIR = $libfile; >+ $JS_LIB_DIR = "-L".$libfile; > $JS_LIB_DIR =~ s/$possible_lib$//; > > $JS_LIB_NAME = $possible_lib; > $JS_LIB_NAME =~ s/\.(a|so|dll)$//; > $JS_LIB_NAME =~ s/^lib//; > >+ $JS_LIBS = "-l".$JS_LIB_NAME; >+ > last; > } else { > @JS_INCL_DIRS = (); >@@ -96,15 +110,22 @@ > } > last if $JS_LIB_DIR; > } >+foreach my $include_dir(@JS_INCL_DIRS) { >+ $JS_INCLUDES.=" -I".$include_dir; >+} > > if ($JS_INCL_DIRS[0] eq $JS_INCL_DIRS[1]) { > shift @JS_INCL_DIRS; > } > >+} # end of pkgcfg mozjs185 >+} # end of pkgcfg mozjs187 >+ >+ > ## If no SpiderMonkey library found report that and exit. > ## Otherwise print lib and include paths. > >-if (!$JS_LIB_DIR) { >+if (!$JS_LIBS) { > print <<EOT; > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >@@ -115,15 +136,11 @@ > EOT > exit 1; > } else { >- print "JS_LIB_DIR: $JS_LIB_DIR\n"; >- foreach my $include_dir(@JS_INCL_DIRS) { >- print "JS_INCL_DIR: $include_dir\n"; >- } >- print "JS_LIB_NAME: $JS_LIB_NAME\n"; >+ print "JS_LIBS: $JS_LIBS\n"; >+ print "JS_INCLUDES: $include_dir\n"; > } > > >- > ## Determine library name and system-related defines > if ($^O ne 'MSWin32') { > $JS_DEFINE = '-DXP_UNIX'; >@@ -162,10 +179,11 @@ > ($] >= 5.005 ? ## Add these new keywords supported since 5.005 > (ABSTRACT_FROM => 'SpiderMonkey.pm', # retrieve abstract from module > AUTHOR => 'Mike Schilli <m@perlmeister.com>') : ()), >- 'LIBS' => ["-L$JS_LIB_DIR -l$JS_LIB_NAME"], >+ 'LIBS' => ["$JS_LIB_DIR $JS_LIBS"], > 'DEFINE' => $JS_DEFINE, # e.g., '-DHAVE_SOMETHING' > # Insert -I. if you add *.h files later: >- 'INC' => "-I".join " -I", @JS_INCL_DIRS, >+# 'INC' => "-I".join " -I", @JS_INCL_DIRS, >+ 'INC' => $JS_INCLUDES, > # Un-comment this if you add C files to link with later: > # 'OBJECT' => '$(O_FILES)', # link all the C files too > );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 404129
:
302153
|
302155
|
326230
| 326306