diff --git a/testing/merlin/APKBUILD b/testing/merlin/APKBUILD
index 312c40785d05360c3d84160f289e7134f4d62773..a692968f9f26e925b8d32455e6230abb10ed982c 100644
--- a/testing/merlin/APKBUILD
+++ b/testing/merlin/APKBUILD
@@ -1,11 +1,11 @@
 # Contributor: Jakub Jirutka <jakub@jirutka.cz>
 # Maintainer:
 pkgname=merlin
-pkgver=3.0.5
+pkgver=3.6.1
 pkgrel=0
 pkgdesc="Context sensitive completion for OCaml"
 url="https://ocaml.github.io/merlin/"
-arch="all !x86 !armhf !armv7 !s390x !mips !mips64 !riscv64"  # limited by ocaml aport
+arch="all !mips64 !riscv64"  # limited by ocaml aport
 license="MIT"
 depends="ocaml ocaml-findlib"
 makedepends="
@@ -15,9 +15,14 @@ makedepends="
 	"
 options="!check"  # XXX: tests are broken, see https://github.com/ocaml/merlin/issues/766
 subpackages="$pkgname-emacs::noarch $pkgname-vim::noarch"
-source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/merlin/archive/v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-$pkgver"
 
+# 32bit archs
+case "$CARCH" in
+    arm*|x86) options="$options textrels" ;;
+esac
+
 build() {
 	cd "$builddir"
 	./configure --prefix /usr
@@ -57,4 +62,4 @@ _submv() {
 	rmdir -p "$pkgdir"/${path%/*} 2>/dev/null || true
 }
 
-sha512sums="bc9790d72caaec2824fe66c3ed439961a00285cd3f7e59cea8f16283a4f489a89d8ac231d2d0da1000e0f03fa6f7b52c04fa4aff6459df5bd17322693493088d  merlin-3.0.5.tar.gz"
+sha512sums="dd8232c5d39324ac14db12dc9f55a560d3eb444775e89dac7c3755cf3744a9939f85bb83cb0e5ddde5a3ea05da8b3ebf4958f81f473330574ca72afc6cbf32e9  merlin-3.6.1.tar.gz"