Alien-curlimpersonate

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

        my ($build) = @_;
        # The files are in the stage dir now (destdir is off, see above);
        # $prefix is where they end up, and is what the flags must name.
        my $prefix = $build->runtime_prop->{prefix};
        my $built  = $build->install_prop->{stage};
        # Not just lib/: GNUInstallDirs uses lib64/ on some distros, and
        # asserting nothing would ship an Alien whose flags point at nothing.
        my $libdir;
        for my $dir (qw(lib lib64)) {
            next unless -d "$built/$dir";
            # List context: a scalar glob is a per-call-site iterator, and a hit
            # leaves it mid-stream (lib/ holds .so, .so.4, .so.4.8.0).
            my @found = glob "$built/$dir/libcurl-impersonate.*";
            next unless @found;
            $libdir = $dir;
            last;
        }
        die "Alien::curlimpersonate: build reported success but no "
          . "libcurl-impersonate.* is under $built (looked in lib/ and lib64/)\n"
            unless defined $libdir;
        # As load-bearing as libs: a consumer finds out at "curl/curl.h: No such file".
        die "Alien::curlimpersonate: build reported success but "
          . "$built/include/curl/curl.h is missing\n"



( run in 1.233 second using v1.01-cache-2.11-cpan-1236ad508bc )