X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2BB01DC0238 for ; Thu, 19 Jun 2014 05:51:19 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id v10so1454281pde.26 for ; Wed, 18 Jun 2014 22:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=pCxmN6YCrNvpt3B/R/3o/KiXe0Gx1LBI6mVhend14eI=; b=iGQje9keSf9sUnzFO4u+bPjPDUTEJIrlCRHFASvQbnPZSCvNsEUSCmAToH5rbbEUlW 5/BPN89sSpILSDwkcF4ppoIwC6vVSDpL26R8cS9KabxAjrWh99xPxr3Zy9DiNPRR70WW rz4bPkVfjm84vL7W9GdFI2L+2ndC071pwaeKmjvDkDNfekIKGyOq4MYyiC13D3+bi10P Fh0CbuXqUyTCtEFkmuZHCAFJsgl7/DjCBLDNTaT4UNwdUtF1+fpxoxjxNE0Z4OChdeXb rnLQoQIyaeah8u2CXOvnOZ1QyF3eaHFNsJjK3fDaQ2l6TQRqmdL2f0CKhJ29YZgIpjMY be1w== X-Received: by 10.66.175.166 with SMTP id cb6mr2897203pac.128.1403157078960; Wed, 18 Jun 2014 22:51:18 -0700 (PDT) Received: from newbook ([50.0.229.137]) by mx.google.com with ESMTPSA id ox3sm6461204pbb.88.2014.06.18.22.51.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jun 2014 22:51:16 -0700 (PDT) Date: Thu, 19 Jun 2014 05:51:41 +0000 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [RFC] trying to package Motif Message-ID: <20140619055137.GA7282@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I've been trying to package Motif; a number of my favorite programs use it (nedit, ida, xpdf, etc.) Motif includes a number of components: -three libraries with headers: libXm, libMrm, and libUil -demos (I've disabled them, following Debian's lead, since one will FTBFS) -a window manager (mwm) and a tool to control keyboard bindings -a compiler for a higher-level interface description language (/usr/bin/uil) -tons of manpages To get it building, I had to snarf a few patches from Debian; I grabbed the rest because it was easier than figuring out fuzz and the like. So far, I've got an APKBUILD that compiles it into motif, motif-dev, and motif-doc. I'm guessing that there should be several more changes, however: -uil seems to belong in -dev -mwm and xmbind should probably be in a separate package from the libs (motif and mwm? motif and motif-libs?) -I'd guess that turning on Xft is preferred to disabling it. However, it's experimental (has been known to cause problems for some of those using it), though even if xft is enabled you can avoid using it. Other than Xft, I don't know how to go about fixing these. So comments in that regard would be helpful. Before it gets added I also need to point it at the right license. Thanks, Isaac Dunham --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-Motif.patch" Content-Transfer-Encoding: quoted-printable =46rom 68cbacb4e2a59e06d453090c8337a24553e25485 Mon Sep 17 00:00:00 2001 =46rom: Isaac Dunham Date: Thu, 19 Jun 2014 05:41:45 +0000 Subject: [PATCH] Add Motif. Motif is an X intrinsics based toolkit which was once widely used. The patches are snarfed from Debianx; not all are needed. --- testing/motif/01-fix-autoconf.patch | 47 ++ testing/motif/02-fix-format-security.patch | 607 +++++++++++++++++= ++++ testing/motif/03-no-demos.patch | 53 ++ ...ebian-menu-structure-to-system.mwmrc-menu.patch | 24 + .../05-multiarch-specialcase-libdir-X11.patch | 45 ++ testing/motif/06-cast-size_t-to-int.patch | 17 + .../07-fix_lintian_reported_manpage_typos.patch | 118 ++++ testing/motif/08-fix_hyphen_in_man_pages.patch | 156 ++++++ testing/motif/09-fix_typo_in_libxm.patch | 25 + .../10-fix_manpage-has-bad-whatis-entry.patch | 49 ++ testing/motif/11-fix_underlinking.patch | 564 +++++++++++++++++= ++ testing/motif/12-fix_buffer_overrun_in_libxm.patch | 17 + testing/motif/13-fix_hardcoded_x11rgb_path.patch | 54 ++ testing/motif/14-fix_ac_find_xft.patch | 91 +++ testing/motif/15-link_uil_against_libuil.patch | 29 + .../motif/16-fix-undefined-use-of-sprintf.patch | 17 + testing/motif/17-switch-to-system-iswspace.patch | 384 +++++++++++++ testing/motif/18-updated-fix-1565.patch | 431 +++++++++++++++ testing/motif/APKBUILD | 131 +++++ 19 files changed, 2859 insertions(+) create mode 100644 testing/motif/01-fix-autoconf.patch create mode 100644 testing/motif/02-fix-format-security.patch create mode 100644 testing/motif/03-no-demos.patch create mode 100644 testing/motif/04-add-debian-menu-structure-to-system.mw= mrc-menu.patch create mode 100644 testing/motif/05-multiarch-specialcase-libdir-X11.patch create mode 100644 testing/motif/06-cast-size_t-to-int.patch create mode 100644 testing/motif/07-fix_lintian_reported_manpage_typos.pat= ch create mode 100644 testing/motif/08-fix_hyphen_in_man_pages.patch create mode 100644 testing/motif/09-fix_typo_in_libxm.patch create mode 100644 testing/motif/10-fix_manpage-has-bad-whatis-entry.patch create mode 100644 testing/motif/11-fix_underlinking.patch create mode 100644 testing/motif/12-fix_buffer_overrun_in_libxm.patch create mode 100644 testing/motif/13-fix_hardcoded_x11rgb_path.patch create mode 100644 testing/motif/14-fix_ac_find_xft.patch create mode 100644 testing/motif/15-link_uil_against_libuil.patch create mode 100644 testing/motif/16-fix-undefined-use-of-sprintf.patch create mode 100644 testing/motif/17-switch-to-system-iswspace.patch create mode 100644 testing/motif/18-updated-fix-1565.patch create mode 100644 testing/motif/APKBUILD diff --git a/testing/motif/01-fix-autoconf.patch b/testing/motif/01-fix-aut= oconf.patch new file mode 100644 index 0000000..325707a --- /dev/null +++ b/testing/motif/01-fix-autoconf.patch @@ -0,0 +1,47 @@ +Description: Update build system to satisfy latest automake/autoconf + This is part of the patch submitted by Adam Sampson, + so we can build without having to provide AUTHORS and NEWS files + . + Adam licensed his patch under MIT license (whatever that means ;) ) +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1571 +Author: Adam Sampson +Author: Graham Inggs +Last-Update: 2012-12-25 +--- a/configure.ac ++++ b/configure.ac +@@ -1,8 +1,13 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT ++AC_PREREQ(2.59) ++AC_INIT([motif], [2.3.4]) + AC_CONFIG_SRCDIR([lib/Xm/Form.c]) +-AC_PREREQ(2.52) + AC_CONFIG_AUX_DIR(.) ++AC_CANONICAL_TARGET ++ ++AM_INIT_AUTOMAKE([foreign no-define]) ++dnl AM_MAINTAINER_MODE ++ + AC_CHECK_FILE(/usr/X/include/X11/X.h, + AC_PREFIX_DEFAULT(/usr/X), + AC_PREFIX_DEFAULT(/usr)) +@@ -10,9 +15,6 @@ + AC_PREFIX_DEFAULT(/usr/X11R6), + AC_PREFIX_DEFAULT(/usr)) +=20 +-dnl AM_MAINTAINER_MODE +-AC_CANONICAL_TARGET +- + dnl The version of the Motif libraries + CURRENT=3D4 + REVISION=3D4 +@@ -21,9 +23,6 @@ + AC_SUBST(REVISION) + AC_SUBST(AGE) +=20 +-dnl This is really dumb but it seems to be bug +-AM_INIT_AUTOMAKE(motif,2.3.4,no-define) +- + LIBTOOL_VERSION=3D$CURRENT:$REVISION:$AGE +=20 + dnl diff --git a/testing/motif/02-fix-format-security.patch b/testing/motif/02-= fix-format-security.patch new file mode 100644 index 0000000..18c4abd --- /dev/null +++ b/testing/motif/02-fix-format-security.patch @@ -0,0 +1,607 @@ +Description: Fix unsafe uses of fprintf and sprintf + prevent 'format not a string literal and no format arguments' errors +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1574 +Author: Graham Inggs +Last-Update: 2012-12-25 +--- a/lib/Mrm/Mrmhier.c ++++ b/lib/Mrm/Mrmhier.c +@@ -264,10 +264,10 @@ + case MrmSUCCESS: + break; + case MrmNOT_VALID: +- sprintf (err_stg, _MrmMMsg_0113); ++ sprintf (err_stg, "%s", _MrmMMsg_0113); + break; + default: +- sprintf (err_stg, _MrmMMsg_0114); ++ sprintf (err_stg, "%s", _MrmMMsg_0114); + break; + } + } +--- a/lib/Mrm/Mrmicon.c ++++ b/lib/Mrm/Mrmicon.c +@@ -1176,7 +1176,7 @@ + } + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + return Urm__UT_Error ("Urm__RelizeColorTable", + err_msg, NULL, NULL, MrmFAILURE) ; + } +@@ -1252,7 +1252,7 @@ + break; + default: + result =3D MrmFAILURE; +- sprintf (err_msg, _MrmMMsg_0040); ++ sprintf (err_msg, "%s", _MrmMMsg_0040); + Urm__UT_Error ("Urm__RelizeColorTable", + err_msg, NULL, NULL, MrmFAILURE) ; + } +--- a/lib/Mrm/Mrmlread.c ++++ b/lib/Mrm/Mrmlread.c +@@ -698,7 +698,7 @@ + XBlackPixelOfScreen(XDefaultScreenOfDisplay(display))); + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + result =3D Urm__UT_Error ("MrmFetchColorLiteral", + err_msg, NULL, NULL, MrmFAILURE) ; + _MrmAppUnlock(app); +--- a/lib/Mrm/Mrmwcrw.c ++++ b/lib/Mrm/Mrmwcrw.c +@@ -1390,7 +1390,7 @@ + } + break; + default: +- sprintf (err_msg, _MrmMMsg_0040); ++ sprintf (err_msg, "%s", _MrmMMsg_0040); + result =3D Urm__UT_Error ("Urm__CW_ConvertValue", + err_msg, NULL, NULL, MrmFAILURE) ; + }; +@@ -2426,7 +2426,7 @@ + } + break; + default: +- sprintf(err_msg, _MrmMMsg_0040); ++ sprintf(err_msg, "%s", _MrmMMsg_0040); + return Urm__UT_Error ("Urm__CW_ConvertValue", + err_msg, NULL, NULL, MrmFAILURE) ; + }; +--- a/tools/wml/wmlouth.c ++++ b/tools/wml/wmlouth.c +@@ -225,12 +225,12 @@ + printf ("\nCouldn't open UilSymGen.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Write the sym_k..._object literals + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + clsobj =3D (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr; +@@ -244,7 +244,7 @@ + /* + * Define the sym_k_..._reason literals + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[ndx].objptr; +@@ -258,7 +258,7 @@ + /* + * Define the sym_k_..._arg literals + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -272,7 +272,7 @@ + /* + * Define the sym_k_..._enumset structs and literals + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + enumsetobj =3D (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objp= tr; +@@ -286,7 +286,7 @@ + /* + * Define the sym_k_..._enumval literals + */ +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + enumvalobj =3D (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].ob= jptr; +@@ -301,7 +301,7 @@ + * Define the sym_k_..._charsize literals + * Define the sym_k_..._charset literals + */ +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + charsetobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objp= tr; +@@ -315,7 +315,7 @@ + /* + * Define the sym_k_..._child literals + */ +-fprintf (outfil, canned8); ++fprintf (outfil, "%s", canned8); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + childobj =3D (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr; +@@ -379,12 +379,12 @@ + printf ("\nCouldn't open UilSymChCL.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + childobj =3D (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr; +@@ -392,7 +392,7 @@ + fprintf (outfil, " sym_k_%s_object,\n", + classobj->tkname); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); +=20 + /* + * close the output file +@@ -446,12 +446,12 @@ + printf ("\nCouldn't open UilSymArTy.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -459,7 +459,7 @@ + fprintf (outfil, " sym_k_%s_value,\n", + datobj->tkname); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); +=20 + /* + * close the output file +@@ -509,19 +509,19 @@ + printf ("\nCouldn't open UilSymRArg.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Create table entries, similar to writing sym_k... + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; + fprintf (outfil, " %d,\n", + resobj->related_code); + } +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); +=20 + /* + * close the output file +@@ -621,12 +621,12 @@ + printf ("\nCouldn't open UilUrmClas.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Write entries for widgets + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + clsobj =3D (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr; +@@ -637,7 +637,7 @@ + else=20 + fprintf (outfil, " \"%s\",\t\n", synobj->convfunc); + } +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); +=20 + /* + * Write entries for gadget variants of widget classes +@@ -661,7 +661,7 @@ + synobj->name); + } + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * Write entries for non-dialog widgets +@@ -685,7 +685,7 @@ + synobj->name); + } + } +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); +=20 + /* + * Write entries for the resource a widget's controls map to +@@ -701,7 +701,7 @@ + else + fprintf (outfil, " sym_k_%s_arg,\n", mapresobj->tkname); + } +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); +=20 + /* + * Write entries for arguments +@@ -714,7 +714,7 @@ + fprintf (outfil, " %s,\n", + synres->resliteral); + } +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); +=20 + /* + * Write entries for reasons +@@ -727,7 +727,7 @@ + fprintf (outfil, " %s,\n", + synres->resliteral); + } +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); +=20 + /* + * close the output file +@@ -781,13 +781,13 @@ + printf ("\nCouldn't open UilConst.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Process the arguments in code order. We start with 1, and write out + * the mask after processing 8 codes. + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + strcpy (maskbuf, "0"); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { +@@ -805,7 +805,7 @@ + } + if ( bitno !=3D 8 ) + fprintf (outfil, "%s", maskbuf); +-fprintf (outfil, canned1a); ++fprintf (outfil, "%s", canned1a); +=20 + /* + * close the output file +@@ -878,8 +878,8 @@ + printf ("\nCouldn't open UilSymReas.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); +=20 + /* + * Generate the bit vectors for each class. Outer loop on the reason code, +@@ -925,13 +925,13 @@ + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( resndx=3D0 ; resndxcnt ; resndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[resndx].objpt= r; + fprintf (outfil, " reason_class_vec%d,\n", resobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * close the output file +@@ -1004,8 +1004,8 @@ + printf ("\nCouldn't open UilSymArTa.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); +=20 + /* + * Generate the bit vectors for each class. Outer loop on the argument co= de, +@@ -1051,13 +1051,13 @@ + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( resndx=3D0 ; resndxcnt ; resndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[resndx].objptr; + fprintf (outfil, " arg_class_vec%d,\n", resobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * close the output file +@@ -1129,8 +1129,8 @@ + printf ("\nCouldn't open UilSymChTa.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); +=20 + /* + * Generate the bit vectors for each class. Outer loop on the child code, +@@ -1174,13 +1174,13 @@ + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( childndx=3D0 ; childndxcnt ; childndx++ ) + { + childobj =3D (WmlChildDefPtr) wml_obj_child_ptr->hvec[childndx].objpt= r; + fprintf (outfil, " child_class_vec%d,\n", childobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * close the output file +@@ -1251,8 +1251,8 @@ + printf ("\nCouldn't open UilSymCtl.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); +=20 + /* + * Generate the bit vectors for each class. Outer loop on the class code, +@@ -1296,13 +1296,13 @@ + /* + * Write the vector of vectors. + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( ctlndx=3D0 ; ctlndxcnt ; ctlndx++ ) + { + clsobj =3D (WmlClassDefPtr) wml_obj_class_ptr->hvec[ctlndx].objptr; + fprintf (outfil, " object_class_vec%d,\n", clsobj->sym_code); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * close the output file +@@ -1438,7 +1438,7 @@ + printf ("\nCouldn't open UilSymNam.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Write entries for widgets +@@ -1517,7 +1517,7 @@ + fprintf (outfil, " \"%s\",\n", + synch->name); + } +-fprintf (outfil, canned7); ++fprintf (outfil, "%s", canned7); +=20 + /* + * close the output file +@@ -1621,12 +1621,12 @@ + printf ("\nCouldn't open UilSymEnum.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Generate the enumeration value vectors for each enumeration set. + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + enumsetobj =3D (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objp= tr; +@@ -1643,7 +1643,7 @@ + /* + * Generate the enumeration set tables + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + enumsetobj =3D (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objp= tr; +@@ -1655,7 +1655,7 @@ + /* + * Create enumset table entries for arguments, similar to writing sym_k... + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + resobj =3D (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr; +@@ -1669,13 +1669,13 @@ + /* + * Create the enumval values table. + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + evobj =3D (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr; + fprintf (outfil, " %s,\n", evobj->syndef->enumlit); + } +-fprintf (outfil, canned5a); ++fprintf (outfil, "%s", canned5a); +=20 + /* + * close the output file +@@ -1813,12 +1813,12 @@ + printf ("\nCouldn't open UilSymCSet.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Generate the standards name table + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + csobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1836,7 +1836,7 @@ + /* + * Generate the writing direction table + */ +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + csobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1858,7 +1858,7 @@ + /* + * Generate the parsing direction table + */ +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + csobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1880,7 +1880,7 @@ + /* + * Generate the character size table + */ +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + csobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +@@ -1906,7 +1906,7 @@ + /* + * Generate the $LANG name recognition table + */ +-fprintf (outfil, canned5); ++fprintf (outfil, "%s", canned5); + lang_max =3D 0; + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { +@@ -1936,7 +1936,7 @@ + /* + * Generate the $LANG code lookup table, in upper case + */ +-fprintf (outfil, canned6); ++fprintf (outfil, "%s", canned6); + for ( ndx=3D0 ; ndxcnt ; ndx++ ) + { + csobj =3D (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr; +--- a/tools/wml/wmloutkey.c ++++ b/tools/wml/wmloutkey.c +@@ -574,16 +574,16 @@ + printf ("\nCouldn't open UilKeyTab.h"); + return; + } +-fprintf (outfil, canned_warn); ++fprintf (outfil, "%s", canned_warn); +=20 + /* + * Print the case sensitive and insensitive tables + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + wmlOutputUilKeyTabBody (outfil, wml_tok_sens_ptr, &maxlen, &maxkey); + fprintf (outfil, canned2, maxlen, maxkey); + wmlOutputUilKeyTabBody (outfil, wml_tok_insens_ptr, &maxlen, &maxkey); +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * close the output file +@@ -812,8 +812,8 @@ + printf ("\nCouldn't open UilTokName.h"); + return; + } +-fprintf (outfil, canned_warn); +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned_warn); ++fprintf (outfil, "%s", canned1); +=20 + /* + * Print the token name entries +--- a/tools/wml/wmloutmm.c ++++ b/tools/wml/wmloutmm.c +@@ -209,9 +209,9 @@ + /* + * Write out header information + */ +-fprintf (outfil, canned1); ++fprintf (outfil, "%s", canned1); + fprintf (outfil, "%s\n", name); +-fprintf (outfil, canned2); ++fprintf (outfil, "%s", canned2); +=20 + /* + * Alphabetize the controls, reason, and argument lists +@@ -287,7 +287,7 @@ + else + fprintf (outfil, "\n"); + } +-fprintf (outfil, canned3); ++fprintf (outfil, "%s", canned3); +=20 + /* + * Write out the argument table +@@ -323,7 +323,7 @@ + } =20 + argndx +=3D 1; + } +-fprintf (outfil, canned4); ++fprintf (outfil, "%s", canned4); +=20 + } +=20 diff --git a/testing/motif/03-no-demos.patch b/testing/motif/03-no-demos.pa= tch new file mode 100644 index 0000000..03953c4 --- /dev/null +++ b/testing/motif/03-no-demos.patch @@ -0,0 +1,53 @@ +Description: Add option to disable building of demos +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1575 +Author: Graham Inggs +Last-Update: 2013-01-09 +--- a/configure.ac ++++ b/configure.ac +@@ -311,7 +311,20 @@ + doc/man/man5/Makefile \ + tools/Makefile \ + tools/wml/Makefile \ +-demos/Makefile \ ++lib/Xm/xmstring.list \ ++]) ++ ++AC_ARG_ENABLE(demos, [ --disable-demos ++ Disable building demos]) ++ ++if test x$enable_demos =3D x ++then ++ enable_demos=3D"yes" ++fi ++ ++if test "$enable_demos" =3D "yes" ++then ++ AC_CONFIG_FILES([demos/Makefile + demos/lib/Makefile \ + demos/lib/Xmd/Makefile \ + demos/lib/Wsm/Makefile \ +@@ -395,6 +408,11 @@ + demos/doc/programGuide/ch17/Makefile \ + demos/doc/programGuide/ch17/simple_drop/Makefile \ + demos/doc/programGuide/ch17/simple_drag/Makefile \ +-lib/Xm/xmstring.list \ +-]) ++ ]) ++ MAYBE_DEMOS=3Ddemos ++else ++ MAYBE_DEMOS=3D ++fi ++AC_SUBST(MAYBE_DEMOS) ++ + AC_OUTPUT +--- a/Makefile.am ++++ b/Makefile.am +@@ -29,6 +29,7 @@ + tools \ + clients \ + doc \ +- demos ++ $(MAYBE_DEMOS) ++ + AUTOMAKE_OPTIONS =3D 1.4 + ACLOCAL_AMFLAGS =3D -I . diff --git a/testing/motif/04-add-debian-menu-structure-to-system.mwmrc-men= u.patch b/testing/motif/04-add-debian-menu-structure-to-system.mwmrc-menu.p= atch new file mode 100644 index 0000000..4d4b784 --- /dev/null +++ b/testing/motif/04-add-debian-menu-structure-to-system.mwmrc-menu.patch @@ -0,0 +1,24 @@ +Description: Add Debian menu structure to system.mwmrc-menu +Forwarded: not-needed +Author: Stefan Bauer +Author: Graham Inggs +Last-Update: 2013-01-21 +--- a/clients/mwm/system.mwmrc ++++ b/clients/mwm/system.mwmrc +@@ -49,6 +49,8 @@ + "Pack Icons" f.pack_icons + ! "Toggle Behavior..." f.set_behavior + no-label f.separator ++ "Debian" f.menu "/Debian" ++ no-label f.separator + "Restart..." f.restart + "Quit..." f.quit_mwm +=20 +@@ -141,3 +143,7 @@ + !! + !! END OF mwm RESOURCE DESCRIPTION FILE + !! ++ ++! debian menu ++!include-menu-defs ++include-menu-defs diff --git a/testing/motif/05-multiarch-specialcase-libdir-X11.patch b/test= ing/motif/05-multiarch-specialcase-libdir-X11.patch new file mode 100644 index 0000000..74bc2ff --- /dev/null +++ b/testing/motif/05-multiarch-specialcase-libdir-X11.patch @@ -0,0 +1,45 @@ +Description: Relocate non-libs from /usr/lib/X11 + For multiarch support, we change libdir to /usr/lib/$(DEB_HOST_MULTIARCH). + However, we do not want to do this to /usr/lib/X11 yet. + . + Note that XMBINDDIR_FALLBACK should really be set to /usr/share/X11/bindi= ngs + since the files are platform-independent. We postpone moving them until a + decision has been reached on libmotif-common. + . + The configure.ac fixes are minimal and only suitable for Debian/Ubuntu + packaging. For upstream one might want to add a command line option. + . + Sergio Gelato, 2012-05-20. + . + Allow the MWM resources and fallback bindings directories to be customized + with the --with-mwmrcdir and --xmbinddir configure options respectively. + Now we can relocate non-library files from /usr/lib/X11 to /usr/share/X11 + (bindings) and /etc/X11/mwm (MWM resources) in debian/rules, allowing us = to + split motif into architecture-dependent and architecture-independent pack= ages. + . + Graham Inggs, 2013-03-12. +Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D673690 +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1581 +Author: Sergio Gelato +Author: Graham Inggs +Last-Update: 2013-03-08 +--- a/configure.ac ++++ b/configure.ac +@@ -178,13 +178,15 @@ + LIBDIR=3D"${libdir}/X11" + AC_SUBST(LIBDIR) +=20 +-MWMRCDIR=3D"${libdir}/X11" ++AC_ARG_WITH(mwmrcdir, [ --with-mwmrcdir=3DDIR mwm resources are located= in DIR], mwmrcdir=3D$withval, mwmrcdir=3D"${libdir}/X11") ++MWMRCDIR=3D"$mwmrcdir" + AC_SUBST(MWMRCDIR) +=20 + INCDIR=3D"${includedir}/X11" + AC_SUBST(INCDIR) +=20 +-XMBINDDIR_FALLBACK=3D"${libdir}/X11/bindings" ++AC_ARG_WITH(xmbinddir, [ --with-xmbinddir=3DDIR fallback bindings are l= ocated in DIR], xmbinddir=3D$withval, xmbinddir=3D"${libdir}/X11/bindings") ++XMBINDDIR_FALLBACK=3D"$xmbinddir" + AC_SUBST(XMBINDDIR_FALLBACK) +=20 + RM=3D"rm -f" diff --git a/testing/motif/06-cast-size_t-to-int.patch b/testing/motif/06-c= ast-size_t-to-int.patch new file mode 100644 index 0000000..b5ce9c6 --- /dev/null +++ b/testing/motif/06-cast-size_t-to-int.patch @@ -0,0 +1,17 @@ +Description: To prevent build failure during building with Hardening optio= ns + enabled due to "format '%d' expects argument of type 'int', but argument = 5 has + type 'size_t'", the fifth argument is cast to integer on the input. +Author: Paul Gevers +Updated: 13-01-2013 + +--- a/tools/wml/wmloutkey.c ++++ b/tools/wml/wmloutkey.c +@@ -627,7 +627,7 @@ + fprintf (outfil, " {%s, %s, %d, %s, \"%s\"},\n", + tkclass, + tksym, +- strlen(tokstg), ++ (int)strlen(tokstg), + tktoken, + tokstg); + if ( (int)strlen(tokstg) > *maxlen ) diff --git a/testing/motif/07-fix_lintian_reported_manpage_typos.patch b/te= sting/motif/07-fix_lintian_reported_manpage_typos.patch new file mode 100644 index 0000000..5ddfd76 --- /dev/null +++ b/testing/motif/07-fix_lintian_reported_manpage_typos.patch @@ -0,0 +1,118 @@ +Description: lintian reports several typos in manpages. This patch fixes t= hose + reported +Author: Paul Gevers +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1587 +Last-reviewed: 14 Jan 2013 + +--- a/doc/man/man1/mwm.1 ++++ b/doc/man/man1/mwm.1 +@@ -359,7 +359,7 @@ + (and other associated messages) by saving the geometries of its clients t= o a state file\&.=20 + \fBmwm\fP can then be restarted by the XSMP session manager\&. + The default location for the state file is \fB$HOME/\&.mwmclientdb\fP\&. +-This location can be overriden with the resource \fBsessionClientDB\fP\&. ++This location can be overridden with the resource \fBsessionClientDB\fP\&. + .SS "X Resources" + .PP + The \fBmwm\fP command is configured from its resource +--- a/doc/man/man3/VendorShell.3 ++++ b/doc/man/man3/VendorShell.3 +@@ -76,7 +76,7 @@ + to the VendorShell resources for controlling toolTips. VendorShell displa= ys + the XmNtooTipString in an XmLabel that is a child of a transientShell. Th= e name + of the transientShell is TipShell, and the name of the XmLabel is TipLabe= l. +-The appearance of the tip can be controlled by specifing resources on the= se ++The appearance of the tip can be controlled by specifying resources on th= ese + widgets. + .PP + If an application uses the \fBXmNmwmDecorations\fP, +--- a/doc/man/man3/XmComboBox.3 ++++ b/doc/man/man3/XmComboBox.3 +@@ -581,7 +581,7 @@ + ComboBox \fBXmNcomboBoxType\fP is + \fBXmDROP_DOWN_LIST\fP, + \fB\fP, \fB\fP, and +-\fBReturn\fP are overriden by ComboBox actions\&. ++\fBReturn\fP are overridden by ComboBox actions\&. + .IP "\fB:c\fP \fB\fP:" 10 + CBDropDownList() + .IP "\fB:c\fP \fB\fP:" 10 +--- a/doc/man/man3/XmGetPixmap.3 ++++ b/doc/man/man3/XmGetPixmap.3 +@@ -109,7 +109,7 @@ + In addition to X bitmap files (XBM), Motif also supports XPM (X + Pixmap) file formats and, from version 2.3, JPEG and PNG image formats\&. + (Note that support of JPEG and PNG image format is an optional feature +-of Motif, in order to check if current version supports PNG ang JPEG ++of Motif, in order to check if current version supports PNG and JPEG + image formats the PNG_SUPPORT and JPEG_SUPPORT macros should be checked + correspondingly.) + The \fBXBMLANGPATH\fP specifies the path for +--- a/doc/man/man3/XmGetPixmapByDepth.3 ++++ b/doc/man/man3/XmGetPixmapByDepth.3 +@@ -111,7 +111,7 @@ + In addition to X bitmap files (XBM), Motif also supports XPM (X + Pixmap) file formats, and, from version 2.3, JPEG and PNG image formats\&. + (Note that support of JPEG and PNG image format is an optional feature +-of Motif, in order to check if current version supports PNG ang JPEG ++of Motif, in order to check if current version supports PNG and JPEG + image formats the PNG_SUPPORT and JPEG_SUPPORT macros should be checked + correspondingly.) + The \fBXBMLANGPATH\fP specifies the path for +--- a/doc/man/man3/XmHierarchyGetChildNodes.3 ++++ b/doc/man/man3/XmHierarchyGetChildNodes.3 +@@ -69,8 +69,8 @@ + \fBXmHierarchy\fP(3)\&. + .SH "RETURN" + .PP +-Returns WidgetList with child nodes of the hierachy, or NULL +-if the hierachy contains no children\&. ++Returns WidgetList with child nodes of the hierarchy, or NULL ++if the hierarchy contains no children\&. + .SH "RELATED" + .PP + \fBXmHierarchy\fP(3)\&. +--- a/doc/man/man3/XmManager.3 ++++ b/doc/man/man3/XmManager.3 +@@ -502,7 +502,7 @@ + Indicates whether the posting process should continue\&. The + application may modify this field\&. + .IP "\fItarget\fP" 10 +-Specifies the most specific widget or gadget that the menu sytem found ++Specifies the most specific widget or gadget that the menu system found + from the event that matches the event\&. + .SS "Translations" + .PP +--- a/doc/man/man3/XmPrimitive.3 ++++ b/doc/man/man3/XmPrimitive.3 +@@ -609,7 +609,7 @@ + Indicates whether the posting process should continue\&. The + application may modify this field\&. + .IP "\fItarget\fP" 10 +-Specifies the most specific widget or gadget that the menu sytem found ++Specifies the most specific widget or gadget that the menu system found + from the event that matches the event\&. + .SS "Translations" + .PP +--- a/doc/man/man3/XmRendition.3 ++++ b/doc/man/man3/XmRendition.3 +@@ -71,7 +71,7 @@ + If a resource in a rendition is unspecified, usually by setting it to + \fBXmAS_IS\fP or \fBXmUNSPECIFIED_PIXEL\fP, + then the value to be used for that resource is the value of the +-immediately preceeding rendition in \fBXmString\fR\&. If that value ++immediately preceding rendition in \fBXmString\fR\&. If that value + is unspecified, then the preceding value is used, and so on\&. If + no renditions specify a value for a resource, then a default value + will be used\&. +--- a/doc/man/man3/XmStringGetNextComponent.3 ++++ b/doc/man/man3/XmStringGetNextComponent.3 +@@ -111,7 +111,7 @@ + \fBXmSTRING_COMPONENT_UNKNOWN\fP\&. The data returned by these + components is returned in the \fIunknown_tag\fP, \fIunknown_length\fP, + and \fIunknown_value\fP fields\&. This apparent inconsistency is +-designed to accomodate older applications that may not be equipped to ++designed to accommodate older applications that may not be equipped to + handle the newer component types of Motif version 2\&.0 and beyond\&. + Consequently, the use of this procedure is not recommended\&. Instead, + use the \fBXmStringGetNextTriple\fP procedure, which provides all the diff --git a/testing/motif/08-fix_hyphen_in_man_pages.patch b/testing/motif= /08-fix_hyphen_in_man_pages.patch new file mode 100644 index 0000000..bc1beb0 --- /dev/null +++ b/testing/motif/08-fix_hyphen_in_man_pages.patch @@ -0,0 +1,156 @@ +Description: lintian reports hyphen misuse in manpages. This patch fixes t= hose + reported. +Author: Paul Gevers +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1588 +Last-reviewed: 06 Feb 2013 + +--- a/doc/man/man1/mwm.1 ++++ b/doc/man/man1/mwm.1 +@@ -904,7 +904,7 @@ + resizeCursors=07ResizeCursors=07T/F=07T + transientDecoration=07TransientDecoration=07string=07menu title + transientFunctions=07TransientFunctions=07string=07T{ +--minimize-maximize ++\-minimize-maximize + T} + useIconBox=07UseIconBox=07T/F=07F + .TE +@@ -941,7 +941,7 @@ + screen size of the icon box window depends on the iconImageMaximum (size) + and \fIiconDecoration\fP resources\&. The default value for size + is (6 * iconWidth + padding) wide by (1 * iconHeight + padding) high\&. T= he +-default value of the location is +0 -0\&. ++default value of the location is +0 \-0\&. + .IP "\fIiconBoxName\fP\ (class\ \fIIconBoxName\fP)" 10 + This resource specifies the name that is used to look up icon box resourc= es\&. + The default name is iconbox\&. +@@ -1059,7 +1059,7 @@ + This resource is used to indicate which window management functions + are applicable (or not applicable) to transient windows\&. The function s= pecification + is exactly the same as for the \fIclientFunctions\fP (client +-specific) resource\&. The default value for this resource is -minimize -m= aximize\&. ++specific) resource\&. The default value for this resource is \-minimize \= -maximize\&. + .IP "" 10 + An application can also specify which functions \fBmwm\fP + should apply to its windows\&. If it does so, \fBmwm\fP applies +@@ -1176,7 +1176,7 @@ + title=07Title bar (includes border)\&. + .TE + .PP +-Examples: \fIMwm*XClock\&.clientDecoration: -resizeh -maximize\fP This re= moves the resize handles and maximize button from XClock ++Examples: \fIMwm*XClock\&.clientDecoration: \-resizeh \-maximize\fP This = removes the resize handles and maximize button from XClock + windows\&. \fIMwm*XClock\&.clientDecoration: menu minimize border\fP This= does the same thing as above\&. Note that either \fImenu\fP or \fIminimize= \fP implies + \fItitle\fP\&. + .IP "\fIclientFunctions\fP\ (class\ \fIClientFunctions\fP)" 10 +--- a/doc/man/man4/mwmrc.4 ++++ b/doc/man/man4/mwmrc.4 +@@ -84,7 +84,7 @@ + be specified from the command line: + .PP + .nf +-\f(CW/usr/X11R6/bin/X11/mwm -xrm "mwm*configFile: mymwmrc"\fR ++\f(CW/usr/X11R6/bin/X11/mwm \-xrm "mwm*configFile: mymwmrc"\fR + .fi + .PP + .SS "Resource Types" +--- a/doc/man/man3/XmFontList.3 ++++ b/doc/man/man3/XmFontList.3 +@@ -119,7 +119,7 @@ + without a font list entry tag; + .PP + .nf +-\f(CW*fontList: -Adobe-Times-Medium-I-Normal--10*\fR ++\f(CW*fontList: \-Adobe\-Times\-Medium\-I\-Normal\-\-10*\fR + .fi + .PP + .PP +@@ -138,9 +138,9 @@ + and an explicit font list entry tag\&. + .PP + .nf +-\f(CW*fontList: -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150;\ +--JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240;\ +--JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120:MY_TAG\fR ++\f(CW*fontList: \-Adobe\-Courier\-Bold\-R\-Normal\-\-25\-180\-100\-100\-M= \-150;\ ++\-JIS\-Fixed\-Medium\-R\-Normal\-\-26\-180\-100\-100\-C\-240;\ ++\-JIS\-Fixed\-Medium\-R\-Normal\-\-26\-180\-100\-100\-C\-120:MY_TAG\fR + .fi + .PP + .PP +--- a/doc/man/man3/XmGetPixmapByDepth.3 ++++ b/doc/man/man3/XmGetPixmapByDepth.3 +@@ -245,8 +245,8 @@ + \f(CW/* XBM file */ + #define plaid_width 22 + #define plaid_height 22 +-#define plaid_x_hot -1 +-#define plaid_y_hot -1 ++#define plaid_x_hot \-1 ++#define plaid_y_hot \-1 + static char plaid_bits[] =3D { + 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, + 0x75, 0xfd, 0x3f, 0xff, 0x57, 0x15, 0x75, 0xfd, 0x3f, 0xaa, 0xfa, 0x3e, +--- a/doc/man/man3/XmList.3 ++++ b/doc/man/man3/XmList.3 +@@ -182,7 +182,7 @@ + A value of 1 transfers the first item in the List; a value of 2 + transfers the second item; and so on\&. + If the entire contents of the List are being transferred, the value is +--1\&. ++\-1\&. + .PP + As a source of data, List supports the following targets and associated + conversions of data to these targets: +--- a/doc/man/man3/XmScreen.3 ++++ b/doc/man/man3/XmScreen.3 +@@ -300,7 +300,7 @@ + startup time, either by placing it within a defaults file or by using the + \fB-xrm\fP command line argument\&. For example: + .IP "" 10 +-\fBmyProg -xrm "*menuCursor: arrow"\fP ++\fBmyProg \-xrm "*menuCursor: arrow"\fP + .IP "" 10 + The menu cursor can also be selected in the program through + the function \fBXmSetMenuCursor\fP\&. +--- a/doc/man/man3/XmTabListCopy.3 ++++ b/doc/man/man3/XmTabListCopy.3 +@@ -71,7 +71,7 @@ + Specifies where to start copying\&. A value of 0 (zero) indicates begin + at the beginning, a value of 1 indicates to skip the first tab, and so + on\&. A negative indicates to begin counting backwards from the end\&. +-A value of -1 indicates to start copying from the last tab\&. ++A value of \-1 indicates to start copying from the last tab\&. + .IP "\fIcount\fP" 10 + Specifies the number of tabs to copy\&. A value of 0 (zero) indicates + to copy all elements from the starting point to the end (beginning if +--- a/doc/man/man3/XmTabListInsertTabs.3 ++++ b/doc/man/man3/XmTabListInsertTabs.3 +@@ -83,7 +83,7 @@ + value of 1 makes it the second tab, and so on\&. If \fIposition\fP is + greater than the number of tabs in \fIoldlist\fP, then the tabs will + be inserted at the end\&. If \fIposition\fP is negative, the count will +-be backwards from the end\&. A value of -1 makes the first new tab ++be backwards from the end\&. A value of \-1 makes the first new tab + the last tab, and so on\&. + .SH "RETURN" + .PP +--- a/doc/man/man5/UIL.5 ++++ b/doc/man/man5/UIL.5 +@@ -1211,7 +1211,7 @@ + 3\&.1415E-2 (equals \&.031415) + T}=072\&.87 e6 (embedded blanks) + T{ +--6\&.29e7 (equals -62900000) ++\-6\&.29e7 (equals \-62900000) + T}=072\&.0e100 (out of range) + .TE + .PP +@@ -1322,7 +1322,7 @@ + You can use parentheses to override the normal precedence of operators\&. + In a sequence of unary operators, the operations are performed in + right-to-left +-order\&. For example, \fB- + -A\fP is equivalent to \fB-(+(-A))\fP\&. ++order\&. For example, \fB- + \-A\fP is equivalent to \fB\-(+(\-A))\fP\&. + In a sequence of binary operators of the same precedence, the operations + are performed in left-to-right order\&. For example, \fBA*B/C*D\fP is + equivalent to \fB((A*B)/C)*D\fP\&. diff --git a/testing/motif/09-fix_typo_in_libxm.patch b/testing/motif/09-fi= x_typo_in_libxm.patch new file mode 100644 index 0000000..90d39a3 --- /dev/null +++ b/testing/motif/09-fix_typo_in_libxm.patch @@ -0,0 +1,25 @@ +Description: lintian reports a typo in libXm. This patch fixes it. +Author: Paul Gevers +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1589 +Last-reviewed: 06 Feb 2013 + +--- a/lib/Xm/FontS.c ++++ b/lib/Xm/FontS.c +@@ -1225,7 +1225,7 @@ +=20 + if ((fontdata =3D XLoadQueryFont(XtDisplay((Widget) fsw), font)) =3D= =3D NULL) + { +- sprintf(buf, "Font '%s'\nis not availiable on this machine", font); ++ sprintf(buf, "Font '%s'\nis not available on this machine", font); + DisplayUserError(fsw, buf); + err =3D True; + } +@@ -1275,7 +1275,7 @@ + fbuf)) =3D=3D NULL)=20 + { + sprintf(buf, +- "Font '%s'\nis not availiable on this machine", ++ "Font '%s'\nis not available on this machine", + font); + DisplayUserError(fsw, buf); + err =3D True; diff --git a/testing/motif/10-fix_manpage-has-bad-whatis-entry.patch b/test= ing/motif/10-fix_manpage-has-bad-whatis-entry.patch new file mode 100644 index 0000000..cf51d1f --- /dev/null +++ b/testing/motif/10-fix_manpage-has-bad-whatis-entry.patch @@ -0,0 +1,49 @@ +Description: lintian reports bad whatis entries in manpages. Fixing here +Author: Paul Gevers +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1590 +Last-reviewed: 17 Feb 2013 + +--- a/doc/man/man3/XmColorSelector.3 ++++ b/doc/man/man3/XmColorSelector.3 +@@ -1,7 +1,7 @@ + .DT + .TH XmColorSelector 3X "" + .SH NAME +-The Color Selector widget ++XmColorSelector \- The Color Selector widget + .SH SYNOPSIS + #include + .SH DESCRIPTION +--- a/doc/man/man3/XmExt18List.3 ++++ b/doc/man/man3/XmExt18List.3 +@@ -1,7 +1,7 @@ + .DT + .TH XxExt18LIst 3x "" + .SH NAME +-The Internationalized Extended List widget ++XmExt18List \- The Internationalized Extended List widget + .SH SYNOPSIS + #include + .SH DESCRIPTION +--- a/doc/man/man3/XmFontSelector.3 ++++ b/doc/man/man3/XmFontSelector.3 +@@ -1,7 +1,7 @@ + .DT + .TH XmFontSelector 3X "" + .SH NAME +-The Font Selector widget ++XmFontSelector \- The Font Selector widget + .SH SYNOPSIS + #include + .SH DESCRIPTION +--- a/doc/man/man3/XmIconButton.3 ++++ b/doc/man/man3/XmIconButton.3 +@@ -1,7 +1,7 @@ + .DT + .TH XmIconButton 3X "15 July 1992" + .SH NAME +-The Icon Button widget ++XmIconButton \- The Icon Button widget + .SH SYNOPSIS + Documents the XmIconButton widget + .SH DESCRIPTION diff --git a/testing/motif/11-fix_underlinking.patch b/testing/motif/11-fix= _underlinking.patch new file mode 100644 index 0000000..601b091 --- /dev/null +++ b/testing/motif/11-fix_underlinking.patch @@ -0,0 +1,564 @@ +Description: Fix underlinking of libXt, libXext and libX11=0D + Recent changes to default linker behaviour prevent shared libraries from = being=0D + indirectly linked, resulting in FTBFS in Ubuntu Raring.=0D + .=0D + This patch fixes this by explicitly linking libXt, libXext and libX11 whe= rever=0D + necessary. Demos are patched even though they are not built for distribu= tion.=0D +Author: Graham Inggs =0D +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1583=0D +Last-Update: 2013-02-26=0D +--- a/clients/mwm/Makefile.am ++++ b/clients/mwm/Makefile.am +@@ -9,7 +9,7 @@ + rc_DATA =3D system.mwmrc +=20 + bin_PROGRAMS =3D mwm +-mwm_LDADD =3D ./WmWsmLib/libWsm.a ../../lib/Xm/libXm.la=20 ++mwm_LDADD =3D ./WmWsmLib/libWsm.a ../../lib/Xm/libXm.la -lXt -lXext -lX11 +=20 + INCLUDES =3D -DLARGECURSORS -DR2_COMPAT -DUNMAP_ON_RESTART \ + -DCDE_INSTALLATION_TOP=3D\"@CDE_INSTALLATION_TOP@\" \ +--- a/clients/uil/Makefile.am ++++ b/clients/uil/Makefile.am +@@ -11,9 +11,9 @@ + UilParser.lo: UilParser.c + $(LTCOMPILE) -DCALLABLE -c UilParser.c +=20 +-libUil_la_LIBADD =3D UilParser.lo ../../lib/Mrm/libMrm.la ../../lib/Xm/li= bXm.la=20 ++libUil_la_LIBADD =3D UilParser.lo ../../lib/Mrm/libMrm.la ../../lib/Xm/li= bXm.la -lXt +=20 +-uil_LDADD =3D ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la=20 ++uil_LDADD =3D ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -DINCDIR=3D\"@INCDIR@\" \ + -DLIBDIR=3D\"@LIBDIR@\" \ +--- a/clients/xmbind/Makefile.am ++++ b/clients/xmbind/Makefile.am +@@ -2,6 +2,6 @@ +=20 + bin_PROGRAMS =3D xmbind +=20 +-LDADD =3D ../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../lib -I$(top_builddir)/lib ${X_CFLAGS} +--- a/demos/doc/programGuide/ch05/Scale/Makefile.am ++++ b/demos/doc/programGuide/ch05/Scale/Makefile.am +@@ -8,4 +8,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch06/combo_box/Makefile.am ++++ b/demos/doc/programGuide/ch06/combo_box/Makefile.am +@@ -9,4 +9,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch06/spin_box/Makefile.am ++++ b/demos/doc/programGuide/ch06/spin_box/Makefile.am +@@ -9,4 +9,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch08/Container/Makefile.am ++++ b/demos/doc/programGuide/ch08/Container/Makefile.am +@@ -8,4 +8,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch08/Notebook/Makefile.am ++++ b/demos/doc/programGuide/ch08/Notebook/Makefile.am +@@ -8,4 +8,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch16/Makefile.am ++++ b/demos/doc/programGuide/ch16/Makefile.am +@@ -9,4 +9,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch17/simple_drag/Makefile.am ++++ b/demos/doc/programGuide/ch17/simple_drag/Makefile.am +@@ -9,4 +9,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/doc/programGuide/ch17/simple_drop/Makefile.am ++++ b/demos/doc/programGuide/ch17/simple_drop/Makefile.am +@@ -9,4 +9,4 @@ +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/de= mos/lib $(X_CFLAGS) +=20 +-LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la ++LDADD =3D -L$(top_builddir)/demos/lib/Xmd -lXmd $(top_builddir)/lib/Xm/li= bXm.la -lXt -lX11 +--- a/demos/lib/Exm/wml/Makefile.am ++++ b/demos/lib/Exm/wml/Makefile.am +@@ -18,7 +18,7 @@ + -I$(top_builddir)/clients/uil \ + ${X_CFLAGS}=20 +=20 +-LDADD =3D $(top_builddir)/lib/Xm/libXm.la ++LDADD =3D $(top_builddir)/lib/Xm/libXm.la -lXt +=20 + DISTCLEANFILES =3D motif.wmd +=20 +--- a/demos/lib/Xmd/Makefile.am ++++ b/demos/lib/Xmd/Makefile.am +@@ -12,7 +12,7 @@ + Print.h PrintP.h \ + RegEdit.h RegEditI.h +=20 +-LDADD =3D libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D libXmd.a ../../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I$(top_builddir)/lib -I$(srcdir)/../../../lib ${X_CFLAGS}= =20 +=20 +--- a/demos/programs/ButtonBox/Makefile.am ++++ b/demos/programs/ButtonBox/Makefile.am +@@ -8,6 +8,6 @@ + bboxdemo_SOURCES =3D bboxdemo.c + data_DATA =3D $(EXTRA_DIST) $(bboxdemo_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/ColorSel/Makefile.am ++++ b/demos/programs/ColorSel/Makefile.am +@@ -7,6 +7,6 @@ + colordemo_SOURCES =3D util-c.c colordemo.c + EXTRA_DIST =3D Imakefile + data_DATA =3D $(colordemo_SOURCES) $(EXTRA_DIST) +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 + TOPDIR =3D ../../.. + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/Column/Makefile.am ++++ b/demos/programs/Column/Makefile.am +@@ -8,5 +8,5 @@ + EXTRA_DIST =3D Imakefile Column.ad + data_DATA =3D $(EXTRA_DIST) $(column_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/Combo2/Makefile.am ++++ b/demos/programs/Combo2/Makefile.am +@@ -8,5 +8,5 @@ + combo_SOURCES =3D combo.c + data_DATA =3D $(EXTRA_DIST) $(combo_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/Exm/app_in_c/Makefile.am ++++ b/demos/programs/Exm/app_in_c/Makefile.am +@@ -14,4 +14,4 @@ + -I$(top_builddir)/lib \ + ${X_CFLAGS}=20 + LDADD =3D ../../../lib/Exm/libExm.a \ +- ../../../../lib/Xm/libXm.la ++ ../../../../lib/Xm/libXm.la -lXt -lXext -lX11 +--- a/demos/programs/Exm/simple_app/Makefile.am ++++ b/demos/programs/Exm/simple_app/Makefile.am +@@ -14,5 +14,6 @@ + -I$(srcdir)/../../../lib \ + -I$(top_builddir)/lib \ + ${X_CFLAGS}=20 +-LDADD =3D ../../../../lib/Xm/libXm.la \ +- ../../../lib/Exm/libExm.a ++LDADD =3D ../../../lib/Exm/libExm.a \ ++ ../../../../lib/Xm/libXm.la -lXt -lX11 ++ +--- a/demos/programs/Ext18List/Makefile.am ++++ b/demos/programs/Ext18List/Makefile.am +@@ -10,6 +10,6 @@ + EXTRA_DIST =3D Imakefile + data_DATA =3D $(EXTRA_DIST) $(ext18list_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I.. -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/FontSel/Makefile.am ++++ b/demos/programs/FontSel/Makefile.am +@@ -7,6 +7,6 @@ + fontsel_SOURCES =3D callbacks-c.c creation-c.c fontsel.c fontsel.h + EXTRA_DIST =3D Imakefile + data_DATA =3D $(EXTRA_DIST) $(fontsel_SOURCES) +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt + TOPDIR =3D ../../.. + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/IconB/Makefile.am ++++ b/demos/programs/IconB/Makefile.am +@@ -8,7 +8,7 @@ + iconbuttondemo_SOURCES =3D misc.c iconbuttondemo.c + data_DATA =3D $(iconbuttondemo_SOURCES) $(EXTRA_DIST) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/.. \ + -I$(srcdir)/$(TOPDIR)/lib \ +--- a/demos/programs/Outline/Makefile.am ++++ b/demos/programs/Outline/Makefile.am +@@ -7,6 +7,6 @@ + bin_PROGRAMS =3D outline + outline_SOURCES =3D outline.c + data_DATA =3D $(outline_SOURCES) $(EXTRA_DIST) +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt + TOPDIR =3D ../../.. + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/Paned/Makefile.am ++++ b/demos/programs/Paned/Makefile.am +@@ -8,6 +8,6 @@ + paned_SOURCES =3D creation-c.c paned.c + data_DATA =3D $(EXTRA_DIST) $(paned_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/TabStack/Makefile.am ++++ b/demos/programs/TabStack/Makefile.am +@@ -8,6 +8,6 @@ + EXTRA_DIST =3D Imakefile + data_DATA =3D $(tabstack_SOURCES) $(EXTRA_DIST) =20 + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/$(TOPDIR)/lib ${X_CFLAGS}=20 +--- a/demos/programs/Tree/Makefile.am ++++ b/demos/programs/Tree/Makefile.am +@@ -8,6 +8,6 @@ + tree_SOURCES =3D bxutil-c.c tree.c + data_DATA =3D $(EXTRA_DIST) $(tree_SOURCES) + TOPDIR =3D ../../.. +-LDADD =3D $(TOPDIR)/lib/Xm/libXm.la ++LDADD =3D $(TOPDIR)/lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(TOPDIR)/lib -I$(srcdir)/.. -I$(srcdir)/$(TOPDIR)/lib ${X= _CFLAGS}=20 +--- a/demos/programs/airport/Makefile.am ++++ b/demos/programs/airport/Makefile.am +@@ -8,5 +8,5 @@ + dragsource.h dropsite.h main.h + EXTRA_DIST =3D Imakefile XmdAirport.ad README + data_DATA =3D $(airport_SOURCES) $(EXTRA_DIST) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/animate/Makefile.am ++++ b/demos/programs/animate/Makefile.am +@@ -17,7 +17,7 @@ +=20 + bin_PROGRAMS =3D xmanimate +=20 +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Mrm/libMrm.la ../../../lib/= Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Mrm/libMrm.la ../../../lib/= Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib \ + -I$(srcdir)/../../lib \ +--- a/demos/programs/drag_and_drop/Makefile.am ++++ b/demos/programs/drag_and_drop/Makefile.am +@@ -10,6 +10,6 @@ + simpledrop_SOURCES =3D simpledrop.c + data_DATA =3D $(EXTRA_DIST) $(DNDDemo_SOURCES) $(simpledrop_SOURCES) + noinst_HEADERS =3D DNDDemo.h +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/draw/Makefile.am ++++ b/demos/programs/draw/Makefile.am +@@ -7,5 +7,5 @@ + draw_SOURCES =3D draw.c + EXTRA_DIST =3D Imakefile XmdDraw.ad README draw.help draw.man + data_DATA =3D $(EXTRA_DIST) $(draw_SOURCES) +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(srcdir)/../../lib -I$(srcdir)/../../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +--- a/demos/programs/earth/Makefile.am ++++ b/demos/programs/earth/Makefile.am +@@ -7,5 +7,5 @@ + earth_SOURCES =3D earth.c + EXTRA_DIST =3D terre.xbm earth.man Imakefile README + data_DATA =3D $(EXTRA_DIST) $(earth_SOURCES) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lXext -lX11 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/filemanager/Makefile.am ++++ b/demos/programs/filemanager/Makefile.am +@@ -11,7 +11,7 @@ + obj.xpm pix.xpm s_dir.xpm s_exec.xpm s_file.xpm \ + s_none.xpm s_pix.xpm + data_DATA =3D $(EXTRA_DIST) $(filemanager_SOURCES) +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(srcdir)/../../lib -I$(srcdir)/../../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +=20 +=20 +--- a/demos/programs/fileview/Makefile.am ++++ b/demos/programs/fileview/Makefile.am +@@ -11,7 +11,7 @@ +=20 + UILS=3D French.uil German.uil English.uil +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la ++LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +=20 +--- a/demos/programs/getsubres/Makefile.am ++++ b/demos/programs/getsubres/Makefile.am +@@ -7,5 +7,5 @@ + EXTRA_DIST =3D getsubres.help getsubres.man README Imakefile + getsubres_SOURCES =3D getsubres.c + data_DATA =3D $(EXTRA_DIST) $(getsubres_SOURCES) +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(srcdir)/../../lib -I$(srcdir)/../../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +--- a/demos/programs/hellomotif/Makefile.am ++++ b/demos/programs/hellomotif/Makefile.am +@@ -7,7 +7,7 @@ + EXTRA_DIST =3D hellomotif.uil Imakefile README + hellomotif_SOURCES =3D hellomotif.c + data_DATA =3D $(EXTRA_DIST) $(hellomotif_SOURCES) hellomotif.uid +-LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la ++LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la -lXt + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +=20 + all: hellomotif.uid +--- a/demos/programs/hellomotifi18n/Makefile.am ++++ b/demos/programs/hellomotifi18n/Makefile.am +@@ -12,7 +12,7 @@ + helloint_DEPENDENCIES =3D helloint.uid C/uid/l_strings.uid english/uid/l_= strings.uid french/uid/l_strings.uid hebrew/uid/l_strings.uid japan/uid/l_s= trings.uid japanese/uid/l_strings.uid swedish/uid/l_strings.uid +=20 + INCLUDES =3D -I$(top_srcdir)/lib -I$(top_builddir)/lib ${X_CFLAGS}=20 +-LDADD =3D $(top_builddir)/lib/Mrm/libMrm.la $(top_builddir)/lib/Xm/libXm.= la ++LDADD =3D $(top_builddir)/lib/Mrm/libMrm.la $(top_builddir)/lib/Xm/libXm.= la -lXt +=20 + SUFFIXES =3D .uil .uid +=20 +--- a/demos/programs/i18ninput/Makefile.am ++++ b/demos/programs/i18ninput/Makefile.am +@@ -8,6 +8,6 @@ + EXTRA_DIST =3D XmdI18nInput.ad README i18ninput.man i18ninput.help \ + Imakefile + data_DATA =3D $(EXTRA_DIST) $(i18ninput_SOURCES) +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../lib -I$(srcdir)/../../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +--- a/demos/programs/panner/Makefile.am ++++ b/demos/programs/panner/Makefile.am +@@ -7,5 +7,5 @@ + panner_SOURCES =3D panner.c + EXTRA_DIST =3D README panner.man Imakefile + data_DATA =3D $(EXTRA_DIST) $(panner_SOURCES) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/periodic/Makefile.am ++++ b/demos/programs/periodic/Makefile.am +@@ -7,7 +7,7 @@ + EXTRA_DIST =3D periodic.uil periodic_l.uil XmdPeriodic.ad Imakefile README + periodic_SOURCES =3D periodic.c + data_DATA =3D $(EXTRA_DIST) $(periodic_SOURCES) periodic.uid +-LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la ++LDADD =3D ../../../lib/Xm/libXm.la ../../../lib/Mrm/libMrm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +=20 +--- a/demos/programs/piano/Makefile.am ++++ b/demos/programs/piano/Makefile.am +@@ -8,6 +8,6 @@ + EXTRA_DIST =3D piano.images README Inv8_part1.piano Inv8_part2.piano \ + piano.man Imakefile + data_DATA =3D $(EXTRA_DIST) $(piano_SOURCES)=20 +-LDADD =3D ../../../lib/Xm/libXm.la -lm ++LDADD =3D ../../../lib/Xm/libXm.la -lm -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/popups/Makefile.am ++++ b/demos/programs/popups/Makefile.am +@@ -7,6 +7,6 @@ + autopopups_SOURCES =3D autopopups.c + EXTRA_DIST =3D README autopopups.man Imakefile + data_DATA =3D $(EXTRA_DIST) $(autopopups_SOURCES) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/sampler2_0/Makefile.am ++++ b/demos/programs/sampler2_0/Makefile.am +@@ -10,6 +10,6 @@ + bin_PROGRAMS =3D sampler2_0 + sampler2_0_SOURCES =3D sampler2_0.c + data_DATA =3D $(sampler2_0_SOURCES) $(EXTRA_DIST) +-LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la ++LDADD =3D ../../lib/Xmd/libXmd.a ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../lib -I$(srcdir)/../../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +--- a/demos/programs/setdate/Makefile.am ++++ b/demos/programs/setdate/Makefile.am +@@ -7,6 +7,6 @@ + EXTRA_DIST =3D XmdSetDate.ad README setDate.man Imakefile + setDate_SOURCES =3D setDate.c + data_DATA =3D $(EXTRA_DIST) $(setDate_SOURCES) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/todo/Makefile.am ++++ b/demos/programs/todo/Makefile.am +@@ -9,4 +9,4 @@ + data_DATA =3D $(EXTRA_DIST) $(todo_SOURCES) +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(srcdir)/../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +-LDADD =3D -L../../lib/Xmd -lXmd -L../../lib/Exm -lExm ../../../lib/Xm/lib= Xm.la=20 ++LDADD =3D -L../../lib/Xmd -lXmd -L../../lib/Exm -lExm ../../../lib/Xm/lib= Xm.la -lXt -lXext -lX11 +--- a/demos/programs/tooltips/Makefile.am ++++ b/demos/programs/tooltips/Makefile.am +@@ -7,6 +7,6 @@ + bin_PROGRAMS =3D tooltips + tooltips_SOURCES =3D tooltips.c + data_DATA =3D $(tooltips_SOURCES) $(EXTRA_DIST) +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +--- a/demos/programs/workspace/Makefile.am ++++ b/demos/programs/workspace/Makefile.am +@@ -11,4 +11,4 @@ + wsm.h wsmSend.h wsmStruct.h wsm_ui.h xrmLib.h + data_DATA =3D $(wsm_SOURCES) $(EXTRA_DIST) + INCLUDES =3D -I$(srcdir)/../../../lib -I$(srcdir)/../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +-LDADD =3D ../../../lib/Xm/libXm.la -L../../lib/Wsm -lWsm ++LDADD =3D ../../../lib/Xm/libXm.la -L../../lib/Wsm -lWsm -lXt -lX11 +--- a/demos/unsupported/aicon/Makefile.am ++++ b/demos/unsupported/aicon/Makefile.am +@@ -2,7 +2,7 @@ +=20 + noinst_PROGRAMS =3D aicon + =20 +-LDADD =3D -L../../lib/Xmd -lXmd ../../../lib/Xm/libXm.la=20 ++LDADD =3D -L../../lib/Xmd -lXmd ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(srcdir)/../../lib -I$(top_build= dir)/lib ${X_CFLAGS}=20 +=20 +--- a/demos/unsupported/dainput/Makefile.am ++++ b/demos/unsupported/dainput/Makefile.am +@@ -4,7 +4,7 @@ +=20 + dainput_SOURCES =3D dainput.c dainput_dlg.c dainput_ui.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/dogs/Makefile.am ++++ b/demos/unsupported/dogs/Makefile.am +@@ -16,7 +16,7 @@ +=20 + dogs_DEPENDENCIES =3D dogs.uid +=20 +-LDADD =3D $(top_builddir)/lib/Mrm/libMrm.la $(top_builddir)/lib/Xm/libXm.= la ++LDADD =3D $(top_builddir)/lib/Mrm/libMrm.la $(top_builddir)/lib/Xm/libXm.= la -lXt -lX11 +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS}= =20 +=20 +--- a/demos/unsupported/hellomotif/Makefile.am ++++ b/demos/unsupported/hellomotif/Makefile.am +@@ -4,7 +4,7 @@ +=20 + SOURCES =3D hellomotif.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/motifshell/Makefile.am ++++ b/demos/unsupported/motifshell/Makefile.am +@@ -4,7 +4,7 @@ +=20 + SOURCES =3D motifshell.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/xmapdef/Makefile.am ++++ b/demos/unsupported/xmapdef/Makefile.am +@@ -4,7 +4,7 @@ +=20 + SOURCES =3D xmapdef.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/xmfonts/Makefile.am ++++ b/demos/unsupported/xmfonts/Makefile.am +@@ -4,7 +4,7 @@ +=20 + SOURCES =3D xmfonts.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt -lX11 +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/xmforc/Makefile.am ++++ b/demos/unsupported/xmforc/Makefile.am +@@ -4,7 +4,7 @@ +=20 + SOURCES =3D xmforc.c +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt +=20 + EXTRA_DIST =3D Imakefile +=20 +--- a/demos/unsupported/xmform/Makefile.am ++++ b/demos/unsupported/xmform/Makefile.am +@@ -6,6 +6,6 @@ +=20 + EXTRA_DIST =3D Imakefile +=20 +-LDADD =3D ../../../lib/Xm/libXm.la ++LDADD =3D ../../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I$(srcdir)/../../../lib -I$(top_builddir)/lib ${X_CFLAGS} +--- a/tools/wml/Makefile.am ++++ b/tools/wml/Makefile.am +@@ -30,7 +30,7 @@ + wml_LDADD =3D -L. -lwml + wml_DEPENDENCIES =3D libwml.a +=20 +-wmldbcreate_LDADD =3D ../../lib/Xm/libXm.la ++wmldbcreate_LDADD =3D ../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -I../../lib -I$(srcdir)/../../lib -I$(srcdir)/../../include = ${X_CFLAGS}=20 +=20 diff --git a/testing/motif/12-fix_buffer_overrun_in_libxm.patch b/testing/m= otif/12-fix_buffer_overrun_in_libxm.patch new file mode 100644 index 0000000..227b1c5 --- /dev/null +++ b/testing/motif/12-fix_buffer_overrun_in_libxm.patch @@ -0,0 +1,17 @@ +Description: Fix buffer overrun in libXm (FontS.c) +Origin: upstream commit dada5ff7f93cb48afaec2469f5dde24178d8d6da +Bug: http://bugs.motifzone.net/show_bug.cgi?id=3D1568 +Author: Arthur Haas +Author: Graham Inggs +Last-Update: 2013-02-19 +--- a/lib/Xm/FontS.c ++++ b/lib/Xm/FontS.c +@@ -1879,7 +1879,7 @@ + String params[1]; + Cardinal num =3D 1; + =09 +- params[1] =3D new_font; ++ params[0] =3D new_font; + dbg(); _XmWarningMsg((Widget) fsw, XmNbadXlfdFont, + XmNbadXlfdFontMsg, params, num); + } diff --git a/testing/motif/13-fix_hardcoded_x11rgb_path.patch b/testing/mot= if/13-fix_hardcoded_x11rgb_path.patch new file mode 100644 index 0000000..6d53285 --- /dev/null +++ b/testing/motif/13-fix_hardcoded_x11rgb_path.patch @@ -0,0 +1,54 @@ +Description: Fix hardcoded path to /usr/lib/X11/rgb.txt in lib/Xm/ColorS.c + LibXm is hardcoded to read rgb.txt from /usr/lib/X11 but this file, provi= ded + by x11-common in Debian, is located in /etc/X11 and /usr/share/X11 via sy= mlink. + . + This patch fixes this by allowing the directory in which rgb.txt resides = to be + customized by the --with-x11rgbdir=3DDIR configure option. +Author: Graham Inggs +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1585 +Last-Update: 2013-03-12 +--- a/configure.ac ++++ b/configure.ac +@@ -189,6 +189,10 @@ + XMBINDDIR_FALLBACK=3D"$xmbinddir" + AC_SUBST(XMBINDDIR_FALLBACK) +=20 ++AC_ARG_WITH(x11rgbdir, [ --with-x11rgbdir=3DDIR rgb.txt is located in D= IR], x11rgbdir=3D$withval, x11rgbdir=3D"/usr/lib/X11") ++X11RGBPATH=3D"$x11rgbdir/rgb.txt" ++AC_SUBST(X11RGBPATH) ++ + RM=3D"rm -f" + AC_SUBST(RM) +=20 +--- a/lib/Xm/ColorS.c ++++ b/lib/Xm/ColorS.c +@@ -123,6 +123,10 @@ + * STATIC DECLARATIONS + ************************************************************/ +=20 ++#ifndef X11RGBPATH ++#define X11RGBPATH "/usr/lib/X11/rgb.txt" ++#endif ++ + static XtResource resources[] =3D + { + { +@@ -146,7 +150,7 @@ + { + XmNrgbFile, XmCString, XmRString, + sizeof(String), XtOffsetOf(XmColorSelectorRec, cs.rgb_file), +- XmRString, (XtPointer) "/usr/lib/X11/rgb.txt" ++ XmRString, (XtPointer) X11RGBPATH + }, + #endif + { +--- a/lib/Xm/Makefile.am ++++ b/lib/Xm/Makefile.am +@@ -8,6 +8,7 @@ + INCLUDES =3D -I.. -I$(srcdir)/.. -DXMBINDDIR_FALLBACK=3D\"@XMBINDDIR_FALL= BACK@\" \ + -DINCDIR=3D\"@INCDIR@\" \ + -DLIBDIR=3D\"@LIBDIR@\" \ ++ -DX11RGBPATH=3D\"@X11RGBPATH@\" \ + ${X_CFLAGS} + xmdir =3D $(includedir)/Xm +=20 diff --git a/testing/motif/14-fix_ac_find_xft.patch b/testing/motif/14-fix_= ac_find_xft.patch new file mode 100644 index 0000000..76c2318 --- /dev/null +++ b/testing/motif/14-fix_ac_find_xft.patch @@ -0,0 +1,91 @@ +Description: Fix ac_find_xft.m4 + ac_find_xft.m4 fails tests required to enable building with Xft anti-alia= sed fonts. + We also need to add -lfontconfig to LIBS to prevent underlinking of libXm. + . + This patch fixes these. Build-depends on libfontconfig1-dev, libfreetype= 6-dev and + libxrender-dev can be dropped as they are all dependencies of libxft-dev. +Author: Graham Inggs +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1591 +Last-Update: 2013-03-13 +--- a/ac_find_xft.m4 ++++ b/ac_find_xft.m4 +@@ -54,28 +54,28 @@ +=20 + case "$freetype_lib" in + no) +- freetype_lib=3D"" ++ FREETYPE_LIBS=3D"" + ;; + yes) + case "$ft_config" in + no) +- freetype_lib=3D"" ++ FREETYPE_LIBS=3D"-lfreetype" + ;; + *) +- freetype_lib=3D"`$ft_config --libs`" ++ FREETYPE_LIBS=3D"`$ft_config --libs`" + ;; + esac + ;; + *) +- freetype_lib=3D"-L$freetype_lib -lfreetype" ++ FREETYPE_LIBS=3D"-L$freetype_lib -lfreetype" + ;; + esac +=20 + saved_LIBS=3D"$LIBS" +-LIBS=3D"$LIBS $freetype_lib" ++LIBS=3D"$LIBS $FREETYPE_LIBS" + saved_CPPFLAGS=3D"$CPPFLAGS" + CPPFLAGS=3D"$CPPFLAGS $FREETYPE_CFLAGS" +-AC_CHECK_HEADERS(freetype/freetype.h) ++AC_CHECK_HEADERS(freetype/freetype.h,,,[#include ]) +=20 + FINDXFT_HAVE_FREETYPE=3D"no" + case "$ac_cv_header_freetype_freetype_h" in +@@ -94,6 +94,7 @@ + FINDXFT_HAVE_FREETYPE=3D"yes" + AC_DEFINE(HAVE_FREETYPE, 1, Means we have discovered the FreeType libra= ry) + AC_SUBST(FREETYPE_CFLAGS) ++ AC_SUBST(FREETYPE_LIBS) + ;; + esac + ;; +@@ -134,8 +135,19 @@ + FINDXFT_HAVE_XRENDER=3D"no" + case "$have_x" in + yes) +- XRENDER_CFLAGS=3D"-I$x_includes" +- XRENDER_LIBS=3D"-L$x_libraries -lXft -lXrender" ++ if test x$x_includes =3D x ++ then ++ XRENDER_CFLAGS=3D"" ++ else ++ XRENDER_CFLAGS=3D"-I$x_includes" ++ fi ++ ++ if test x$x_libraries =3D x ++ then ++ XRENDER_LIBS=3D"-lXft -lXrender" ++ else ++ XRENDER_LIBS=3D"-I$x_libraries -lXft -lXrender" ++ fi +=20 + saved_LIBS=3D"$LIBS" + LIBS=3D"$LIBS $XRENDER_LIBS" +@@ -203,12 +215,12 @@ +=20 + case "$fontconfig_lib" in + no) +- fontconfig_lib=3D"" ++ FONTCONFIG_LIBS=3D"" + ;; + yes) + case "$fc_config" in + no) +- fontconfig_lib=3D"" ++ FONTCONFIG_LIBS=3D"-lfontconfig" + ;; + *) + FONTCONFIG_LIBS=3D"`$fc_config --libs`" diff --git a/testing/motif/15-link_uil_against_libuil.patch b/testing/motif= /15-link_uil_against_libuil.patch new file mode 100644 index 0000000..11792a7 --- /dev/null +++ b/testing/motif/15-link_uil_against_libuil.patch @@ -0,0 +1,29 @@ +Description: Link the uil executable against libUil + Linking the uil executable againt libUil instead of compiling with the li= bUil + code results in a reduction in size of the uil executable from about 348KB + to about 16KB. + . + This patch originates from Red Hat. +Author: Graham Inggs +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1586 +Last-Update: 2013-03-12 +--- a/clients/uil/Makefile.am ++++ b/clients/uil/Makefile.am +@@ -13,7 +13,7 @@ +=20 + libUil_la_LIBADD =3D UilParser.lo ../../lib/Mrm/libMrm.la ../../lib/Xm/li= bXm.la -lXt +=20 +-uil_LDADD =3D ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la -lXt ++uil_LDADD =3D libUil.la ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la -lXt +=20 + INCLUDES =3D -DINCDIR=3D\"@INCDIR@\" \ + -DLIBDIR=3D\"@LIBDIR@\" \ +@@ -42,7 +42,7 @@ + UilLstMac.c UilSemVal.c UilSemCSet.c UilDB.c +=20 + SRCS =3D $(COMMON_SRC) +-SRCS2 =3D $(COMMON_SRC) UilMain.c ++SRCS2 =3D UilMain.c +=20 + HEADERS_1 =3D Uil.h UilSymGl.h UilSymDef.h \ + UilDef.h XmAppl.uil diff --git a/testing/motif/16-fix-undefined-use-of-sprintf.patch b/testing/= motif/16-fix-undefined-use-of-sprintf.patch new file mode 100644 index 0000000..95a753e --- /dev/null +++ b/testing/motif/16-fix-undefined-use-of-sprintf.patch @@ -0,0 +1,17 @@ +Description: Fix undefined use of sprintf + This patch fixes the undefined use of sprintf when the + source and destination buffers overlap. +Author: Graham Inggs +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1628 +Last-Update: 2013-09-24 +--- a/lib/Xm/XmRenderT.c ++++ b/lib/Xm/XmRenderT.c +@@ -2703,7 +2703,7 @@ + number =3D tlist -> count; + tab =3D (_XmTab) tlist -> start; + while(number > 0) { +- sprintf(temp, "%s %f %d %d %d, ", temp, tab -> value,=20 ++ sprintf(temp + strlen(temp), " %f %d %d %d, ", tab -> value, + tab -> units, tab -> alignment, tab -> offsetModel); + tab =3D (_XmTab) tab -> next; + number--; diff --git a/testing/motif/17-switch-to-system-iswspace.patch b/testing/mot= if/17-switch-to-system-iswspace.patch new file mode 100644 index 0000000..a77b879 --- /dev/null +++ b/testing/motif/17-switch-to-system-iswspace.patch @@ -0,0 +1,384 @@ +Description: Switch to system iswspace() function + This patch replaces calls to _XmDataFieldIsWSpace() in lib/Xm/DataF.c + and _XmTextFieldIsWSpace() in lib/Xm/TextF.c with calls to the system + iswspace() function. + . + It fixes an array bounds error in lib/Xm/DataF.c where=20 + _XmDataFieldIsWSpace() is called with num_entries =3D 3. +Author: Graham Inggs +Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=3D1629 +Last-Update: 2013-11-18 +--- a/lib/Xm/DataF.c ++++ b/lib/Xm/DataF.c +@@ -208,7 +208,6 @@ + static Boolean df_VerifyLeave() ; + static Boolean _XmDataFieldIsWordBoundary() ; + static int _XmGetImage(Screen *, char *, XImage **); +-static Boolean _XmDataFieldIsWSpace() ; + static void df_FindWord() ; + static void df_FindPrevWord() ; + static void df_FindNextWord() ; +@@ -549,10 +548,6 @@ + XmDataFieldWidget tf, + XmTextPosition pos1, + XmTextPosition pos2) ; +-static Boolean _XmDataFieldIsWSpace(=20 +- wchar_t wide_char, +- wchar_t *white_space, +- int num_entries) ; + static void df_FindWord(=20 + XmDataFieldWidget tf, + XmTextPosition begin, +@@ -4549,40 +4544,6 @@ + return False; + } +=20 +-/* This routine accepts an array of wchar_t's containing wchar encodings +- * of whitespace characters (and the number of array elements), comparing +- * the wide character passed to each element of the array. If a match +- * is found, we got a white space. This routine exists only because +- * iswspace(3c) is not yet standard. If a system has isw* available, +- * calls to this routine should be changed to iswspace(3c) (and callers +- * should delete initialization of the array), and this routine should +- * be deleted. Its a stop gap measure to avoid allocating an instance +- * variable for the white_space array and/or declaring a widget wide +- * global for the data and using a macro. Its ugly, but it works and=20 +- * in the long run will be replaced by standard functionality. */ +- +-/* ARGSUSED */ +-static Boolean +-#ifdef _NO_PROTO +-_XmDataFieldIsWSpace( wide_char, white_space, num_entries ) +- wchar_t wide_char ; +- wchar_t * white_space ; +- int num_entries ; +-#else +-_XmDataFieldIsWSpace( +- wchar_t wide_char, +- wchar_t * white_space , +- int num_entries ) +-#endif /* _NO_PROTO */ +-{ +- int i; +- +- for (i=3Dnum_entries; i > 0; i--){ +- if (wide_char =3D=3D white_space[i]) return True; +- } +- return False; +-} +- + static void=20 + #ifdef _NO_PROTO + df_FindWord( tf, begin, left, right ) +@@ -4599,7 +4560,6 @@ + #endif /* _NO_PROTO */ + { + XmTextPosition start, end; +- wchar_t white_space[3]; +=20 + if (XmTextF_max_char_size(tf) =3D=3D 1) { + for (start =3D begin; start > 0; start--) { +@@ -4617,11 +4577,8 @@ + } + *right =3D end - 1; + } else { /* check for iswspace and iswordboundary in each direction */ +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); + for (start =3D begin; start > 0; start --) { +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[start-1],white_sp= ace, 3) ++ if (iswspace(XmTextF_wc_value(tf)[start-1]) + || _XmDataFieldIsWordBoundary(tf, (XmTextPosition) start - 1,=20 + start)) { + break; +@@ -4630,7 +4587,7 @@ + *left =3D start; +=20 + for (end =3D begin; end <=3D XmTextF_string_length(tf); end++) { +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[end], white_space, 3)){ ++ if (iswspace(XmTextF_wc_value(tf)[end])){ + end++; + break; + } else if (end < XmTextF_string_length(tf)) { +@@ -4659,14 +4616,6 @@ + { +=20 + XmTextPosition start =3D XmTextF_cursor_position(tf); +- wchar_t white_space[3]; +- +- if (XmTextF_max_char_size(tf) !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } +- +=20 + if (XmTextF_max_char_size(tf) =3D=3D 1) { + if ((start > 0) &&=20 +@@ -4680,11 +4629,9 @@ + } + df_FindWord(tf, start, left, right); + } else {=20 +- if ((start > 0) && (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[star= t - 1], +- white_space, 3))) { ++ if ((start > 0) && (iswspace(XmTextF_wc_value(tf)[start - 1]))) { + for (; start > 0; start--) { +- if (!_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[start -1],=20 +- white_space, 3)){ ++ if (!iswspace(XmTextF_wc_value(tf)[start -1])){ + start--; + break; + } +@@ -4713,14 +4660,6 @@ + { +=20 + XmTextPosition end =3D XmTextF_cursor_position(tf); +- wchar_t white_space[3]; +- +- if (XmTextF_max_char_size(tf) !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } +- +=20 + if(XmTextF_max_char_size(tf) =3D=3D 1) { + if (isspace((int)(unsigned char)XmTextF_value(tf)[end])) { +@@ -4742,9 +4681,9 @@ + if (*right < XmTextF_string_length(tf)) + *right =3D *right - 1; + } else { +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[end], white_space, 3)= ) { ++ if (iswspace(XmTextF_wc_value(tf)[end])) { + for ( ; end < XmTextF_string_length(tf); end ++) { +- if (!_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[end], white_space, 3))= { ++ if (!iswspace(XmTextF_wc_value(tf)[end])) { + break; + } + } +@@ -4758,10 +4697,9 @@ + * If word boundary caused by whitespace, set right to the last=20 + * whitespace following the end of the current word. + */ +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[(int)*right], white_s= pace, 3)) { ++ if (iswspace(XmTextF_wc_value(tf)[(int)*right])) { + while (*right < XmTextF_string_length(tf) && +- _XmDataFieldIsWSpace(XmTextF_wc_value(tf)[(int)*right],=20 +- white_space, 3)) { ++ iswspace(XmTextF_wc_value(tf)[(int)*right])) { + *right =3D *right + 1; + } + if (*right < XmTextF_string_length(tf)) +@@ -5872,13 +5810,6 @@ + { + XmDataFieldWidget tf =3D (XmDataFieldWidget) w; + XmTextPosition cursorPos, position, dummy; +- wchar_t white_space[3]; +- +- if (XmTextF_max_char_size(tf) !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } +=20 + cursorPos =3D XmTextF_cursor_position(tf); +=20 +@@ -5896,16 +5827,13 @@ + } + } + } else { +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[cursorPos], +- white_space, 3)) ++ if (iswspace(XmTextF_wc_value(tf)[cursorPos])) + df_FindWord(tf, cursorPos, &dummy, &position); + else + df_FindNextWord(tf, &dummy, &position); +- if (_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[position], +- white_space, 3)){ ++ if (iswspace(XmTextF_wc_value(tf)[position])){ + for (; position < XmTextF_string_length(tf); position++) { +- if (!_XmDataFieldIsWSpace(XmTextF_wc_value(tf)[position],=20 +- white_space, 3)) ++ if (!iswspace(XmTextF_wc_value(tf)[position])) + break; + } + } +--- a/lib/Xm/TextF.c ++++ b/lib/Xm/TextF.c +@@ -360,10 +360,6 @@ + XmTextPosition pos1, + XmTextPosition pos2); +=20 +-static Boolean _XmTextFieldIsWSpace(wchar_t wide_char, +- wchar_t *white_space, +- int num_entries); +- + static void FindWord(XmTextFieldWidget tf, + XmTextPosition begin, + XmTextPosition *left, +@@ -3514,32 +3510,6 @@ + return False; + } +=20 +-/* This routine accepts an array of wchar_t's containing wchar encodings +- * of whitespace characters (and the number of array elements), comparing +- * the wide character passed to each element of the array. If a match +- * is found, we got a white space. This routine exists only because +- * iswspace(3c) is not yet standard. If a system has isw* available, +- * calls to this routine should be changed to iswspace(3c) (and callers +- * should delete initialization of the array), and this routine should +- * be deleted. Its a stop gap measure to avoid allocating an instance +- * variable for the white_space array and/or declaring a widget wide +- * global for the data and using a macro. Its ugly, but it works and=20 +- * in the long run will be replaced by standard functionality. */ +- +-/* ARGSUSED */ +-static Boolean +-_XmTextFieldIsWSpace(wchar_t wide_char, +- wchar_t * white_space , +- int num_entries) +-{ +- int i; +- =20 +- for (i=3D0; i < num_entries; i++) { +- if (wide_char =3D=3D white_space[i]) return True; +- } +- return False; +-} +- + static void=20 + FindWord(XmTextFieldWidget tf, + XmTextPosition begin, +@@ -3547,7 +3517,6 @@ + XmTextPosition *right) + { + XmTextPosition start, end; +- wchar_t white_space[3]; + =20 + if (tf->text.max_char_size =3D=3D 1) { + for (start =3D begin; start > 0; start--) { +@@ -3565,11 +3534,8 @@ + } + *right =3D end - 1; + } else { /* check for iswspace and iswordboundary in each direction */ +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); + for (start =3D begin; start > 0; start --) { +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[start-1],white_space, 3) ++ if (iswspace(TextF_WcValue(tf)[start-1]) + || _XmTextFieldIsWordBoundary(tf, (XmTextPosition) start - 1,=20 + start)) { + break; +@@ -3578,7 +3544,7 @@ + *left =3D start; + =20 + for (end =3D begin; end <=3D tf->text.string_length; end++) { +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[end], white_space, 3)) { ++ if (iswspace(TextF_WcValue(tf)[end])) { + end++; + break; + } else if (end < tf->text.string_length) { +@@ -3599,14 +3565,6 @@ + { + =20 + XmTextPosition start =3D TextF_CursorPosition(tf); +- wchar_t white_space[3]; +- =20 +- if (tf->text.max_char_size !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } +- =20 + =20 + if (tf->text.max_char_size =3D=3D 1) { + if ((start > 0) &&=20 +@@ -3620,11 +3578,9 @@ + } + FindWord(tf, start, left, right); + } else {=20 +- if ((start > 0) && (_XmTextFieldIsWSpace(TextF_WcValue(tf)[start - 1], +- white_space, 3))) { ++ if ((start > 0) && (iswspace(TextF_WcValue(tf)[start - 1]))) { + for (; start > 0; start--) { +- if (!_XmTextFieldIsWSpace(TextF_WcValue(tf)[start -1],=20 +- white_space, 3)) { ++ if (!iswspace(TextF_WcValue(tf)[start -1])) { + start--; + break; + } +@@ -3645,14 +3601,6 @@ + { + =20 + XmTextPosition end =3D TextF_CursorPosition(tf); +- wchar_t white_space[3]; +- =20 +- if (tf->text.max_char_size !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } +- =20 + =20 + if(tf->text.max_char_size =3D=3D 1) { + if (isspace((unsigned char)TextF_Value(tf)[end])) { +@@ -3674,9 +3622,9 @@ + if (*right < tf->text.string_length) + *right =3D *right - 1; + } else { +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[end], white_space, 3)) { ++ if (iswspace(TextF_WcValue(tf)[end])) { + for (; end < tf->text.string_length; end ++) { +- if (!_XmTextFieldIsWSpace(TextF_WcValue(tf)[end], white_space, 3)) { ++ if (!iswspace(TextF_WcValue(tf)[end])) { + break; + } + } +@@ -3690,10 +3638,9 @@ + * If word boundary caused by whitespace, set right to the last=20 + * whitespace following the end of the current word. + */ +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[(int)*right], white_space,= 3)) { ++ if (iswspace(TextF_WcValue(tf)[(int)*right])) { + while (*right < tf->text.string_length && +- _XmTextFieldIsWSpace(TextF_WcValue(tf)[(int)*right],=20 +- white_space, 3)) { ++ iswspace(TextF_WcValue(tf)[(int)*right])) { + *right =3D *right + 1; + } + if (*right < tf->text.string_length) +@@ -4546,13 +4493,6 @@ + { + XmTextFieldWidget tf =3D (XmTextFieldWidget) w; + XmTextPosition cursorPos, position, dummy; +- wchar_t white_space[3]; +- =20 +- if (tf->text.max_char_size !=3D 1) { +- (void)mbtowc(&white_space[0], " ", 1); +- (void)mbtowc(&white_space[1], "\n", 1); +- (void)mbtowc(&white_space[2], "\t", 1); +- } + =20 + cursorPos =3D TextF_CursorPosition(tf); + =20 +@@ -4570,16 +4510,13 @@ + } + } + } else { +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[cursorPos], +- white_space, 3)) ++ if (iswspace(TextF_WcValue(tf)[cursorPos])) + FindWord(tf, cursorPos, &dummy, &position); + else + FindNextWord(tf, &dummy, &position); +- if (_XmTextFieldIsWSpace(TextF_WcValue(tf)[position], +- white_space, 3)) { ++ if (iswspace(TextF_WcValue(tf)[position])) { + for (; position < tf->text.string_length; position++) { +- if (!_XmTextFieldIsWSpace(TextF_WcValue(tf)[position],=20 +- white_space, 3)) ++ if (!iswspace(TextF_WcValue(tf)[position])) + break; + } + } diff --git a/testing/motif/18-updated-fix-1565.patch b/testing/motif/18-upd= ated-fix-1565.patch new file mode 100644 index 0000000..850a6e2 --- /dev/null +++ b/testing/motif/18-updated-fix-1565.patch @@ -0,0 +1,431 @@ +Description: Updated fix for upstream bug #1565 + This patch fixes the problem introduced by fix #1565, included in + Motif 2.3.4, which breaks keyboard navigation in menus. +Author: Olexiy Chernyavskyy +Origin: upstream, http://bugs.motifzone.net/show_bug.cgi?id=3D1565 +Bug: http://bugs.motifzone.net/show_bug.cgi?id=3D1630 +Bug-Debian: http://bugs.debian.org/730026 +Last-Update: 2013-11-29 +--- a/lib/Xm/ComboBox.c ++++ b/lib/Xm/ComboBox.c +@@ -3164,6 +3164,9 @@ + Arg args[4]; + ArgList merged_args; + Cardinal n; ++#ifdef FIX_1565 ++ XmGrabShellWidget grabsh; ++#endif +=20 + n =3D 0; + XtSetArg(args[n], XmNlayoutDirection, LayoutM(parent)), n++; +@@ -3175,6 +3178,11 @@ + merged_args, n + *num_args); + XtFree((char*)merged_args); +=20 ++#ifdef FIX_1565 ++ grabsh =3D (XmGrabShellWidget) shell; ++ grabsh->grab_shell.set_input_focus =3D False; ++#endif ++ + return shell; + } + =0C +--- a/lib/Xm/DropDown.c ++++ b/lib/Xm/DropDown.c +@@ -2027,6 +2027,9 @@ + Arg *new_list, largs[10]; + Cardinal num_largs; + Widget sb; ++#ifdef FIX_1565 ++ XmGrabShellWidget grabsh; ++#endif +=20 + num_largs =3D 0; + XtSetArg(largs[num_largs], XmNoverrideRedirect, True); num_largs++; +@@ -2040,6 +2043,10 @@ + xmGrabShellWidgetClass, w, + new_list, + num_largs + num_args); ++#ifdef FIX_1565 ++ grabsh =3D (XmGrabShellWidget) XmDropDown_popup_shell(cbw); ++ grabsh->grab_shell.set_input_focus =3D False; ++#endif + XtFree((char *) new_list); +=20 + #ifdef FIX_1446 +--- a/lib/Xm/GrabShell.c ++++ b/lib/Xm/GrabShell.c +@@ -283,6 +283,10 @@ +=20 + /* CR 9920: Popdown may be requested before MapNotify. */ + grabsh->grab_shell.mapped =3D False; ++ ++#ifdef FIX_1565 ++ grabsh->grab_shell.set_input_focus =3D True; ++#endif + } + =0C + /* +@@ -395,8 +399,16 @@ + XGetInputFocus(XtDisplay(shell), &grabshell->grab_shell.old_focus, + &grabshell->grab_shell.old_revert_to); + old_handler =3D XSetErrorHandler(IgnoreXErrors); +- XSetInputFocus(XtDisplay(shell), XtWindow(shell), RevertToParent, time); +- XSync(XtDisplay(shell), False); ++#ifdef FIX_1565 ++ if (! grabshell->grab_shell.set_input_focus) { ++ XmForceGrabKeyboard(shell, time); ++ } else { ++#endif ++ XSetInputFocus(XtDisplay(shell), XtWindow(shell), RevertToParent, tim= e); ++ XSync(XtDisplay(shell), False); ++#ifdef FIX_1565 ++ } ++#endif + XSetErrorHandler(old_handler); + } + =0C +--- a/lib/Xm/GrabShellP.h ++++ b/lib/Xm/GrabShellP.h +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include "XmI.h" +=20 + #ifdef __cplusplus + extern "C" { +@@ -55,6 +56,9 @@ + Boolean mapped; + Window old_focus; + int old_revert_to; ++#ifdef FIX_1565 ++ Boolean set_input_focus; ++#endif + } XmGrabShellPart; +=20 +=20 +--- a/lib/Xm/MenuShell.c ++++ b/lib/Xm/MenuShell.c +@@ -1514,9 +1514,7 @@ +=20 + /** the real grab ***/ + _XmMenuGrabKeyboardAndPointer((Widget)rowcol, _time); +-#ifndef FIX_1565 + _XmMenuFocus(XtParent(rowcol), XmMENU_BEGIN, _time); +-#endif +=20 + /* To support menu replay, keep the pointer in sync mode */ + XAllowEvents(XtDisplay(rowcol), SyncPointer, CurrentTime); +--- a/lib/Xm/MenuUtil.c ++++ b/lib/Xm/MenuUtil.c +@@ -1053,11 +1053,7 @@ +=20 + register int status =3D + (_XmGrabKeyboard(widget, +-#ifdef FIX_1565 +- False, +-#else + True, +-#endif + GrabModeSync, + GrabModeAsync, + time) !=3D GrabSuccess); +--- a/lib/Xm/RCMenu.c ++++ b/lib/Xm/RCMenu.c +@@ -85,6 +85,9 @@ + #include "TraversalI.h" + #include "UniqueEvnI.h" + #include "VendorSI.h" ++#ifdef FIX_1565 ++#include ++#endif +=20 + #define FIX_1535 +=20 +@@ -943,6 +946,13 @@ + XmMenuState mst =3D _XmGetMenuState((Widget)w); + Window tmpWindow; + int tmpRevert; ++#ifdef FIX_1565 ++ Widget shell; ++ ++ shell =3D w; ++ while (! XtIsSubclass(shell, shellWidgetClass)) ++ shell =3D XtParent(shell); ++#endif + =20 + if (_time =3D=3D CurrentTime)=20 + _time =3D XtLastTimestampProcessed(XtDisplay(w)); +@@ -983,6 +993,11 @@ + shell.popped_up)) + **/ + { ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSub= class(shell, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), mst->RC_menuFocus.oldFocus, + mst->RC_menuFocus.oldRevert, + mst->RC_menuFocus.oldTime); +@@ -996,6 +1011,11 @@ + */ + else + { ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSub= class(shell, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), mst->RC_menuFocus.oldFocus, + mst->RC_menuFocus.oldRevert, + mst->RC_menuFocus.oldTime); +@@ -1014,6 +1034,11 @@ + RC_menuFocus.oldFocus); + mst->RC_menuFocus.oldTime =3D _time - 1; +=20 ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSubclass(she= ll, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), XtWindow(w), mst->RC_menuFocus.oldRevert, + mst->RC_menuFocus.oldTime); +=20 +@@ -1027,6 +1052,11 @@ + XGetInputFocus(XtDisplay(w), &tmpWindow, &tmpRevert); + if (tmpWindow !=3D XtWindow(w)) + { ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSubclass(s= hell, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), XtWindow(w), tmpRevert, _time); +=20 + mst->RC_menuFocus.oldRevert =3D tmpRevert; +@@ -1048,6 +1078,11 @@ +=20 + break; + case XmMENU_MIDDLE: ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSubclass(she= ll, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), XtWindow(w), + mst->RC_menuFocus.oldRevert, + mst->RC_menuFocus.oldTime); +@@ -1062,6 +1097,11 @@ + if ((tmpWindow !=3D XtWindow(w)) && + (_time > mst->RC_menuFocus.oldTime)) + { ++#ifdef FIX_1565 ++ if (XtIsSubclass(shell, xmGrabShellWidgetClass) || XtIsSubclass(s= hell, xmMenuShellWidgetClass)) ++ XmForceGrabKeyboard(w, _time); ++ else ++#endif + SetInputFocus(XtDisplay(w), XtWindow(w), tmpRevert, _time); +=20 + mst->RC_menuFocus.oldRevert =3D tmpRevert; +--- a/lib/Xm/Xm.c ++++ b/lib/Xm/Xm.c +@@ -40,6 +40,10 @@ + #ifdef FIX_345 + #include + #endif ++#ifdef FIX_1565 ++#include ++#include ++#endif +=20 +=20 + /************************************************************************= ** +@@ -530,3 +534,173 @@ + return p; + } + #endif ++ ++#ifdef FIX_1565 ++ ++typedef struct _GrabData GrabData; ++struct _GrabData { ++ Widget w; ++ GrabData *next; ++}; ++ ++static void _XmSendFocusEvent(Widget child, int type); ++static void _XmStartDispatcher(Display *display); ++static Boolean _XmEventDispatcher(XEvent *event); ++static void UnmapHandler(Widget w, XtPointer client_data, XEvent *event, = Boolean *cont); ++static Boolean _UngrabKeyboard(Widget w); ++ ++static GrabData *grabw_top =3D NULL; ++static int xm_dispatcher_on =3D 0; ++static XtEventDispatchProc saved_dispatcher_proc =3D NULL; ++static XtEventDispatchProc xt_dispatcher_proc =3D NULL; ++ ++/* ++ XmForceGrabKeyboard function is defined to be a substitutor of XSetInp= utFocus calls ++ for popup and pulldown menus that should grab keyboard focus yet main = window at the ++ same time should visually stay in focus for window manager. This resol= ves focus flip ++ issue when popup or pulldown menu is raised. ~ochern ++ */ ++void XmForceGrabKeyboard(Widget w, Time time) ++{ ++ GrabData *grabw; ++ ++ if (!w) ++ return; ++ ++ while (! XtIsSubclass(w, shellWidgetClass)) ++ w =3D XtParent(w); ++ ++ if (! (XtIsSubclass(w, xmGrabShellWidgetClass) || XtIsSubclass(w, xmMen= uShellWidgetClass))) ++ return; ++ ++ _XmStartDispatcher(XtDisplay(w)); ++ ++ _UngrabKeyboard(w); ++ ++ grabw =3D (GrabData *) XtMalloc(sizeof(GrabData)); ++ grabw->w =3D w; ++ _XmProcessLock(); ++ grabw->next =3D grabw_top; ++ grabw_top =3D grabw; ++ _XmProcessUnlock(); ++ ++ XtInsertEventHandler(w, StructureNotifyMask, False, UnmapHandler, NULL,= XtListHead); ++ ++ _XmSendFocusEvent(w, FocusIn); ++ ++ /* Following the XSetInputFocus behaviour we force sending FocusOut (se= e XGrabKeyboard(3)) ++ event to a previous keyboard holder */ ++ XtGrabKeyboard(w, True, GrabModeAsync, GrabModeAsync, time); ++} ++ ++static void _XmStartDispatcher(Display *display) ++{ ++ if (!display) ++ return; ++ ++ _XmProcessLock(); ++ ++ if (xm_dispatcher_on) { ++ _XmProcessUnlock(); ++ return; ++ } ++ ++ saved_dispatcher_proc =3D XtSetEventDispatcher(display, KeyPress, _XmEv= entDispatcher); ++ if (! xt_dispatcher_proc) ++ xt_dispatcher_proc =3D saved_dispatcher_proc; ++ XtSetEventDispatcher(display, KeyRelease, _XmEventDispatcher); ++ xm_dispatcher_on =3D 1; ++ ++ _XmProcessUnlock(); ++} ++ ++static Boolean _XmEventDispatcher(XEvent *event) ++{ ++ _XmProcessLock(); ++ if (grabw_top) { ++ if (event->type =3D=3D KeyPress || event->type =3D=3D KeyRelease) ++ event->xany.window =3D XtWindow(grabw_top->w); ++ } ++ _XmProcessUnlock(); ++ ++ if (saved_dispatcher_proc) { ++ return (*saved_dispatcher_proc)(event); ++ } else if (xt_dispatcher_proc) { ++ return (*xt_dispatcher_proc)(event); ++ } else { ++ if (grabw_top) ++ XtSetEventDispatcher(XtDisplay(grabw_top->w), event->type, NULL); ++ return XtDispatchEvent(event); ++ } ++} ++ ++static void UnmapHandler(Widget w, XtPointer client_data, XEvent *event, = Boolean *cont) ++{ ++ if (event->type =3D=3D UnmapNotify) ++ _UngrabKeyboard(w); ++ if (! grabw_top) { ++ XtSetEventDispatcher(XtDisplay(w), KeyPress, saved_dispatcher_proc); ++ XtSetEventDispatcher(XtDisplay(w), KeyRelease, saved_dispatcher_proc); ++ xm_dispatcher_on =3D 0; ++ } ++ ++ /* we do not call XtUngrabKeyboard since X server automatically perform= s an ++ UngrabKeyboard request if the event window for an active keyboard gr= ab becomes ++ not viewable. ~ochern */ ++} ++ ++static Boolean _UngrabKeyboard(Widget w) ++{ ++ GrabData *grabw, *grabw_prev; ++ ++ _XmProcessLock(); ++ if (! grabw_top) { ++ _XmProcessUnlock(); ++ return False; ++ } ++ ++ grabw =3D grabw_top; ++ grabw_prev =3D NULL; ++ while(grabw && grabw->w !=3D w) { ++ grabw_prev =3D grabw; ++ grabw =3D grabw->next; ++ } ++ if (grabw) { ++ if (grabw_prev) ++ grabw_prev->next =3D grabw->next; ++ else ++ grabw_top =3D grabw->next; ++ XtFree((char*) grabw); ++ ++ _XmProcessUnlock(); ++ return True; ++ } ++ ++ _XmProcessUnlock(); ++ return False; ++} ++ ++static void _XmSendFocusEvent(Widget child, int type) ++{ ++ child =3D XtIsWidget(child) ? child : _XtWindowedAncestor(child); ++ if (XtIsSensitive(child) && !child->core.being_destroyed ++ && XtIsRealized(child) && (XtBuildEventMask(child) & FocusChangeMas= k)) ++ { ++ XFocusChangeEvent event; ++ Display* dpy =3D XtDisplay (child); ++ ++ event.type =3D type; ++ event.serial =3D LastKnownRequestProcessed(dpy); ++ event.send_event =3D True; ++ event.display =3D dpy; ++ event.window =3D XtWindow(child); ++ event.mode =3D NotifyNormal; ++ event.detail =3D NotifyAncestor; ++ if (XFilterEvent((XEvent*)&event, XtWindow(child))) ++ return; ++ XtDispatchEventToWidget(child, (XEvent*)&event); ++ } ++} ++ ++#endif ++ +--- a/lib/Xm/XmI.h ++++ b/lib/Xm/XmI.h +@@ -242,7 +242,9 @@ + extern XChar2b* _XmUtf8ToUcs2(char *draw_text, + size_t seg_len, + size_t *ret_str_len); +- ++#ifdef FIX_1565 ++extern void XmForceGrabKeyboard(Widget w, Time time); ++#endif +=20 + /******** End Private Function Declarations ********/ +=20 diff --git a/testing/motif/APKBUILD b/testing/motif/APKBUILD new file mode 100644 index 0000000..3ad2341 --- /dev/null +++ b/testing/motif/APKBUILD @@ -0,0 +1,131 @@ +# Contributor: +# Maintainer: + + +pkgname=3Dmotif +pkgver=3D2.3.4 +pkgrel=3D0 +pkgdesc=3D"The Motif library" +url=3D"http://motif.ics.com/" +arch=3D"all" +license=3D"LGPL2" +depends=3D"" +depends_dev=3D"libx11-dev libxt-dev libxpm-dev libxext-dev xbitmaps" +makedepends=3D"$depends_dev libtool autoconf automake flex flex-libs flex-= dev bison" +install=3D"" +subpackages=3D"$pkgname-dev $pkgname-doc" +source=3D"http://downloads.sourceforge.net/$pkgname/Motif%20$pkgver%20Sour= ce%20Code/motif-$pkgver-src.tgz +01-fix-autoconf.patch +02-fix-format-security.patch +03-no-demos.patch +05-multiarch-specialcase-libdir-X11.patch +06-cast-size_t-to-int.patch +07-fix_lintian_reported_manpage_typos.patch +08-fix_hyphen_in_man_pages.patch +09-fix_typo_in_libxm.patch +10-fix_manpage-has-bad-whatis-entry.patch +11-fix_underlinking.patch +12-fix_buffer_overrun_in_libxm.patch +13-fix_hardcoded_x11rgb_path.patch +14-fix_ac_find_xft.patch +15-link_uil_against_libuil.patch +16-fix-undefined-use-of-sprintf.patch +17-switch-to-system-iswspace.patch +18-updated-fix-1565.patch" + +_builddir=3D"$srcdir/$pkgname-$pkgver" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { +# reasons for --disable- flags: +#png, jpeg: most programs that use png and jpeg use the libraries directly; +# enabling these mainly matters if you want to point the resources at a=20 +# png/jpeg image. +#printing: this is Xprint support; only CDE uses this, others print direct= ly. +#demos: one of the demos can break the build +#xft: could be enabled; currently experimental from what I understand. + cd "$_builddir" + ./autogen.sh \ + --build=3D$CBUILD \ + --host=3D$CHOST \ + --disable-demos \ + --disable-printing \ + --disable-jpeg \ + --disable-png \ + --disable-xft \ + --prefix=3D/usr \ + --sysconfdir=3D/etc \ + --mandir=3D/usr/share/man \ + --localstatedir=3D/var \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR=3D"$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la +} + +md5sums=3D"612bb8127d0d31da6e5474edf8a5c247 motif-2.3.4-src.tgz +191cee7af8137e75385153a8f334f50c 01-fix-autoconf.patch +34044aeba20b7e4e9c543c771ce015f6 02-fix-format-security.patch +7302c76677201e0be743fe3bb7f1cc8b 03-no-demos.patch +1adcb4a307af3281722a20bdcaf0d0c9 05-multiarch-specialcase-libdir-X11.patch +bb676bc8f0a0d24fbb5c599b72dc827a 06-cast-size_t-to-int.patch +ec750525c43510227b834d70239f7af4 07-fix_lintian_reported_manpage_typos.pa= tch +d6d836f83e3f9c9b2754f3486c7e3682 08-fix_hyphen_in_man_pages.patch +829ee2d6e21de7463bc12ef35347a000 09-fix_typo_in_libxm.patch +b993f84341d5b015ae1059b68af5ab55 10-fix_manpage-has-bad-whatis-entry.patch +96bc3c48348c635e3ba03369632fbf09 11-fix_underlinking.patch +7bb10fb0f0ddaa1c11a43b7110e0f3ff 12-fix_buffer_overrun_in_libxm.patch +a283720664a1338157532e0b62164f91 13-fix_hardcoded_x11rgb_path.patch +384688cde092594baf5a9cda9e6ea61d 14-fix_ac_find_xft.patch +d4e5e74014da80985290d44e52e6296b 15-link_uil_against_libuil.patch +9a7b47b601ecfc9639c54563e764851a 16-fix-undefined-use-of-sprintf.patch +382bca380e52e377388a131df9c76245 17-switch-to-system-iswspace.patch +6ef23e3053818411b2b75c2f40cbfa22 18-updated-fix-1565.patch" +sha256sums=3D"637efa09608e0b8f93465dbeb7c92e58ebb14c4bc1b488040eb79a65af3e= fbe0 motif-2.3.4-src.tgz +cfdd253918b2fdbfa1803d59c7b1a20431a74de4227d20db0343aab866505c21 01-fix-a= utoconf.patch +b679d4274c18fd4e29aad8fc757d0d635ce715329b28e8f46f6952ed9a8f390d 02-fix-f= ormat-security.patch +c084ed5838c50296e18bd1354e812699e891d4a326c3fdd6e262a7a9e33eea8d 03-no-de= mos.patch +9cbfdbfec6841f4dd26cebb463b1f2912bc8a08320938d29fb978a38ed256dd7 05-multi= arch-specialcase-libdir-X11.patch +85afe090f6f45ed4baef76a7d73cebf70343a6aaee0209cb4a12ac34b48610c4 06-cast-= size_t-to-int.patch +90e8ac475990c130345f0a1f9365329599184a4f1112dc863f33f727abee22d1 07-fix_l= intian_reported_manpage_typos.patch +5fda6f879619c3d9761b222114e8ee0f548f874cca8ae9122d1b436c96a58d8d 08-fix_h= yphen_in_man_pages.patch +6bd8872bf3099e57a3c47752c5c469b449901be0ede07a5301b7c05eb3a0067a 09-fix_t= ypo_in_libxm.patch +54481c6a3990b0c2034b759ee4bb28b03880ff6fc0cbca2e8c3f4263830358b1 10-fix_m= anpage-has-bad-whatis-entry.patch +86ad1f5c40e1d8f69b927c87e5fcf39b7ce260d4cd156e4cbe9ad0a205ad72cb 11-fix_u= nderlinking.patch +3664820ec7c2639c4ab66f412121c1e8bcb8ce998a6a3743955e4b5ca7824d5e 12-fix_b= uffer_overrun_in_libxm.patch +60b01485d2ef9302533d660eef91e5023d04e71c9d9e727c147f873f2fe86ba2 13-fix_h= ardcoded_x11rgb_path.patch +1fe5efb1920c897c979f9292dc93e59d1315c145493fa591ec0000ba6e99eb7e 14-fix_a= c_find_xft.patch +ab061e0cca20b29f5337fed663eef7560defbdf6d0cf0fe21bf3377aaf516dca 15-link_= uil_against_libuil.patch +2bfb2957478f8c66554090dc171f885dc75bf3b0586e3b1abe7c3702f0ef23a2 16-fix-u= ndefined-use-of-sprintf.patch +8039b803716007d6959101592571f82f3be7590b86ba4d3160ae3b5362745a61 17-switc= h-to-system-iswspace.patch +007dec8a19aae3a59723359bc7457692c0d2a6fbf68fc91b8d6e0e866277c8d7 18-updat= ed-fix-1565.patch" +sha512sums=3D"fb1033caa68f25b93282fa6700d5b7856be217b3651072d86e7c93a747df= 5b31219230998eb93deae22a8fa698e816b1a30e52b3ae88ae1c01c1f0aac59a2af2 motif= -2.3.4-src.tgz +6ca24c74233552a4ce3ebb72f17ed277a3feca10bfa50c4680ed1eff917a11bf1f0bd39bcf= daaef1104466065c25c70251ba450f884bca637bc935565d0cdd9d 01-fix-autoconf.pat= ch +aff5be25bd25666e6134bc18faaffd54914cc390ca4d89a498efae5aa6dd175ac2b17dc719= f7b8d27cff5db2f17b714ddfd5a163f219cad5f5c949cf5eb4786d 02-fix-format-secur= ity.patch +a54e0bbf95b7af1a2ba3a6031b3d4f36b6516d4b30d97804158c20b7cccda5df9628ed9a3c= 84ddda7cbd7779781ad065b0a16d39115184eff9fa509f6ec75ec6 03-no-demos.patch +7e5f07e904f7cbea988d6cb7c65fefc5790c84d3bbc77aaa7e3de2fd22a5bd262d5519d566= 20080d830e2e79e3ffd09ee47d3b72374783b6f52b55eea4da00c0 05-multiarch-specia= lcase-libdir-X11.patch +605f3cc868c179c74ada49bd4ed40a39364f5d883866c99a9e8ffdb1c559e5e06ebf92a776= b6a10df516b7f82a186b0084e55a9be1076498f5b742ca9376febc 06-cast-size_t-to-i= nt.patch +0c4f678e34a00e3281337b06dffbf5f50d345f66b86bb86dd1532d435ce1630443f8ec6245= bb773143783d1b5e6e99da5f1e68bd7391e23ee0a10e4fb99ed737 07-fix_lintian_repo= rted_manpage_typos.patch +fc955d88cc5c64655ec642786449968e2241c92653fec00bcf8a722d2c206a2ebad16e4252= 9d4ba1905d40e4239e567189b7abd1b9f1c2bdad944cb134094b7c 08-fix_hyphen_in_ma= n_pages.patch +9157f68bf111b081811e08e43b0b67f31364230fd480381668750e130e264867697d3fc461= d2011117ee267ebf3801c39d04b24d4c213433ac4a213b6ad8683a 09-fix_typo_in_libx= m.patch +8081bddd444423cfe34995cef6c52eebf98d98616f34e9f9eae6240cfbfe8269cab2bdfbac= 7f85be85371a6f7375452471b32082d4a2dd0cffee242afe115c2f 10-fix_manpage-has-= bad-whatis-entry.patch +18c155c13a21df3c95e94d15a8f31def6f40257baadc2ec9e29eef3e10197343824adeef54= b75863cd9de25b5f46c4dc88e1e1f991f75c59048fc483a1ea1b43 11-fix_underlinking= =2Epatch +666d0e0fe1ac9b63942224b4f49711e2590a99409fbf8893570f9b87b6e4f8f80e14c780fd= 2c4cdd664c6f130ee929b89bb20e189338c73dc7daf2750aa0c382 12-fix_buffer_overr= un_in_libxm.patch +21dd0ba7fd9ed234d5115ad24547961592dd35c3d4843856800a564ff380482af0c5a35e3c= e60d3258e4e9a47cb537435b4f08f460064e130d4327a4955b9975 13-fix_hardcoded_x1= 1rgb_path.patch +fcb28b3527821c6f4dce0aa86e864f21bf7261ed8a88766858b6f5d4a9ad7affcf94e49c58= 6ae0e87a324a92404fea5965bff2959b2482035e49983d07b5ea45 14-fix_ac_find_xft.= patch +8a726e253fa6ed8d14914fd2e2eb0bce8f240051a5fefc04ff56899f908a26300ad3292507= b71c1ce65f57e7889e4067e35d0ab4ce15123bffccb606dfd9067f 15-link_uil_against= _libuil.patch +2230f0af607111d014b0a648b807df18676a4a1421f10978c59a0a29b02dda38060163619b= c54fda19a5186315f98fc8597b2ef6eb8ab7bedb6bd6972a77b38d 16-fix-undefined-us= e-of-sprintf.patch +0cb0fa3a02a452f067649e02e855d6d3d728e4904bad009aebda9250de0c9fb76d352b6d9a= 857fcd1f920c5dfc6183f9b12886505c5570164fe92e99e97eea15 17-switch-to-system= -iswspace.patch +15cbb37beebf4b06b65a09612a05e4a5b2eaab09d23860332c90aec02cf8a59e0d351dce83= 1eb98a774cb98d15c2ecf695669e5b5e6d0dcce77ce6b2658a8a84 18-updated-fix-1565= =2Epatch" --=20 2.0.0 --+HP7ph2BbKc20aGI-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---