-
Notifications
You must be signed in to change notification settings - Fork 42
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
Port build system to Meson #8
Conversation
dbb2c2e
to
217b1e0
Compare
Hi! Happy to take a contribution of Meson build files, but I'd prefer not to delete the autoconf/Make files - while they are pretty old-school, they still work fine - I just tried and confirmed that on a modern system they still work for me. Modify it to just add the new build files, update the README to discuss both options, and I'm happy to merge! |
I wasn’t expecting a response to this PR, let alone such a quick one :) Thanks for being receptive to the idea! The reason I did this, rather than just going back to trying the autotools system when I ran into problems with the Debian CMake patch, is that we (Nixpkgs, but also other Linux distros – Fedora also ships a modified version of the CMake patch, for instance) want pkg-config How do you want me to handle this? Adapting the autotools build system to produce a correct P.S. Some clarity on #6 would be helpful for us downstreams too (although I think “Two licenses available” in the |
I tried to address #6 - hope that helps! I'm fine with having Meson generate the .pc file! I don't want to ask you to adapt the autotools stuff, I just don't want to delete it since it works fine for some people. I know this project is embedded in many others and some of them may be using or even patching autotools, so getting rid of that would break them. What would happen if you added the meson files and left the autotools there too? Just let people choose. Or would that break anything, like does it prevent Meson from working if those files are there? |
Nope, it won’t break anything at all – just that of course only users of the Meson build system will get |
Sounds good! |
Thanks a lot, @emilazy - indeed th .pc file was broken in Debian, and works fine now with your patch (adapted to only add, not needlessly replate files). |
1685f86
to
da5cfaa
Compare
Sorry for the delay! I’ve now done as requested and left the Autotools build system alone, and documented the options. I’ve also somewhat presumptively bumped the version to 0.1.5 in the hopes that we can get this into a tagged release :) I’ve left the Visual Studio 2005 file around as well, although Meson can generate project files for Visual Studio 2010 and newer, so that one might be less useful than the Autotools build and I can remove it if you agree. I’ve done testing to ensure that everything works properly with Meson on Windows, with the both the Ninja backend and the Visual Studio one, including compiling a DLL. I’ve confirmed it works natively on Windows with a Visual Studio toolchain, and with Nixpkgs’ MinGW-w64‐based cross‐compilation toolchain. It should work with a native MinGW toolchain too, but I didn’t test that. I opted for a traditional I realized that the
|
da5cfaa
to
5268ff9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Looks great.
Thanks for the quick merge and being open to this! I thought this would probably just sit around for other distros, so I really appreciate you taking the time to review :) I’d definitely recommend merging #7 too, as the Meson test phase without that PR doesn’t meaningfully test anything and the current Would we be able to get an official 0.1.5 tag on GitHub after that to package as a final release? We’re currently vendoring both this and #7 so that we can check the build works in CI. |
I was trying to use Debian’s CMake build system patch but ran into issues because its
.pc
file doesn’t actually include the linker flags required to link the resulting library.I messed around with it for a bit, but generating correct
.pc
files from CMake is actually way too hard. So instead I just rewrote the build system in Meson, which is much simpler and takes care of all the details for us.I don’t really expect this to be merged given the project has been inactive for over a decade, but I wanted to put it up here if any downstreams are interested in it.
@jonassmedegaard This may interest you, either to adopt directly in Debian or at least as a notification that the resulting
.pc
files from your current patch are broken; it lacks the flags for linking, and passes ones that don’t make sense like-ffile-prefix-map=/build/libresample-Yb23pu/libresample-0.1.3=.
. (It also seems like thelibresample.so
in the current package is a broken symbolic link tolibresample.so.1
, but maybe that’s just some Debian thing I don’t fully understand.)