aboutsummaryrefslogtreecommitdiffstats
path: root/main/libbsd
diff options
context:
space:
mode:
Diffstat (limited to 'main/libbsd')
-rw-r--r--main/libbsd/APKBUILD24
-rw-r--r--main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch77
2 files changed, 89 insertions, 12 deletions
diff --git a/main/libbsd/APKBUILD b/main/libbsd/APKBUILD
index 831992ea96..d6555d451c 100644
--- a/main/libbsd/APKBUILD
+++ b/main/libbsd/APKBUILD
@@ -9,21 +9,18 @@ arch="all"
license="BSD"
depends=""
depends_dev=""
-makedepends="$depends_dev"
+makedepends="$depends_dev autoconf automake libtool"
install=""
subpackages="$pkgname-dev $pkgname-doc"
-source="http://libbsd.freedesktop.org/releases/libbsd-$pkgver.tar.xz"
+source="http://libbsd.freedesktop.org/releases/libbsd-$pkgver.tar.xz
+ Revert_Force_setproctitle_into_.init_array_section.patch"
_builddir="$srcdir"/libbsd-$pkgver
prepare() {
- local i
cd "$_builddir"
- update_config_sub || return 0
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
+ patch -p1 -i "$srcdir"/Revert_Force_setproctitle_into_.init_array_section.patch \
+ || return 1
+ autoreconf -fi || return 1
}
build() {
@@ -46,6 +43,9 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
-md5sums="f6c75f0a9818e323a589bcbd560a0eb4 libbsd-0.6.0.tar.xz"
-sha256sums="9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62 libbsd-0.6.0.tar.xz"
-sha512sums="d750ead28e76938ab8d9c5575c1c87bcf275754f9f82b19d647f522bfaf07e5a85dc47ed5faae093994e5456be806fdebb55eeeed74efff3c950dfb6142e2b5c libbsd-0.6.0.tar.xz"
+md5sums="f6c75f0a9818e323a589bcbd560a0eb4 libbsd-0.6.0.tar.xz
+628a86066f8a1222c7ffee5aa3d488ef Revert_Force_setproctitle_into_.init_array_section.patch"
+sha256sums="9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62 libbsd-0.6.0.tar.xz
+a4497defcc14d04e407130931ed89c6b9e5e79c684884291cc080c6e90c82777 Revert_Force_setproctitle_into_.init_array_section.patch"
+sha512sums="d750ead28e76938ab8d9c5575c1c87bcf275754f9f82b19d647f522bfaf07e5a85dc47ed5faae093994e5456be806fdebb55eeeed74efff3c950dfb6142e2b5c libbsd-0.6.0.tar.xz
+52d3e69a2589dc299bcc5ca99bcf595d054be4c8b6b2ce4101d7657a54fecc4bc843b4439f0c9b582266559288220b342f926e700e7ae7e91bf29f0ae30d707f Revert_Force_setproctitle_into_.init_array_section.patch"
diff --git a/main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch b/main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
new file mode 100644
index 0000000000..5d5b215a8d
--- /dev/null
+++ b/main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
@@ -0,0 +1,77 @@
+diff -rupN a/configure.ac b/configure.ac
+--- a/configure.ac 2013-07-14 13:34:07.000000000 +0200
++++ b/configure.ac 2013-11-12 10:27:39.986117039 +0100
+@@ -60,51 +60,6 @@ AC_CHECK_DECL([F_CLOSEM],
+ [#include <limits.h>
+ #include <fcntl.h>])
+
+-AC_CACHE_CHECK(
+- [for GNU .init_array section support],
+- [libbsd_cv_gnu_init_array_support],
+- [AC_RUN_IFELSE(
+- [AC_LANG_SOURCE(
+-[[
+-static int rc = 1;
+-static void init(int argc) { if (argc == 1) rc = 0; }
+-void (*init_func)(int argc) __attribute__((section(".init_array"))) = init;
+-int main() { return rc; }
+-]]
+- )],
+- [libbsd_cv_gnu_init_array_support=yes],
+- [libbsd_cv_gnu_init_array_support=no],
+- [AC_PREPROC_IFELSE(
+- [AC_LANG_SOURCE(
+-[[
+-/* Look for a known libc that supports .init_array with the GNU extension
+- * to pass main() arguments to the init functions. */
+-#include <stdlib.h>
+-#if defined __GLIBC_PREREQ
+-# if __GLIBC_PREREQ(2, 4)
+-/* glibc supports GNU .init_array since 2.4. */
+-# else
+-# error glibc does not support GNU .init_array
+-# endif
+-#else
+-/*
+- * Basic SysV ABI .init_array support, init functions do not get arguments:
+- * - Bionic since its inception.
+- * - uClibc since 0.9.29.
+- */
+-# error unknown whether libc supports GNU .init_array
+-#endif
+-]]
+- )],
+- [libbsd_cv_gnu_init_array_support=yes],
+- [libbsd_cv_gnu_init_array_support=no])
+- ]
+- )]
+-)
+-if test "$libbsd_cv_gnu_init_array_support" = no; then
+- AC_MSG_ERROR([missing required GNU .init_array section support])
+-fi
+-
+ # Checks for library functions.
+ AC_MSG_CHECKING([for program_invocation_short_name])
+ AC_LINK_IFELSE(
+diff -rupN a/src/setproctitle.c b/src/setproctitle.c
+--- a/src/setproctitle.c 2013-07-14 13:34:07.000000000 +0200
++++ b/src/setproctitle.c 2013-11-12 10:28:55.332787881 +0100
+@@ -1,6 +1,6 @@
+ /*
+ * Copyright © 2010 William Ahern
+- * Copyright © 2012-2013 Guillem Jover <guillem@hadrons.org>
++ * Copyright © 2012 Guillem Jover <guillem@hadrons.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+@@ -155,8 +155,8 @@ spt_copyargs(int argc, char *argv[])
+ return 0;
+ }
+
+-void
+-setproctitle_init(int argc, char *argv[], char *envp[])
++static void
++spt_init(int argc, char *argv[], char *envp[])
+ {
+ char *base, *end, *nul, *tmp;
+ int i, envc, error;