bzip2: fix cross build on mingw by using autoconf patch#10820
bzip2: fix cross build on mingw by using autoconf patch#10820mcmtroffaes wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
cc @aszlig as nix expert concerning the mingw cross build target (judging from the nixpkgs git history) |
|
Yes, you're correct in that it only overrides those phases. The problem is this line: and Makefile-libbz2_so is completely broken on cross targets. Other cross builds (such as on Fedora) use the autoconf patch to get their cross build running, see for instance: http://pkgs.fedoraproject.org/cgit/mingw-bzip2.git/tree/mingw-bzip2.spec#n19 so I'm following what appears to be best practice concerning cross builds of bzip2. It entered my mind to use the autoconf patch on all targets (both native and cross) and to chuck out the old method, but of course that will cause a mass rebuild as a lot of stuff depends on this package. But if it is felt that this is better, I can rework the patch along those lines. I'm open to other suggestions too to make bzip2 work on cross targets. |
Everything the builder.sh did can be done with the generic builder which makes it easier to override attributes and also easier to read. The reason I've done this is because of #10820, which tries to override the preBuild hook, but the latter is hardcoded in the builder.sh of bzip2. I have compared the output of this against the previous version and the only things that were different were timestamps in libbz2.a. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
I've removed the builder.sh in 96648a8 (currently in |
|
Thanks a lot for the work. Yep, I will do a rebase on top of staging and send a new pull request against staging (I'll close this one once that's happened). |
|
Is there any way to download that patch from some other place? It would be nice if we wouldn't have to check that (large'ish) patch into the Nixpkgs repository. |
|
@peti: The official upstream of the patch is SUSE: http://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/ Other sources are: https://github.com/niXman/mingw-builds/blob/master/patches/bzip2/bzip2-1.0.6-autoconfiscated.patch Let me know what you prefer and I can try to integrate it. |
|
Any of those places seem fine to me. What matters is that the patch is retrieved with |
|
No problem at all, I will do a fetchurl on the next iteration. |
|
Right, so this should be closed, as the next iteration is to be submitted against staging. (Github seems not to allow changing target branch in PR.) |
|
Yep, sadly it doesn't... |
This also removes most of the sed script fixes for the cross builds: autoconf knows the right tools, and also knows not to run the tests. Tested with: