tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patches for NetBSD-4



EF> Nevertheless, I have a bunch of pkgsrc patches to make certain packages 
EF> build/run on 4.0.1.
It looks like it's only four of them, really.

GT> The tricky issue is the tradeoff between management burden and useful.
GT> If the patches aren't that crufty (meaning they are smallish and good
GT> hygiene for the upstream anyway, or likely to help on other systems),
GT> then I wouldn't object to adding them.
They are rather small. I will paste them below and comment what I 
think/remember of them.

GT> You could put up a tarball that is usable with LOCALPATCHES.
Since that tarball is exactly what I have anyway, I will attach it.

GT> That would allow integration into pkgsrc, too.
Yes, but someone would have to check how they influence other systems.

devel/glib2/unpcbid:
4.x lacks struct unpcbid. Just add it inline. Not very elegant.
--- gio/gcredentials.c.orig	2014-07-31 15:36:53.000000000 +0200
+++ gio/gcredentials.c	2015-01-27 18:05:21.000000000 +0100
@@ -88,7 +88,16 @@
 #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
   struct cmsgcred native;
 #elif G_CREDENTIALS_USE_NETBSD_UNPCBID
+#include <sys/param.h> /* __NetBSD_Version__ */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 499002900	/* NetBSD 4.99.29 */
+  struct /* unpcbid */ {
+        pid_t unp_pid;          /* process id */
+        uid_t unp_euid;         /* effective user id */
+        gid_t unp_egid;         /* effective group id */
+  } native;
+#else
   struct unpcbid native;
+#endif
 #elif G_CREDENTIALS_USE_OPENBSD_SOCKPEERCRED
   struct sockpeercred native;
 #elif G_CREDENTIALS_USE_SOLARIS_UCRED

devel/p5-Curses/keypad:
I don't remember. I guess keypad() returning void, not int as documented.
--- CursesFun.c.orig	2014-04-22 17:49:36.000000000 +0200
+++ CursesFun.c	2014-04-22 17:52:07.000000000 +0200
@@ -1538,7 +1538,7 @@
     WINDOW *win = c_win ? c_sv2window(ST(0), 0) : stdscr;
     int c_mret  = c_x ? c_domove(win, ST(c_x-1), ST(c_x)) : OK;
     bool    bf  = (int)SvIV(ST(c_arg));
-    int ret = c_mret == ERR ? ERR : keypad(win, bf);
+    int ret = c_mret == ERR ? ERR : (keypad(win, bf), OK);
     
     ST(0) = sv_newmortal();
     sv_setiv(ST(0), (IV)ret);

devel/lua-posix/nb4:
Missing RLIMIT_AS.
--- ext/posix/posix.c.orig	2014-02-06 12:31:15.000000000 +0100
+++ ext/posix/posix.c	2014-02-06 12:28:12.000000000 +0100
@@ -14,6 +14,7 @@
 
 #include <config.h>
 
+#define _NETBSD_SOURCE
 #include <ctype.h>
 #include <dirent.h>
 #include <errno.h>
@@ -2643,8 +2644,7 @@
 	MENTRY( _DATA   ) \
 	MENTRY( _FSIZE  ) \
 	MENTRY( _NOFILE ) \
-	MENTRY( _STACK  ) \
-	MENTRY( _AS     )
+	MENTRY( _STACK  )
 
 static const int Krlimit[] =
 {

www/squid3/sockaddr_un:
<sys/un.h> needs uint8_t from <sys/types.h>.
Unpatched, the configure test for sockaddr_un presence fails, causing havoc
elsewhere.
No idea how this affects other platforms.
--- configure.orig	2014-12-09 17:28:58.000000000 +0100
+++ configure	2015-01-27 19:34:45.000000000 +0100
@@ -32055,6 +32055,7 @@
 
 
 ac_fn_cxx_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "
+  #include <sys/types.h>
   #if HAVE_SYS_UN_H
   #include <sys/un.h>
   #endif

I gave up on databases/openldap-server since it needs posix_memalign() and the 
code in liblmdb in that area was completely re-factored in
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commitdiff;h=4009c9ae65144e3da5879477ba8696908593c26a

Attachment: pkgsrc-nb4.tar.gz
Description: application/tar-gz



Home | Main Index | Thread Index | Old Index