summaryrefslogtreecommitdiff
path: root/user/fts
diff options
context:
space:
mode:
Diffstat (limited to 'user/fts')
-rw-r--r--user/fts/00-static-and-shared-libs.patch49
-rw-r--r--user/fts/APKBUILD46
2 files changed, 95 insertions, 0 deletions
diff --git a/user/fts/00-static-and-shared-libs.patch b/user/fts/00-static-and-shared-libs.patch
new file mode 100644
index 000000000..b65b1d0d6
--- /dev/null
+++ b/user/fts/00-static-and-shared-libs.patch
@@ -0,0 +1,49 @@
+diff --git a/.gitignore b/.gitignore
+index 528fe32..663e6bb 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -10,4 +10,5 @@ config.status
+ configure
+ depcomp
+ install-sh
++ltmain.sh
+ missing
+diff --git a/Makefile.am b/Makefile.am
+index aa93562..f09994e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ ## Makefile.am - procress this file with automake to produce Makefile.in
+-lib_LIBRARIES = libfts.a
+-libfts_a_SOURCES = fts.c
+-libfts_a_HEADERS = fts.h
+-libfts_adir = $(includedir)
++lib_LTLIBRARIES = libfts.la
++libfts_la_SOURCES = fts.c
++libfts_la_HEADERS = fts.h
++libfts_ladir = $(includedir)
+diff --git a/bootstrap.sh b/bootstrap.sh
+index 9e026b5..cd4a585 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -1,4 +1,5 @@
+ #!/bin/sh
++libtoolize
+ aclocal
+ autoconf
+ automake --add-missing
+diff --git a/configure.ac b/configure.ac
+index 28dd6c6..6f12859 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -7,7 +7,9 @@ AC_INIT([fts], [1.1], [Jürgen Buchmüller <pullmoll@t-online.de>])
+ AM_INIT_AUTOMAKE([1.15])
+
+ AC_PROG_CC
+-AC_PROG_RANLIB
++AC_PROG_LIBTOOL
++
++LT_INIT
+
+ AC_CHECK_HEADERS(assert.h dirent.h errno.h fcntl.h stdlib.h string.h unistd.h sys/param.h sys/stat.h)
+
diff --git a/user/fts/APKBUILD b/user/fts/APKBUILD
new file mode 100644
index 000000000..0e7d81cf1
--- /dev/null
+++ b/user/fts/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=fts
+pkgver=1.2.7
+pkgrel=1
+pkgdesc="Provides the fts(3) functions, which are missing in musl libc"
+url="https://github.com/pullmoll/musl-fts/"
+arch="all"
+license="BSD-3-Clause"
+makedepends="automake autoconf libtool"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.zip::https://github.com/pullmoll/musl-fts/archive/v$pkgver.zip"
+builddir="$srcdir/musl-$pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+ ./bootstrap.sh
+}
+
+build() {
+ cd "$builddir"
+ CFLAGS=-fPIC ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir"/usr/lib/pkgconfig
+ cp "$builddir"/musl-fts.pc "$pkgdir"/usr/lib/pkgconfig/libfts.pc
+}
+
+sha512sums="69aceaa7a8dc7ab5845d3288e315357f92ac32fac55c3d670186f2c5756f665a11471fc81f67126755a707058a8d293ba926d906f542c1360a49ca3c9b357976 fts-1.2.7.zip"