Package: zeroc-ice
Severity: important
Version: 3.3.0-9
Tags: patch
User: [EMAIL PROTECTED]
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD.

It needs following changes:

* alter of debian/rules-*.mk
* extend debian/patches/20-hppa-linux-threads.patch, as the same
  approach is needed for GNU/kFreeBSD
* new debian/patches/20-kfreebsd.patch, GNU/kFreeBSD specific patch

Please find attached patch with all needed changes.

The override in clean target (UNAME=Linux) is because during "make clean" is not applied 20-kfreebsd.patch which also alters config/Make.common.rules.

It would be nice if you can ask upstream
to include changes in 20-kfreebsd.patch.

Thanks in advance

                        Petr
diff -u zeroc-ice-3.3.0/debian/rules-py.mk zeroc-ice-3.3.0/debian/rules-py.mk
--- zeroc-ice-3.3.0/debian/rules-py.mk
+++ zeroc-ice-3.3.0/debian/rules-py.mk
@@ -12,7 +12,6 @@
 debian/stamp-build-py:: DEB_MAKE_INVOKE := $(DEB_MAKE_ENVVARS) make \
        OPTIMIZE=$(OPTIMIZE) \
        LP64=yes lp64suffix= \
-       UNAME=$(shell uname | tr '/' '_') \
        PYTHON_LIBS= \
        LDPLATFORMFLAGS=-g \
        prefix=/usr
@@ -41,7 +40,6 @@
 # The whole python package is only installed once.
 # IcePy module is re-installed for each python version available
 debian/stamp-install-py:: DEB_MAKE_INVOKE := $(DEB_MAKE_ENVVARS) make \
-       UNAME=$(shell uname | tr '/' '_') \
        LP64=yes lp64suffix= \
        PYTHON_LIBS= \
        prefix=$(PY_PREFIX) \
@@ -80,7 +78,7 @@
        dh_pysupport -ppython-zeroc-ice
 
 clean::
-       $(MAKE) -C py clean
+       $(MAKE) -C py clean UNAME=Linux
        $(RM) debian/stamp-build-py debian/stamp-install-py
        -for v in $(shell pyversions -s) ; do \
          if test $$v != $(DEFAULT_PYTHON_VERSION) ; then \
diff -u zeroc-ice-3.3.0/debian/rules-php.mk zeroc-ice-3.3.0/debian/rules-php.mk
--- zeroc-ice-3.3.0/debian/rules-php.mk
+++ zeroc-ice-3.3.0/debian/rules-php.mk
@@ -6,7 +6,6 @@
 debian/stamp-build-php:: DEB_MAKE_INVOKE := $(DEB_MAKE_ENVVARS) make \
        OPTIMIZE=$(OPTIMIZE) \
        LP64=yes lp64suffix= \
-       UNAME=$(shell uname | tr '/' '_') \
        LDPLATFORMFLAGS=-g \
        prefix=/usr
 debian/stamp-build-php:: debian/stamp-build-cpp
@@ -39,5 +38,5 @@
 
 clean::
-       $(MAKE) -C php clean
+       $(MAKE) -C php clean UNAME=Linux
        $(RM) debian/stamp-build-php debian/stamp-install-php
        $(RM) -r php/lib
diff -u zeroc-ice-3.3.0/debian/rules-cs.mk zeroc-ice-3.3.0/debian/rules-cs.mk
--- zeroc-ice-3.3.0/debian/rules-cs.mk
+++ zeroc-ice-3.3.0/debian/rules-cs.mk
@@ -52,7 +52,7 @@
        dh_installdeb
 
 clean::
-       -$(MAKE) -C cs clean 
+       -$(MAKE) -C cs clean UNAME=Linux
        $(RM) debian/stamp-build-cs debian/stamp-install-cs
        -for i in src demo test ; do \
            find cs/$$i -name generated | xargs rm -rf ; \
diff -u zeroc-ice-3.3.0/debian/rules-rb.mk zeroc-ice-3.3.0/debian/rules-rb.mk
--- zeroc-ice-3.3.0/debian/rules-rb.mk
+++ zeroc-ice-3.3.0/debian/rules-rb.mk
@@ -43,3 +43,3 @@
 clean::
-       $(MAKE) -C rb clean
+       $(MAKE) -C rb clean UNAME=Linux
        $(RM) debian/stamp-build-rb debian/stamp-install-rb
diff -u zeroc-ice-3.3.0/debian/rules-cpp.mk zeroc-ice-3.3.0/debian/rules-cpp.mk
--- zeroc-ice-3.3.0/debian/rules-cpp.mk
+++ zeroc-ice-3.3.0/debian/rules-cpp.mk
@@ -23,12 +23,9 @@
 debian/stamp-build-cpp:: DEB_MAKE_INVOKE := $(DEB_MAKE_ENVVARS) make \
        OPTIMIZE=$(OPTIMIZE) \
        LP64=yes lp64suffix= USE_READLINE=yes \
-       UNAME=$(shell uname | tr '/' '_') \
        LDPLATFORMFLAGS=-g \
        prefix=/usr
 debian/stamp-build-cpp::
