Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4726f810ee14
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f183ad6c8ff6
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 13, 2017

  1. libtiger: fix on darwin

    (cherry picked from commit 5882cc2)
    matthewbauer authored and LnL7 committed Nov 13, 2017
    Copy the full SHA
    a656bcb View commit details
  2. libtiger: add myself as maintainer

    (cherry picked from commit d19494c)
    matthewbauer authored and LnL7 committed Nov 13, 2017
    Copy the full SHA
    6c4da26 View commit details
  3. libbsd: update darwin patch for 0.8.6

    This resolves the patch issues. If someone has time, they should try to get the
    patched merged upstream.
    
    (cherry picked from commit ff0ac72)
    matthewbauer authored and LnL7 committed Nov 13, 2017
    Copy the full SHA
    77a4b3e View commit details
  4. libbsd: add myself as maintainer

    (cherry picked from commit 6b0e191)
    matthewbauer authored and LnL7 committed Nov 13, 2017
    Copy the full SHA
    f183ad6 View commit details
Showing with 57 additions and 50 deletions.
  1. +50 −47 pkgs/development/libraries/libbsd/darwin.patch
  2. +1 −0 pkgs/development/libraries/libbsd/default.nix
  3. +6 −3 pkgs/development/libraries/libtiger/default.nix
97 changes: 50 additions & 47 deletions pkgs/development/libraries/libbsd/darwin.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
diff --git a/configure.ac b/configure.ac
index 5a432d4..a69ae0b 100644
index c909878..60c540e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,7 @@ AS_CASE([$host_os],
@@ -59,7 +59,7 @@ AS_CASE([$host_os],
)

# Checks for header files.
-AC_CHECK_HEADERS([sys/ndir.h sys/dir.h ndir.h dirent.h])
+AC_CHECK_HEADERS([sys/ndir.h sys/dir.h ndir.h dirent.h stdio_ext.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
@@ -143,6 +143,31 @@ AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \
AC_C_INLINE
@@ -146,6 +146,31 @@ AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \
pstat_getproc sysconf])
AM_CONDITIONAL(HAVE_GETENTROPY, [test "x$ac_cv_func_getentropy" = "xtrue"])
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xtrue"])

+HostOS=`echo "$host" | sed 's/.*-//'`
+os_is_macosx=false
@@ -31,7 +31,7 @@ index 5a432d4..a69ae0b 100644
+ os_is_macosx=false
+ nonLinuxOS=false
+ ;;
+esac
+esac
+AM_CONDITIONAL([IS_DARWIN], [test x$os_is_macosx = xtrue])
+AM_COND_IF([IS_DARWIN],
+ [AC_DEFINE([IS_DARWIN], [1], [Get HostOS Type is Darwin])])
@@ -44,12 +44,12 @@ index 5a432d4..a69ae0b 100644
Makefile
include/Makefile
diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
index ebb6160..ce882bf 100644
index 45b3b15..d0d4043 100644
--- a/include/bsd/libutil.h
+++ b/include/bsd/libutil.h
@@ -39,7 +39,9 @@
#ifndef _LIBUTIL_H_
#define _LIBUTIL_H_
#ifndef LIBBSD_LIBUTIL_H
#define LIBBSD_LIBUTIL_H

+#ifdef HAVE_FEATURES_H
#include <features.h>
@@ -58,20 +58,20 @@ index ebb6160..ce882bf 100644
#include <sys/types.h>
#include <stdint.h>
diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
index 7697425..ef34c4f 100644
index 4b69983..8e2ac75 100644
--- a/include/bsd/stdio.h
+++ b/include/bsd/stdio.h
@@ -44,12 +44,16 @@
@@ -48,12 +48,16 @@
__BEGIN_DECLS
const char *fmtcheck(const char *, const char *);

+#if !defined(darwin) && !defined(__APPLE__) && !defined(MACOSX)
/* XXX: The function requires cooperation from the system libc to store the
* line buffer in the FILE struct itself. */
char *fgetln(FILE *fp, size_t *lenp)
__attribute__((deprecated("This functions cannot be safely ported, "
"use getline(3) instead, as it is supported "
"by GNU and POSIX.1-2008.")));
LIBBSD_DEPRECATED("This functions cannot be safely ported, "
"use getline(3) instead, as it is supported "
"by GNU and POSIX.1-2008.");
+#else
+char *fgetln(FILE *fp, size_t *lenp);
+#endif
@@ -519,17 +519,18 @@ index 462535a..e7eb46f 100644
+}
#endif
diff --git a/src/funopen.c b/src/funopen.c
index 7d6ae31..9963162 100644
index 1e05c7e..ed8ce85 100644
--- a/src/funopen.c
+++ b/src/funopen.c
@@ -137,6 +137,7 @@ funopen(const void *cookie,
@@ -137,7 +137,7 @@ funopen(const void *cookie,

return fopencookie(cookiewrap, mode, funcswrap);
}
+#elif defined(darwin) || defined(__APPLE__) || defined(MACOSX)
#else
#error "Function funopen() needs to be ported."
#endif
-#elif defined(__MUSL__)
+#elif defined(__MUSL__) || defined(darwin) || defined(__APPLE__) || defined(MACOSX)
/*
* This is unimplementable on musl based systems, and upstream has stated
* they will not add the needed support to implement it. Just ignore this
diff --git a/src/getentropy.c b/src/getentropy.c
index 3f11a1e..8a23a07 100644
--- a/src/getentropy.c
@@ -562,13 +563,13 @@ index 4f368a1..ab22fc1 100644
#define SHA512_DIGEST_LENGTH 64

diff --git a/src/hash/sha512c.c b/src/hash/sha512c.c
index c2a93be..f69013d 100644
index b3c8d5e..4fade0f 100644
--- a/src/hash/sha512c.c
+++ b/src/hash/sha512c.c
@@ -27,7 +27,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -25,7 +25,11 @@
*/

#include <sys/cdefs.h>
+#if defined(darwin) || defined(__APPLE__) || defined(MACOSX)
+#include <machine/endian.h>
+#else
@@ -578,24 +579,26 @@ index c2a93be..f69013d 100644

#include <string.h>
diff --git a/src/nlist.c b/src/nlist.c
index 0cffe55..f785b61 100644
index 0932f59..a3ba2be 100644
--- a/src/nlist.c
+++ b/src/nlist.c
@@ -27,6 +27,7 @@
@@ -27,6 +27,8 @@
* SUCH DAMAGE.
*/

+#if !defined(darwin) && !defined(__APPLE__) && !defined(MACOSX)
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
@@ -409,3 +410,4 @@ elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum)
nl->n_type |= N_EXT;
+
#include <sys/cdefs.h>

