Mail archive
alpine-aports

[alpine-aports] [PATCH] main/libbsd: upgrade to 0.7.0

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Wed, 9 Sep 2015 09:55:58 +0200

fixes #4613
---
 main/libbsd/APKBUILD                               | 26 ++++----
 ...rce_setproctitle_into_.init_array_section.patch | 77 ----------------------
 main/libbsd/musl-fix-headers.patch                 | 25 -------
 main/libbsd/musl-fixes.patch                       | 31 +++++++++
 4 files changed, 42 insertions(+), 117 deletions(-)
 delete mode 100644 main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
 delete mode 100644 main/libbsd/musl-fix-headers.patch
 create mode 100644 main/libbsd/musl-fixes.patch
diff --git a/main/libbsd/APKBUILD b/main/libbsd/APKBUILD
index 0b63168..f080ca2 100644
--- a/main/libbsd/APKBUILD
+++ b/main/libbsd/APKBUILD
_at_@ -1,8 +1,9 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: William Pitcock <nenolod_at_dereferenced.org>
 # Maintainer: William Pitcock <nenolod_at_dereferenced.org>
 pkgname=libbsd
-pkgver=0.6.0
-pkgrel=1
+pkgver=0.7.0
+pkgrel=0
 pkgdesc="commonly-used BSD functions not implemented by all libcs"
 url="http://libbsd.freedesktop.org/"
 arch="x86 x86_64"
_at_@ -13,10 +14,8 @@ makedepends="$depends_dev autoconf automake libtool bsd-compat-headers
 	linux-headers"
 install=""
 subpackages="$pkgname-dev $pkgname-doc"
