[Pkg-gridengine-commits] [pkg-gridengine] 01/01: WIP: Improve kFreeBSD support

Afif Elghraoui afif at moszumanska.debian.org
Sat Sep 3 20:23:47 UTC 2016


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

afif pushed a commit to branch debian/experimental
in repository pkg-gridengine.

commit fa0d5152fede9c7aa5717cb90f739441c9ac3109
Author: Afif Elghraoui <afif at debian.org>
Date:   Sat Sep 3 12:59:50 2016 -0700

    WIP: Improve kFreeBSD support
---
 debian/control                |   1 +
 debian/patches/kFreeBSD.patch | 148 ++++++++++++++++++++++++++++++++++++++++--
 debian/rules                  |   2 +
 3 files changed, 144 insertions(+), 7 deletions(-)

diff --git a/debian/control b/debian/control
index 080e133..1a9e4cb 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Build-Depends:
 	libmotif-dev,
 	libxpm-dev,
 	libxmu-dev,
+	libkvm-dev [kfreebsd-any],
 	po-debconf,
 	default-jdk,
 	ant,
diff --git a/debian/patches/kFreeBSD.patch b/debian/patches/kFreeBSD.patch
index a3381af..bca25c3 100644
--- a/debian/patches/kFreeBSD.patch
+++ b/debian/patches/kFreeBSD.patch
@@ -4,15 +4,27 @@ Author: Afif Elghraoui <afif at debian.org>
 Forwarded: no
 Bug-Debian: https://bugs.debian.org/828875
 Last-Update: 2016-08-29
+Index: pkg-gridengine/source/dist/util/arch
+===================================================================
 --- pkg-gridengine.orig/source/dist/util/arch
 +++ pkg-gridengine/source/dist/util/arch
-@@ -130,8 +130,16 @@
+@@ -130,8 +130,27 @@ Darwin)
        ARCH=darwin-$darwin_machine
     fi
     ;;
--FreeBSD|DragonFly)
++GNU/kFreeBSD)
++   case $osmachine in
++      x86_64)
++         gnumachine=amd64
++         ;;
++      *)
++         gnumachine=$osmachine
++         ;;
++   esac
++   ARCH=gnukfbsd-$gnumachine
++   ;;
+ FreeBSD|DragonFly)
 -   ARCH=fbsd-$osmachine
-+GNU/kFreeBSD|FreeBSD|DragonFly)
 +   case $osmachine in
 +	x86_64)
 +	    fbsdmachine=amd64
@@ -25,9 +37,45 @@ Last-Update: 2016-08-29
     ;;
  NetBSD)
      osprocessor="`$UNAME -p`"
+Index: pkg-gridengine/source/aimk
+===================================================================
 --- pkg-gridengine.orig/source/aimk
 +++ pkg-gridengine/source/aimk
-@@ -1990,7 +1990,10 @@
+@@ -1386,6 +1386,8 @@ case HP1164:
+    endif
+    breaksw
+    
++case GNU*:
++   set GNU = -ULINUX
+ case LINUX*:
+    set MAKEWINGRIDLIB   = 0
+    set MAKEWINGRIDAPP   = 0
+@@ -1434,7 +1436,7 @@ case LINUX*:
+ #       set CFLAGS = "$CFLAGS -Wno-strict-aliasing -U_FORTIFY_SOURCE"
+ #    endif
+ 
+-   set CFLAGS = "$OFLAG -Wstrict-prototypes -DLINUX -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 $DEBUG_FLAG $CFLAGS"
++   set CFLAGS = "$OFLAG -Wstrict-prototypes -DLINUX $GNU -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 $DEBUG_FLAG $CFLAGS"
+ 
+    if ("$ADOC" == 1) then
+       set CFLAGS = "$CFLAGS -Wno-error"
+@@ -1924,6 +1926,7 @@ if ( $JNI == 1 ) then
+          case sol-x86:
+          case usol-x86:
+          case obsd-i386:
++         case gnukfbsd-i386:
+              set JAVA_LIB_ARCH = i386
+              breaksw
+          case sol-sparc64:
+@@ -1941,6 +1944,7 @@ if ( $JNI == 1 ) then
+          case lx-amd64:
+          case ulx-amd64:
+          case sol-amd64:
++         case gnukfbsd-amd64:
+              if ($FORCE_32BIT == 1) then
+                 set JAVA_LIB_ARCH = i386
+              else
+@@ -1990,7 +1994,10 @@ if ( $JNI == 1 ) then
               set JAVA_LIB_ARCH = PA_RISC2.0W
               breaksw
           case fbsd-i386:
@@ -39,13 +87,99 @@ Last-Update: 2016-08-29
               breaksw
           case irix65:
           case darwin-*:
+Index: pkg-gridengine/source/libs/uti2/util.h
+===================================================================
 --- pkg-gridengine.orig/source/libs/uti2/util.h
 +++ pkg-gridengine/source/libs/uti2/util.h
