Subject: Collected Debian patches for GnuBG
Author: Russ Allbery <rra@debian.org>

The packaging for GnuBG is maintained in Git.  This makes it complex to
separate the changes into individual patches.  They are therefore all
included in a single Debian patch.

For full commit history and separated commits, see the packaging Git
repository.
--- gnubg-1.01.003.orig/eval.c
+++ gnubg-1.01.003/eval.c
@@ -638,7 +638,9 @@ EvalInitialise(char *szWeights, char *sz
             pbc1 = BearoffInit(NULL, BO_HEURISTIC, pfProgress);
 
         /* read two-sided db from gnubg.bd */
-        gnubg_bearoff = BuildFilename("gnubg_ts0.bd");
+        /* For Debian, load dynamic databases from /var/lib/gnubg
+           instead.  -- rra, 2008-02-16 */
+        gnubg_bearoff = BuildVarFilename("gnubg_ts0.bd");
         pbc2 = BearoffInit(gnubg_bearoff, BO_IN_MEMORY | BO_MUST_BE_TWO_SIDED, NULL);
         g_free(gnubg_bearoff);
 
@@ -652,12 +654,12 @@ EvalInitialise(char *szWeights, char *sz
                     "makebearoff -t 6x6 -f gnubg_ts0.bd\n"
                     "You can also generate other bearoff databases; see\n" "README for more details\n\n");
 
-        gnubg_bearoff_os = BuildFilename("gnubg_os.bd");
+        gnubg_bearoff_os = BuildVarFilename("gnubg_os.bd");
         /* init one-sided db */
         pbcOS = BearoffInit(gnubg_bearoff_os, BO_IN_MEMORY, NULL);
         g_free(gnubg_bearoff_os);
 
-        gnubg_bearoff = BuildFilename("gnubg_ts.bd");
+        gnubg_bearoff = BuildVarFilename("gnubg_ts.bd");
         /* init two-sided db */
         pbcTS = BearoffInit(gnubg_bearoff, BO_IN_MEMORY, NULL);
         g_free(gnubg_bearoff);
@@ -668,7 +670,7 @@ EvalInitialise(char *szWeights, char *sz
             char *fn;
             char sz[10];
             sprintf(sz, "hyper%1d.bd", i + 1);
-            fn = BuildFilename(sz);
+            fn = BuildVarFilename(sz);
             apbcHyper[i] = BearoffInit(fn, BO_NONE, NULL);
             g_free(fn);
         }
--- gnubg-1.01.003.orig/gtk-multiview.c
+++ gnubg-1.01.003/gtk-multiview.c
@@ -8,7 +8,7 @@
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
--- gnubg-1.01.003.orig/gtk-multiview.h
+++ gnubg-1.01.003/gtk-multiview.h
@@ -8,7 +8,7 @@
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
--- gnubg-1.01.003.orig/util.h
+++ gnubg-1.01.003/util.h
@@ -35,6 +35,9 @@ extern char *getDocDir(void);
 #define BuildFilename(file) g_build_filename(getPkgDataDir(), file, NULL)
 #define BuildFilename2(file1, file2) g_build_filename(getPkgDataDir(), file1, file2, NULL)
 
+/* Added for Debian -- rra, 2008-02-16 */
+#define BuildVarFilename(file) g_build_filename("/var/lib/gnubg", file, NULL)
+
 extern void PrintSystemError(const char *message);
 extern void PrintError(const char *message);
 extern FILE *GetTemporaryFile(const char *nameTemplate, char **retName);
--- gnubg-1.01.003.orig/openurl.c
+++ gnubg-1.01.003/openurl.c
@@ -46,7 +46,8 @@ get_web_browser(void)
 #ifdef __APPLE__
         pch = "open";
 #else
-        pch = "firefox";
+        /* Modified to use sensible-browser -- rra, 2008-02-16 */
+        pch = "sensible-browser";
 #endif
     }
     return pch;
--- gnubg-1.01.003.orig/board3d/tr.h
+++ gnubg-1.01.003/board3d/tr.h
@@ -23,7 +23,23 @@
 /*
  * Tiled Rendering library
  * Version 1.1
- * Copyright (C) Brian Paul
+ * Copyright (C) 1997 Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Notice added by Russ Allbery on 2013-07-21 based on the license information
+ * in tr-1.3.tar.gz retrieved from <http://www.mesa3d.org/brianp/TR.html>.
  *
  *
  * This library allows one to render arbitrarily large images with OpenGL.
--- gnubg-1.01.003.orig/board3d/tr.c
+++ gnubg-1.01.003/board3d/tr.c
@@ -35,7 +35,23 @@
 /*
  * Tiled Rendering library
  * Version 1.1
- * Copyright (C) Brian Paul
+ * Copyright (C) 1997 Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Notice added by Russ Allbery on 2013-07-21 based on the license information
+ * in tr-1.3.tar.gz retrieved from <http://www.mesa3d.org/brianp/TR.html>.
  */
 
 #include "config.h"
