$NetBSD: patch-Jamrules,v 1.2 2019/11/06 23:13:56 wiz Exp $

Turned on a static compile option (as no other apps use GARGLK at this time and made changes to the build file to support compiling on NetBSD. Also reported upstream in github. Issue #274

--- Jamrules.orig	2019-11-03 19:03:20.000000000 +0000
+++ Jamrules
@@ -6,6 +6,7 @@ BUILD ?= RELEASE ;
 USESDL ?= yes ;
 USEBABEL ?= yes ;
 MAC_USEHOMEBREW ?= no ;
+STATIC = yes ;
 MACOS_MIN_VER ?= 10.7 ;
 BUNDLEFONTS ?= yes ;
 USETTS ?= no ;
@@ -139,6 +140,23 @@ switch $(PLATFORM)
         if $(STATIC) { LINKLIBS += $(GARGLKLIBS) ; }
         else      { SHRLINKLIBS += $(GARGLKLIBS) ; }
 
+    case NETBSD :
+        Echo "OS is NETBSD ($(GUILIB))" ;
+        PKGCONFIG = "pkg-config freetype2 gtk+-x11-2.0 gdk-x11-2.0 gobject-2.0 glib-2.0 fontconfig libpng16" ;
+
+        GARGLKCCFLAGS = "`$(PKGCONFIG) --cflags`" -fPIC ;
+        GARGLKLIBS = "`$(PKGCONFIG) --libs`" -ljpeg -lz ;
+        LINKLIBS = -lz -lm "`$(PKGCONFIG) --libs`" ;
+
+        if $(USESDL) = yes
+        {
+            GARGLKCCFLAGS += -I${DESTDIR}/include/SDL ;
+            GARGLKLIBS += -lSDL_mixer -lSDL_sound -lSDL -lsmpeg -lvorbisfile ;
+        }
+
+        if $(STATIC) { LINKLIBS += $(GARGLKLIBS) ; }
+        else      { SHRLINKLIBS += $(GARGLKLIBS) ; }
+
 
     case IPLINUX :
         Echo "OS is IPLINUX (EFL)" ;
