Sinono3 / souvlaki

A cross-platform library for handling OS media controls and metadata.
MIT License
80 stars 15 forks source link

Allow build on other *nix platforms #26

Closed 0323pin closed 2 years ago

0323pin commented 2 years ago

Suggestion to address https://github.com/Sinono3/souvlaki/issues/25

It builds standalone on NetBSD.

Sinono3 commented 2 years ago

Thanks for the PR! I appreciate it. I've left a few notes on the code.

0323pin commented 2 years ago

@Sinono3 Ok now, or did I miss something? Sorry, I'm not a programmer, just a package maintainer trying my best 😄 According to https://doc.rust-lang.org/reference/conditional-compilation.html looks to be possible to use target_family = "unix"

If not maybe use a list cfg(target_os = "linux", target_os = "netbsd") adding the other unixs defined in the reference above.

Sinono3 commented 2 years ago

If not maybe use a list cfg(target_os = "linux", target_os = "netbsd") adding the other unixs defined in the reference above.

That's probably the safest bet. Can you change that?

Sorry, I'm not a programmer, just a package maintainer trying my best :smile:

Don't worry, you're good :)

0323pin commented 2 years ago

@Sinono3 Sure, no problem. I've checked that those platforms do have dbus support. I don't use any of them, though.

Or, did you mean to convert all feature gates to the same syntax as well?

0323pin commented 2 years ago

@Sinono3 I'm sorry that the last commit kicked an extra CI build that was doomed to fail due to yet another typo. I should be more careful :(

0323pin commented 2 years ago

@Sinono3 give the CI another go, I've fixed the typo.

0323pin commented 2 years ago

@Sinono3 😞 Any hints on something obvious that I'm failing to see?

0323pin commented 2 years ago

@Sinono3 Ok, I'm sorry, I should have done this myself before requesting a CI build. It builds for me now,

souvlaki > cargo build --release
   Compiling pkg-config v0.3.25
   Compiling libc v0.2.126
   Compiling souvlaki v0.5.1 (/home/pin/Downloads/souvlaki)
   Compiling libdbus-sys v0.2.2
   Compiling dbus v0.9.5
   Compiling dbus-crossroads v0.5.0
    Finished release [optimized] target(s) in 48.75s
Sinono3 commented 2 years ago

Sorry for the delay. I'll merge this now.

0323pin commented 2 years ago

@Sinono3 Thank you 👍