[perl-Cairo] Use the pthread compatibility workaround on NetBSD as well



commit 3f1fbbc9324e2bab28a9f0b1e9a3182962167238
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Tue Sep 22 21:36:18 2015 +0200

    Use the pthread compatibility workaround on NetBSD as well
    
    CPAN testers results indicate that dynamically loading libpthread.so is
    not supported on NetBSD either.

 Makefile.PL |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index eeeeae3..d8e056b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -571,16 +571,16 @@ $dep->install (qw(cairo-perl.h
                   build/cairo-perl-auto.typemap));
 $dep->save_config ('build/IFiles.pm');
 
-# On OpenBSD, any program that directly or indirectly wants to load
+# On OpenBSD/NetBSD, any program that directly or indirectly wants to load
 # libpthread.so must do so from the start.  But when perl is built without
 # ithreads, it will also most likely not be compiled with "-pthread".  When
-# libglib/libgobject then go and try to load libpthread.so, the loader will
-# error out.
-my @openbsd_compat_flags = ();
-if ($^O eq 'openbsd' && $Config::Config{ldflags} !~ m/-pthread\b/) {
-  warn " ***\n *** on OpenBSD, we either need perl linked with '-pthread',\n",
+# libcairo then goes and tries to load libpthread.so, the loader will error
+# out.
+my @bsd_compat_flags = ();
+if (($^O eq 'openbsd' || $^O eq 'netbsd') && $Config::Config{ldflags} !~ m/-pthread\b/) {
+  warn " ***\n *** on OpenBSD/NetBSD, we either need perl linked with '-pthread',\n",
        " ***   or we need to set LD_PRELOAD=libpthread.so; doing the latter now...\n ***\n";
-  @openbsd_compat_flags = (
+  @bsd_compat_flags = (
     macro => {FULLPERLRUN => 'LD_PRELOAD=libpthread.so $(FULLPERL)'},
   );
 }
@@ -596,7 +596,7 @@ WriteMakefile (
     DL_FUNCS      => { Cairo=> [] },
     META_MERGE    => \%meta_merge,
     $dep->get_makefile_vars,
-    @openbsd_compat_flags,
+    @bsd_compat_flags,
 );
 
 sub MY::postamble


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]