Skip to content

Patch to build on Haiku #486

@nigelhorne

Description

@nigelhorne

Please consider this patch, with it Net::SSLeay now build on Haiku R1/Beta5:

*** ../Net-SSLeay-1.94-5/Makefile.PL	2024-01-07 19:43:17.050593792 -0500
--- ./Makefile.PL	2024-09-26 10:44:10.662700032 -0400
***************
*** 120,125 ****
--- 120,130 ----
  # macros are available).
  add_ccflag( $eumm_args{CCFLAGS}, "-DNET_SSLEAY_PERL_VERSION=" . $] * 1e6 );
  
+ if(-d '/boot/system/develop/headers/x86/openssl') {
+ 	# Haiku
+ 	add_ccflag($eumm_args{'CCFLAGS'}, '-I/boot/system/develop/headers/x86/openssl');
+ }
+ 
  # Suppress deprecation warnings during compilation.
  # https://www.openssl.org/docs/manmaster/man7/openssl_user_macros.html
  add_ccflag( $eumm_args{CCFLAGS}, '-DOPENSSL_API_COMPAT=908' );
***************
*** 224,229 ****
--- 229,235 ----
      my @try_includes = (
          'include' => sub { 1 },
          'inc32'   => sub { $OSNAME eq 'MSWin32' },
+ 	'/boot/system/develop/headers/x86' => sub { $OSNAME eq 'haiku' },
      );
  
      while (
***************
*** 235,240 ****
--- 241,250 ----
                             || -f "$prefix/$dir/ssl.h")) {
              $opts->{inc_path} = "$prefix/$dir";
          }
+ 	if($cond->() && (-f "/$dir/openssl/ssl.h")) {
+ 		# e.g Haiku
+ 		$opts->{inc_path} = $dir;
+ 	}
      }
  
      # Directory order matters. With macOS Monterey a poisoned dylib is

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions