Subject: [PATCH] community/sfml: build static libraries

From: Drew DeVault <[email-masked]>
Date: Wed, 2 Mar 2022 21:40:51 +0100

---
 community/sfml/APKBUILD | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/community/sfml/APKBUILD b/community/sfml/APKBUILD
index 5ab219f88e..81f4c362a7 100644
--- a/community/sfml/APKBUILD
+++ b/community/sfml/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Daniel Sabogal <[email-masked]>
 pkgname=sfml
 pkgver=2.5.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Simple and Fast Multimedia Library"
 url="https://www.sfml-dev.org/"
 arch="all"
@@ -15,16 +15,25 @@ source="https://github.com/SFML/SFML/archive/$pkgver/sfml-$pkgver.tar.gz"
 builddir="$srcdir/SFML-$pkgver"
 
 build() {
-	cmake -B build \
+	cmake -B build-shared \
 		-DCMAKE_BUILD_TYPE=None \
 		-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 \
+		-DCMAKE_BUILD_TYPE=None \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DSFML_BUILD_DOC=TRUE \
+		-DSFML_INSTALL_PKGCONFIG_FILES=TRUE \
+		-DBUILD_SHARED_LIBS=FALSE
 }
 
 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