aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-10 09:04:52 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-10 09:04:52 +0000
commit7e2656ed1d22d113658b0b343d5b65570b71fb3f (patch)
tree9ebbbf74558391fc0cb9862110b84b041a9032ee
parentca6ee3c388db2d91fbcf23d69a599117ea23f604 (diff)
downloadaports-7e2656ed1d22d113658b0b343d5b65570b71fb3f.tar.bz2
aports-7e2656ed1d22d113658b0b343d5b65570b71fb3f.tar.xz
main/lsyncd: fix musl build
-rw-r--r--main/lsyncd/APKBUILD11
-rw-r--r--main/lsyncd/fix-realpath.patch20
2 files changed, 30 insertions, 1 deletions
diff --git a/main/lsyncd/APKBUILD b/main/lsyncd/APKBUILD
index ec6b099e19..fb2f466461 100644
--- a/main/lsyncd/APKBUILD
+++ b/main/lsyncd/APKBUILD
@@ -9,10 +9,11 @@ arch="all"
license="GPLv2+"
depends="rsync"
depends_dev=
-makedepends="$depends_dev lua-dev"
+makedepends="$depends_dev lua lua-dev"
install=""
subpackages="$pkgname-doc"
source="http://lsyncd.googlecode.com/files/lsyncd-$pkgver.tar.gz
+ fix-realpath.patch
$pkgname.initd"
_builddir="$srcdir"/lsyncd-$pkgver
@@ -28,6 +29,7 @@ prepare() {
build() {
cd "$_builddir"
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -52,4 +54,11 @@ package() {
}
md5sums="4ef8787f6e3a402a9a2bcb84c123fb17 lsyncd-2.0.7.tar.gz
+a8ad7a0a5faddd8b19f45b1c3086eee3 fix-realpath.patch
b3d38982ef1a6e09a76586418ec6c35d lsyncd.initd"
+sha256sums="3c76a6e8acfceea742154afd21f74b220277e54b1ffdb71ee1dc2eb104b0bbde lsyncd-2.0.7.tar.gz
+f956ed6243675018ac646e0789f4ddf37a60ad7526cdfdf59f633fd86efb9a68 fix-realpath.patch
+2797d06c74154290ec183cbe5ba22dde818c384bee1434c6d95923626890cfe0 lsyncd.initd"
+sha512sums="4ba99853b7962f40bd6a7cd2b51eebf33b37a9536511d39f5650da04465c67080cc89568537981165c357c76841221c1fcc83b42ee0d8ab4713619f8c008af40 lsyncd-2.0.7.tar.gz
+b3cedf4c0a456a7eb1b43c63faf40c7a77d1d6435d8980c15a30139a999d8e2f471f2f2758542408574f99079eb1ea5fa087cfa19e3e38a21bb6f06d69815a06 fix-realpath.patch
+db9b65817b25e9853e5e6fab479eb54e19bcbd37cb8682cbe5549b539866a85db94969deed0b311f92af81f91af31efc638acd5bec05e7722f74b2fc314d7922 lsyncd.initd"
diff --git a/main/lsyncd/fix-realpath.patch b/main/lsyncd/fix-realpath.patch
new file mode 100644
index 0000000000..66132f26e4
--- /dev/null
+++ b/main/lsyncd/fix-realpath.patch
@@ -0,0 +1,20 @@
+--- lsyncd-2.0.7.orig/lsyncd.c
++++ lsyncd-2.0.7/lsyncd.c
+@@ -166,17 +166,7 @@
+ char *
+ get_realpath(const char * rpath) {
+ // uses c-library to get the absolute path
+-#ifdef __GLIBC__
+- // in case of GLIBC the task is easy.
+ return realpath(rpath, NULL);
+-#else
+-# warning having to use old style realpath()
+- // otherwise less so and requires PATH_MAX limit.
+- char buf[PATH_MAX];
+- char *asw = realpath(rpath, buf);
+- if (!asw) return NULL;
+- return s_strdup(asw);
+-#endif
+ }
+
+ /*****************************************************************************