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

Properly handle ALSA using ALSA_PLUGIN_DIR #41

Open
probonopd opened this issue Jun 6, 2020 · 1 comment
Open

Properly handle ALSA using ALSA_PLUGIN_DIR #41

probonopd opened this issue Jun 6, 2020 · 1 comment

Comments

@probonopd
Copy link
Owner

// ALSA
// FIXME: Doesn't seem to get loaded. Is ALSA_PLUGIN_DIR needed and working in ALSA?
// Is something like https://github.com/flatpak/freedesktop-sdk-images/blob/1.6/alsa-lib-plugin-path.patch needed in the bundled ALSA?
// TODO: What about the `share/alsa` subdirectory? libasound.so.* refers to it as well
for _, lib := range allELFs {
if strings.HasPrefix(filepath.Base(lib), "libasound.so") {
log.Println("Bundling alsa-lib directory (for <tbd>)...")
locs, err := findWithPrefixInLibraryLocations("alsa-lib")
if err != nil {
log.Println("Could not find alsa-lib directory")
log.Println("E.g., in Alpine Linux: apk add alsa-plugins alsa-plugins-pulse")
os.Exit(1)
} else {
log.Println("Bundling dependencies of alsa-lib directory...")
determineELFsInDirTree(appdir, locs[0])
}
break
}
}

A change was committed to ALSA master:
alsa-project/alsa-lib#34 (comment)

So we should see whether we can make it work now using ALSA master.

@probonopd
Copy link
Owner Author

Some trickery used in

https://github.com/probonopd/doesemu2-factory/blob/4844ed18ba574bfb76071a32e39b61c9f6adbab6/build.sh#L91-L95

# ALSA patching... don't ask ;-)
find appdir/usr/lib -type f -exec sed -i -e 's|/usr|././|g' {} \;
mkdir -p appdir/usr/share/
( cd appdir/usr/share/ ; ln -s /usr/share/alsa . )
( cd appdir/usr/lib/alsa-lib ; ln -s ../ lib )

Is there a better way?

Reference:#

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

No branches or pull requests

1 participant