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

Bug#710320: gambas3: kfreebsd support



Package: gambas3
Version: 3.1.1-2
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Severity: wishlist

Hi,

The attached patches allow gambas3 to build on GNU/kFreeBSD (aside from
bug #701393).  These have been tested on kfreebsd-amd64 and result in a
successful build of the full set of binary packages.

I created a new 'OS_GNU' system type for this because neither OS_LINUX
or OS_FREEBSD were quite suitable.  This system type may be suitable for
GNU/Hurd as well, but there were still other issues preventing gambas3
from building yet on hurd-i386.

In order for the gb.v4l component to build, I had to add a missing
Build-Depends on libv4l-dev [kfreebsd-any] (please see
debian-control.patch).  And I reversed the logic of two FreeBSD-specific
vs. Linux-specific ifdefs for better compatibility.

-- System Information:
Debian Release: 7.0
  APT prefers stable
  APT policy: (500, 'stable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64-xenhvm
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- gambas3-3.1.1.orig/debian/control	2012-05-24 11:25:53.000000000 +0000
+++ gambas3-3.1.1/debian/control	2013-05-29 16:40:40.175796014 +0000
@@ -4,7 +4,7 @@
 Homepage: http://gambas.sourceforge.net
 Maintainer: Gambas Debian Maintainers <pkg-gambas-devel@lists.alioth.debian.org> 
 Uploaders: Ian Haywood <ian@haywood.id.au>, David Paleino <dapal@debian.org>, José L. Redrejo Rodríguez <jredrejo@debian.org>
-Build-Depends: debhelper (>> 7), dh-autoreconf, libpq-dev, libv4l-dev [linux-any], libcam-dev [kfreebsd-any], libmysqlclient-dev, libbz2-dev, libglew-dev, libqt4-dev, libqt4-opengl-dev, libcurl4-openssl-dev, libsdl-mixer1.2-dev, libsqlite0-dev, libxml2-dev, libxslt1-dev, kdelibs5-dev, libssl-dev, zlib1g-dev, unixodbc-dev, libsqlite3-dev, libgtk2.0-dev, libxt-dev, pkg-config, mesa-common-dev, libsdl-sound1.2-dev, libsdl-image1.2-dev, libsdl-gfx1.2-dev, libsdl-ttf2.0-dev, libpcre3-dev, libsdl1.2-dev, libjpeg-dev, libpng12-dev, libpoppler-private-dev, libimlib2-dev, librsvg2-dev, bzip2, gettext, libxtst-dev, libffi-dev, libdbus-1-dev, libgnome-keyring-dev, libgtkglext1-dev, linux-libc-dev [linux-any], libc0.1 [kfreebsd-any], libqtwebkit-dev
+Build-Depends: debhelper (>> 7), dh-autoreconf, libpq-dev, libv4l-dev [linux-any], libv4l-dev [kfreebsd-any], libcam-dev [kfreebsd-any], libmysqlclient-dev, libbz2-dev, libglew-dev, libqt4-dev, libqt4-opengl-dev, libcurl4-openssl-dev, libsdl-mixer1.2-dev, libsqlite0-dev, libxml2-dev, libxslt1-dev, kdelibs5-dev, libssl-dev, zlib1g-dev, unixodbc-dev, libsqlite3-dev, libgtk2.0-dev, libxt-dev, pkg-config, mesa-common-dev, libsdl-sound1.2-dev, libsdl-image1.2-dev, libsdl-gfx1.2-dev, libsdl-ttf2.0-dev, libpcre3-dev, libsdl1.2-dev, libjpeg-dev, libpng12-dev, libpoppler-private-dev, libimlib2-dev, librsvg2-dev, bzip2, gettext, libxtst-dev, libffi-dev, libdbus-1-dev, libgnome-keyring-dev, libgtkglext1-dev, linux-libc-dev [linux-any], libc0.1 [kfreebsd-any], libqtwebkit-dev
 Standards-Version: 3.9.3
 
 Package: gambas3
Index: gambas3-3.1.1/acinclude.m4
===================================================================
--- gambas3-3.1.1.orig/acinclude.m4	2013-05-29 15:10:17.000000000 +0000
+++ gambas3-3.1.1/acinclude.m4	2013-05-29 15:59:18.643725997 +0000
@@ -505,6 +505,17 @@
       AC_DEFINE(OS_SOLARIS, 1, [Target system is Solaris])
       AC_DEFINE(SYSTEM, "Solaris", [Operating system])
       ;;
+    *-*-k*bsd*-gnu )
+      SYSTEM=GNU
+      AC_DEFINE(OS_GNU, 1, [Target system is of GNU family])
+      AC_DEFINE(OS_BSD, 1, [Target system is of BSD family])
+      AC_DEFINE(SYSTEM, "GNU/kFreeBSD", [Operating system])
+      ;;
+    *-*-gnu* )
+      SYSTEM=GNU
+      AC_DEFINE(OS_GNU, 1, [Target system is of GNU family])
+      AC_DEFINE(SYSTEM, "GNU", [Operating system])
+      ;;
     *)
       SYSTEM=UNKNOWN
       AC_DEFINE(SYSTEM, "unknown", [Operating system])
Index: gambas3-3.1.1/main/gbc/gbi.c
===================================================================
--- gambas3-3.1.1.orig/main/gbc/gbi.c	2012-05-09 12:32:25.000000000 +0000
+++ gambas3-3.1.1/main/gbc/gbi.c	2013-05-29 15:47:50.313789067 +0000
@@ -42,7 +42,7 @@
 
 #include <dlfcn.h>
 
-#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_CYGWIN)
+#if defined(OS_LINUX) || defined(OS_GNU) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_CYGWIN)
 	#define lt_dlinit() (0)
 	#define lt_dlhandle void *
 	#define lt_dlopenext(_path) dlopen(_path, RTLD_LAZY)
Index: gambas3-3.1.1/gb.v4l/src/CWebcam.h
===================================================================
--- gambas3-3.1.1.orig/gb.v4l/src/CWebcam.h	2012-05-09 12:32:25.000000000 +0000
+++ gambas3-3.1.1/gb.v4l/src/CWebcam.h	2013-05-29 16:53:17.031802491 +0000
@@ -31,11 +31,11 @@
 #include <linux/videodev2.h>
 #include <libv4lconvert.h>
 
-#ifdef OS_FREEBSD
-  #include <linux/videodev.h>
-#else
+#ifdef OS_LINUX
   #include <linux/types.h>
   #include "videodev.h"
+#else
+  #include <linux/videodev.h>
 #endif
 
 #include "gambas.h"
Index: gambas3-3.1.1/gb.v4l/src/gv4l2.c
===================================================================
--- gambas3-3.1.1.orig/gb.v4l/src/gv4l2.c	2012-05-09 12:32:25.000000000 +0000
+++ gambas3-3.1.1/gb.v4l/src/gv4l2.c	2013-05-29 16:53:54.186985498 +0000
@@ -46,10 +46,10 @@
 #include "main.h"
 #include "CWebcam.h"
 
-#ifdef OS_FREEBSD
-  #include <stdint.h>
-#else
+#ifdef OS_LINUX
   #include <asm/types.h>
+#else
+  #include <stdint.h>
 #endif
 
 //

Reply to: