Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gmake for FreeBSD #815

Merged
merged 2 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ docs/Translation-translators.md
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/External.pm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not present on Ubuntu :

$ make distcheck
"/usr/bin/perl" "-Iinc" "-MExtUtils::Manifest=fullcheck" -e fullcheck
No such file: inc/Module/Install/External.pm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspected that. It appeared when building on FreeBSD after adding

if ($^O eq "freebsd") {
    requires_external_bin 'gmake';
};

to Makefile.PL. I will investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now inc/Module/Install/External.pm is included by the second commit. Please review again.

inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
Expand Down
19 changes: 15 additions & 4 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,25 @@ test_requires 'Test::Exception' => 0;
test_requires 'Test::Fatal' => 0;
test_requires 'Test::Pod' => 1.22;

if ($^O eq "freebsd") {
requires_external_bin 'gmake';
};

recommends 'Readonly::XS' => 0;
recommends 'Net::IP::XS' => 0;

sub MY::postamble {
return <<'MAKE_FRAG';
pure_all :: share/Makefile
cd share && $(MAKE) touch-po all
MAKE_FRAG
my $text;
if ($^O eq "freebsd") {
# Make FreeBSD use gmake for share/Makefile
$text = 'GMAKE = "gmake"' . "\n"
. 'pure_all :: share/Makefile' . "\n"
. "\t" . 'cd share && $(GMAKE) touch-po all' . "\n";
} else {
$text = 'pure_all :: share/Makefile' . "\n"
. "\t" . 'cd share && $(MAKE) touch-po all' . "\n";
};
return $text;
};

install_share;
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ This instruction covers the following operating systems:
* On all versions of FreeBSD install:

```sh
pkg install libidn p5-App-cpanminus p5-Clone p5-Devel-CheckLib p5-Email-Valid p5-File-ShareDir p5-File-Slurp p5-IO-Socket-INET6 p5-JSON-PP p5-List-MoreUtils p5-Locale-libintl p5-Locale-Msgfmt p5-Module-Find p5-Module-Install p5-Module-Install-XSUtil p5-Moose p5-MooseX-Singleton p5-Net-IP-XS p5-Pod-Coverage p5-Readonly-XS p5-Test-Differences p5-Test-Exception p5-Test-Fatal p5-Test-Pod p5-Text-CSV net-mgmt/p5-Net-IP
pkg install devel/gmake libidn p5-App-cpanminus p5-Clone p5-Devel-CheckLib p5-Email-Valid p5-File-ShareDir p5-File-Slurp p5-IO-Socket-INET6 p5-JSON-PP p5-List-MoreUtils p5-Locale-libintl p5-Locale-Msgfmt p5-Module-Find p5-Module-Install p5-Module-Install-XSUtil p5-Moose p5-MooseX-Singleton p5-Net-IP-XS p5-Pod-Coverage p5-Readonly-XS p5-Test-Differences p5-Test-Exception p5-Test-Fatal p5-Test-Pod p5-Text-CSV net-mgmt/p5-Net-IP
```

* On FreeBSD 11.x (11.3 or newer) also install OpenSSL 1.1.1 or newer:
Expand Down