-source="http://libbsd.freedesktop.org/releases/libbsd-$pkgver.tar.xz
-	Revert_Force_setproctitle_into_.init_array_section.patch
-	musl-fix-headers.patch
-	"
+source="http://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.xz
+	musl-fixes.patch"
 
 _builddir="$srcdir"/libbsd-$pkgver
 prepare() {
_at_@ -49,12 +48,9 @@ package() {
 	rm -f "$pkgdir"/usr/lib/*.la
 }
 
-md5sums="f6c75f0a9818e323a589bcbd560a0eb4  libbsd-0.6.0.tar.xz
-628a86066f8a1222c7ffee5aa3d488ef  Revert_Force_setproctitle_into_.init_array_section.patch
-712fca9c718f8b0f4d664c214072d6b3  musl-fix-headers.patch"
-sha256sums="9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62  libbsd-0.6.0.tar.xz
-a4497defcc14d04e407130931ed89c6b9e5e79c684884291cc080c6e90c82777  Revert_Force_setproctitle_into_.init_array_section.patch
-3082d5f47c6d895dc3546d517ba7d541602872f00d5b39852a0b28b3d74ce954  musl-fix-headers.patch"
-sha512sums="d750ead28e76938ab8d9c5575c1c87bcf275754f9f82b19d647f522bfaf07e5a85dc47ed5faae093994e5456be806fdebb55eeeed74efff3c950dfb6142e2b5c  libbsd-0.6.0.tar.xz
-52d3e69a2589dc299bcc5ca99bcf595d054be4c8b6b2ce4101d7657a54fecc4bc843b4439f0c9b582266559288220b342f926e700e7ae7e91bf29f0ae30d707f  Revert_Force_setproctitle_into_.init_array_section.patch
-87a4337108776cf8ff05be5938b3c8a548a4dd5625ae8e4afbab54c4c06af287188a81213633540a82c07e90b028b616f30934b02e8ab7485efa0ae0afdf20ee  musl-fix-headers.patch"
+md5sums="fcceb4e66fd448ca4ed42ba22a8babb0  libbsd-0.7.0.tar.xz
+4449c9cd2447a595d283441c75256fbd  musl-fixes.patch"
+sha256sums="0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb  libbsd-0.7.0.tar.xz
+94bc4853e2acae9d630f01aaae2992d166dd92154446112f1e80bb186c0e6be8  musl-fixes.patch"
+sha512sums="2c4c8fb2ae7fb5e5aab90f7a59a679220922dfeeaf0d54f80976914fcd507171bb9359f0837c32499e63a0f3e9342c9dcd387a466b359d20e3790ddc8ca17cea  libbsd-0.7.0.tar.xz
+a60b23c87dca30db2414f7f7184503cd080e2ff490f28d8b5a4c55ff48e282e80e636c0e72096753d4cf8b32f852004aa3b24eae7b6ef7e62ef85169f052335a  musl-fixes.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
deleted file mode 100644
index 5d5b215..0000000
--- a/main/libbsd/Revert_Force_setproctitle_into_.init_array_section.patch
+++ /dev/null
_at_@ -1,77 +0,0 @@
-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
-_at_@ -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
-_at_@ -1,6 +1,6 @@
- /*
-  * Copyright © 2010 William Ahern
-- * Copyright © 2012-2013 Guillem Jover <guillem_at_hadrons.org>
-+ * Copyright © 2012 Guillem Jover <guillem_at_hadrons.org>
-  *
-  * Permission is hereby granted, free of charge, to any person obtaining a
-  * copy of this software and associated documentation files (the
-_at_@ -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;
diff --git a/main/libbsd/musl-fix-headers.patch b/main/libbsd/musl-fix-headers.patch
deleted file mode 100644
index 0556884..0000000
--- a/main/libbsd/musl-fix-headers.patch
+++ /dev/null
_at_@ -1,25 +0,0 @@
---- libbsd-0.6.0.orig/src/flopen.c
-+++ libbsd-0.6.0/src/flopen.c
-_at_@ -32,6 +32,7 @@
- #include <sys/stat.h>
- 
- #include <errno.h>
-+#include <fcntl.h>
- #include <stdarg.h>
- #include <unistd.h>
- #include <libutil.h>
---- libbsd-0.6.0.orig/src/nlist.c
-+++ libbsd-0.6.0/src/nlist.c
-_at_@ -37,10 +37,11 @@
- #include <sys/stat.h>
- #include <sys/file.h>
- #include <arpa/inet.h>
-+#include <linux/a.out.h>
- 
- #include <errno.h>
--#include <a.out.h>
- #include <stdio.h>
-+#include <fcntl.h>
- #include <string.h>
- #include <unistd.h>
- 
diff --git a/main/libbsd/musl-fixes.patch b/main/libbsd/musl-fixes.patch
new file mode 100644
index 0000000..f4f69bb
--- /dev/null
+++ b/main/libbsd/musl-fixes.patch
_at_@ -0,0 +1,31 @@
+--- libbsd-0.7.0.orig/src/flopen.c
++++ libbsd-0.7.0/src/flopen.c
+_at_@ -1,3 +1,4 @@
++#include <fcntl.h>
+ /*-
+  * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+  * All rights reserved.
+--- libbsd-0.7.0.orig/src/funopen.c
++++ libbsd-0.7.0/src/funopen.c
+_at_@ -138,5 +138,4 @@
+ 	return fopencookie(cookiewrap, mode, funcswrap);
+ }
+ #else
+-#error "Function funopen() needs to be ported."
+ #endif
+--- libbsd-0.7.0.orig/src/nlist.c
++++ libbsd-0.7.0/src/nlist.c
+_at_@ -1,3 +1,4 @@
++#include <fcntl.h>
+ /*
+  * Copyright (c) 1989, 1993
+  *	The Regents of the University of California.  All rights reserved.
+_at_@ -39,7 +40,7 @@
+ #include <arpa/inet.h>
+ 
+ #include <errno.h>
+-#include <a.out.h>
++#include <linux/a.out.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
-- 
2.5.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Sep 09 2015 - 09:55:58 GMT