diff --git a/sources b/sources index 3595438..8450403 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xgap-4.32.tar.gz) = 91e09f5c8cdd37d73d0ff733a5c0873527185a29ac784eb7fd18de85118ef4a79a634eea88ac16808e54cc0e144b5c1c850c8a1ce0f4bec63ce134ee301eb997 +SHA512 (xgap-4.33.tar.gz) = 70055f3f8e81060024f1359831bbfff8a1e0f98f075a560187e9de95fb74ba728ec306a2eef74eea53dcee09b93823e950e82cddfab64160b8f8b98914eaecca diff --git a/xgap-c23.patch b/xgap-c23.patch deleted file mode 100644 index 87e4c5c..0000000 --- a/xgap-c23.patch +++ /dev/null @@ -1,770 +0,0 @@ ---- src.x11/gaptext.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/gaptext.c 2025-01-19 20:55:42.267107554 -0700 -@@ -14,11 +14,11 @@ - #include "utils.h" - #include "gaptext.h" - --extern void _XawTextPrepareToUpdate(); --extern int _XawTextReplace(); --extern void _XawTextSetScrollBars(); --extern void _XawTextCheckResize(); --extern void _XawTextExecuteUpdate(); -+extern void _XawTextPrepareToUpdate(TextWidget); -+extern int _XawTextReplace(TextWidget, XawTextPosition, XawTextPosition, XawTextBlock *); -+extern void _XawTextSetScrollBars(TextWidget); -+extern void _XawTextCheckResize(TextWidget); -+extern void _XawTextExecuteUpdate(TextWidget); - - - /**************************************************************************** -@@ -666,7 +666,7 @@ static XawTextPosition GapSrcReadText ( - Widget w, - XawTextPosition pos, - XawTextBlock * text, -- unsigned long length ) -+ Int length ) - { - GapSrcObject src = (GapSrcObject) w; - -@@ -913,9 +913,9 @@ GapSrcClassRec gapSrcClassRec = - /* extension */ NULL - }, - { /* textSrc_class fields */ -- /* Read */ (XawTextPosition (*)())GapSrcReadText, -- /* Replace */ (int (*)()) GapSrcReplaceText, -- /* Scan */ (XawTextPosition (*)()) GapSrcScan, -+ /* Read */ GapSrcReadText, -+ /* Replace */ GapSrcReplaceText, -+ /* Scan */ GapSrcScan, - /* Search */ XtInheritSearch, - /* SetSelection */ XtInheritSetSelection, - /* ConvertSelection */ XtInheritConvertSelection -@@ -1006,7 +1006,7 @@ void GTDelete ( Widget w, XawTextScanDir - Int from; - - /* prepare text for update */ -- _XawTextPrepareToUpdate(gap); -+ _XawTextPrepareToUpdate((TextWidget)gap); - gap->text.time = CurrentTime; - - /* find and */ -@@ -1025,19 +1025,19 @@ void GTDelete ( Widget w, XawTextScanDir - /* remove text */ - text.length = 0; - text.firstPos = 0; -- if ( _XawTextReplace( gap, from, to, &text ) ) -+ if ( _XawTextReplace( (TextWidget)gap, from, to, &text ) ) - { - XBell(XtDisplay(gap), 50); - goto error; - } - gap->text.insertPos = from; - gap->text.showposition = TRUE; -- _XawTextSetScrollBars(gap); -+ _XawTextSetScrollBars((TextWidget)gap); - - /* do update */ - error: -- _XawTextCheckResize(gap); -- _XawTextExecuteUpdate(gap); -+ _XawTextCheckResize((TextWidget)gap); -+ _XawTextExecuteUpdate((TextWidget)gap); - gap->text.mult = 1; - } - ---- src.x11/gaptext.h.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/gaptext.h 2025-01-19 20:26:04.761116990 -0700 -@@ -96,10 +96,10 @@ extern GapTextClassRec gapTextClassRec; - typedef struct - { - /* function to call when receiving input */ -- void (*input_callback)(); -+ void (*input_callback)(String, Int); - - /* function to position caret */ -- Int (*check_caret_pos)(); -+ Int (*check_caret_pos)(Int, Int); - - /* input buffer for unprocessed input */ - String buffer; ---- src.x11/popdial.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/popdial.c 2025-01-19 20:27:23.072111848 -0700 -@@ -71,10 +71,10 @@ static struct { String name; Int flag; - { "overwrite", PD_OVERWRITE } - }; - --static void ButtonSelected ( w, cld, cd ) -- Widget w; -- XtPointer cld; -- XtPointer cd; -+static void ButtonSelected ( -+ Widget w, -+ XtPointer cld, -+ XtPointer cd) - { - Int i; - Int * res = (int*) cld; -@@ -96,13 +96,13 @@ static void ButtonSelected ( w, cld, cd - - static Boolean BrokenWM = False; - --TypePopupDialog CreatePopupDialog ( app, top, name, bt, def, pix ) -- XtAppContext app; -- Widget top; -- String name; -- Int bt; -- Int def; -- Pixmap pix; -+TypePopupDialog CreatePopupDialog ( -+ XtAppContext app, -+ Widget top, -+ String name, -+ Int bt, -+ Int def, -+ Pixmap pix) - { - Display * dp; - TypePopupDialog dialog; -@@ -198,11 +198,11 @@ void PopupDialogBrokenWM ( ) - */ - static Cursor BlobCursor = 0; - --Int PopupDialog ( dialog, message, deflt, result ) -- TypePopupDialog dialog; -- String message; -- String deflt; -- String * result; -+Int PopupDialog ( -+ TypePopupDialog dialog, -+ String message, -+ String deflt, -+ String * result) - { - Display * display; - Position x1, y1, tmp; ---- src.x11/pty.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/pty.c 2025-01-19 20:31:00.389267989 -0700 -@@ -117,11 +117,11 @@ Boolean ExecRunning = False; - */ - #ifdef DEBUG_ON - --Int READ_GAP ( file, where, line, len ) -- String file; -- Int where; -- String line; -- Int len; -+Int READ_GAP ( -+ String file, -+ Int where, -+ String line, -+ Int len) - { - Int n; - Int old; -@@ -171,9 +171,9 @@ Int READ_GAP ( file, where, line, len ) - - #else - --Int ReadGap ( line, len ) -- String line; -- Int len; -+Int ReadGap ( -+ String line, -+ Int len) - { - Int n; - Int old; -@@ -201,15 +201,15 @@ Int ReadGap ( line, len ) - ** - *F WriteGap( , ) . . . . . . . . . . . . . . . . write gap input - */ --extern int errno; -+#include - - #ifdef DEBUG_ON - --void WRITE_GAP ( file, where, line, len ) -- String file; -- Int where; -- String line; -- Int len; -+void WRITE_GAP ( -+ String file, -+ Int where, -+ String line, -+ Int len) - { - Int res; - -@@ -238,9 +238,9 @@ void WRITE_GAP ( file, where, line, len - - #else - --void WriteGap ( line, len ) -- String line; -- Int len; -+void WriteGap ( -+ String line, -+ Int len) - { - Int res; - -@@ -337,8 +337,8 @@ static Int LastLine; - - *F WaitInput( ) . . . . . . . . . . . . . . . wait for one character - */ --void WaitInput ( buf ) -- struct _in_buf * buf; -+void WaitInput ( -+ struct _in_buf * buf) - { - Int len; - -@@ -356,8 +356,8 @@ void WaitInput ( buf ) - ** - *F WaitInput2( ) . . . . . . . . . . . . . . . wait for two characters - */ --void WaitInput2 ( buf ) -- struct _in_buf * buf; -+void WaitInput2 ( -+ struct _in_buf * buf) - { - Int len; - -@@ -385,8 +385,8 @@ void WaitInput2 ( buf ) - ** - *F ReadLine( ) . . . . . . . . . . . . . . . . . . . . . . read a line - */ --void ReadLine ( buf ) -- struct _in_buf * buf; -+void ReadLine ( -+ struct _in_buf * buf) - { - String ptr = GapBuffer; - -@@ -435,9 +435,9 @@ static struct _storage - } - Storage = { 0, 0, 0 }; - --void StoreInput ( str, len ) -- String str; -- Int len; -+void StoreInput ( -+ String str, -+ Int len) - { - if ( Storage.buffer == 0 ) - { -@@ -460,8 +460,8 @@ void StoreInput ( str, len ) - */ - static Char InputCookie = 'A'; - --void ProcessStoredInput ( state ) -- Int state; -+void ProcessStoredInput ( -+ Int state) - { - String ptr; - String free; -@@ -558,8 +558,8 @@ again: - ** - *F SimulateInput( ) . . . . . . . . . . enter a line as command line - */ --void SimulateInput ( str ) -- String str; -+void SimulateInput ( -+ String str) - { - Int pos; - -@@ -585,8 +585,8 @@ void SimulateInput ( str ) - Boolean PlayingBack = False; - FILE * Playback = 0; - --int PlaybackFile ( str ) -- String str; -+int PlaybackFile ( -+ String str) - { - if ( Playback != 0 ) { - fclose(Playback); -@@ -609,9 +609,9 @@ int ResumePlayback ( void ) - return True; - } - --void KeyboardInput ( str, len ) -- String str; -- Int len; -+void KeyboardInput ( -+ String str, -+ Int len) - { - char buf[1025]; - -@@ -750,9 +750,9 @@ void KeyboardInput ( str, len ) - ** - *F CheckCaretPos( , ) . . . . . . . . . . . check caret movement - */ --Int CheckCaretPos ( new, old ) -- Int new; -- Int old; -+Int CheckCaretPos ( -+ Int new, -+ Int old) - { - /* if is -1, then gap is running, ignore move */ - if ( LastLine < 0 ) -@@ -824,10 +824,10 @@ static Boolean ParseInt ( - - static char TBuf[SIZE_BUFFER]; - --void GapOutput ( cld, fid, id ) -- XtPointer cld; -- int * fid; -- XtInputId id; -+void GapOutput ( -+ XtPointer cld, -+ int * fid, -+ XtInputId id) - { - char ch; - Int special; -@@ -1272,7 +1272,7 @@ static UInt OpenPty(int * master, int * - ** - *F StartGapProcess( , ) . . . start a gap subprocess using ptys - */ --static void GapStatusHasChanged () -+static void GapStatusHasChanged ([[maybe_unused]] int signo) - { - int w; - -@@ -1286,9 +1286,9 @@ static void GapStatusHasChanged () - exit(1); - } - --int StartGapProcess ( name, argv ) -- String name; -- String argv[]; -+int StartGapProcess ( -+ String name, -+ String argv[]) - { - Int j; /* loop variables */ - char c[10]; /* buffer for communication */ ---- src.x11/selfile.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/selfile.c 2025-01-19 21:20:59.023791159 -0700 -@@ -110,33 +110,30 @@ typedef struct { - time_t mtime; - } SFDir; - --static void -- SFenterList(), -- SFleaveList(), -- SFmotionList(), -- SFbuttonPressList(), -- SFbuttonReleaseList(); -+static void SFenterList(Widget, long, XEnterWindowEvent *); -+static void SFleaveList(Widget, int, XEvent *); -+static void SFmotionList(Widget, int, XMotionEvent *); -+static void SFbuttonPressList(Widget, int, XButtonPressedEvent *); -+static void SFbuttonReleaseList(Widget, int, XButtonReleasedEvent *); - --static void -- SFvSliderMovedCallback(), -- SFvFloatSliderMovedCallback(), -- SFhSliderMovedCallback(), -- SFpathSliderMovedCallback(), -- SFvAreaSelectedCallback(), -- SFhAreaSelectedCallback(), -- SFpathAreaSelectedCallback(); -+static void SFvSliderMovedCallback(Widget, long, int); -+static void SFvFloatSliderMovedCallback(Widget, int, float *); -+static void SFhSliderMovedCallback(Widget, int, float *); -+static void SFpathSliderMovedCallback(Widget, XtPointer, float *); -+static void SFvAreaSelectedCallback(Widget, int, int); -+static void SFhAreaSelectedCallback(Widget, int, int); -+static void SFpathAreaSelectedCallback(Widget, XtPointer, int); - --static Boolean SFworkProc(); -+static Boolean SFworkProc(XtPointer); - --static int SFcompareEntries(); -+static int SFcompareEntries(const void *, const void *); - --static void SFdirModTimer(); -+static void SFdirModTimer(XtPointer, XtIntervalId *); - --static char SFstatChar(); -+static char SFstatChar(struct stat *); - - --/* BSD 4.3 errno.h does not declare errno */ --extern int errno; -+#include - /* extern int sys_nerr; */ - - #if !defined(S_ISDIR) && defined(S_IFDIR) -@@ -1157,7 +1154,7 @@ SFpathAreaSelectedCallback(Widget w, XtP - } - - static Boolean --SFworkProc() -+SFworkProc([[maybe_unused]] XtPointer closure) - { - register SFDir *dir; - register SFEntry *entry; -@@ -1250,7 +1247,8 @@ SFreplaceText(SFDir *dir, char *str) - if (str[len - 1] == '/') { - (void) strcat(SFcurrentPath, str); - } else { -- (void) strncat(SFcurrentPath, str, len - 1); -+ len = strlen(SFcurrentPath); -+ (void) strncat(SFcurrentPath, str, MAXPATHLEN - len - 1); - } - if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) { - SFsetText(SFcurrentPath); ---- src.x11/utils.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/utils.c 2025-01-19 20:34:59.138143676 -0700 -@@ -62,13 +62,13 @@ Int Debug = 0; - *F List( ) . . . . . . . . . . . . . . . . . . . create a new list - */ - #ifdef DEBUG_ON --TypeList LIST ( file, line, len ) -- String file; -- Int line; -- UInt len; -+TypeList LIST ( -+ String file, -+ Int line, -+ UInt len) - #else --TypeList List ( len ) -- UInt len; -+TypeList List ( -+ UInt len) - #endif - { - TypeList list; -@@ -95,15 +95,15 @@ TypeList List ( len ) - *F AddList( , ) . . . . . . . . add list element to - */ - #ifdef DEBUG_ON --void ADD_LIST ( file, line, lst, elm ) -- String file; -- Int line; -- TypeList lst; -- Pointer elm; -+void ADD_LIST ( -+ String file, -+ Int line, -+ TypeList lst, -+ Pointer elm) - #else --void AddList ( lst, elm ) -- TypeList lst; -- Pointer elm; -+void AddList ( -+ TypeList lst, -+ Pointer elm) - #endif - { - /* give some debug information */ ---- src.x11/xcmds.c.orig 2024-03-15 16:59:24.433308375 -0600 -+++ src.x11/xcmds.c 2025-01-19 20:36:44.344766920 -0700 -@@ -2056,8 +2056,8 @@ void InitXCMDS () - ** - *F UpdateXCMDS( ) . . . . . . . . . . gap is/isn't accepting input - */ --void UpdateXCMDS ( state ) -- Boolean state; -+void UpdateXCMDS ( -+ Boolean state) - { - TypeGapWindow * win; - Int i; ---- src.x11/xcmds.h.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/xcmds.h 2025-01-19 21:04:34.260330623 -0700 -@@ -129,7 +129,7 @@ TypePaneData; - */ - extern void InitXCMDS( void ); - extern void ExitXMCDS( void ); --extern void UpdateXCMDS( Int ); -+extern void UpdateXCMDS( Boolean ); - extern Boolean GapWindowCmd( String, Int ); - - #endif ---- src.x11/xgap.c.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/xgap.c 2025-01-19 21:15:10.292231384 -0700 -@@ -255,8 +255,15 @@ static char *FallbackResources[] = - *V GapMenu . . . . . . . . . . . . . . . . . . . . . . . . xgap's "GAP" menu - ** - */ --static void MenuQuitGap () { KeyboardInput( "@C@A@Kquit;\nquit;\n", 18 ); } --static void MenuKillGap () { KillGap(); } -+static void MenuQuitGap ([[maybe_unused]] TypeMenuItem *item) -+{ -+ KeyboardInput( "@C@A@Kquit;\nquit;\n", 18 ); -+} -+ -+static void MenuKillGap ([[maybe_unused]] TypeMenuItem *item) -+{ -+ KillGap(); -+} - - #ifdef DEBUG_ON - static void MenuResyncGap () -@@ -269,8 +276,8 @@ static void MenuResyncGap () - } - #endif - --static void MenuPastePrompt ( item ) -- TypeMenuItem * item; -+static void MenuPastePrompt ( -+ TypeMenuItem * item) - { - static Boolean paste = False; - -@@ -284,8 +291,8 @@ static void MenuPastePrompt ( item ) - (String)NULL ); - } - --static void MenuQuitGapCTRD ( item ) -- TypeMenuItem * item; -+static void MenuQuitGapCTRD ( -+ TypeMenuItem * item) - { - QuitGapCtrlD = !QuitGapCtrlD; - if ( QuitGapCtrlD ) -@@ -297,8 +304,8 @@ static void MenuQuitGapCTRD ( item ) - } - - #ifndef NO_FILE_SELECTOR --void MenuReadFile ( item ) -- TypeMenuItem * item; -+void MenuReadFile ( -+ TypeMenuItem * item) - { - Int res; - String str; -@@ -341,14 +348,14 @@ static TypeMenuItem GapMenu[] = - *V HelpMenu . . . . . . . . . . . . . . . . . . . . . . xgap's "Help" menu - ** - */ --static void MenuChapters () { SimulateInput( "?Chapters\n" ); } --static void MenuSections () { SimulateInput( "?Sections\n" ); } --static void MenuCopyright () { SimulateInput( "?Copyright\n" );} --static void MenuHelp () { SimulateInput( "?Help\n" ); } --static void MenuNextHelp () { SimulateInput( "?>\n" ); } --static void MenuNextChapter () { SimulateInput( "?>>\n" ); } --static void MenuPrevChapter () { SimulateInput( "?<<\n" ); } --static void MenuPrevHelp () { SimulateInput( "?<\n" ); } -+static void MenuChapters ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?Chapters\n" ); } -+static void MenuSections ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?Sections\n" ); } -+static void MenuCopyright ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?Copyright\n" );} -+static void MenuHelp ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?Help\n" ); } -+static void MenuNextHelp ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?>\n" ); } -+static void MenuNextChapter ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?>>\n" ); } -+static void MenuPrevChapter ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?<<\n" ); } -+static void MenuPrevHelp ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "?<\n" ); } - - - static TypeMenuItem HelpMenu[] = -@@ -372,11 +379,11 @@ static TypeMenuItem HelpMenu[] = - *V RunMenu . . . . . . . . . . . . . . . . . . . . . . . . xgap's "Run" menu - ** - */ --static void MenuInterrupt () { InterruptGap(); } --static void MenuQuitBreak () { SimulateInput( "quit;\n" ); } --static void MenuContBreak () { SimulateInput( "return;\n" ); } --static void MenuGarbColl () { SimulateInput( "GASMAN(\"collect\");\n" ); } --static void MenuGarbMesg () { SimulateInput( "GASMAN(\"message\");\n" ); } -+static void MenuInterrupt ([[maybe_unused]] TypeMenuItem *item) { InterruptGap(); } -+static void MenuQuitBreak ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "quit;\n" ); } -+static void MenuContBreak ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "return;\n" ); } -+static void MenuGarbColl ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "GASMAN(\"collect\");\n" ); } -+static void MenuGarbMesg ([[maybe_unused]] TypeMenuItem *item) { SimulateInput( "GASMAN(\"message\");\n" ); } - - static TypeMenuItem RunMenu[] = - { -@@ -497,8 +504,8 @@ static void MenuSelected ( - ** - *F UpdateMenus( ) . . . . . . update menus in case of state change - */ --void UpdateMenus ( state ) -- Int state; -+void UpdateMenus ( -+ Int state) - { - TypeList l; - Int i; -@@ -581,9 +588,9 @@ static Widget LabelLiveObjects; - static Widget LabelLiveKB; - static Widget LabelTotalKBytes; - --void UpdateMemoryInfo ( type, val ) -- Int type; -- Int val; -+void UpdateMemoryInfo ( -+ Int type, -+ Int val) - { - char tmp[30]; - -@@ -806,11 +813,11 @@ static void CreateGapWindow ( void ) - - *F MyErrorHandler() . . . . . . . . . . . . kill gap in case of X error - */ --static int (*OldErrorHandler)(); -+static int (*OldErrorHandler)(Display *, XErrorEvent *); - --static int MyErrorHandler ( dis, evt ) -- Display * dis; -- XErrorEvent evt; -+static int MyErrorHandler ( -+ Display * dis, -+ XErrorEvent * evt) - { - # ifdef DEBUG_ON - fputs( "killing gap because of X error\n", stderr ); -@@ -824,10 +831,10 @@ static int MyErrorHandler ( dis, evt ) - ** - *F MyIOErrorHandler() . . . . . . . . . . . kill gap in case of X error - */ --static int (*OldIOErrorHandler)(); -+static int (*OldIOErrorHandler)(Display *); - --static int MyIOErrorHandler ( dis ) -- Display * dis; -+static int MyIOErrorHandler ( -+ Display * dis) - { - # ifdef DEBUG_ON - fputs( "killing gap because of X IO error\n", stderr ); -@@ -843,68 +850,68 @@ static int MyIOErrorHandler ( dis ) - */ - #ifdef DEBUG_ON - --static void (*OldSignalHandlerHUP)(); --static void (*OldSignalHandlerINT)(); --static void (*OldSignalHandlerQUIT)(); --static void (*OldSignalHandlerILL)(); --static void (*OldSignalHandlerIOT)(); --static void (*OldSignalHandlerBUS)(); --static void (*OldSignalHandlerSEGV)(); -+static void (*OldSignalHandlerHUP)(int); -+static void (*OldSignalHandlerINT)(int); -+static void (*OldSignalHandlerQUIT)(int); -+static void (*OldSignalHandlerILL)(int); -+static void (*OldSignalHandlerIOT)(int); -+static void (*OldSignalHandlerBUS)(int); -+static void (*OldSignalHandlerSEGV)(int); - --static void MySignalHandlerHUP () -+static void MySignalHandlerHUP (int signo) - { - fputs( "killing gap because of signal HUP\n", stderr ); - KillGap(); -- OldSignalHandlerHUP(); -+ OldSignalHandlerHUP(signo); - exit(1); - } --static void MySignalHandlerINT () -+static void MySignalHandlerINT (int signo) - { - fputs( "killing gap because of signal INT\n", stderr ); - KillGap(); -- OldSignalHandlerINT(); -+ OldSignalHandlerINT(signo); - exit(1); - } --static void MySignalHandlerQUIT () -+static void MySignalHandlerQUIT (int signo) - { - fputs( "killing gap because of signal QUIT\n", stderr ); - KillGap(); -- OldSignalHandlerQUIT(); -+ OldSignalHandlerQUIT(signo); - exit(1); - } --static void MySignalHandlerILL () -+static void MySignalHandlerILL (int signo) - { - fputs( "killing gap because of signal ILL\n", stderr ); - KillGap(); -- OldSignalHandlerILL(); -+ OldSignalHandlerILL(signo); - exit(1); - } --static void MySignalHandlerIOT () -+static void MySignalHandlerIOT (int signo) - { - fputs( "killing gap because of signal IOT\n", stderr ); - KillGap(); -- OldSignalHandlerIOT(); -+ OldSignalHandlerIOT(signo); - exit(1); - } --static void MySignalHandlerBUS () -+static void MySignalHandlerBUS (int signo) - { - fputs( "killing gap because of signal BUS\n", stderr ); - KillGap(); -- OldSignalHandlerBUS(); -+ OldSignalHandlerBUS(signo); - exit(1); - } - --static void MySignalHandlerSEGV () -+static void MySignalHandlerSEGV (int signo) - { - fputs( "killing gap because of signal SEGV\n", stderr ); - KillGap(); -- OldSignalHandlerSEGV(); -+ OldSignalHandlerSEGV(signo); - exit(1); - } - - #else - --static void MySignalHandler () -+static void MySignalHandler ([[maybe_unused]] int signo) - { - KillGap(); - exit(1); -@@ -927,9 +934,9 @@ static void MySignalHandler () - */ - static char * nargv[1024]; - --static void ParseArgs ( argc, argv ) -- Int argc; -- char ** argv; -+static void ParseArgs ( -+ Int argc, -+ char ** argv) - { - Int nargc; - Int i, j; -@@ -1072,9 +1079,9 @@ fullusage: - #include "bitmaps/exmark.bm" - #include "bitmaps/menusym.bm" - --int main ( argc, argv ) -- int argc; -- char ** argv; -+int main ( -+ int argc, -+ char ** argv) - { - String color; - String colors; ---- src.x11/xgap.h.orig 2024-02-07 16:26:14.000000000 -0700 -+++ src.x11/xgap.h 2025-01-19 20:52:26.269604813 -0700 -@@ -25,7 +25,7 @@ - typedef struct _menu_item - { - char * label; -- void (*click)(); -+ void (*click)(struct _menu_item *); - int sensitive; - Widget entry; - } diff --git a/xgap-gap-path.patch b/xgap-gap-path.patch new file mode 100644 index 0000000..edd181b --- /dev/null +++ b/xgap-gap-path.patch @@ -0,0 +1,11 @@ +--- tst/xgap_test.g.orig 2024-02-07 16:26:14.000000000 -0700 ++++ tst/xgap_test.g 2025-09-06 14:19:22.424822565 -0600 +@@ -142,7 +142,7 @@ end; + XGT_Test:=function(cmd) + local GAP_cmd, GAP_dir, stream, mycmd; + +- GAP_cmd := Filename(DirectoriesLibrary(""), "gap"); ++ GAP_cmd := "/usr/bin/gap"; + GAP_dir := DirectoryCurrent(); + + XGT_buf:=""; diff --git a/xgap-incompatible-pointer.patch b/xgap-incompatible-pointer.patch index 4c15fb4..46b24ca 100644 --- a/xgap-incompatible-pointer.patch +++ b/xgap-incompatible-pointer.patch @@ -19,7 +19,7 @@ In file included from ../../src.x11/utils.h:120, /* change list */ - XawListChange( arg->sel->list, (const char **)text, 0, 0, True ); -+ XawListChange( arg->sel->list, (char **)text, 0, 0, True ); ++ XawListChange( arg->sel->list, text, 0, 0, True ); /* clear old text */ for ( i = 0; arg->sel->text[i]; i++ ) diff --git a/xgap.spec b/xgap.spec index 3182569..2698111 100644 --- a/xgap.spec +++ b/xgap.spec @@ -1,15 +1,14 @@ -%global giturl https://github.com/gap-packages/xgap +%global gap_pkgname xgap +%global giturl https://github.com/gap-packages/xgap -Name: xgap -Version: 4.32 +Name: %{gap_pkgname} +Version: 4.33 Release: %autorelease Summary: GUI for GAP # The project as a whole is GPL-2.0-or-later. # src.x11/selfile.{c,h} is HPND. License: GPL-2.0-or-later AND HPND -# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: %{ix86} URL: https://gap-packages.github.io/xgap/ VCS : git:%{giturl}.git Source0: %{giturl}/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -22,8 +21,14 @@ Source2: XGap Patch: %{name}-warning.patch # Fix FTBFS due to an incompatible pointer type Patch: %{name}-incompatible-pointer.patch -# Adapt to changes in C23 -Patch: %{name}-c23.patch +# Adapt to a change in the gap binary location in gap 4.15.0 +Patch: %{name}-gap-path.patch + +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} +BuildSystem: gap +BuildOption(install): bin examples htm lib tst +BuildOption(check): tst/testall.g BuildRequires: desktop-file-utils BuildRequires: gap-devel @@ -35,10 +40,10 @@ BuildRequires: tth Requires: gap%{?_isa} -Provides: gap-pkg-xgap = %{version}-%{release} +Provides: gap-pkg-%{gap_pkgname} = %{version}-%{release} %description -A X Windows GUI for GAP. +An X Windows GUI for GAP. %package doc # The content is GPL-2.0-or-later. The remaining licenses cover the various @@ -53,7 +58,7 @@ Requires: %{name} = %{version}-%{release} Requires: gap-pkg-smallgrp-doc %description doc -This package contains documentation for %{name}. +This package contains documentation for %{gap_pkgname}. %prep %autosetup -p0 @@ -71,16 +76,15 @@ ln -s %{gap_libdir}/etc ../../etc ln -s %{gap_libdir}/doc ../../doc ln -s %{gap_libdir}/pkg/smallgrp .. ln -s %{name}-%{version} ../%{name} -make -C doc manual +cd doc +./make_doc +cd - rm -f ../%{name} ../smallgrp ../../{doc,etc} -%install +%install -a mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{gap_archdir}/pkg/%{name}/doc -cp -a *.g bin examples htm lib tst %{buildroot}%{gap_archdir}/pkg/%{name} mv %{buildroot}%{gap_archdir}/pkg/%{name}/bin/xgap.sh %{buildroot}%{_bindir}/xgap rm %{buildroot}%{gap_archdir}/pkg/%{name}/bin/*/{Makefile,config*,*.o} -%gap_copy_docs -n %{name} # Install the desktop file mkdir -p %{buildroot}%{_datadir}/applications @@ -91,11 +95,12 @@ desktop-file-install --mode=644 --dir=%{buildroot}%{_datadir}/applications \ mkdir -p %{buildroot}%{_datadir}/X11/app-defaults cp -p %{SOURCE2} %{buildroot}%{_datadir}/X11/app-defaults -%check +%check -p # Temporarily modify the test runner to add the necessary -l argument sed -i.orig 's|"-p"|"-l","%{buildroot}%{gap_archdir};",&|' \ %{buildroot}%{gap_archdir}/pkg/%{name}/tst/xgap_test.g -gap -l '%{buildroot}%{gap_archdir};' tst/testall.g + +%check -a mv %{buildroot}%{gap_archdir}/pkg/%{name}/tst/xgap_test.g.orig \ %{buildroot}%{gap_archdir}/pkg/%{name}/tst/xgap_test.g