[Pkg-fedora-ds-maintainers] [389-admin] 02/03: Add support-kfreebsd.patch to fix the kFreeBSD build failure.

Benjamin Drung bdrung at moszumanska.debian.org
Thu Sep 4 10:29:03 UTC 2014


This is an automated email from the git hooks/post-receive script.

bdrung pushed a commit to branch master
in repository 389-admin.

commit eee436aac002fb24ca0e082943cea70de95c8c01
Author: Benjamin Drung <benjamin.drung at profitbricks.com>
Date:   Thu Sep 4 12:22:06 2014 +0200

    Add support-kfreebsd.patch to fix the kFreeBSD build failure.
---
 debian/patches/series                 |  1 +
 debian/patches/support-kfreebsd.patch | 56 +++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 23c26c0..ef1fd04 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ man_page_fixes
 http_conf_fix
 fix-linking.patch
 fix-script-name-cgi.patch
+support-kfreebsd.patch
diff --git a/debian/patches/support-kfreebsd.patch b/debian/patches/support-kfreebsd.patch
new file mode 100644
index 0000000..b008ff0
--- /dev/null
+++ b/debian/patches/support-kfreebsd.patch
@@ -0,0 +1,56 @@
+Description: Add support for kFreeBSD
+ The configure script should check for available features of the host instead
+ of assuming that specific hosts (e.g. Linux) have specific features.
+ .
+ This patch hacks the configure script and various source files to behave
+ on kFreeBSD similar to Linux.
+Author: Benjamin Drung <benjamin.drung at profitbricks.com>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -154,6 +154,12 @@
+     platform="linux"
+     initdir='$(sysconfdir)/rc.d/init.d'
+ 	;;
++  *-*-kfreebsd*)
++    AC_DEFINE([XP_UNIX], [1], [UNIX])
++    AC_DEFINE([FREEBSD], [1], [FreeBSD])
++    platform="freebsd"
++    initdir='$(sysconfdir)/rc.d/init.d'
++    ;;
+   ia64-hp-hpux*)
+     AC_DEFINE([XP_UNIX], [1], [UNIX])
+     AC_DEFINE([hpux], [1], [HP-UX])
+--- a/include/base/systems.h
++++ b/include/base/systems.h
+@@ -157,7 +157,7 @@
+ #define SHMEM_MMAP_FLAGS MAP_SHARED
+ #define THROW_HACK throw()
+ 
+-#elif defined(LINUX)
++#elif defined(LINUX) || defined(FREEBSD)
+ 
+ #define ACCELERATOR_CACHE
+ #define AUTH_DBM
+--- a/include/public/base/systems.h
++++ b/include/public/base/systems.h
+@@ -75,7 +75,7 @@
+ #define SHMEM_UNIX_MMAP
+ #define ZERO(ptr,len) memset(ptr,0,len)
+ 
+-#elif defined(LINUX)
++#elif defined(LINUX) || defined(FREEBSD)
+ 
+ #define FILE_UNIX
+ #define FILE_UNIX_MMAP
+--- a/lib/base/nscputil.cpp
++++ b/lib/base/nscputil.cpp
+@@ -1150,7 +1150,7 @@
+      */
+     if ( (size_t)-1 == iconv( convdesc, NULL, NULL,
+         &curoutbuf, &outbytesleft ) /* initial shift seq. */
+-#ifdef LINUX
++#if defined(LINUX) || defined(FREEBSD)
+          || (size_t)-1 == iconv( convdesc, (char **)&src, &inbytesleft,
+         &curoutbuf, &outbytesleft )     /* convert our chars. */
+ #else

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-fedora-ds/389-admin.git



More information about the Pkg-fedora-ds-maintainers mailing list