Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion srcpkgs/brotli/template
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Template file for 'brotli'
pkgname=brotli
version=1.2.0
revision=1
revision=2
build_style=cmake
configure_args="-DBROTLI_BUILD_FOR_PACKAGE=ON"
short_desc="Generic-purpose lossless compression algorithm"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
Expand All @@ -12,6 +13,11 @@ checksum=816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec

post_install() {
vlicense LICENSE

# Drop the -static suffix from static libs
Copy link
Member

Choose a reason for hiding this comment

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

Why? Upstream picks the name; if there is not a compelling reason to override it, it should remain as they intend.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

their pkg-config definition doesn't mention their static libraries with differing names, so without this change it means pkg-config --libs --static output won't point correctly to the static libraries. i'm happy to remove the change if you'd prefer to stick to upstream behaviour still, but this update was to make pkg-config with brotli-devel work more as expected. let me know which you'd prefer :)

Copy link
Member

Choose a reason for hiding this comment

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

You should submit this fix upstream, and defer adding static libraries to this package until they decide how they want to resolve the matter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a known issue that after years they haven't decided on a fix yet unfortunately google/brotli#795

alpine's solution is to perform 2 separate build steps which is something we could alternatively do: https://gitlab.alpinelinux.org/alpine/aports/-/blob/3.19-stable/main/brotli/APKBUILD#L43

for p in ${DESTDIR}/usr/lib/*-static.a; do
mv -v ${p} ${p%-static.a}.a
done
}

brotli-devel_package() {
Expand All @@ -20,6 +26,7 @@ brotli-devel_package() {
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/*.a
vmove usr/lib/pkgconfig
}
}