#include <sys/param.h>
@@ -265,3 +267,5 @@ nlist(const char *name, struct nlist *list)
(void)close(fd);
return (n);
}
#endif /* _NLIST_DO_ELF */
+
+#endif
diff --git a/src/setproctitle.c b/src/setproctitle.c
index c18c61c..b1b1591 100644
index 038ac7d..d0ef01b 100644
--- a/src/setproctitle.c
+++ b/src/setproctitle.c
@@ -32,6 +32,11 @@
@@ -626,42 +629,42 @@ index c18c61c..b1b1591 100644
void setproctitle_stub(const char *fmt, ...)
__attribute__((alias("setproctitle_impl")));
diff --git a/src/strlcat.c b/src/strlcat.c
index 21c8afb..e036132 100644
index 14c53a1..e01cb60 100644
--- a/src/strlcat.c
+++ b/src/strlcat.c
@@ -27,7 +27,11 @@
* If retval >= siz, truncation occurred.
* If retval >= dsize, truncation occurred.
*/
size_t
+#if defined(darwin) || defined(__APPLE__) || defined(MACOSX)
+bsd_strlcat(char *dst, const char *src, size_t siz)
+bsd_strlcat(char *dst, const char *src, size_t dsize)
+#else
strlcat(char *dst, const char *src, size_t siz)
strlcat(char *dst, const char *src, size_t dsize)
+#endif
{
char *d = dst;
const char *s = src;
const char *odst = dst;
const char *osrc = src;
diff --git a/src/strlcpy.c b/src/strlcpy.c
index 1719d35..c63591d 100644
index e9a7fe4..10a855f 100644
--- a/src/strlcpy.c
+++ b/src/strlcpy.c
@@ -25,7 +25,11 @@
* Returns strlen(src); if retval >= siz, truncation occurred.
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t
+#if defined(darwin) || defined(__APPLE__) || defined(MACOSX)
+bsd_strlcpy(char *dst, const char *src, size_t siz)
+bsd_strlcpy(char *dst, const char *src, size_t dsize)
+#else
strlcpy(char *dst, const char *src, size_t siz)
strlcpy(char *dst, const char *src, size_t dsize)
+#endif
{
char *d = dst;
const char *s = src;
const char *osrc = src;
size_t nleft = dsize;
diff --git a/src/strmode.c b/src/strmode.c
index 8d825ae..c1b5f8d 100644
index e6afde5..c463243 100644
--- a/src/strmode.c
+++ b/src/strmode.c
@@ -37,7 +37,11 @@ static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
@@ -33,7 +33,11 @@
#include <string.h>

void
1 change: 1 addition & 0 deletions pkgs/development/libraries/libbsd/default.nix
Original file line number Diff line number Diff line change
@@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
homepage = https://libbsd.freedesktop.org/;
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainer; [ matthewbauer ];
};
}
9 changes: 6 additions & 3 deletions pkgs/development/libraries/libtiger/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libkate, pango, cairo, pkgconfig }:
{ stdenv, lib, fetchurl, libkate, pango, cairo, pkgconfig, darwin }:

stdenv.mkDerivation rec {
name = "libtiger-0.3.4";
@@ -8,11 +8,14 @@ stdenv.mkDerivation rec {
sha256 = "0rj1bmr9kngrgbxrjbn4f4f9pww0wmf6viflinq7ava7zdav4hkk";
};

buildInputs = [ libkate pango cairo pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libkate pango cairo ]
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.ApplicationServices;

meta = {
homepage = http://code.google.com/p/libtiger/;
description = "A rendering library for Kate streams using Pango and Cairo";
platforms = stdenv.lib.platforms.unix;
platforms = lib.platforms.unix;
maintainers = with lib; [ matthewbauer ];
};
}