-       ln -sf Make.rules.Linux cpp/config/Make.rules.GNU_kFreeBSD
-       ln -sf Make.rules.Linux cpp/config/Make.rules.GNU
        -mkdir cpp/bin cpp/lib
        @if test ! -f $@ ; then \
                $(DEB_MAKE_INVOKE) -C cpp all ; \
@@ -37,7 +34,6 @@
        :> $@
 
 debian/stamp-install-cpp:: DEB_MAKE_INVOKE := $(DEB_MAKE_ENVVARS) make \
-       UNAME=$(shell uname | tr '/' '_') \
        LP64=yes lp64suffix= \
        prefix=$(CPP_PREFIX) \
        install_docdir=$(CPP_PREFIX)/share/doc/ice33-slice \
@@ -67,6 +63,4 @@
-       $(MAKE) -C cpp clean
-       $(MAKE) -C cpp/doc clean
+       $(MAKE) -C cpp clean UNAME=Linux
+       $(MAKE) -C cpp/doc clean UNAME=Linux
        $(RM) debian/stamp-build-cpp debian/stamp-install-cpp
        $(RM) -r cpp/lib cpp/bin
-       $(RM) cpp/config/Make.rules.GNU
-       $(RM) cpp/config/Make.rules.GNU_kFreeBSD
diff -u zeroc-ice-3.3.0/debian/rules-java.mk 
zeroc-ice-3.3.0/debian/rules-java.mk
--- zeroc-ice-3.3.0/debian/rules-java.mk
+++ zeroc-ice-3.3.0/debian/rules-java.mk
@@ -45,3 +45,3 @@
 clean::
-       -$(MAKE) -C java clean
+       -$(MAKE) -C java clean UNAME=Linux
        $(RM) debian/stamp-build-java debian/stamp-install-java
diff -u zeroc-ice-3.3.0/debian/patches/20-hppa-linux-threads.patch 
zeroc-ice-3.3.0/debian/patches/20-hppa-linux-threads.patch
--- zeroc-ice-3.3.0/debian/patches/20-hppa-linux-threads.patch
+++ zeroc-ice-3.3.0/debian/patches/20-hppa-linux-threads.patch
@@ -6,7 +6,7 @@
      }
  
 -#if !defined(__hpux) && !defined(__APPLE__)
-+#if !defined(__hppa) && !defined(__APPLE__)
++#if !defined(__hppa) && !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
      rc = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); 
      if(rc != 0)
      {
@@ -18,7 +18,7 @@
              return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + 
tb.millitm * 1000);
          }
 -#elif defined(__hpux) || defined(__APPLE__)
-+#elif defined(__hppa) || defined(__APPLE__)
++#elif defined(__hppa) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
          //
          // HP/MacOS does not support CLOCK_MONOTONIC
          //
only in patch2:
unchanged:
--- zeroc-ice-3.3.0.orig/debian/patches/20-kfreebsd.patch
+++ zeroc-ice-3.3.0/debian/patches/20-kfreebsd.patch
@@ -0,0 +1,46 @@
+only in patch2:
+unchanged:
+--- zeroc-ice-3.3.0.orig/config/Make.common.rules
++++ zeroc-ice-3.3.0/config/Make.common.rules
+@@ -28,6 +28,15 @@
+ UNAME                 := $(shell uname)
+ MACHINE_TYPE          := $(shell uname -m)
+ 
++ifeq ($(UNAME),GNU/kFreeBSD)
++   UNAME := Linux
++endif
++
++ifeq ($(UNAME),GNU)
++   UNAME := Linux
++endif
++
++
+ #
+ # Ensure ice_language has been set by the file that includes this one.
+ #
+only in patch2:
+unchanged:
+--- zeroc-ice-3.3.0.orig/cpp/src/IceSSL/Instance.cpp
++++ zeroc-ice-3.3.0/cpp/src/IceSSL/Instance.cpp
+@@ -69,7 +69,7 @@
+     // On some platforms, pthread_t is a pointer to a per-thread structure.
+     //
+     return reinterpret_cast<unsigned long>(pthread_self());
+-#elif (defined(__linux) || defined(__sun) || defined(__hpux)) || defined(_AIX)
++#elif (defined(__linux) || defined(__sun) || defined(__hpux)) || 
defined(_AIX)  || defined(__GLIBC__) 
+     //
+     // On Linux, Solaris, HP-UX and AIX, pthread_t is an integer.
+     //
+only in patch2:
+unchanged:
+--- zeroc-ice-3.3.0.orig/py/makebindist.py
++++ zeroc-ice-3.3.0/py/makebindist.py
+@@ -87,7 +87,7 @@
+ platform = ""
+ if sys.platform.startswith("win") or sys.platform.startswith("cygwin"):
+     platform = "win32"
+-elif sys.platform.startswith("linux"):
++elif sys.platform.startswith("linux") or 
sys.platform.startswith("gnukfreebsd"):
+     platform = "linux"
+ elif sys.platform.startswith("sunos"):
+     platform = "solaris"

Reply via email to