diff --git a/ucblogo/ucblogo.patch b/ucblogo/ucblogo.patch new file mode 100644 index 0000000000..d08c8d9c0a --- /dev/null +++ b/ucblogo/ucblogo.patch @@ -0,0 +1,134 @@ +Index: makefile.in +--- makefile.in.orig 2008-09-14 01:27:17 +0200 ++++ makefile.in 2010-01-11 13:37:32 +0100 +@@ -31,7 +31,7 @@ + $(CC) $(CFLAGS) -O0 -c mem.c + + svn.c: $(SRCS) +- echo 'char* SVN = "('`svnversion|tr -d '\r'`')";' > svn.c ++ echo 'char* SVN = "('`echo r0|tr -d '\r'`')";' > svn.c + + tags: $(SRCS) + ctags --format=1 -N $(SRCS) $(HDRS) +@@ -70,14 +70,14 @@ + # cd emacs; $(MAKE) ship + cd docs; $(MAKE) ship + +-install: all ++install: + for d in $(BINDIR) $(LIBLOC) $(LIBLOC)/logolib $(LIBLOC)/helpfiles $(LIBLOC)/csls; do [ -d $$d ] || mkdir -p $$d || exit 1; done + cp logo $(BINDIR)/. + cp -f logolib/* $(LIBLOC)/logolib/. + cp -f helpfiles/* $(LIBLOC)/helpfiles/. + cp -f csls/* $(LIBLOC)/csls/. + # (cd emacs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install) +- (cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install) ++# (cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install) + # prefix=$(prefix); LIBLOC=$(LIBLOC); BINDIR=$(BINDIR); export prefix LIBLOC BINDIR; cd emacs; $(MAKE) install + + logo-mode: +Index: term.c +--- term.c.orig 2008-09-14 06:57:09 +0200 ++++ term.c 2010-01-11 13:36:39 +0100 +@@ -30,6 +30,9 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++#include ++#else + #ifdef HAVE_TERMIO_H + #ifdef HAVE_WX + #include +@@ -41,6 +44,7 @@ + #include + #endif + #endif ++#endif + + #undef TRUE + #undef FALSE +@@ -78,6 +82,9 @@ + char so_arr[40]; + char se_arr[40]; + ++#ifdef __FreeBSD__ ++struct termios tty_cooked, tty_cbreak; ++#else + #ifdef HAVE_TERMIO_H + struct termio tty_cooked, tty_cbreak; + #else +@@ -85,6 +92,7 @@ + struct sgttyb tty_cooked, tty_cbreak; + #endif + #endif ++#endif + + int interactive, tty_charmode; + +@@ -92,7 +100,11 @@ + + char *termcap_ptr; + ++#ifdef __FreeBSD__ ++int termcap_putter(int ch) { ++#else + int termcap_putter(char ch) { ++#endif + *termcap_ptr++ = ch; + return 0; + } +@@ -132,6 +144,13 @@ + #endif /* WIN32 */ + #else + if (interactive) { ++#ifdef __FreeBSD__ ++ tcgetattr(0, &tty_cooked); ++ tty_cbreak = tty_cooked; ++ tty_cbreak.c_cc[VMIN] = '\01'; ++ tty_cbreak.c_cc[VTIME] = '\0'; ++ tty_cbreak.c_lflag &= ~(ECHO|ICANON); ++#else + #ifdef HAVE_TERMIO_H + ioctl(0,TCGETA,(char *)(&tty_cooked)); + tty_cbreak = tty_cooked; +@@ -144,6 +163,7 @@ + tty_cbreak.sg_flags |= CBREAK; + tty_cbreak.sg_flags &= ~ECHO; + #endif ++#endif + } + tty_charmode = 0; + tgetent(bp, getenv("TERM")); +@@ -188,11 +208,15 @@ + void charmode_on() { + #ifdef unix + if ((readstream == stdin) && interactive && !tty_charmode) { ++#ifdef __FreeBSD__ ++ tcsetattr(0, TCSANOW, &tty_cbreak); ++#else + #ifdef HAVE_TERMIO_H + ioctl(0,TCSETA,(char *)(&tty_cbreak)); + #else /* !HAVE_TERMIO_H */ + ioctl(0,TIOCSETP,(char *)(&tty_cbreak)); + #endif /* HAVE_TERMIO_H */ ++#endif + tty_charmode++; + } + #endif /* unix */ +@@ -204,11 +228,15 @@ + void charmode_off() { + #ifdef unix + if (tty_charmode) { ++#ifdef __FreeBSD__ ++ tcsetattr(0, TCSANOW, &tty_cooked); ++#else + #ifdef HAVE_TERMIO_H + ioctl(0,TCSETA,(char *)(&tty_cooked)); + #else /* !HAVE_TERMIO_H */ + ioctl(0,TIOCSETP,(char *)(&tty_cooked)); + #endif /* HAVE_TERMIO_H */ ++#endif + tty_charmode = 0; + } + #endif /* unix */ diff --git a/ucblogo/ucblogo.spec b/ucblogo/ucblogo.spec index 14a8e98f37..8650440231 100644 --- a/ucblogo/ucblogo.spec +++ b/ucblogo/ucblogo.spec @@ -23,7 +23,7 @@ # package information Name: ucblogo -Summary: Berkeley Logo interpreter +Summary: Berkeley Logo Interpreter URL: http://www.cs.berkeley.edu/~bh/ Vendor: Brian Harvey Packager: OpenPKG Foundation e.V. @@ -31,22 +31,23 @@ Distribution: OpenPKG Community Class: EVAL Group: Language License: GPL -Version: 5.5 -Release: 20080101 +Version: 6.0 +Release: 20100111 # list of sources Source0: ftp://anarres.cs.berkeley.edu/pub/ucblogo/ucblogo-%{version}.tar.gz +Patch0: ucblogo.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, emacs, x11, make -PreReq: OpenPKG, openpkg >= 20040130, emacs, x11 +BuildPreReq: OpenPKG, openpkg >= 20040130, make +PreReq: OpenPKG, openpkg >= 20040130 AutoReq: no AutoReqProv: no %description - Berkely Logo (ucblogo) is an interpreter for the Logo programming + Berkeley Logo (ucblogo) is an interpreter for the Logo programming language. Logo is a computer programming language designed for use by learners, including children. This dialect of Logo features random-access arrays, variable number of inputs to user-defined @@ -63,43 +64,28 @@ AutoReqProv: no %prep %setup -q - %{l_shtool} subst \ - -e 's;/logolib;/ucblogo;' \ - -e 's;/helpfiles;/share/ucblogo;' \ - -e 's;@MAKE@;%{l_make};' \ - -e 's;^\(.*cd \(emacs\|docs\).*\);#\1;' \ - -e 's; make-docs$;;' \ - makefile.in + %patch -p0 + find . -type d -name CVS -print | xargs rm -rf %build - # configure the package + rm -f config.cache CC="%{l_cc}" \ CFLAGS="%{l_cflags}" \ MAKE="%{l_make}" \ ./configure \ --prefix=%{l_prefix} \ - --with-x - - %{l_shtool} subst -e "s;^LIBLOC.*=.*$;LIBLOC=%{l_prefix}/lib/;" makefile - %{l_shtool} subst \ - -e "/texi2html/s;-expand tex;;" \ - -e "/texi2html/s;-split chapter;-split_chapter;" \ - docs/makefile - mkdir -p docs/html - %{l_make} %{l_mflags} logo + --without-x + %{l_make} %{l_mflags} \ + BINDIR="%{l_prefix}/bin" \ + LIBLOC="%{l_prefix}/lib/ucblogo" %install rm -rf $RPM_BUILD_ROOT - - %{l_shtool} subst -e "s;^prefix.*=.*$;prefix=$RPM_BUILD_ROOT%{l_prefix};" makefile - %{l_shtool} subst -e "s;^LIBLOC.*=.*$;LIBLOC=$RPM_BUILD_ROOT%{l_prefix}/lib;" makefile - %{l_make} install - - # FIXME these files are a challenge for "rpmtool files" - rm $RPM_BUILD_ROOT%{l_prefix}/lib/ucblogo/file\? - rm $RPM_BUILD_ROOT%{l_prefix}/lib/ucblogo/\?rest - - # determine installation file list + %{l_make} %{l_mflags} install \ + BINDIR="$RPM_BUILD_ROOT%{l_prefix}/bin" \ + LIBLOC="$RPM_BUILD_ROOT%{l_prefix}/lib/ucblogo" + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/ucblogo/file\? + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/ucblogo/\?rest %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files