Closed chromatic closed 2 years ago
I see the problem with the Windows tests. That should be easy to fix.
The usual way that I deal with this is to use Alien::Autotools
(which in turn uses Alien::autoconf
, Alien::automake
, Alien::libtool
). I've not added any helpers for these though, and probably should!
share {
requires 'Alien::Autotools';
build [ 'autoreconf -if --warnings=all', ... ];
};
The downside to these is that they always perform a share
install for Alien::autoconf
and Alien::automake
because using a system tool implemented in Perl can be problematic if the system Perl is different from the Perl that you are using and you have XS modules installed in a PERL5LIB
directory. The silver lining is that if you require Alien::Autotools
in the share
block they will only be installed if your Alien is doing a share
install.
We could put this helper in here with a documented caveat that it might not work in the described situation or we could add the helper to Alien::Autotools
. My thinking is the latter is more reliable, but I'm also open to the former if you are okay with the caveats.
I will look into the one remaining CI failure, I am pretty sure that is unrelated to this PR.
I have no strong preference between the two approaches you mention here (patching the project upstream may not always be an option), so I'm happy to use either.
Cool I am in the progress of implementing helpers in Alien::autoconf and Alien::Autotools that should address this.
I've made the required changes to Alien::Autotools
(and its dependencies), and added some notes pointing to those aliens so hopefully future developers will be able to find it. You should be good with something like this:
plugin 'PkgConfig' => (
pkg_name => 'libdogecoin',
);
share {
requires 'Alien::Autotools' => 1.07; # <- added this; 1.07 makes sure you get the appropriate helpers
start_url 'https://github.com/dogecoinfoundation/libdogecoin/archive/refs/tags/v0.1.0.tar.gz';
plugin 'Download';
plugin 'Extract' => 'tar.gz';
plugin 'Build::Autoconf';
build [
'%{autoreconf} -if --warnings=all',
'%{configure} --disable-shared',
'%{make}',
'%{make} install',
];
};
Thanks for reporting this, and let me know if you have any questions.
The incantation for getting these tools to work on windows is a wee bit crazy
https://metacpan.org/dist/Alien-autoconf/source/lib/Alien/autoconf.pm#L18
so it is worth the effort to make it easier to build autotool packages on windows!
I've just tried your suggestion and everything appears successful. Thank you kindly!
I found myself needing something like this to support an upstream library that doesn't ship a
./configure
script, but instead ships anautogen.sh
script that callsautoreconf
with these options. If there's a better way to do this, I'm open to the idea.My
alienfile
looks like this:All tests pass for me on 64-bit x86 Linux.