Skip to content

Extend Travis build matrix, patch SDL2 2.0.8 #797

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

Merged
merged 5 commits into from
Oct 9, 2018
Merged

Extend Travis build matrix, patch SDL2 2.0.8 #797

merged 5 commits into from
Oct 9, 2018

Conversation

pyrrho
Copy link
Contributor

@pyrrho pyrrho commented Sep 24, 2018

This PR is a potential replacement for #781.

It keeps @reynisdrangar's original extension of the Travis build matrix, but it solves the OSX SDL2 2.0.8 build failure with some (questionable?) hand-crafted patching logic. See patch_sdl2 in sdl2-sys/build.rs and the new .patch file for the code new to this branch. All the other modifications are carried over from 781.

This code is submitted as much for discussion is it is for actual adoption. The logic that's in the patch_sdl2 function should probably be backported into unidiff and throughly tested there, but for the moment -- until SDL2's CMake build system is fixed -- this may be a sufficient-enough stop-gap.

#[cfg(feature = "bundled")]
fn patch_sdl2(sdl2_source_path: &Path) {
let patches: Vec<(&str, &'static str)> = vec![
("SDL2-2.0.8-4234-mac-os-dylib-fix.patch",
Copy link
Member

Choose a reason for hiding this comment

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

Add as a comment why this patch is necessary, please (we probably won't remember in 6months, and we won't even be able to know when to remove it if/when this is fixed)

reynisdrangar and others added 5 commits September 29, 2018 14:15
Doubles the number of builds, unfortunately, but it should
cover all the common linkage scenarios, except for macos
frameworks, which I'm not sure I know enough about to handle.

Also autoformats travis.yml and splits the SDL archive extraction
and installation out to a shell script
Assert that stereo buffers are *at least* twice the original size,
rather than more than twice the size.
Using some very poorly tested file I/O code, it should be noted.
@pyrrho
Copy link
Contributor Author

pyrrho commented Sep 29, 2018

Sorry about the delay on these updates.

I added a few comments, but please let me know if there are any other sections that could use some more clarifications.

I also rebased onto master to pull in the update to version 2.0.2 of the sdl2 mixer.

@Cobrand Cobrand merged commit ef36bb8 into Rust-SDL2:master Oct 9, 2018
@pyrrho pyrrho deleted the patch_bundled_sdl2 branch October 9, 2018 16:48
sypwex pushed a commit to sypwex/rust-sdl2 that referenced this pull request Jun 2, 2024
Extend Travis build matrix, patch SDL2 2.0.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants