--- sgt-puzzles-6844.orig/blackbox.c +++ sgt-puzzles-6844/blackbox.c @@ -1398,7 +1398,7 @@ #endif const struct game thegame = { - "Black Box", "games.blackbox", + "Black Box", "blackbox", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/bridges.c +++ sgt-puzzles-6844/bridges.c @@ -2631,7 +2631,7 @@ #endif const struct game thegame = { - "Bridges", "games.bridges", + "Bridges", "bridges", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/cube.c +++ sgt-puzzles-6844/cube.c @@ -1700,7 +1700,7 @@ #endif const struct game thegame = { - "Cube", "games.cube", + "Cube", "cube", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/dominosa.c +++ sgt-puzzles-6844/dominosa.c @@ -1740,7 +1740,7 @@ #endif const struct game thegame = { - "Dominosa", "games.dominosa", + "Dominosa", "dominosa", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/fifteen.c +++ sgt-puzzles-6844/fifteen.c @@ -838,7 +838,7 @@ #endif const struct game thegame = { - "Fifteen", "games.fifteen", + "Fifteen", "fifteen", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/flip.c +++ sgt-puzzles-6844/flip.c @@ -1266,7 +1266,7 @@ #endif const struct game thegame = { - "Flip", "games.flip", + "Flip", "flip", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/gtk.c +++ sgt-puzzles-6844/gtk.c @@ -20,6 +20,10 @@ #include #include +#ifdef USE_GNOME_HELP +#include +#endif + #include "puzzles.h" #if GTK_CHECK_VERSION(2,0,0) @@ -1123,8 +1127,6 @@ void init_paste() { - unsigned char empty[] = { 0 }; - if (paste_initialised) return; @@ -1132,35 +1134,6 @@ compound_text_atom = gdk_atom_intern("COMPOUND_TEXT", FALSE); if (!utf8_string_atom) utf8_string_atom = gdk_atom_intern("UTF8_STRING", FALSE); - - /* - * Ensure that all the cut buffers exist - according to the - * ICCCM, we must do this before we start using cut buffers. - */ - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER0, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER1, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER2, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER3, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER4, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER5, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER6, XA_STRING, 8, PropModeAppend, empty, 0); - XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), - XA_CUT_BUFFER7, XA_STRING, 8, PropModeAppend, empty, 0); -} - -/* Store data in a cut-buffer. */ -void store_cutbuffer(char *ptr, int len) -{ - /* ICCCM says we must rotate the buffers before storing to buffer 0. */ - XRotateBuffers(GDK_DISPLAY(), 1); - XStoreBytes(GDK_DISPLAY(), ptr, len); } void write_clip(frontend *fe, char *data) @@ -1180,15 +1153,13 @@ fe->paste_data = data; fe->paste_data_len = strlen(data); - store_cutbuffer(fe->paste_data, fe->paste_data_len); - - if (gtk_selection_owner_set(fe->area, GDK_SELECTION_PRIMARY, + if (gtk_selection_owner_set(fe->area, GDK_SELECTION_CLIPBOARD, CurrentTime)) { - gtk_selection_add_target(fe->area, GDK_SELECTION_PRIMARY, + gtk_selection_add_target(fe->area, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 1); - gtk_selection_add_target(fe->area, GDK_SELECTION_PRIMARY, + gtk_selection_add_target(fe->area, GDK_SELECTION_CLIPBOARD, compound_text_atom, 1); - gtk_selection_add_target(fe->area, GDK_SELECTION_PRIMARY, + gtk_selection_add_target(fe->area, GDK_SELECTION_CLIPBOARD, utf8_string_atom, 1); } } @@ -1398,6 +1369,32 @@ } } +#ifdef USE_GNOME_HELP + +static void show_help(frontend *fe, const char *topic) +{ + GError *error = NULL; + + gnome_help_display_with_doc_id(NULL, "", topic, NULL, &error); + if (error) + { + error_box(fe->window, error->message); + g_error_free(error); + } +} + +static void menu_help_contents_event(GtkMenuItem *menuitem, gpointer data) +{ + show_help((frontend *)data, "index"); +} + +static void menu_help_specific_event(GtkMenuItem *menuitem, gpointer data) +{ + show_help((frontend *)data, thegame.help_topic); +} + +#endif + static void menu_about_event(GtkMenuItem *menuitem, gpointer data) { frontend *fe = (frontend *)data; @@ -1624,6 +1621,27 @@ menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); +#ifdef USE_GNOME_HELP + menuitem = gtk_menu_item_new_with_label("Contents"); + gtk_container_add(GTK_CONTAINER(menu), menuitem); + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", + GTK_SIGNAL_FUNC(menu_help_contents_event), fe); + gtk_widget_show(menuitem); + + if (thegame.help_topic) { + char *item; + assert(thegame.name); + item = snewn(9+strlen(thegame.name), char); /*ick*/ + sprintf(item, "Help on %s", thegame.name); + menuitem = gtk_menu_item_new_with_label(item); + sfree(item); + gtk_container_add(GTK_CONTAINER(menu), menuitem); + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", + GTK_SIGNAL_FUNC(menu_help_specific_event), fe); + gtk_widget_show(menuitem); + } +#endif + menuitem = gtk_menu_item_new_with_label("About"); gtk_container_add(GTK_CONTAINER(menu), menuitem); gtk_signal_connect(GTK_OBJECT(menuitem), "activate", @@ -1973,6 +1991,14 @@ } else { gtk_init(&argc, &argv); +#ifdef USE_GNOME_HELP + gnome_program_init("sgt-puzzles", ver, LIBGNOME_MODULE, + argc, argv, + GNOME_PARAM_APP_PREFIX, PATH_PREFIX, + GNOME_PARAM_APP_DATADIR, + PATH_PREFIX "/share/sgt-puzzles", + GNOME_PARAM_NONE); +#endif if (!new_window(argc > 1 ? argv[1] : NULL, &error)) { fprintf(stderr, "%s: %s\n", pname, error); --- sgt-puzzles-6844.orig/guess.c +++ sgt-puzzles-6844/guess.c @@ -1296,7 +1296,7 @@ #endif const struct game thegame = { - "Guess", "games.guess", + "Guess", "guess", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/inertia.c +++ sgt-puzzles-6844/inertia.c @@ -2152,7 +2152,7 @@ #endif const struct game thegame = { - "Inertia", "games.inertia", + "Inertia", "inertia", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/lightup.c +++ sgt-puzzles-6844/lightup.c @@ -2216,7 +2216,7 @@ #endif const struct game thegame = { - "Light Up", "games.lightup", + "Light Up", "lightup", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/loopy.c +++ sgt-puzzles-6844/loopy.c @@ -2716,7 +2716,7 @@ #endif const struct game thegame = { - "Loopy", "games.loopy", + "Loopy", "loopy", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/map.c +++ sgt-puzzles-6844/map.c @@ -3085,7 +3085,7 @@ #endif const struct game thegame = { - "Map", "games.map", + "Map", "map", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/mines.c +++ sgt-puzzles-6844/mines.c @@ -3070,7 +3070,7 @@ #endif const struct game thegame = { - "Mines", "games.mines", + "Mines", "mines", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/net.c +++ sgt-puzzles-6844/net.c @@ -2826,7 +2826,7 @@ #endif const struct game thegame = { - "Net", "games.net", + "Net", "net", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/netslide.c +++ sgt-puzzles-6844/netslide.c @@ -1780,7 +1780,7 @@ #endif const struct game thegame = { - "Netslide", "games.netslide", + "Netslide", "netslide", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/pattern.c +++ sgt-puzzles-6844/pattern.c @@ -1243,7 +1243,7 @@ #endif const struct game thegame = { - "Pattern", "games.pattern", + "Pattern", "pattern", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/pegs.c +++ sgt-puzzles-6844/pegs.c @@ -1186,7 +1186,7 @@ #endif const struct game thegame = { - "Pegs", "games.pegs", + "Pegs", "pegs", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/rect.c +++ sgt-puzzles-6844/rect.c @@ -2836,7 +2836,7 @@ #endif const struct game thegame = { - "Rectangles", "games.rectangles", + "Rectangles", "rectangles", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/samegame.c +++ sgt-puzzles-6844/samegame.c @@ -1626,7 +1626,7 @@ #endif const struct game thegame = { - "Same Game", "games.samegame", + "Same Game", "samegame", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/sixteen.c +++ sgt-puzzles-6844/sixteen.c @@ -1014,7 +1014,7 @@ #endif const struct game thegame = { - "Sixteen", "games.sixteen", + "Sixteen", "sixteen", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/slant.c +++ sgt-puzzles-6844/slant.c @@ -2191,7 +2191,7 @@ #endif const struct game thegame = { - "Slant", "games.slant", + "Slant", "slant", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/solo.c +++ sgt-puzzles-6844/solo.c @@ -3052,7 +3052,7 @@ #endif const struct game thegame = { - "Solo", "games.solo", + "Solo", "solo", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/tents.c +++ sgt-puzzles-6844/tents.c @@ -2053,7 +2053,7 @@ #endif const struct game thegame = { - "Tents", "games.tents", + "Tents", "tents", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/twiddle.c +++ sgt-puzzles-6844/twiddle.c @@ -1181,7 +1181,7 @@ #endif const struct game thegame = { - "Twiddle", "games.twiddle", + "Twiddle", "twiddle", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/untangle.c +++ sgt-puzzles-6844/untangle.c @@ -1425,7 +1425,7 @@ #endif const struct game thegame = { - "Untangle", "games.untangle", + "Untangle", "untangle", default_params, game_fetch_preset, decode_params, --- sgt-puzzles-6844.orig/version.c +++ sgt-puzzles-6844/version.c @@ -7,7 +7,11 @@ #if defined REVISION -char ver[] = "Revision: r" STR(REVISION); +char ver[] = "Revision: r" STR(REVISION) +#if defined DEBIAN_REVISION + " (Debian package " STR(REVISION) "-" DEBIAN_REVISION ")" +#endif + ; #else --- sgt-puzzles-6844.orig/windows.c +++ sgt-puzzles-6844/windows.c @@ -1238,7 +1238,7 @@ if (fe->help_path) { AppendMenu(menu, MF_SEPARATOR, 0, 0); AppendMenu(menu, MF_ENABLED, IDM_HELPC, "Contents"); - if (thegame.winhelp_topic) { + if (thegame.help_topic) { char *item; assert(thegame.name); item = snewn(9+strlen(thegame.name), char); /*ick*/ @@ -2097,10 +2097,10 @@ break; case IDM_GAMEHELP: assert(fe->help_path); - assert(thegame.winhelp_topic); + assert(thegame.help_topic); { - char *cmd = snewn(10+strlen(thegame.winhelp_topic), char); - sprintf(cmd, "JI(`',`%s')", thegame.winhelp_topic); + char *cmd = snewn(16+strlen(thegame.help_topic), char); + sprintf(cmd, "JI(`',`games.%s')", thegame.help_topic); WinHelp(hwnd, fe->help_path, HELP_COMMAND, (DWORD)cmd); sfree(cmd); } --- sgt-puzzles-6844.orig/puzzles.h +++ sgt-puzzles-6844/puzzles.h @@ -349,7 +349,7 @@ */ struct game { const char *name; - const char *winhelp_topic; + const char *help_topic; game_params *(*default_params)(void); int (*fetch_preset)(int i, char **name, game_params **params); void (*decode_params)(game_params *, char const *string); --- sgt-puzzles-6844.orig/puzzles.but +++ sgt-puzzles-6844/puzzles.but @@ -387,7 +387,9 @@ \cfg{winhelp-topic}{games.net} (\e{Note:} the \i{Windows} version of this game is called -\i\cw{NETGAME.EXE} to avoid clashing with Windows's own \cw{NET.EXE}.) +\i\cw{NETGAME.EXE} to avoid clashing with Windows's own \cw{NET.EXE}. +Similarly the Debian version is called \i\cw{netgame} to avoid +clashing with Samba's \cw{net}.) I originally saw this in the form of a Flash game called \i{FreeNet} \k{FreeNet}, written by Pavils Jurjans; there are several other @@ -1126,6 +1128,9 @@ \cfg{winhelp-topic}{games.flip} +(\e{Note:} the Debian version of this game is called \i\cw{flipgame} to +avoid clashing with the text conversion program \cw{flip}.) + You have a grid of squares, some light and some dark. Your aim is to light all the squares up at the same time. You can choose any square and flip its state from light to dark or dark to light, but when you @@ -1398,6 +1403,9 @@ \cfg{winhelp-topic}{games.blackbox} +(\e{Note:} the Debian version of this game is called \i\cw{blackboxgame} to +avoid clashing with the window manager \cw{blackbox}.) + A number of balls are hidden in a rectangular arena. You have to deduce the positions of the balls by firing lasers from positions on the edge of the arena and observing how they are deflected. --- sgt-puzzles-6844.orig/Recipe +++ sgt-puzzles-6844/Recipe @@ -96,8 +96,7 @@ # For Unix, we also need the gross MD5 hack that causes automatic # version number selection in release source archives. !begin gtk -version.o: FORCE; -FORCE: +version.o: if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \ $(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version.def` -c version.c; \ elif test -z "$(VER)" && test -d .svn && svnversion . >&/dev/null; then \ --- sgt-puzzles-6844.orig/mkfiles.pl +++ sgt-puzzles-6844/mkfiles.pl @@ -974,11 +974,11 @@ "INSTALL=install\n", "INSTALL_PROGRAM=\$(INSTALL)\n", "INSTALL_DATA=\$(INSTALL)\n", - "prefix=/usr/local\n", + "prefix=/usr\n", "exec_prefix=\$(prefix)\n", "bindir=\$(exec_prefix)/bin\n", "gamesdir=\$(exec_prefix)/games\n", - "mandir=\$(prefix)/man\n", + "mandir=\$(prefix)/share/man\n", "man1dir=\$(mandir)/man1\n", "\n"; print &splitline("all:" . join "", map { " $_" } &progrealnames("X:U")); --- sgt-puzzles-6844.orig/Makefile.doc +++ sgt-puzzles-6844/Makefile.doc @@ -1,7 +1,28 @@ -all: puzzles.hlp puzzles.txt HACKING +MAN_PAGES := blackboxgame.6 bridges.6 cube.6 dominosa.6 fifteen.6 flipgame.6 \ + guess.6 inertia.6 lightup.6 loopy.6 map.6 mines.6 netgame.6 netslide.6 \ + pattern.6 pegs.6 rect.6 samegame.6 sixteen.6 slant.6 solo.6 tents.6 \ + twiddle.6 untangle.6 -puzzles.hlp puzzles.txt: puzzles.but +HTML_PAGES := common.html docindex.html index.html intro.html licence.html \ + blackbox.html bridges.html cube.html dominosa.html fifteen.html flip.html \ + guess.html inertia.html lightup.html loopy.html map.html mines.html \ + net.html netslide.html pattern.html pegs.html rectangles.html \ + samegame.html sixteen.html slant.html solo.html tents.html twiddle.html \ + untangle.html + +all: puzzles.hlp puzzles.cnt puzzles.txt HACKING $(MAN_PAGES) $(HTML_PAGES) + +clean: + rm -f puzzles.hlp puzzles.cnt puzzles.txt HACKING *.6 *.html + +puzzles.hlp puzzles.cnt puzzles.txt: puzzles.but halibut --winhelp=puzzles.hlp --text=puzzles.txt puzzles.but HACKING: devel.but halibut --text=HACKING devel.but + +$(MAN_PAGES): puzzles.but + perl mkmanpages.pl + +$(HTML_PAGES): puzzles.but + halibut --html puzzles.but --- sgt-puzzles-6844.orig/debian/control +++ sgt-puzzles-6844/debian/control @@ -0,0 +1,33 @@ +Source: sgt-puzzles +Maintainer: Ben Hutchings +Section: games +Priority: extra +Build-Depends: debhelper (>= 4), gcc-4.0 | gcc-3.3, halibut, libgnome2-dev, libgtk2.0-dev, perl +Standards-Version: 3.7.2 + +Package: sgt-puzzles +Architecture: any +Depends: ${shlibs:Depends} +Recommends: yelp +Description: Simon Tatham's Portable Puzzle Collection - 1-player puzzle games + Simon Tatham's Portable Puzzle Collection contains a number of popular + puzzle games for one player. It currently consists of these games: + . + * Topological deduction games: Bridges; Loopy; Map; Net, based on FreeNet; + Slant + * Tile manipulation games: Cube; Fifteen; Flip; Netslide; Sixteen; Twiddle + * Black Box + * Dominosa + * Guess, based on Mastermind + * Inertia + * Light Up + * Mines, based on Minesweeper + * Pattern, an implementation of nonograms + * Pegs, an implementation of several versions of peg solitaire + * Rectangles, based on Divide by Squares + * Same Game + * Solo, based on Sudoku + * Tents + * Untangle, based on Planarity + . + Homepage: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ --- sgt-puzzles-6844.orig/debian/compat +++ sgt-puzzles-6844/debian/compat @@ -0,0 +1 @@ +4 --- sgt-puzzles-6844.orig/debian/copyright-prefix +++ sgt-puzzles-6844/debian/copyright-prefix @@ -0,0 +1,8 @@ +This is the Debian-packaged version of Simon Tatham's Portable Puzzle +Collection. + +The package was put together by Ben Hutchings +using source from: + + http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz + --- sgt-puzzles-6844.orig/debian/changelog +++ sgt-puzzles-6844/debian/changelog @@ -0,0 +1,155 @@ +sgt-puzzles (6844-2) unstable; urgency=low + + * Added compiler version dependency since gcc-4.0 is no longer in + build-essential and previous version FTBFS in many places + + -- Ben Hutchings Wed, 6 Sep 2006 14:42:53 +0100 + +sgt-puzzles (6844-1) unstable; urgency=low + + * New upstream release + * Added recommendation of yelp + * Changed to build with gcc-4.0 - closes: #380455 + * Added missing .R files from upstream svn + + -- Ben Hutchings Tue, 5 Sep 2006 23:44:13 +0100 + +sgt-puzzles (6739-1) unstable; urgency=low + + * New upstream release + * Moved help files under /usr/share/sgt-puzzles - closes: #379876 + * Changed help invocation and added sym-link to work around help search + path changes in libgnome - closes: #379527 + * Added error checking and reporting to help invocation + * Updated maintainer address + + -- Ben Hutchings Sat, 24 Jun 2006 01:21:49 +0100 + +sgt-puzzles (6616-1) unstable; urgency=low + + * New upstream version + + -- Ben Hutchings Wed, 22 Mar 2006 23:53:09 +0000 + +sgt-puzzles (6526-1) unstable; urgency=low + + * New upstream version + * Fixed clearing of window area - closes: #345024 + + -- Ben Hutchings Sun, 22 Jan 2006 12:30:00 +0000 + +sgt-puzzles (6452-5) unstable; urgency=low + + * Yet another attempt to fix intermittent manual page build failures + + -- Ben Hutchings Wed, 07 Dec 2005 02:07:34 +0000 + +sgt-puzzles (6452-4) unstable; urgency=low + + * Another attempt to fix intermittent manual page build failures + + -- Ben Hutchings Fri, 02 Dec 2005 00:54:52 +0000 + +sgt-puzzles (6452-3) unstable; urgency=low + + * Attempt to fix intermittent manual page build failures (bug #339407) + + -- Ben Hutchings Wed, 23 Nov 2005 02:31:26 +0000 + +sgt-puzzles (6452-2) unstable; urgency=low + + * Minor changes to package building + + -- Ben Hutchings Sun, 13 Nov 2005 16:23:36 +0000 + +sgt-puzzles (6452-1) unstable; urgency=low + + * New upstream version fixes bug in Bridges puzzle + * Enabled window resizing, closes #337802 + + -- Ben Hutchings Fri, 11 Nov 2005 23:21:03 +0000 + +sgt-puzzles (6444-1) unstable; urgency=low + + * New upstream version adds Bridges and Tents puzzles, closes #335627 + * Updated command-line synopses in manual pages + * Reorganised list of puzzles in package description + + -- Ben Hutchings Sun, 06 Nov 2005 01:33:31 +0000 + +sgt-puzzles (6378-1) unstable; urgency=low + + * New upstream version + * Include loopy puzzle + + -- Ben Hutchings Sun, 09 Oct 2005 15:37:26 +0100 + +sgt-puzzles (6229-2) unstable; urgency=low + + * Add online help to the Help menu + * Change Copy command to use the clipboard not the primary selection + * Make menu accelerators visible + + -- Ben Hutchings Tue, 13 Sep 2005 09:01:28 +0100 + +sgt-puzzles (6229-1) unstable; urgency=low + + * New upstream version, closes #323683 + + -- Ben Hutchings Mon, 29 Aug 2005 00:45:24 +0100 + +sgt-puzzles (6169-1) unstable; urgency=low + + * New upstream version + * Improve generation of cross-references in manual pages + + -- Ben Hutchings Sat, 06 Aug 2005 23:49:58 +0100 + +sgt-puzzles (6119-1) unstable; urgency=low + + * New upstream version + * Change manual page generation to use upstream documentation as source + + -- Ben Hutchings Wed, 20 Jul 2005 09:09:10 +0100 + +sgt-puzzles (6085-2) unstable; urgency=low + + * Fix warning from gcc 4.0 treated as error + + -- Ben Hutchings Mon, 11 Jul 2005 22:30:52 +0300 + +sgt-puzzles (6085-1) unstable; urgency=low + + * New upstream version + + -- Ben Hutchings Sun, 10 Jul 2005 17:07:15 +0300 + +sgt-puzzles (6039-1) unstable; urgency=low + + * New upstream version + * Removed mistaken dependency on menu + * Appended 'game' to names of 'flip' and 'net' to avoid confusion with programs + of the same name in /usr/bin + + -- Ben Hutchings Fri, 01 Jul 2005 00:56:01 +0100 + +sgt-puzzles (6009-1) unstable; urgency=low + + * New upstream version + * Added dependency on menu + * Fixed potential for breakage in build rules + * Minor style fixes + + -- Ben Hutchings Sat, 25 Jun 2005 01:20:47 +0100 + +sgt-puzzles (5982-2) unstable; urgency=low + + * Add menu entries + + -- Ben Hutchings Fri, 24 Jun 2005 23:57:54 +0100 + +sgt-puzzles (5982-1) unstable; urgency=low + + * Initial upload, closes: #309175 + + -- Ben Hutchings Fri, 24 Jun 2005 03:53:02 +0100 --- sgt-puzzles-6844.orig/debian/rules +++ sgt-puzzles-6844/debian/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f + +# Hack to work around a code generation bug in gcc 4.1 (#380541 causing +# #380455). Use either gcc 4.0 or 3.3 (the latter is the latest in sarge). +CC=$(shell which >&/dev/null gcc-4.0 && echo gcc-4.0 || echo gcc-3.3) + +build : Makefile + DEBIAN_REVISION="$$(dpkg-parsechangelog | sed 's/^Version: [^-]*-//; t; d')" && \ + [ -n "$$DEBIAN_REVISION" ] && \ + make "VER=$$(cat version.def) -DDEBIAN_REVISION=\"\\\"$$DEBIAN_REVISION\\\"\"" \ + "CC=$(CC)" \ + "CFLAGS=-O2 -Wall -g -DUSE_GNOME_HELP -DPATH_PREFIX=\"\\\"/usr\\\"\" $$(pkg-config gtk+-2.0 --cflags) $$(pkg-config libgnome-2.0 --cflags)" \ + "XLDFLAGS=$$(pkg-config gtk+-2.0 --libs) $$(pkg-config libgnome-2.0 --libs)" + make -f Makefile.doc + +# We patch these sources and so must rebuild the Makefile. +Makefile : mkfiles.pl Recipe + ./mkfiles.pl + +binary : binary-arch binary-indep + +binary-arch : build + dh_testroot + mkdir -p -m755 debian/sgt-puzzles/usr/games + make DESTDIR=debian/sgt-puzzles install + dh_strip + dh_shlibdeps + mkdir -p -m755 \ + debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/C + install -m644 *.html \ + debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/C + ln -s . \ + debian/sgt-puzzles/usr/share/sgt-puzzles/gnome/help/sgt-puzzles + mkdir -p -m755 debian/sgt-puzzles/usr/share/doc/sgt-puzzles + cat debian/copyright-prefix LICENCE \ + > debian/sgt-puzzles/usr/share/doc/sgt-puzzles/copyright + ln -sf ../../sgt-puzzles/gnome/help/C \ + debian/sgt-puzzles/usr/share/doc/sgt-puzzles/html + dh_installchangelogs + dh_installdocs + mkdir -p -m755 debian/sgt-puzzles/usr/share/man/man6 + install -m644 *.6 debian/sgt-puzzles/usr/share/man/man6 + dh_compress + dh_fixperms + dh_installmenu + dh_installdeb + dh_gencontrol + dh_builddeb + +binary-indep : + +clean : Makefile + make clean + make -f Makefile.doc clean + dh_clean Makefile Makefile.cyg Makefile.osx Makefile.vc debian/substvars + +# The canonical source location is +# http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz +# but this redirects to puzzles-$version.tar.gz. We get the version +# number (really a Subversion revision number) by scanning wget's +# output. +get-orig-source : + revision=$$(wget http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles.tar.gz 2>&1 | sed 's/^ *=> `puzzles-r\([0-9]*\)\.tar\.gz'\''$$/\1/; t; d') && \ + [ -n "$$revision" ] && \ + echo "Creating sgt-puzzles_$$revision.orig.tar.gz" && \ + mv puzzles-r$$revision.tar.gz sgt-puzzles_$$revision.orig.tar.gz + +.PHONY : build binary binary-arch binary-dep clean get-orig-source --- sgt-puzzles-6844.orig/debian/sgt-puzzles.menu +++ sgt-puzzles-6844/debian/sgt-puzzles.menu @@ -0,0 +1,24 @@ +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Black Box" command="/usr/games/blackboxgame" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Bridges" command="/usr/games/bridges" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Cube" command="/usr/games/cube" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Dominosa" command="/usr/games/dominosa" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Fifteen" command="/usr/games/fifteen" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Flip" command="/usr/games/flipgame" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Guess" command="/usr/games/guess" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Inertia" command="/usr/games/inertia" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Light Up" command="/usr/games/lightup" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Loopy" command="/usr/games/loopy" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Map" command="/usr/games/map" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Mines" command="/usr/games/mines" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Net" command="/usr/games/netgame" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Netslide" command="/usr/games/netslide" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Pattern" command="/usr/games/pattern" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Pegs" command="/usr/games/pegs" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Rectangles" command="/usr/games/rect" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Same Game" command="/usr/games/samegame" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Sixteen" command="/usr/games/sixteen" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Slant" command="/usr/games/slant" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Solo" command="/usr/games/solo" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Tents" command="/usr/games/tents" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Twiddle" command="/usr/games/twiddle" +?package(sgt-puzzles):needs="x11" section="Games/Puzzles" title="Untangle" command="/usr/games/untangle" --- sgt-puzzles-6844.orig/debian/ignore-regexp +++ sgt-puzzles-6844/debian/ignore-regexp @@ -0,0 +1 @@ +(^|/)(Makefile(\.cyg|\.osx|\.vc)?|HACKING|puzzles\.(cnt|hlp|txt))$ --- sgt-puzzles-6844.orig/debian/sgt-puzzles.docs +++ sgt-puzzles-6844/debian/sgt-puzzles.docs @@ -0,0 +1 @@ +puzzles.txt --- sgt-puzzles-6844.orig/sixteen.R +++ sgt-puzzles-6844/sixteen.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +sixteen : [X] GTK COMMON sixteen + +sixteen : [G] WINDOWS COMMON sixteen + +ALL += sixteen + +!begin gtk +GAMES += sixteen +!end + +!begin >list.c + A(sixteen) \ +!end --- sgt-puzzles-6844.orig/samegame.R +++ sgt-puzzles-6844/samegame.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +samegame : [X] GTK COMMON samegame + +samegame : [G] WINDOWS COMMON samegame + +ALL += samegame + +!begin gtk +GAMES += samegame +!end + +!begin >list.c + A(samegame) \ +!end --- sgt-puzzles-6844.orig/flip.R +++ sgt-puzzles-6844/flip.R @@ -0,0 +1,19 @@ +# -*- makefile -*- + +FLIP = flip tree234 + +# Debian already has a binary called `flip' (in the flip package) so we +# append `game' to its name +flipgame : [X] GTK COMMON FLIP + +flip : [G] WINDOWS COMMON FLIP + +ALL += FLIP + +!begin gtk +GAMES += flipgame +!end + +!begin >list.c + A(flip) \ +!end --- sgt-puzzles-6844.orig/inertia.R +++ sgt-puzzles-6844/inertia.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +inertia : [X] GTK COMMON inertia + +inertia : [G] WINDOWS COMMON inertia + +ALL += inertia + +!begin gtk +GAMES += inertia +!end + +!begin >list.c + A(inertia) \ +!end --- sgt-puzzles-6844.orig/loopy.R +++ sgt-puzzles-6844/loopy.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +LOOPY = loopy tree234 dsf + +loopy : [X] GTK COMMON LOOPY + +loopy : [G] WINDOWS COMMON LOOPY + +ALL += LOOPY + +!begin gtk +GAMES += loopy +!end + +!begin >list.c + A(loopy) \ +!end --- sgt-puzzles-6844.orig/solo.R +++ sgt-puzzles-6844/solo.R @@ -0,0 +1,18 @@ +# -*- makefile -*- + +solo : [X] GTK COMMON solo + +solo : [G] WINDOWS COMMON solo + +solosolver : [U] solo[STANDALONE_SOLVER] STANDALONE +solosolver : [C] solo[STANDALONE_SOLVER] STANDALONE + +ALL += solo + +!begin gtk +GAMES += solo +!end + +!begin >list.c + A(solo) \ +!end --- sgt-puzzles-6844.orig/guess.R +++ sgt-puzzles-6844/guess.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +guess : [X] GTK COMMON guess + +guess : [G] WINDOWS COMMON guess + +ALL += guess + +!begin gtk +GAMES += guess +!end + +!begin >list.c + A(guess) \ +!end --- sgt-puzzles-6844.orig/lightup.R +++ sgt-puzzles-6844/lightup.R @@ -0,0 +1,20 @@ +# -*- makefile -*- + +LIGHTUP = lightup combi + +lightup : [X] GTK COMMON LIGHTUP + +lightup : [G] WINDOWS COMMON LIGHTUP + +lightupsolver : [U] lightup[STANDALONE_SOLVER] combi STANDALONE +lightupsolver : [C] lightup[STANDALONE_SOLVER] combi STANDALONE + +ALL += LIGHTUP + +!begin gtk +GAMES += lightup +!end + +!begin >list.c + A(lightup) \ +!end --- sgt-puzzles-6844.orig/cube.R +++ sgt-puzzles-6844/cube.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +cube : [X] GTK COMMON cube + +cube : [G] WINDOWS COMMON cube + +ALL += cube + +!begin gtk +GAMES += cube +!end + +!begin >list.c + A(cube) \ +!end --- sgt-puzzles-6844.orig/bridges.R +++ sgt-puzzles-6844/bridges.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +BRIDGES = bridges dsf + +bridges : [X] GTK COMMON BRIDGES + +bridges : [G] WINDOWS COMMON BRIDGES + +ALL += BRIDGES + +!begin gtk +GAMES += bridges +!end + +!begin >list.c + A(bridges) \ +!end --- sgt-puzzles-6844.orig/twiddle.R +++ sgt-puzzles-6844/twiddle.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +twiddle : [X] GTK COMMON twiddle + +twiddle : [G] WINDOWS COMMON twiddle + +ALL += twiddle + +!begin gtk +GAMES += twiddle +!end + +!begin >list.c + A(twiddle) \ +!end --- sgt-puzzles-6844.orig/rect.R +++ sgt-puzzles-6844/rect.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +rect : [X] GTK COMMON rect + +rect : [G] WINDOWS COMMON rect + +ALL += rect + +!begin gtk +GAMES += rect +!end + +!begin >list.c + A(rect) \ +!end --- sgt-puzzles-6844.orig/tents.R +++ sgt-puzzles-6844/tents.R @@ -0,0 +1,20 @@ +# -*- makefile -*- + +TENTS = tents maxflow + +tents : [X] GTK COMMON TENTS + +tents : [G] WINDOWS COMMON TENTS + +ALL += TENTS + +tentssolver : [U] tents[STANDALONE_SOLVER] maxflow STANDALONE +tentssolver : [C] tents[STANDALONE_SOLVER] maxflow STANDALONE + +!begin gtk +GAMES += tents +!end + +!begin >list.c + A(tents) \ +!end --- sgt-puzzles-6844.orig/pegs.R +++ sgt-puzzles-6844/pegs.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +PEGS = pegs tree234 + +pegs : [X] GTK COMMON PEGS + +pegs : [G] WINDOWS COMMON PEGS + +ALL += PEGS + +!begin gtk +GAMES += pegs +!end + +!begin >list.c + A(pegs) \ +!end --- sgt-puzzles-6844.orig/nullgame.R +++ sgt-puzzles-6844/nullgame.R @@ -0,0 +1,12 @@ +# -*- makefile -*- + +# The `nullgame' source file is a largely blank one, which contains +# all the correct function definitions to compile and link, but +# which defines the null game in which nothing is ever drawn and +# there are no valid moves. Its main purpose is to act as a +# template for writing new game definition source files. I include +# it in the Makefile because it will be worse than useless if it +# ever fails to compile, so it's important that it should actually +# be built on a regular basis. +nullgame : [X] GTK COMMON nullgame +nullgame : [G] WINDOWS COMMON nullgame --- sgt-puzzles-6844.orig/netslide.R +++ sgt-puzzles-6844/netslide.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +NETSLIDE = netslide tree234 + +netslide : [X] GTK COMMON NETSLIDE + +netslide : [G] WINDOWS COMMON NETSLIDE + +ALL += NETSLIDE + +!begin gtk +GAMES += netslide +!end + +!begin >list.c + A(netslide) \ +!end --- sgt-puzzles-6844.orig/dominosa.R +++ sgt-puzzles-6844/dominosa.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +dominosa : [X] GTK COMMON dominosa + +dominosa : [G] WINDOWS COMMON dominosa + +ALL += dominosa + +!begin gtk +GAMES += dominosa +!end + +!begin >list.c + A(dominosa) \ +!end --- sgt-puzzles-6844.orig/mines.R +++ sgt-puzzles-6844/mines.R @@ -0,0 +1,20 @@ +# -*- makefile -*- + +MINES = mines tree234 + +mines : [X] GTK COMMON MINES + +mines : [G] WINDOWS COMMON MINES + +mineobfusc : [U] mines[STANDALONE_OBFUSCATOR] tree234 STANDALONE +mineobfusc : [C] mines[STANDALONE_OBFUSCATOR] tree234 STANDALONE + +ALL += MINES + +!begin gtk +GAMES += mines +!end + +!begin >list.c + A(mines) \ +!end --- sgt-puzzles-6844.orig/pattern.R +++ sgt-puzzles-6844/pattern.R @@ -0,0 +1,18 @@ +# -*- makefile -*- + +pattern : [X] GTK COMMON pattern + +pattern : [G] WINDOWS COMMON pattern + +patternsolver : [U] pattern[STANDALONE_SOLVER] STANDALONE +patternsolver : [C] pattern[STANDALONE_SOLVER] STANDALONE + +ALL += pattern + +!begin gtk +GAMES += pattern +!end + +!begin >list.c + A(pattern) \ +!end --- sgt-puzzles-6844.orig/map.R +++ sgt-puzzles-6844/map.R @@ -0,0 +1,20 @@ +# -*- makefile -*- + +MAP = map dsf + +map : [X] GTK COMMON MAP + +map : [G] WINDOWS COMMON MAP + +mapsolver : [U] map[STANDALONE_SOLVER] dsf STANDALONE m.lib +mapsolver : [C] map[STANDALONE_SOLVER] dsf STANDALONE + +ALL += MAP + +!begin gtk +GAMES += map +!end + +!begin >list.c + A(map) \ +!end --- sgt-puzzles-6844.orig/fifteen.R +++ sgt-puzzles-6844/fifteen.R @@ -0,0 +1,15 @@ +# -*- makefile -*- + +fifteen : [X] GTK COMMON fifteen + +fifteen : [G] WINDOWS COMMON fifteen + +ALL += fifteen + +!begin gtk +GAMES += fifteen +!end + +!begin >list.c + A(fifteen) \ +!end --- sgt-puzzles-6844.orig/slant.R +++ sgt-puzzles-6844/slant.R @@ -0,0 +1,20 @@ +# -*- makefile -*- + +SLANT = slant dsf + +slant : [X] GTK COMMON SLANT + +slant : [G] WINDOWS COMMON SLANT + +slantsolver : [U] slant[STANDALONE_SOLVER] dsf STANDALONE +slantsolver : [C] slant[STANDALONE_SOLVER] dsf STANDALONE + +ALL += SLANT + +!begin gtk +GAMES += slant +!end + +!begin >list.c + A(slant) \ +!end --- sgt-puzzles-6844.orig/blackbox.R +++ sgt-puzzles-6844/blackbox.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +# Debian already has a binary called `blackbox' (in the blackbox package) +# so we append `game' to its name +blackboxgame : [X] GTK COMMON blackbox + +blackbox : [G] WINDOWS COMMON blackbox + +ALL += blackbox + +!begin gtk +GAMES += blackboxgame +!end + +!begin >list.c + A(blackbox) \ +!end --- sgt-puzzles-6844.orig/net.R +++ sgt-puzzles-6844/net.R @@ -0,0 +1,21 @@ +# -*- makefile -*- + +NET = net tree234 dsf + +# Debian already has a binary called `net' (in the samba-common package) +# so we append `game' to its name +netgame : [X] GTK COMMON NET + +# The Windows Net shouldn't be called `net.exe' since Windows +# already has a reasonably important utility program by that name! +netgame : [G] WINDOWS COMMON NET + +ALL += NET + +!begin gtk +GAMES += netgame +!end + +!begin >list.c + A(net) \ +!end --- sgt-puzzles-6844.orig/mkmanpages.pl +++ sgt-puzzles-6844/mkmanpages.pl @@ -0,0 +1,167 @@ +#!/usr/bin/perl -w + +# Generate manual pages for sgt-puzzles by running extracts of puzzles.but +# through halibut. + +use strict; +use File::Temp; +use IO::File; + +# Header information +my $package = "sgt\\-puzzles"; +my $date; +my $section = "Games"; +my $section_no = "6"; + +# Name of command corresponding to each game-specific chapter name +my %commands = (blackbox => 'blackboxgame', + bridges => 'bridges', + cube => 'cube', + dominosa => 'dominosa', + fifteen => 'fifteen', + flip => 'flipgame', + guess => 'guess', + inertia => 'inertia', + lightup => 'lightup', + loopy => 'loopy', + map => 'map', + mines => 'mines', + net => 'netgame', + netslide => 'netslide', + pattern => 'pattern', + pegs => 'pegs', + rectangles => 'rect', + samegame => 'samegame', + sixteen => 'sixteen', + slant => 'slant', + solo => 'solo', + tents => 'tents', + twiddle => 'twiddle', + untangle => 'untangle'); +my %short_descs = (blackboxgame => 'guessing game', + bridges => 'topological deduction game', + cube => 'tile manipulation puzzle game', + dominosa => 'domino puzzle game', + fifteen => 'tile manipulation puzzle game', + flipgame => 'tile manipulation puzzle game', + guess => 'guessing game based on Mastermind', + inertia => 'puzzle game', + lightup => 'puzzle game', + loopy => 'topological deduction game', + map => 'map colouring game', + mines => 'game based on Minesweeper', + netgame => 'tile manipulation puzzle game based on FreeNet', + netslide => 'tile manipulation puzzle game', + pattern => 'nonogram puzzle game', + pegs => 'peg solitaire puzzle game', + rect => 'puzzle game based on Divide by Squares', + samegame => 'puzzle game', + sixteen => 'tile manipulation puzzle game', + slant => 'topological deduction game', + solo => 'puzzle game based on Sudoku', + tents => 'puzzle game', + twiddle => 'tile manipulation puzzle game', + untangle => 'puzzle game based on Planarity'); + +my @MONTHS = qw(January February March April May June + July August September October November December); + +# Chapter name, initialised to dummy value to capture header +my $name = '__HEADER__'; + +# Contents of each chapter/appendix +my %contents; + +# Gather chapters from the original documentation +my $source = new IO::File; +$source->open(") { + # Look for chapter/appendix heading + if (/^\\[AC]{([^}]+)}\s*/) { + $name = $1; + } + # Look for version ID with date + if (/^\\versionid \$Id: [^ ]+ \d+ (\d{4})-(\d{2})-\d{2} /) { + $date = "${MONTHS[$2-1]} $1"; + } + $contents{$name} .= $_; +} +close $source; + +# Remove all normal text from the header +$contents{__HEADER__} =~ s/^(?!\\(?:cfg|define|title){).*$//gm; + +# Remove introduction from "common features" chapter +$contents{common} =~ s/^.*?(?=\\H{)//s; + +for my $chapter (keys %commands) { + + my $command = $commands{$chapter}; + print "Generating $command.6\n"; + + my $contents = + "\\cfg{man-mindepth}{1}\n" # don't show original chapter headings + . "\\cfg{man-identity}{".uc($command)."}{$section_no}{$date}{$command ($package)}{$section}\n\n" + . $contents{__HEADER__} + . "\\C{man-$command} $command\n\n" # dummy chapter + . "\\H{man-$command-name} NAME\n\n" + . "\\c{$command} \\- $short_descs{$command}\n\n" + . "\\H{man-$command-synopsis} SYNOPSIS\n\n" + . "\\cw{$command} [\\cw{--generate }\\e{n}]\n" + . "[\\cw{--print }\\e{w}\\cw{x}\\e{h} [\\cw{--with-solutions}]\n" + . "[\\cw{--scale }\\e{n}] [\\cw{--colour}]]\n" + . "[\\e{game-parameters}|\\e{game-ID}|\\e{random-seed}]\n\n" + . "\\cw{$command --version}\n\n" + . "\\H{man-$command-desc} DESCRIPTION\n\n" + . $contents{$chapter} + . $contents{common} + . "\\H{man-$command-see-also} SEE ALSO\n\n" + . "Full documentation in /usr/share/doc/$package/puzzles.txt.gz.\n"; + + # Kluge cross-references + sub replace_ref { + my ($above, $target, $below) = @_; + # If the target is an earlier or later section in the current page, say + # it's above or below. + if ($above =~ m/\\(?:[CHA]|S\d*){$target}/) { + 'above'; + } elsif ($below =~ m/\\(?:[CHA]|S\d*){$target}/) { + 'below'; + } + # Else if the target is a bibliographic entry, include the entry directly. + elsif ($below =~ m/\\B{$target}\s*(.*?)\s*(?:\\(?:[BCHA]|S\d*|$))/s) { + "($1)"; + } + # Else if it appears to refer to another game, convert to a customary + # cross-manual-page reference. + elsif ($target =~ /(\w+)/ && exists $commands{$1}) { + "\\e{$commands{$1}}($section_no)"; + } + # Otherwise (and this shouldn't happen), show the reference target. + else { + print STDERR "Failed to resolve reference to $target\n"; + $target; + } + } + $contents =~ s/(?:\bin\s+)?\\[kK]{([^}]+)}/replace_ref($`, $1, $')/eg; + + # Run through halibut, working around bug #320333 (fixed for etch, + # but this source is meant to build under sarge too). + # halibut does not default to using stdin or stdout, and + # /dev/std{in,out} apparently don't exist on some systems, so we + # can't reliably do this with a pipeline. + my ($temp_but, $temp_but_name) = mkstemp "/tmp/sgt-puzzles-but-XXXXXX" + or die "$!"; + print $temp_but $contents or die "$!"; + close $temp_but; + my ($temp_man, $temp_man_name) = mkstemp "/tmp/sgt-puzzles-man-XXXXXX" + or die "$!"; + close $temp_man; + system "halibut --man=$temp_man_name $temp_but_name"; + system "grep -v '^\\.UC' <$temp_man_name >$command.6"; + unlink $temp_but_name; + unlink $temp_man_name; + -s "$command.6" or die "halibut produced an empty $command.6"; +} + +exit; --- sgt-puzzles-6844.orig/untangle.R +++ sgt-puzzles-6844/untangle.R @@ -0,0 +1,17 @@ +# -*- makefile -*- + +UNTANGLE = untangle tree234 + +untangle : [X] GTK COMMON UNTANGLE + +untangle : [G] WINDOWS COMMON UNTANGLE + +ALL += UNTANGLE + +!begin gtk +GAMES += untangle +!end + +!begin >list.c + A(untangle) \ +!end