Author: pabs Date: 2012-06-18 06:11:17 +0000 (Mon, 18 Jun 2012) New Revision: 13713
Added: packages/trunk/mancala/debian/patches/fix-libforms2-issue.patch Modified: packages/trunk/mancala/debian/changelog packages/trunk/mancala/debian/control packages/trunk/mancala/debian/patches/series Log: Fix issues with new libforms (Closes: #620634, LP: #904629) Modified: packages/trunk/mancala/debian/changelog =================================================================== --- packages/trunk/mancala/debian/changelog 2012-06-17 11:45:18 UTC (rev 13712) +++ packages/trunk/mancala/debian/changelog 2012-06-18 06:11:17 UTC (rev 13713) @@ -3,6 +3,7 @@ * Remove uupdate from the watch file * Switch to dpkg-source v3 * Don't link against unused libraries + * Fix issues with new libforms (Closes: #620634, LP: #904629) -- Paul Wise <[email protected]> Sun, 03 Apr 2011 13:45:54 +0800 Modified: packages/trunk/mancala/debian/control =================================================================== --- packages/trunk/mancala/debian/control 2012-06-17 11:45:18 UTC (rev 13712) +++ packages/trunk/mancala/debian/control 2012-06-18 06:11:17 UTC (rev 13713) @@ -4,7 +4,7 @@ Maintainer: Debian Games Team <[email protected]> Uploaders: Paul Wise <[email protected]> Standards-Version: 3.8.2 -Build-Depends: debhelper (>= 5.0.0), libforms-dev +Build-Depends: debhelper (>= 5.0.0), libforms-dev, libforms-bin Homepage: http://shh.thathost.com/pub-unix/#Mancala Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/mancala/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/mancala/?op=log Added: packages/trunk/mancala/debian/patches/fix-libforms2-issue.patch =================================================================== --- packages/trunk/mancala/debian/patches/fix-libforms2-issue.patch (rev 0) +++ packages/trunk/mancala/debian/patches/fix-libforms2-issue.patch 2012-06-18 06:11:17 UTC (rev 13713) @@ -0,0 +1,158 @@ +Description: Fix issues with new libforms +Author: Jens Thoms Toerring <[email protected]> +Bug-Debian: http://bugs.debian.org/620634 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/904629 +--- a/xform.fd ++++ b/xform.fd +@@ -11,7 +11,7 @@ + Name: mancala + Width: 530 + Height: 220 +-Number of Objects: 44 ++Number of Objects: 45 + + -------------------- + class: FL_BOX +@@ -805,6 +805,24 @@ + callback: + argument: + ++-------------------- ++class: FL_BUTTON ++type: NORMAL_BUTTON ++box: 0 0 0 0 ++boxtype: FL_UP_BOX ++colors: FL_COL1 FL_COL1 ++alignment: FL_ALIGN_CENTER ++style: FL_NORMAL_STYLE ++size: FL_DEFAULT_SIZE ++lcol: FL_BLACK ++label: ++shortcut: ++resize: FL_RESIZE_NONE ++gravity: FL_NoGravity FL_NoGravity ++name: dummyButton ++callback: ++argument: ++ + =============== FORM =============== + Name: rules + Width: 505 +@@ -852,7 +870,7 @@ + type: NORMAL_BROWSER + box: 10 10 485 255 + boxtype: FL_DOWN_BOX +-colors: FL_COL1 FL_YELLOW ++colors: FL_WHITE FL_YELLOW + alignment: FL_ALIGN_BOTTOM + style: FL_NORMAL_STYLE + size: FL_DEFAULT_SIZE +--- a/xmain.c ++++ b/xmain.c +@@ -46,7 +46,7 @@ + static FL_OBJECT *frmMancala[2]; + static FL_OBJECT *frmHole[2][MAX_HOLES]; + static FL_OBJECT *frmLight[2][MAX_HOLES]; +-static char playerName[2][20] = { "the human player", "the computer" }; ++static const char *playerName[2] = { "the human player", "the computer" }; + static int maxPly[2] = { 0, 4 }; + static int rulesDisplayed = 0; + static int stones_pr_hole = STONES_PR_HOLE; +@@ -236,16 +236,6 @@ + fl_set_object_label(frm->winT, ""); + } + +-static void niceDoForms(void) +-{ +- FL_OBJECT *obj; +- XEvent xev; +- +- obj = fl_do_forms(); +- if (obj == FL_EVENT) +- fl_XNextEvent(&xev); +-} +- + static void formHandler(void) + { + PMove move; +@@ -266,7 +256,7 @@ + } else { + if (!maxPly[player]) { + setMessage("It's %s to move", playerName[player]); +- niceDoForms(); ++ fl_do_forms(); + move = &move2; + if (moveHole >= 0) { + if (movePlayer == player) { +@@ -293,19 +283,10 @@ + } + } + } else +- niceDoForms(); ++ fl_do_forms(); + } + } + +-/* Dirty trick to make fl_do_forms() return */ +-static void formWakeup(void) +-{ +- XEvent xev; +- +- xev.type = ClientMessage; +- fl_XPutBackEvent(&xev); +-} +- + /************************************************************************** + * * + * P U B L I C F U N C T I O N S * +@@ -350,7 +331,7 @@ + movePlayer = player; + moveHole = hole; + } +- formWakeup(); ++ fl_trigger_object(frm->dummyButton); + } + + void doLevel(FL_OBJECT *ob, long arg) +@@ -367,7 +348,7 @@ + void doNewGame(FL_OBJECT *ob, long arg) + { + ourInitGame(arg); +- formWakeup(); ++ fl_trigger_object(frm->dummyButton); + } + + void doQuit(FL_OBJECT *ob, long arg) +--- a/Makefile ++++ b/Makefile +@@ -27,15 +27,19 @@ + OBJS = minimax.o mancala.o + + # Object files used by xmancala +-XOBJS = xform.o rulestxt.o ++XSRCS = xform.c rulestxt.c ++XOBJS = $(XSRCS:.c=.o) + + + all: $(TARGETS) + ++%.c %.h: %.fd ++ fdesign -convert $< ++ + mancala: textmain.o $(OBJS) + $(CC) $(CCOPT) -o $@ textmain.o $(OBJS) $(LDOPT) $(LIBS) + +-xmancala: xmain.o $(XOBJS) $(OBJS) ++xmancala: $(XOBJS) xmain.o $(OBJS) + $(CC) $(CCOPT) -o $@ xmain.o $(XOBJS) $(OBJS) \ + $(LDOPT) $(XLIBDIR) $(XLIBS) + +@@ -43,7 +47,7 @@ + $(CC) -o $@ -c $(CCOPT) $< + + clean: +- rm -f *.o core depend *~ ++ rm -f *.o core depend *~ xform.c xform.h + + veryclean: clean + rm -f $(TARGETS) $(DIST)-$(VERSION).tar.gz Modified: packages/trunk/mancala/debian/patches/series =================================================================== --- packages/trunk/mancala/debian/patches/series 2012-06-17 11:45:18 UTC (rev 13712) +++ packages/trunk/mancala/debian/patches/series 2012-06-18 06:11:17 UTC (rev 13713) @@ -1 +1,2 @@ drop-unneeded-libs.patch +fix-libforms2-issue.patch _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