-@@ -7,6 +7,7 @@
+@@ -6,10 +6,14 @@ char *file_getvalue(char *buffer, int lb
+ void sge_running_as_admin_user(bool *error, bool *isadmin);
  bool file_exists(const char *file);
  /* fixme: extend, in the absence of autoconf */
++#define HAVE_STRSIGNAL 1
++/*
  #define HAVE_STRSIGNAL (__linux__ || __sun || __sun__ || __NetBSD__ || \
-+                        __FreeBSD_kernel__ || \
-                         __FreeBSD__ || __OpenBSD__ || __DragonFly__)
+-                        __FreeBSD__ || __OpenBSD__ || __DragonFly__)
++                        __FreeBSD__ || __FreeBSD_kernel__ || __OpenBSD__ || __DragonFly__)
++*/
  #if !HAVE_STRSIGNAL
  char *strsignal(int sig);
+ #endif
++
+ bool copy_linewise(const char *src, const char *dst);
+ #endif
+Index: pkg-gridengine/source/scripts/compilearch
+===================================================================
+--- pkg-gridengine.orig/source/scripts/compilearch
++++ pkg-gridengine/source/scripts/compilearch
+@@ -136,6 +136,16 @@ case $buildarch in
+    fbsd-sparc64)
+       BUILDARCH=FREEBSD_SPARC64
+       ;;
++   gnukfbsd-amd64)
++      BUILDARCH=GNU
++      COMPILE_ARCH=FREEBSD
++      TARGET_BITS=TARGET_64BIT
++      ;;
++   gnukfbsd-i386)
++      BUILDARCH=GNU
++      COMPILE_ARCH=FREEBSD
++      TARGET_BITS=TARGET_32BIT
++      ;;
+    hp11)
+       BUILDARCH=HP11
+       TARGET_BITS=TARGET_32BIT
+@@ -367,4 +377,3 @@ case "$option" in
+     echo "invalid option $option"
+     exit 1;;
+ esac
+-
+Index: pkg-gridengine/source/libs/uti/sge_unistd.h
+===================================================================
+--- pkg-gridengine.orig/source/libs/uti/sge_unistd.h
++++ pkg-gridengine/source/libs/uti/sge_unistd.h
+@@ -73,7 +73,7 @@
+ #define SGE_SEEKDIR(directory, offset) seekdir(directory, offset)
+ #define SGE_STRUCT_DIRENT struct dirent
+ 
+-#if defined(SOLARIS) || defined(__hpux) || defined(LINUX) || defined(AIX) || defined(DARWIN)
++#if defined(SOLARIS) || defined(__hpux) || defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(DARWIN)
+ #   define SETPGRP setpgrp()
+ #elif defined(__sgi)
+ #   define SETPGRP BSDsetpgrp(getpid(),getpid())
+Index: pkg-gridengine/source/clients/common/sge_client_ijs.c
+===================================================================
+--- pkg-gridengine.orig/source/clients/common/sge_client_ijs.c
++++ pkg-gridengine/source/clients/common/sge_client_ijs.c
+@@ -49,6 +49,7 @@
+ #elif defined(FREEBSD) || defined(NETBSD)
+ #  include <termios.h>
+ #  include <sys/ioctl.h>
++#  include <sys/ttycom.h>
+ #else
+ #  include <termio.h>
+ #endif
+@@ -989,4 +990,3 @@ int force_ijs_server_shutdown(COMM_HANDL
+ 
+    DRETURN(ret);
+ }
+-
+Index: pkg-gridengine/source/common/sge_ijs_comm.h
+===================================================================
+--- pkg-gridengine.orig/source/common/sge_ijs_comm.h
++++ pkg-gridengine/source/common/sge_ijs_comm.h
+@@ -37,6 +37,10 @@
+ #include "comm/cl_commlib.h"
+ #include "comm/cl_connection_list.h"
+ 
++#if defined(FREEBSD)
++#  include <sys/ttycom.h>
++#endif
++
+ #define BUFSIZE              64*1024
+ #define COMM_HANDLE cl_com_handle_t
+ 
+@@ -142,4 +146,3 @@ int check_client_alive(COMM_HANDLE *hand
+                        const char *component_name,
+                        char *hostname,
+                        dstring *err_msg);
+-
diff --git a/debian/rules b/debian/rules
index 8b6088e..256c536 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,6 +62,8 @@ override_dh_auto_clean:
 # aimk clean doesn't DTRT
 	cd source && rm -rf CLASSES JAVADOCS MANSBUILD_* dist/qmon/Qmon
 	find source -type d -name "LINUX*" -print0 | xargs --null rm -rf
+	find source -type d -name "FREEBSD*" -print0 | xargs --null rm -rf
+	find source -type d -name "GNU" -print0 | xargs --null rm -rf
 	find source -type d -name "build" -print0 | xargs --null rm -rf
 	find source -name "*_dependencies" -print0 | xargs --null rm -f
 	for t in common exec master client qmon; do \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gridengine/pkg-gridengine.git



More information about the Pkg-gridengine-commits mailing list