~alpine/aports

community/sfml: build static libraries v2 APPLIED

Drew DeVault: 1
 community/sfml: build static libraries

 1 files changed, 20 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/3964/mbox | git am -3
Learn more about email & git

[PATCH v2] community/sfml: build static libraries Export this patch

---
 community/sfml/APKBUILD | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/community/sfml/APKBUILD b/community/sfml/APKBUILD
index 5ab219f88e..2cb2b1a33c 100644
--- a/community/sfml/APKBUILD
+++ b/community/sfml/APKBUILD
@@ -1,30 +1,42 @@
# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
pkgname=sfml
pkgver=2.5.1
pkgrel=2
pkgrel=3
pkgdesc="Simple and Fast Multimedia Library"
url="https://www.sfml-dev.org/"
arch="all"
license="Zlib"
makedepends="cmake doxygen eudev-dev flac-dev freetype-dev jpeg-dev
makedepends="cmake doxygen eudev-dev flac-dev freetype-dev jpeg-dev samurai
	mesa-dev libpng-dev libogg-dev libvorbis-dev libx11-dev
	libxrandr-dev libxcb-dev openal-soft-dev xcb-util-image zlib-dev"
subpackages="$pkgname-dev $pkgname-doc"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
options="!check"
source="https://github.com/SFML/SFML/archive/$pkgver/sfml-$pkgver.tar.gz"
builddir="$srcdir/SFML-$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
	cmake -B build-shared \
		-GNinja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSFML_BUILD_DOC=TRUE \
		-DSFML_INSTALL_PKGCONFIG_FILES=TRUE
	cmake --build build
		-DSFML_INSTALL_PKGCONFIG_FILES=TRUE \
		-DBUILD_SHARED_LIBS=TRUE
	cmake --build build-shared

	cmake -B build-static \
		-GNinja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSFML_BUILD_DOC=TRUE \
		-DSFML_INSTALL_PKGCONFIG_FILES=TRUE \
		-DBUILD_SHARED_LIBS=FALSE
	cmake --build build-static
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
	DESTDIR="$pkgdir" cmake --build build-shared --target install
	DESTDIR="$pkgdir" cmake --build build-static --target install

	mkdir -p "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/share/SFML/doc "$pkgdir"/usr/share/doc/SFML
-- 
2.35.1