From 79af75ce99ab323e3a2245d9cd3b4ea332faec48 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Thu, 26 Dec 2019 16:26:18 -0700 Subject: [PATCH 1/3] Updating to prerelease 6.1c. --- ucblogo.spec | 53 +++++++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/ucblogo.spec b/ucblogo.spec index d2c40cd..3b05d2a 100644 --- a/ucblogo.spec +++ b/ucblogo.spec @@ -1,22 +1,11 @@ Name: ucblogo -Version: 6.0 -Release: 27%{?dist} +Version: 6.1 +Release: 1%{?dist} Summary: An interpreter for the Logo programming language -License: GPLv2+ -Source: ftp://ftp.cs.berkeley.edu/pub/ucblogo/ucblogo-%{version}.tar.gz +License: GPLv3+ +Source: https://github.com/jrincayc/ucblogo-code/archive/pre_release_6_1_c.tar.gz Source1: %{name}.desktop -Patch0: ucblogo-5.5-ospeed.patch -Patch1: ucblogo-6.0-wx.patch -Patch2: ucblogo-6.0-texi.patch -Patch3: ucblogo-6.0-inc.patch -# To upstream https://sourceforge.net/p/ucblogo/bugs/29/ -Patch4: ucblogo-6.0-matherr.patch -# Patch 5 and 6 to upstream https://sourceforge.net/p/ucblogo/bugs/28/ -Patch5: ucblogo-6.0-wx3.patch -Patch6: ucblogo-6.0-wxturtle.patch -# To upstream https://sourceforge.net/p/ucblogo/bugs/30/ -Patch7: ucblogo-6.0-man.patch URL: https://people.eecs.berkeley.edu/~bh/logo.html BuildRequires: gcc BuildRequires: gcc-c++ @@ -57,28 +46,15 @@ This package includes HTML and PDF documentation for ucblogo and the Program Logic Manual (plm) %prep -%setup -q -%patch0 -p1 -b .ospeed -%patch1 -p1 -b .wx -%patch2 -p1 -b .texiFix -%patch3 -p1 -b .inc -%patch4 -p1 -b .matherr -%patch5 -p1 -b .wx3 -%patch6 -p1 -b .wxturtle -%patch7 -p1 -b .man +%setup -q -n ucblogo-code-pre_release_6_1_c -sed -i 's|everything|all|g' makefile* # correct directories /usr/lib -> /usr/share and /usr/local -> /usr -sed -i 's|/local/lib/logo|/share/logo|g' *.c README +sed -i 's|/local/lib/logo|/share/logo|g' *.c README.md sed -i 's|/lib/logo|/share/logo|g' *.c makefile* -sed -i "s|/usr/local/bin/logo|%{_bindir}/logo|g" docs/html/usermanual_1.html -sed -i "s|/usr/local/bin/logo|%{_bindir}/logo|g" docs/ucblogo.info* sed -i "s|/usr/local/bin/logo|%{_bindir}/logo|g" docs/usermanual.texi -sed -i "s|/usr/local/bin/logo|%{_bindir}/logo|g" README -sed -i "s|/usr/local/info|%{_datadir}/info|g" README -sed -i 's|.*mv .*||' docs/makefile -sed -i 's|.*rmdir .*||' docs/makefile +sed -i "s|/usr/local/bin/logo|%{_bindir}/logo|g" README.md +sed -i "s|/usr/local/info|%{_datadir}/info|g" README.md find -name 'CVS' | xargs rm -rf find -name '.svn' | xargs rm -rf @@ -86,13 +62,15 @@ find -name '.svn' | xargs rm -rf %build # build WX version -%configure --x-includes=%{_includedir} --x-libraries=%{_libdir} --with-x --wx-enable --wx-config_path=/usr/bin/wx-config-3.0 +%configure --with-wx-config=/usr/bin/wx-config-3.0 make %{_smp_mflags} logo mv logo logo-wx # build traditional version make clean -%configure --x-includes=%{_includedir} --x-libraries=%{_libdir} --with-x +%configure --x-includes=%{_includedir} --x-libraries=%{_libdir} --with-x --with-wx-config=no make %{_smp_mflags} +# build docs +make make-docs %install @@ -120,8 +98,8 @@ if [ $1 = 0 ]; then fi %files -%doc README changes.txt -%license gpl +%doc README.md changes.txt +%license LICENSE %{_bindir}/* %{_datadir}/logo %{_infodir}/* @@ -133,6 +111,9 @@ fi %doc docs/html docs/usermanual.pdf plm %changelog +* Thu Dec 26 2019 Joshua Cogliati - 6.1-1 +- new release 6.1 + * Fri Sep 27 2019 Joshua Cogliati - 6.0-27 - Removing emacs mode and created separate doc package From 26238ab46b84c363849aa9766a1be5527bc350e6 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Thu, 26 Dec 2019 17:07:12 -0700 Subject: [PATCH 2/3] Removing old patches. --- ucblogo-5.5-ospeed.patch | 11 ---- ucblogo-6.0-inc.patch | 28 ----------- ucblogo-6.0-man.patch | 34 ------------- ucblogo-6.0-matherr.patch | 24 --------- ucblogo-6.0-texi.patch | 47 ----------------- ucblogo-6.0-wx.patch | 71 -------------------------- ucblogo-6.0-wx3.patch | 100 ------------------------------------- ucblogo-6.0-wxturtle.patch | 85 ------------------------------- 8 files changed, 400 deletions(-) delete mode 100644 ucblogo-5.5-ospeed.patch delete mode 100644 ucblogo-6.0-inc.patch delete mode 100644 ucblogo-6.0-man.patch delete mode 100644 ucblogo-6.0-matherr.patch delete mode 100644 ucblogo-6.0-texi.patch delete mode 100644 ucblogo-6.0-wx.patch delete mode 100644 ucblogo-6.0-wx3.patch delete mode 100644 ucblogo-6.0-wxturtle.patch diff --git a/ucblogo-5.5-ospeed.patch b/ucblogo-5.5-ospeed.patch deleted file mode 100644 index 093ef6f..0000000 --- a/ucblogo-5.5-ospeed.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ucblogo-5.5/term.c.ospeed 2007-02-22 11:35:36.000000000 +0100 -+++ ucblogo-5.5/term.c 2007-02-22 11:36:02.000000000 +0100 -@@ -64,7 +64,7 @@ - char PC; - char *BC; - char *UP; --short ospeed; -+/* short ospeed; */ - char bp[1024]; - char cl_arr[40]; - char cm_arr[40]; diff --git a/ucblogo-6.0-inc.patch b/ucblogo-6.0-inc.patch deleted file mode 100644 index e1cad14..0000000 --- a/ucblogo-6.0-inc.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up ucblogo-6.0/coms.c.inc ucblogo-6.0/coms.c ---- ucblogo-6.0/coms.c.inc 2016-07-09 19:28:01.384859616 +0200 -+++ ucblogo-6.0/coms.c 2016-07-09 19:28:09.250898715 +0200 -@@ -25,9 +25,9 @@ extern int check_wx_stop(int force_yield - #endif - - #define WANT_EVAL_REGS 1 -+#include - #include "logo.h" - #include "globals.h" --#include - #ifdef HAVE_UNISTD_H - #include - #endif -diff -up ucblogo-6.0/graphics.c.inc ucblogo-6.0/graphics.c ---- ucblogo-6.0/graphics.c.inc 2016-07-09 19:28:31.426008938 +0200 -+++ ucblogo-6.0/graphics.c 2016-07-09 19:28:40.570054389 +0200 -@@ -24,9 +24,9 @@ - #endif /* WIN32 */ - - #define WANT_EVAL_REGS 1 -+#include - #include "logo.h" - /* #include "globals.h" has been moved further down */ --#include - - #ifdef HAVE_WX - #include "wxGraphics.h" diff --git a/ucblogo-6.0-man.patch b/ucblogo-6.0-man.patch deleted file mode 100644 index 947ec16..0000000 --- a/ucblogo-6.0-man.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -uNr ucblogo-6.0/docs/logo.1 ucblogo-6.0other/docs/logo.1 ---- ucblogo-6.0/docs/logo.1 1969-12-31 17:00:00.000000000 -0700 -+++ ucblogo-6.0other/docs/logo.1 2019-09-13 10:10:58.500059360 -0600 -@@ -0,0 +1,13 @@ -+.TH LOGO 1 -+.SH NAME -+logo, logo-wx \- start the Logo Programming Language interpreter -+.SH SYNOPSIS -+.B logo -+[\fIfile\fR] -+.SH DESCRIPTION -+.B logo -+begins running the logo programming language interperter. If a file is -+provided, it will run those commands first. The full manual is available -+as -+.PP -+.B info ucblogo -diff -uNr ucblogo-6.0/docs/makefile ucblogo-6.0other/docs/makefile ---- ucblogo-6.0/docs/makefile 2019-09-13 09:33:12.056700261 -0600 -+++ ucblogo-6.0other/docs/makefile 2019-09-13 10:23:54.445228922 -0600 -@@ -2,6 +2,7 @@ - INFODIR = $(prefix)/info - DOCSDIR = $(LIBLOC)/docs - HTMLDIR = $(DOCSDIR)/html -+MANDIR = $(prefix)/share/man/ - - all: usermanual.ps usermanual.pdf html/usermanual_1.html ucblogo.info - -@@ -38,3 +39,5 @@ - -cp -f usermanual.pdf $(DOCSDIR)/. - -cp -f usermanual.texi $(DOCSDIR)/. - -cp -f ../usermanual $(DOCSDIR)/. -+ -mkdir -p $(MANDIR)/man1/ -+ -cp -f logo.1 $(MANDIR)/man1/. diff --git a/ucblogo-6.0-matherr.patch b/ucblogo-6.0-matherr.patch deleted file mode 100644 index ee9aec3..0000000 --- a/ucblogo-6.0-matherr.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u ucblogo-6.0/configure ucblogo-6.0m/configure ---- ucblogo-6.0/configure 2008-06-08 18:02:30.000000000 -0600 -+++ ucblogo-6.0m/configure 2019-08-30 10:14:32.368915525 -0600 -@@ -1820,7 +1820,7 @@ - fi - - --for ac_func in usleep srandom sigvec sigsetmask matherr drem irint bcopy memcpy -+for ac_func in usleep srandom sigvec sigsetmask drem irint bcopy memcpy - do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -diff -u ucblogo-6.0/configure.in ucblogo-6.0m/configure.in ---- ucblogo-6.0/configure.in 2007-11-18 15:08:58.000000000 -0700 -+++ ucblogo-6.0m/configure.in 2019-08-30 10:19:23.847099812 -0600 -@@ -38,7 +38,7 @@ - AC_TYPE_SIGNAL - - dnl Checks for library functions. --AC_CHECK_FUNCS(usleep srandom sigvec sigsetmask matherr drem irint memcpy) -+AC_CHECK_FUNCS(usleep srandom sigvec sigsetmask drem irint memcpy) - AC_PROG_GCC_TRADITIONAL - dnl AC_TYPE_SIGNAL - diff --git a/ucblogo-6.0-texi.patch b/ucblogo-6.0-texi.patch deleted file mode 100644 index bfdf4d2..0000000 --- a/ucblogo-6.0-texi.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- ucblogo-6.0/docs/usermanual.texi 2008-09-03 16:20:15.000000000 -0400 -+++ usermanual.texi 2013-08-10 22:02:28.820516598 -0400 -@@ -371,7 +371,7 @@ - list, one word per argument; the buried variable @code{COMMAND.LINE} contains - that list of arguments, or the empty list if there are none. On my Linux - system, if the first line of an executable shell script is --@w{@t{#!/usr/local/bin/logo -}} (note the hyphen) then the script can be given -+@w{@t{#!/usr/bin/logo -}} (note the hyphen) then the script can be given - command line arguments and they all end up in @code{:COMMAND.LINE} along with - the script's path. Experiment. - -@@ -479,7 +479,7 @@ - comment. Unix users can therefore write a file containing Logo commands, - starting with the line - @example --#! /usr/local/bin/logo -+#! /usr/bin/logo - @end example - (or wherever your Logo executable lives) and the file will be executable - directly from the shell. -@@ -2875,7 +2875,7 @@ - - - @node AND, OR, LOGICAL OPERATIONS, LOGICAL OPERATIONS --@unnumberedsubsec and -+@unnumberedsec and - @cindex and - - @example -@@ -6766,7 +6766,7 @@ - @end menu - - @node dMACRO, dDEFMACRO, MACROS, MACROS --@unnumberedsubsec .macro -+@unnumberedsec .macro - @cindex .macro - @cindex .defmacro - -@@ -7128,7 +7128,7 @@ - - @node ALLOWGETSET, BUTTONACT, SPECIAL VARIABLES, SPECIAL VARIABLES - @comment node-name, next, previous, up --@unnumberedsubsec allowgetset -+@unnumberedsec allowgetset - @cindex allowgetset - - @example diff --git a/ucblogo-6.0-wx.patch b/ucblogo-6.0-wx.patch deleted file mode 100644 index 34909a1..0000000 --- a/ucblogo-6.0-wx.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -up ucblogo-6.0/wxTerminal.cpp.wx ucblogo-6.0/wxTerminal.cpp ---- ucblogo-6.0/wxTerminal.cpp.wx 2008-09-14 06:57:09.000000000 +0200 -+++ ucblogo-6.0/wxTerminal.cpp 2008-11-21 01:05:26.000000000 +0100 -@@ -938,7 +938,7 @@ wxTerminal::GetCharSize(int *cw, int *ch - //dc.GetTextExtent("(", &dummy, ch); - - int descent, extlead; -- dc.GetTextExtent("M", cw, ch, &descent, &extlead); -+ dc.GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), cw, ch, &descent, &extlead); - //for the tails of g's and y's, if needed. - #ifdef __WXMSW__ - *ch += descent + extlead + 1; -@@ -2202,8 +2202,8 @@ void wxTerminal::DebugOutputBuffer() { - lpos.offset = 0; - wxterm_charpos pos_1 = line_of(lpos); - -- fprintf(stderr, "WXTERMINAL STATS: \n width: %d, height: %d, \n cw: %d, ch: %d \n x_max: %d, y_max: %d \n cursor_x: %d, cursor_y: %d \n last_logo_x : %d, last_logo_y: %d \ncurr_charpos buf %d offset %d \ncurr_line buf %d offset %d\n", m_width, m_height, m_charWidth, m_charHeight, x_max, y_max,cursor_x, cursor_y, last_logo_x, last_logo_y,(int)curr_char_pos.buf, curr_char_pos.offset, (int)curr_line_pos.buf, curr_line_pos.offset); -- fprintf(stderr, "WXTERMINAL CHARACTER BUFFER\n###############\n"); -+ // fprintf(stderr, "WXTERMINAL STATS: \n width: %d, height: %d, \n cw: %d, ch: %d \n x_max: %d, y_max: %d \n cursor_x: %d, cursor_y: %d \n last_logo_x : %d, last_logo_y: %d \ncurr_charpos buf %d offset %d \ncurr_line buf %d offset %d\n", m_width, m_height, m_charWidth, m_charHeight, x_max, y_max,cursor_x, cursor_y, last_logo_x, last_logo_y,(int)curr_char_pos.buf, curr_char_pos.offset, (int)curr_line_pos.buf, curr_line_pos.offset); -+ // fprintf(stderr, "WXTERMINAL CHARACTER BUFFER\n###############\n"); - while(char_of(pos_1) != '\0') { - if(char_of(pos_1) == '\n') { - fprintf(stderr, "\\n\n"); -@@ -2218,7 +2218,7 @@ void wxTerminal::DebugOutputBuffer() { - fprintf(stderr, "\n#############\n"); - fprintf(stderr, "WXTERMINAL LINE BUFFER\n##############\n"); - for(int i = 0; i <= y_max; i++) { -- fprintf(stderr, "LINE %d: buf: %d, offset: %d, len: %d\n", i,(int)line_of(lpos).buf, line_of(lpos).offset, line_of(lpos).line_length); -+ // fprintf(stderr, "LINE %d: buf: %d, offset: %d, len: %d\n", i,(int)line_of(lpos).buf, line_of(lpos).offset, line_of(lpos).line_length); - inc_linepos(lpos); - } - fprintf(stderr, "\n#############\n\n"); -diff -up ucblogo-6.0/wxTurtleGraphics.cpp.wx ucblogo-6.0/wxTurtleGraphics.cpp ---- ucblogo-6.0/wxTurtleGraphics.cpp.wx 2008-09-14 01:23:42.000000000 +0200 -+++ ucblogo-6.0/wxTurtleGraphics.cpp 2008-11-21 01:05:35.000000000 +0100 -@@ -558,7 +558,7 @@ extern "C" FLONUM y_scale; - extern "C" void wx_get_label_size(int *w, int *h) { - /* returns size in pixels; converted to turtle steps in wxterm.c */ - int descent, extlead; -- m_memDC->GetTextExtent("M", w, h, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), w, h, &descent, &extlead); - } - - extern "C" void wx_adjust_label_height() { -@@ -573,7 +573,7 @@ extern "C" void wx_adjust_label_height() - label_font.SetPointSize(font_size); - - m_memDC->SetFont(label_font); -- m_memDC->GetTextExtent("M", &cw, &ch, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &ch, &descent, &extlead); - - //now... first figure out whether we undershot or overshot... - //this determines which direction to change the size -@@ -592,7 +592,7 @@ extern "C" void wx_adjust_label_height() - } - if (expected == 100) break; - m_memDC->SetFont(tmp_font); -- m_memDC->GetTextExtent("M", &cw, &tmp_height, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &tmp_height, &descent, &extlead); - - if(tmp_height >= px_height) break; - -@@ -611,7 +611,7 @@ extern "C" void wx_adjust_label_height() - } - if (expected == 2) break; - m_memDC->SetFont(tmp_font); -- m_memDC->GetTextExtent("M", &cw, &tmp_height, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &tmp_height, &descent, &extlead); - - if(tmp_height <= px_height) break; - diff --git a/ucblogo-6.0-wx3.patch b/ucblogo-6.0-wx3.patch deleted file mode 100644 index f38432b..0000000 --- a/ucblogo-6.0-wx3.patch +++ /dev/null @@ -1,100 +0,0 @@ -Common subdirectories: ucblogo-6.0/csls and ucblogo-6.0wx/csls -Common subdirectories: ucblogo-6.0/docs and ucblogo-6.0wx/docs -Common subdirectories: ucblogo-6.0/emacs and ucblogo-6.0wx/emacs -Common subdirectories: ucblogo-6.0/helpfiles and ucblogo-6.0wx/helpfiles -Common subdirectories: ucblogo-6.0/logolib and ucblogo-6.0wx/logolib -diff -u ucblogo-6.0/wxTerminal.cpp ucblogo-6.0wx/wxTerminal.cpp ---- ucblogo-6.0/wxTerminal.cpp 2019-08-30 11:44:20.982827709 -0600 -+++ ucblogo-6.0wx/wxTerminal.cpp 2019-08-30 11:40:02.061790995 -0600 -@@ -500,13 +500,7 @@ - void LogoFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event)) { - wxFileDialog dialog(this, - _T("Save Logo Workspace"), -- (firstloadsave ? --#ifdef __WXMAC__ /* needed for wxWidgets 2.6 */ -- *wxEmptyString : --#else -- wxStandardPaths::Get().GetDocumentsDir() : --#endif -- *wxEmptyString), -+ *wxEmptyString, - wxEmptyString, - _T("Logo workspaces(*.lg)|*.lg|All files(*)|*"), - // "*", -@@ -536,13 +530,7 @@ - ( - this, - _T("Load Logo Workspace"), -- (firstloadsave ? --#ifdef __WXMAC__ /* needed for wxWidgets 2.6 */ -- *wxEmptyString : --#else -- wxStandardPaths::Get().GetDocumentsDir() : --#endif -- *wxEmptyString), -+ *wxEmptyString, - wxEmptyString, - _T("Logo workspaces(*.lg)|*.lg|All files(*)|*"), - // "*", -@@ -938,7 +926,7 @@ - //dc.GetTextExtent("(", &dummy, ch); - - int descent, extlead; -- dc.GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), cw, ch, &descent, &extlead); -+ dc.GetTextExtent(wxString("M", wxConvUTF8, wxString::npos), cw, ch, &descent, &extlead); - //for the tails of g's and y's, if needed. - #ifdef __WXMSW__ - *ch += descent + extlead + 1; -diff -u ucblogo-6.0/wxTurtleGraphics.cpp ucblogo-6.0wx/wxTurtleGraphics.cpp ---- ucblogo-6.0/wxTurtleGraphics.cpp 2019-08-30 11:44:20.983827713 -0600 -+++ ucblogo-6.0wx/wxTurtleGraphics.cpp 2019-08-30 11:41:21.255108083 -0600 -@@ -558,7 +558,7 @@ - extern "C" void wx_get_label_size(int *w, int *h) { - /* returns size in pixels; converted to turtle steps in wxterm.c */ - int descent, extlead; -- m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), w, h, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxString::npos), w, h, &descent, &extlead); - } - - extern "C" void wx_adjust_label_height() { -@@ -573,7 +573,7 @@ - label_font.SetPointSize(font_size); - - m_memDC->SetFont(label_font); -- m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &ch, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxString::npos), &cw, &ch, &descent, &extlead); - - //now... first figure out whether we undershot or overshot... - //this determines which direction to change the size -@@ -592,7 +592,7 @@ - } - if (expected == 100) break; - m_memDC->SetFont(tmp_font); -- m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &tmp_height, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxString::npos), &cw, &tmp_height, &descent, &extlead); - - if(tmp_height >= px_height) break; - -@@ -611,7 +611,7 @@ - } - if (expected == 2) break; - m_memDC->SetFont(tmp_font); -- m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxSTRING_MAXLEN), &cw, &tmp_height, &descent, &extlead); -+ m_memDC->GetTextExtent(wxString("M", wxConvUTF8, wxString::npos), &cw, &tmp_height, &descent, &extlead); - - if(tmp_height <= px_height) break; - -diff -u ucblogo-6.0wx/wxTerminal.cpp ucblogo-6.0wx3/wxTerminal.cpp ---- ucblogo-6.0wx/wxTerminal.cpp 2019-08-30 11:40:02.061790995 -0600 -+++ ucblogo-6.0wx3/wxTerminal.cpp 2019-08-30 16:40:39.664086823 -0600 -@@ -1883,7 +1883,9 @@ - // return; - //} - } -- dc.Blit( t_x, t_y, w, h, &dc, t_x, t_y, wxINVERT); -+ if (w > 0 && h > 0) { -+ dc.Blit( t_x, t_y, w, h, &dc, t_x, t_y, wxINVERT); -+ } - } - - diff --git a/ucblogo-6.0-wxturtle.patch b/ucblogo-6.0-wxturtle.patch deleted file mode 100644 index 5c6f359..0000000 --- a/ucblogo-6.0-wxturtle.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -ur ucblogo-6.0/wxTurtleGraphics.cpp ucblogo-6.0wx4/wxTurtleGraphics.cpp ---- ucblogo-6.0/wxTurtleGraphics.cpp 2019-09-13 09:16:43.902627371 -0600 -+++ ucblogo-6.0wx4/wxTurtleGraphics.cpp 2019-09-13 09:21:10.298703716 -0600 -@@ -312,6 +312,61 @@ - wxdprintf("OnSize ends\n"); - } - -+extern FLONUM turtle_x, turtle_y, turtle_heading; -+extern "C" FLONUM x_scale, y_scale; -+extern "C" BOOLEAN user_turtle_shown; -+extern "C" FIXNUM g_round(FLONUM n); -+ -+void TurtleCanvas::DrawTurtle(wxDC &dc) { -+ FLONUM real_heading; -+ int left_x, left_y, right_x, right_y, top_x, top_y; -+ double cos_real_heading, sin_real_heading; -+ FLONUM delta_x, delta_y; -+ if (!user_turtle_shown) { -+ return; -+ } -+ const FLONUM degrad = 0.017453292520; -+ const int screen_width = wxGetInfo(SCREEN_WIDTH); -+ const int screen_height = wxGetInfo(SCREEN_HEIGHT); -+ const int screen_top = 0; -+ const int screen_left = 0; -+ const FLONUM turtle_side = 19.0; -+ const FLONUM turtle_half_bottom = 6.0; -+ const int screen_x_center = (screen_left + (screen_width)/2); -+ const int screen_y_center = (screen_top + (screen_height)/2); -+ -+ real_heading = -turtle_heading + 90.0; -+ -+ cos_real_heading = cos((FLONUM)(real_heading*degrad)); -+ sin_real_heading = sin((FLONUM)(real_heading*degrad)); -+ -+ delta_x = x_scale*(FLONUM)(sin_real_heading*turtle_half_bottom); -+ delta_y = y_scale*(FLONUM)(cos_real_heading*turtle_half_bottom); -+ -+ left_x = g_round(turtle_x - delta_x); -+ left_y = g_round(turtle_y + delta_y); -+ -+ right_x = g_round(turtle_x + delta_x); -+ right_y = g_round(turtle_y - delta_y); -+ -+ top_x = g_round(turtle_x + x_scale*(FLONUM)(cos_real_heading*turtle_side)); -+ top_y = g_round(turtle_y + y_scale*(FLONUM)(sin_real_heading*turtle_side)); -+ -+ /* move to right, draw to left, draw to top, draw to right */ -+ //move_to(screen_x_center + right_x, screen_y_center - right_y); -+ //line_to(screen_x_center + left_x, screen_y_center - left_y); -+ dc.SetPen(wxPen(colors[turtleFrame->xgr_pen.color+SPECIAL_COLORS], -+ turtleFrame->xgr_pen.pw, wxSOLID)); -+ dc.DrawLine(screen_x_center + right_x, screen_y_center - right_y, -+ screen_x_center + left_x, screen_y_center - left_y); -+ //line_to(screen_x_center + top_x, screen_y_center - top_y); -+ dc.DrawLine(screen_x_center + left_x, screen_y_center - left_y, -+ screen_x_center + top_x, screen_y_center - top_y); -+ //line_to(screen_x_center + right_x, screen_y_center - right_y); -+ dc.DrawLine(screen_x_center + top_x, screen_y_center - top_y, -+ screen_x_center + right_x, screen_y_center - right_y); -+ -+} - - void TurtleCanvas::OnDraw(wxDC &dc) { - int x, y; -@@ -322,6 +373,7 @@ - - #if USE_MEMDC - dc.Blit(0,0,x,y,m_memDC,0,0); -+ DrawTurtle(dc); - return; - #endif - -diff -ur ucblogo-6.0/wxTurtleGraphics.h ucblogo-6.0wx4/wxTurtleGraphics.h ---- ucblogo-6.0/wxTurtleGraphics.h 2008-09-03 11:58:13.000000000 -0600 -+++ ucblogo-6.0wx4/wxTurtleGraphics.h 2019-09-13 09:19:31.257303550 -0600 -@@ -213,6 +213,7 @@ - static wxColour colors[NUMCOLORS+SPECIAL_COLORS]; - - private: -+ void DrawTurtle(wxDC &dc); - - wxBitmap - *m_bitmap; - From 7cd02e1097c9c00526fa34c325e8fa5c824ba8aa Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Fri, 27 Dec 2019 09:43:23 -0700 Subject: [PATCH 3/3] Switching to final release version --- ucblogo.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucblogo.spec b/ucblogo.spec index 3b05d2a..224fa61 100644 --- a/ucblogo.spec +++ b/ucblogo.spec @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: An interpreter for the Logo programming language License: GPLv3+ -Source: https://github.com/jrincayc/ucblogo-code/archive/pre_release_6_1_c.tar.gz +Source: https://github.com/jrincayc/ucblogo-code/archive/version_6.1.tar.gz Source1: %{name}.desktop URL: https://people.eecs.berkeley.edu/~bh/logo.html BuildRequires: gcc @@ -46,7 +46,7 @@ This package includes HTML and PDF documentation for ucblogo and the Program Logic Manual (plm) %prep -%setup -q -n ucblogo-code-pre_release_6_1_c +%setup -q -n ucblogo-code-version_6.1 # correct directories /usr/lib -> /usr/share and /usr/local -> /usr