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

New package: dosbox-staging-0.77.0 #31258

Merged
merged 2 commits into from Jul 17, 2021

Conversation

joshuakraemer
Copy link
Contributor

  • This is a new package and it conforms to the quality requirements
  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

This is a draft based on a current git snapshot, because DOSBox Staging 0.77.0 has not been released yet.

@kcgen wrote (joshuakraemer@2d0e6a7#commitcomment-51084600):

@joshuakraemer, looks good!

I realize this is using the master branch right now until we can wrap up 0.77. In the meantime, regarding: -Duse_mt32emu=false, can you try removing that? Meson should be able to build it internally based on its wrap. There should be no copyright concerns, as users must provide their own ROMs for this feature.

Thank you for your comments. I have added libmt32emu as a separate package, and successfully tested MT-32 emulation.

Also, there might be more configuration options needed to ensure an optimized binary is built. Here's what I use:

-Dbuildtype=release \
-Dc_args=-Ofast \
-Dcpp_args=-Ofast \
-Db_asneeded=true -Dstrip=true \
-Ddefault_library=static \
-Dfluidsynth:enable-floats=true \
-Dfluidsynth:try-static-deps=true 

Perhaps the static settings could be dropped depending on what void Linux prefers.
I personally want to ensure that FluidSynth is compiled with the same optimization level (and uses our highly stripped down FluidSynth configuration) to ensure good performance on some of my CPU-limited platforms.

Void's build options for meson packages are specified in https://github.com/void-linux/void-packages/blob/master/common/build-style/meson.sh (using -O2 from the CFLAGS environment variable). The enable-floats option could probably be added to Void's FluidSynth package (https://github.com/void-linux/void-packages/blob/master/srcpkgs/fluidsynth/template), but I do not know if it would be a suitable default outside of DosBox.

@joshuakraemer
Copy link
Contributor Author

Build fails with musl because the wrong strerror_r() variant is used. Upstream bug report: dosbox-staging/dosbox-staging#1047

@kcgen
Copy link

kcgen commented Jun 2, 2021

The enable-floats option could probably be added to Void's FluidSynth package (https://github.com/void-linux/void-packages/blob/master/srcpkgs/fluidsynth/template), but I do not know if it would be a suitable default outside of DosBox.

I highly recommend it across the board. Floats are already 32-bits - which gives you 2^16 times finer resolution to quantify an amplitude level versus CD-quality 16-bit sound.

Even 24-bit audio is considered sufficient for professional-grade studio work. Leaving this as a double means samples are a whopping 64-bit; which is.. vastly overkill.

The other benefit of 32-bit floats (versus full-doubles) is that SIMD'able operations can pack twice the data into a single operation, which can make difference on CPU limited hardware like the Pi 2 and 3. I made these two points in another thread and FluidSynth's author was also in agreement - but can't remember where now.

@ericonr ericonr added the new-package This PR adds a new package label Jun 3, 2021
@joshuakraemer joshuakraemer force-pushed the dosbox-staging branch 2 times, most recently from 8cd2da5 to e1ad7c8 Compare July 15, 2021 21:05
@joshuakraemer joshuakraemer marked this pull request as ready for review July 15, 2021 21:06
revision=1
build_style=meson
hostmakedepends="pkg-config ccache"
makedepends="alsa-lib-devel libpng-devel SDL2-devel SDL2_net-devel opusfile-devel fluidsynth-devel libmt32emu-devel libatomic-devel"
Copy link
Member

Choose a reason for hiding this comment

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

Please create a new line at ~80 columns.

Is libatomic always necessary or only for XBPS_TARGET_NO_ATOMIC8 archs (like armv6l)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and check for XBPS_TARGET_NO_ATOMIC8 added.

version=0.77.0
revision=1
build_style=meson
hostmakedepends="pkg-config ccache"
Copy link
Member

Choose a reason for hiding this comment

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

ccache is always available in the chroot, don't install manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

desc_option_libsamplerate="Use libsamplerate for sample rate conversion"
build_options_default="libsoxr"
vopt_conflict libsoxr libsamplerate
if [ "$build_option_libsoxr" -o "$build_option_libsamplerate" ]; then configure_args+=" -Dlibmt32emu_WITH_INTERNAL_RESAMPLER=off"; fi
Copy link
Member

Choose a reason for hiding this comment

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

Everything after then should be a new line, and so should fi.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


libmt32emu-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} $(vopt_if libsoxr libsoxr-devel) $(vopt_if libsamplerate libsamplerate-devel)"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
depends="${sourcepkg}>=${version}_${revision} $(vopt_if libsoxr libsoxr-devel) $(vopt_if libsamplerate libsamplerate-devel)"
depends="${sourcepkg}>=${version}_${revision} ${makedepends}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ericonr
Copy link
Member

ericonr commented Jul 16, 2021

Files of libmt32emu:
/usr/lib/libmt32emu.so.2.5.1
/usr/share/doc/munt/libmt32emu/AUTHORS.txt
/usr/share/doc/munt/libmt32emu/COPYING.LESSER.txt
/usr/share/doc/munt/libmt32emu/COPYING.txt
/usr/share/doc/munt/libmt32emu/NEWS.txt
/usr/share/doc/munt/libmt32emu/README.md
/usr/share/doc/munt/libmt32emu/TODO.txt
/usr/lib/libmt32emu.so.2 -> /usr/lib/libmt32emu.so.2.5.1

I think the files under /usr/share/doc can be removed, can't they?

@ericonr
Copy link
Member

ericonr commented Jul 17, 2021

Re-ordered commits for logical order (first dependency, then dosbox).

@ericonr ericonr merged commit 62667d7 into void-linux:master Jul 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2021
@joshuakraemer joshuakraemer deleted the dosbox-staging branch March 8, 2023 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-package This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants