Skip to content
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

build: Add meson build #3

Merged
merged 2 commits into from
May 18, 2024

Conversation

hadess
Copy link
Contributor

@hadess hadess commented May 17, 2024

This simplifies the installation of necessary data files for the thumbnailer to work, working around this long-standing RFE: rust-lang/cargo#2729

Ideally, meson would also be used to compile the binary instead of Cargo, but meson doesn't easily support external crates: mesonbuild/meson#2173

This simplifies the installation of necessary data files for the
thumbnailer to work, working around this long-standing RFE:
rust-lang/cargo#2729

Ideally, meson would also be used to compile the binary instead of
Cargo, but meson doesn't easily support external crates:
mesonbuild/meson#2173
@hadess
Copy link
Contributor Author

hadess commented May 17, 2024

When this lands, I can retire gnome-nds-thumbnailer, thanks :)

@MateusRodCosta
Copy link
Owner

Hi, I will look into this over this weekend.

When this lands, I can retire gnome-nds-thumbnailer, thanks :)

Apparently gnome-nds-thumbnailer got removed from Fedora a while ago...
But, I would guess being in official repos instead of simply COPR would be important to be considered a real replacement.

Copy link
Owner

@MateusRodCosta MateusRodCosta left a comment

Choose a reason for hiding this comment

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

I'm a bit unsure on how to integrate this with the RPM spec.

Sure, I might be able to run some macro that triggers meson (not sure which yet) and that will save me from having to manually call install to install the .thumbnailer file and the mime types. But will that still keep the licenses generation macros working?

Also it seems that the meson file calls the update mime database command unconditionally, which is fine if it's only used for manual installing, but it could be a problem if I want to integrate with the spec, as the mime type database update will be triggered on user's system automatically.

meson.build Outdated Show resolved Hide resolved
As it needs to be disabled for the installation process when building
distribution packages.
@hadess
Copy link
Contributor Author

hadess commented May 18, 2024

Apparently gnome-nds-thumbnailer got removed from Fedora a while ago...

About 18 months ago, not certain why.

Sure, I might be able to run some macro that triggers meson (not sure which yet) and that will save me from having to manually call install to install the .thumbnailer file and the mime types. But will that still keep the licenses generation macros working?

meson just runs cargo. We could also make meson generate LICENSE similarly to %{cargo_license_summary} or LICENSE.dependencies like %{cargo_license} if you want, or you could keep running them manually in the spec file.

You can use:

  • %meson instead of %cargo_build
  • %meson_install instead of %cargo_install.

Copy link
Owner

@MateusRodCosta MateusRodCosta left a comment

Choose a reason for hiding this comment

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

lgtm, though I would initially expect update_mime_database to be opt-in instead of opt-out.
But, since we only don't want to do it for packaging, I think it makes sense to be opt-out.

@MateusRodCosta MateusRodCosta merged commit 9717856 into MateusRodCosta:main May 18, 2024
@MateusRodCosta
Copy link
Owner

About 18 months ago, not certain why.

From a search on the Fedora Devel list apparently they were removing inactive packages and orphaning their packages, and it seems gnome-nds-thumbnailer got caught into this, see here.

meson just runs cargo. We could also make meson generate LICENSE similarly to %{cargo_license_summary} or LICENSE.dependencies like %{cargo_license} if you want, or you could keep running them manually in the spec file.

You can use:

%meson instead of %cargo_build
%meson_install instead of %cargo_install.

Makes sense, I will tag a new release soonish and then update the spec and update the COPR.

When this lands, I can retire gnome-nds-thumbnailer, thanks :)

I believe that this means that you plan to archive the gnome-nds-thumbnailer repo, right?

It could be a good idea to link to this repo and mention that it not only covers Nintendo DS .nds files but also several Nintendo 3DS file formats as well. Mentioning that it's written in Rust is optional.
I guess this would also point distros and users that still care about having .nds thumbnailing to an appropriate replacement.

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.

2 participants