tags 580540 +patch
--

Hi,

the tunctl.c should build helper binary, which is used only on linux,
see guarding in linux-tap.c.

So, IMHO, just skip this dir.

The rest is straigforward, see attached patch.
Build-tested on kfreebsd-amd64.

Petr
diff -u softgun-0.18/debian/control softgun-0.18/debian/control
--- softgun-0.18/debian/control
+++ softgun-0.18/debian/control
@@ -2,7 +2,7 @@
 Section: misc
 Priority: optional
 Maintainer: Murat Demirten <mu...@debian.org>
-Build-Depends: debhelper (>= 7), zlib1g-dev, quilt, libasound2-dev
+Build-Depends: debhelper (>= 7), zlib1g-dev, quilt, libasound2-dev [linux-any]
 Standards-Version: 3.8.3
 Homepage: http://softgun.sourceforge.net/
 
--- softgun-0.18.orig/byteorder.h
+++ softgun-0.18/byteorder.h
@@ -35,7 +35,7 @@
 #define swap32(x)		bswap32(x)
 #define swap16(x)		bswap16(x)
 
-#elif defined(linux)
+#elif defined(linux) || defined(__GLIBC__)
 
 #include <byteswap.h>
 #define swap64(x)		__bswap_64(x)
only in patch2:
unchanged:
--- softgun-0.18.orig/config.mk
+++ softgun-0.18/config.mk
@@ -18,11 +18,15 @@
 ifeq ($(shell uname),Linux)
 LDFLAGS=-rdynamic -lpthread -ldl -lrt -lm -lz -lasound 
 else
+ ifeq ($(shell uname),GNU/kFreeBSD)
+ LDFLAGS=-rdynamic -lpthread -ldl -lrt -lm -lz 
+ else
  ifeq ($(shell uname),FreeBSD)
  LDFLAGS=-rdynamic -lpthread -lm -lz -lSDL
  else
  $(error Unknown architecture)
  endif
+ endif
 endif
 INCLUDES:=-I$(top_srcdir) -I.
 
only in patch2:
unchanged:
--- softgun-0.18.orig/Makefile
+++ softgun-0.18/Makefile
@@ -8,7 +8,12 @@
 MAKE=make
 endif
 
+ifeq ($(shell uname),Linux)
 SUBDIRS=  tools
+else
+SUBDIRS= 
+endif
+
 SUBMODULES=ppc boards devices printer c16x avr8 mips64 sh4 coldfire \
 	   mos6510 m16c cli mcs51 float
 SHLIBS=

Reply via email to