Package: plplot
Severity: important
Version: 5.9.0-8
Tags: patch
User: [EMAIL PROTECTED]
Usertags: kfreebsd
Hi,

the current version fails to build on GNU/kFreeBSD.

It needs a small fixup for cmake/modules/xwin.cmake
for both kfreebsd-i386 and kfreebsd-amd64.
Moreover, kfreebsd-amd64 does not have yet gnat,
it have to be treated as other architectures without gnat.

Please find attached patch with both changes.

It would also be nice if you can ask upstream
to include similar change for cmake/modules/xwin.cmake.
Another posibility is to define _GNU_SOURCE in include/plplotP.h as show bellow and use PTHREAD_MUTEX_RECURSIVE everywhere. The _GNU_SOURCE is not enabled by default despite claim in comment in include/plplotP.h.

Thanks in advance

                        Petr


#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
#define _GNU_SOURCE 1
#endif
only in patch2:
unchanged:
--- plplot-5.9.0.orig/cmake/modules/xwin.cmake
+++ plplot-5.9.0/cmake/modules/xwin.cmake
@@ -43,6 +43,8 @@
         set(xwin_LINK_FLAGS ${xwin_LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT})
        if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
          set(PLPLOT_MUTEX_RECURSIVE "PTHREAD_MUTEX_RECURSIVE_NP")
+       elseif(CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
+         set(PLPLOT_MUTEX_RECURSIVE "PTHREAD_MUTEX_RECURSIVE_NP")
        else(CMAKE_SYSTEM_NAME STREQUAL "Linux")
          set(PLPLOT_MUTEX_RECURSIVE "PTHREAD_MUTEX_RECURSIVE")
        endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff -u plplot-5.9.0/debian/rules plplot-5.9.0/debian/rules
--- plplot-5.9.0/debian/rules
+++ plplot-5.9.0/debian/rules
@@ -35,7 +35,7 @@
 # Disable java and ada build on arm - problems with java-gcj-compat-dev
 # at the moment. Also gnat not available on arm, mips, and mipsel.
 
-ifneq (,$(findstring :$(DEB_BUILD_ARCH):,:alpha:arm:armeb:armel:mips:mipsel:))
+ifneq (,$(findstring 
:$(DEB_BUILD_ARCH):,:alpha:arm:armeb:armel:mips:mipsel:kfreebsd-amd64:))
 BUILD_ADA = no
 else
 BUILD_ADA = yes
diff -u plplot-5.9.0/debian/control.in plplot-5.9.0/debian/control.in
--- plplot-5.9.0/debian/control.in
+++ plplot-5.9.0/debian/control.in
@@ -14,7 +14,7 @@
  python-gtk2-dev, libwxgtk2.6-dev, python-gnome2-dev,
  python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6),
  python-numpy (>= 1.0.4-4), ttf-freefont, default-jdk-builddep [!alpha !arm 
!hppa !hurd-i386],
- fastjar, swig, gnat [!alpha !arm !armeb !armel !mips !mipsel]
+ fastjar, swig, gnat [!alpha !arm !armeb !armel !mips !mipsel !kfreebsd-amd64]
 Build-Depends-Indep: docbook-xml, docbook, docbook-dsssl, docbook-xsl,
  docbook2x, opensp, jadetex
 Build-Conflicts: libplplot5,  octave2.1-headers

Reply via email to