[packages/twin] - new URLs, updated to 0.8.1 - updated ac,ncurses patches - removed outdated bitops,declarations,don

qboosh qboosh at pld-linux.org
Sun Feb 5 21:34:33 CET 2023


commit bcf5944d272d8efded2d4e6f1322936dab664d76
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 5 21:36:00 2023 +0100

    - new URLs, updated to 0.8.1
    - updated ac,ncurses patches
    - removed outdated bitops,declarations,dont_strip,gpm_wheel,raw,utf8 patches
    - added ggi patch (update internal API in ggi module)
    - TT library and modules are gone (disabled upstream)

 twin-ac.patch           | 108 ++++++++++++++-------------------
 twin-bitops.patch       |  61 -------------------
 twin-declarations.patch |  53 -----------------
 twin-dont_strip.patch   |  11 ----
 twin-ggi.patch          |  11 ++++
 twin-gpm_wheel.patch    |  33 -----------
 twin-ncursesw.patch     |  18 +++---
 twin-raw.patch          |  13 ----
 twin-utf8.patch         | 145 --------------------------------------------
 twin.spec               | 155 ++++++++++++++++++++++++------------------------
 10 files changed, 145 insertions(+), 463 deletions(-)
---
diff --git a/twin.spec b/twin.spec
index 3ffdcf8..4ed4589 100644
--- a/twin.spec
+++ b/twin.spec
@@ -1,35 +1,37 @@
 #
 # Conditional build:
-%bcond_without	static_libs	# don't build static library
+%bcond_without	static_libs	# static library
+%bcond_without	ggi		# GGI hw module
 #
 Summary:	Twin - a windowing environment
 Summary(pl.UTF-8):	Tekstowe środowisko okienkowe
 Name:		twin
-Version:	0.5.1
-Release:	5
-License:	LGPL
+Version:	0.8.1
+Release:	1
+License:	LGPL v2+
 Group:		Libraries
-Source0:	http://dl.sourceforge.net/twin/%{name}-%{version}.tar.gz
-# Source0-md5:	46b31e1bdd4fda60336da24034896c53
-Patch0:		%{name}-bitops.patch
+#Source0Download: https://github.com/cosmos72/twin/tags
+Source0:	https://github.com/cosmos72/twin/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	e98efaff326335d5947eb8f7f4bb2f6c
+Patch0:		%{name}-ggi.patch
 Patch1:		%{name}-ac.patch
-Patch2:		%{name}-declarations.patch
-Patch3:		%{name}-ncursesw.patch
-Patch4:		%{name}-utf8.patch
-Patch5:		%{name}-dont_strip.patch
-Patch6:		%{name}-raw.patch
-Patch7:		%{name}-gpm_wheel.patch
-URL:		http://twin.sourceforge.net/
-BuildRequires:	autoconf
-BuildRequires:	automake
+Patch2:		%{name}-ncursesw.patch
+URL:		https://sourceforge.net/projects/twin/
+BuildRequires:	autoconf >= 2.65
+BuildRequires:	automake >= 1:1.14
 BuildRequires:	bash
+BuildRequires:	fontconfig-devel
+BuildRequires:	freetype-devel >= 2
 BuildRequires:	gpm-devel
-BuildRequires:	gtk+-devel
-BuildRequires:	libggi-devel
-BuildRequires:	libtool
+%{?with_ggi:BuildRequires:	libggi-devel}
+BuildRequires:	libtool >= 2:2
 BuildRequires:	ncurses-devel
+BuildRequires:	pkgconfig >= 1:0.25
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXft-devel
 BuildRequires:	xorg-lib-libXpm-devel
 BuildRequires:	zlib-devel
+Obsoletes:	twin-TT-hw-gtk < 0.8
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -83,18 +85,6 @@ Static twin libraries.
 %description static -l pl.UTF-8
 Biblioteki statyczne twin.
 
-%package TT-hw-gtk
-Summary:	TT GTK+ driver for twin
-Summary(pl.UTF-8):	Sterownik TT GTK+ do twin
-Group:		Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description TT-hw-gtk
-GTK+ target driver for twin's TT library.
-
-%description TT-hw-gtk -l pl.UTF-8
-Sterownik wyjścia GTK+ do biblioteki TT z twin.
-
 %package hw-X11
 Summary:	X11 driver for twin
 Summary(pl.UTF-8):	Sterownik X11 do twin
@@ -136,30 +126,31 @@ Sterownik TTY z obsługą myszy przez GPM do twin.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
 
 %build
 %{__libtoolize}
-%{__aclocal}
-%{__autoheader}
+%{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
 	%{!?with_static_libs:--disable-static}
-%{__make} \
-	CFLAGS="%{rpmcflags} -Wall -D_GNU_SOURCE"
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install docs/twin.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/twin/*.la
+%if %{with static_libs}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/twin/*.a
+%endif
+
+# packaged as %doc / in common-licenses
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/twin/{BUGS,COPYING*,Changelog.txt,INSTALL,README*,twin-current.lsm}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/twin/docs
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -169,64 +160,76 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc BUGS Changelog.txt README docs/{Compatibility,Philosophy,Tutorial}
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) %{_libdir}/libTT.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libTT.so.0
+%doc BUGS Changelog.txt README.md docs/{Compatibility,FAQ,Philosophy,Tutorial} clients/README.twsetroot
+%attr(755,root,root) %{_bindir}/twattach
+%attr(755,root,root) %{_bindir}/twcat
+%attr(755,root,root) %{_bindir}/twclip
+%attr(755,root,root) %{_bindir}/twclutter
+%attr(755,root,root) %{_bindir}/twcuckoo
+%attr(755,root,root) %{_bindir}/twdetach
+%attr(755,root,root) %{_bindir}/twdialog
+%attr(755,root,root) %{_bindir}/twdisplay
+%attr(755,root,root) %{_bindir}/twevent
+%attr(755,root,root) %{_bindir}/twfindtwin
+%attr(755,root,root) %{_bindir}/twin
+%attr(755,root,root) %{_bindir}/twin_server
+%attr(755,root,root) %{_bindir}/twlsmsgport
+%attr(755,root,root) %{_bindir}/twlsobj
+%attr(755,root,root) %{_bindir}/twsendmsg
+%attr(755,root,root) %{_bindir}/twsetroot
+%attr(755,root,root) %{_bindir}/twstart
+%attr(755,root,root) %{_bindir}/twsysmon
+%attr(755,root,root) %{_bindir}/twterm
+%attr(755,root,root) %{_bindir}/twthreadtest
+%attr(755,root,root) %{_sbindir}/twdm
 %attr(755,root,root) %{_libdir}/libTutf.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libTutf.so.0
+%attr(755,root,root) %ghost %{_libdir}/libTutf.so.1
 %attr(755,root,root) %{_libdir}/libTw.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libTw.so.4
-%dir %{_libdir}/TT
-%dir %{_libdir}/TT/modules
-%dir %{_libdir}/TT/modules/HW
-%attr(755,root,root) %{_libdir}/TT/modules/HW/twin*.so*
-%attr(755,root,root) %{_libdir}/TT/modules/HW/xml.so*
+%attr(755,root,root) %ghost %{_libdir}/libTw.so.5
 %dir %{_libdir}/twin
-%{_libdir}/twin/system.*
-%dir %{_libdir}/twin/modules
-%attr(755,root,root) %{_libdir}/twin/modules/*.so*
-%dir %{_libdir}/twin/modules/HW
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_display.so*
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_twin.so*
+%attr(755,root,root) %{_libdir}/twin/libhw_display*.so
+%attr(755,root,root) %{_libdir}/twin/libhw_twin*.so
+%attr(755,root,root) %{_libdir}/twin/librcparse*.so
+%attr(755,root,root) %{_libdir}/twin/libsocket*.so
+%attr(755,root,root) %{_libdir}/twin/libterm*.so
+%attr(755,root,root) %{_libdir}/twin/libwm*.so
+%attr(755,root,root) %{_libdir}/twin/system.twenvrc.sh
+%attr(755,root,root) %{_libdir}/twin/system.twinrc
 %dir %{_datadir}/twin
 %dir %{_datadir}/twin/themes
-%{_mandir}/man1/*
+%{_mandir}/man1/twin.1*
 
 %files devel
 %defattr(644,root,root,755)
-%doc docs/{diagram.txt,libTT-design.txt,libTw.txt,ltrace.conf} clients/README.twsetroot
-%attr(755,root,root) %{_libdir}/libTT.so
+%doc docs/{diagram.txt,libTT-design.txt,libTw.txt,ltrace.conf}
 %attr(755,root,root) %{_libdir}/libTutf.so
 %attr(755,root,root) %{_libdir}/libTw.so
-%{_includedir}/*
+%{_libdir}/libTutf.la
+%{_libdir}/libTw.la
+%{_includedir}/Tutf
+%{_includedir}/Tw
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libTT.a
 %{_libdir}/libTutf.a
 %{_libdir}/libTw.a
 %endif
 
-%files TT-hw-gtk
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/TT/modules/HW/gtk.so*
-
 %files hw-X11
 %defattr(644,root,root,755)
 %doc themes/hw_gfx/README
-%attr(755,root,root) %{_libdir}/TT/modules/HW/X11.so*
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_X*.so*
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_gfx.so*
-%dir %{_datadir}/twin/themes/hw_gfx
-%{_datadir}/twin/themes/hw_gfx/*.xpm
+%attr(755,root,root) %{_libdir}/twin/libhw_X11*.so
+%attr(755,root,root) %{_libdir}/twin/libhw_gfx*.so
+%attr(755,root,root) %{_libdir}/twin/libhw_xft*.so
+%{_datadir}/twin/themes/hw_gfx
 
+%if %{with ggi}
 %files hw-ggi
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_ggi.so*
+%attr(755,root,root) %{_libdir}/twin/libhw_ggi*.so
+%endif
 
 %files hw-tty
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/twin/modules/HW/hw_tty.so*
+%attr(755,root,root) %{_libdir}/twin/libhw_tty*.so
diff --git a/twin-ac.patch b/twin-ac.patch
index f857fe3..de43980 100644
--- a/twin-ac.patch
+++ b/twin-ac.patch
@@ -1,62 +1,46 @@
---- twin-0.5.1/configure.in.old	2007-09-30 19:14:50.000000000 +0200
-+++ twin-0.5.1/configure.in	2007-09-30 19:15:09.000000000 +0200
-@@ -222,6 +222,7 @@
- dnl
- dnl Checks for programs.
- dnl
-+AC_HEADER_STDC
- AC_PROG_MAKE_SET
- 
- make_is_good=no
-@@ -377,7 +378,6 @@
- dnl
- dnl Checks for header files.
- dnl
--AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
- AC_HEADER_TIME
- AC_CHECK_HEADERS(crypt.h dirent.h dlfcn.h fcntl.h gpm.h ggi/ggi.h limits.h ltdl.h \
-@@ -863,12 +863,12 @@
- 
- 
- # this will prepare the Makefiles
--. ${TOP_SRCDIR}/scripts/Makefiles.sh "${TOP_SRCDIR}"
-+/bin/bash ${TOP_SRCDIR}/scripts/Makefiles.sh "${TOP_SRCDIR}"
- 
- 
- AC_OUTPUT(makeautoconf conf/conf.auto)
- 
--enable_="`echo \"$CONF_\" | sed 's/CONF_/enable_/g' | tr -d ';' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`"
-+enable_="`echo $CONF_ | sed 's/CONF_/enable_/g' | tr -d ';' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`"
- 
- ${TOP_SRCDIR}/scripts/Prettyconfig.sh "prefix='$prefix'" "CC='$CC'" "CFLAGS='$CFLAGS'" "OS='$OS'" \
- 	"SYS_SHLIBS='$SYS_SHLIBS'" "enable__asm_style='$enable__asm_style'" $enable_
---- twin-0.5.1/makerules.in.old	2007-09-30 19:07:56.000000000 +0200
-+++ twin-0.5.1/makerules.in	2007-09-30 19:08:57.000000000 +0200
-@@ -221,7 +221,7 @@
- 	fi
- 
- $(T)configure: $(T)configure.in $(ADMIN_LIBTOOLS) $(ADMIN_ACLOCAL) $(T)scripts/Makefiles.sh $(T)include/autoconf.h.in
--	rm -f $@ && cd $(TT) && autoconf --localdir=admin
-+	rm -f $@ && cd $(TT) && autoconf
- 
- $(T)include/autoconf.h.in: $(T)configure.in
- 	rm -f $@ && cd $(TT) && autoheader
-@@ -331,7 +331,7 @@
-   make-shlib-links=target_shlib=$(patsubst %.la,%.so,$(1)) ; \
-     $(LN) $$target_shlib.$(SHLIBS_VER) $(1) ; \
-     $(LN) $$target_shlib.$(SHLIBS_VER) $$target_shlib.$(MAJOR_VER) ; \
--    $(LN) $$target_shlib.$(MAJOR_VER) $$target_shlib
-+    $(LN) $$target_shlib.$(SHLIBS_VER) $$target_shlib
- 
-   #
-   # how to install a binary (program or library)
-@@ -837,7 +837,7 @@
-   install-lib-%.la:
- 	$(INSTALL) $*.so.$(SHLIBS_VER) $(DESTDIR)$(libdir)
- 	$(LN)      $*.so.$(SHLIBS_VER) $(DESTDIR)$(libdir)/$*.so.$(MAJOR_VER) && \
--	$(LN)      $*.so.$(MAJOR_VER)  $(DESTDIR)$(libdir)/$*.so
-+	$(LN)      $*.so.$(SHLIBS_VER)  $(DESTDIR)$(libdir)/$*.so
- 
-   uninstall-mod-%.la:
- 	rm -f $(DESTDIR)$(libdir)$(INSTALLSUBDIR)/$*.so.$(SHLIBS_VER)
+--- twin-0.8.1/configure.ac.orig	2023-02-05 19:51:46.010582238 +0100
++++ twin-0.8.1/configure.ac	2023-02-05 20:03:31.693425892 +0100
+@@ -86,7 +86,7 @@ for try_flag in -fomit-frame-pointer -fn
+ do
+   save_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS $try_flag"
+-  try_flag_id="`echo \"$try_flag\" | tr - _`"
++  try_flag_id="$(echo "$try_flag" | tr - _)"
+   AC_CACHE_CHECK(for C compiler flag $try_flag, ac_cv_cflag$try_flag_id, AC_TRY_COMPILE(
+   [
+     int ret0(void) {
+@@ -269,7 +269,7 @@ TW_FIX_CONFIG
+ 
+ 
+ if test "$enable__dlopen" = yes ; then
+-  AC_SUBST(LIBDL, "`echo \"$ac_cv_search_dlopen\"         | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
++  AC_SUBST(LIBDL, "$(echo "$ac_cv_search_dlopen"         | $SED -e 's/^none required$//g' -e 's/^no$//g')")
+ else
+   # if dlopen() or <dlfcn.h> are missing, or user specified --enable-dlopen=no, link against libtool
+   AC_SUBST(LIBDL, "$LIBLTDL")
+@@ -280,16 +280,16 @@ else
+   fi
+ fi
+ 
+-AC_SUBST(LIBCRYPT,    "`echo \"$ac_cv_search_crypt\"          | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBGGI,      "`echo \"$ac_cv_search_ggiOpen\"        | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBGPM,      "`echo \"$ac_cv_search_Gpm_Open\"       | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBSOCK,     "`echo \"$ac_cv_search_gethostbyname\"  | $SED -e 's/^none required$//g' -e 's/^no$//g'` `echo \"$ac_cv_search_socket\" | $SED -e 's/^none required$//g' -e 's/^no$//g'` `echo \"$ac_cv_search_connect\"  | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBPTHREAD,  "`echo \"$ac_cv_search_pthread_create\" | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBTERMCAP,  "`echo \"$ac_cv_search_tgetent\"        | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBXPM,      "`echo \"$ac_cv_search_XpmReadFileToPixmap\"  | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
+-AC_SUBST(LIBXFT,      "`echo \"$ac_cv_search_XftFontOpen\"    | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
++AC_SUBST(LIBCRYPT,    "$(echo "$ac_cv_search_crypt"          | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBGGI,      "$(echo "$ac_cv_search_ggiOpen"        | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBGPM,      "$(echo "$ac_cv_search_Gpm_Open"       | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBSOCK,     "$(echo "$ac_cv_search_gethostbyname"  | $SED -e 's/^none required$//g' -e 's/^no$//g') $(echo "$ac_cv_search_socket" | $SED -e 's/^none required$//g' -e 's/^no$//g') $(echo "$ac_cv_search_connect"  | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBPTHREAD,  "$(echo "$ac_cv_search_pthread_create" | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBTERMCAP,  "$(echo "$ac_cv_search_tgetent"        | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBXPM,      "$(echo "$ac_cv_search_XpmReadFileToPixmap"  | $SED -e 's/^none required$//g' -e 's/^no$//g')")
++AC_SUBST(LIBXFT,      "$(echo "$ac_cv_search_XftFontOpen"    | $SED -e 's/^none required$//g' -e 's/^no$//g')")
+ if test "$enable_socket_gz" = yes; then
+-  AC_SUBST(LIBZ,      "`echo \"$ac_cv_search_deflate\"        | $SED -e 's/^none required$//g' -e 's/^no$//g'`")
++  AC_SUBST(LIBZ,      "$(echo "$ac_cv_search_deflate"        | $SED -e 's/^none required$//g' -e 's/^no$//g')")
+ fi
+ AC_SUBST(LIBTUTF,    '$(top_builddir)/libs/libTutf/libTutf.la')
+ AC_SUBST(LIBTW,      '$(top_builddir)/libs/libTw/libTw.la')
diff --git a/twin-bitops.patch b/twin-bitops.patch
deleted file mode 100644
index 10cc763..0000000
--- a/twin-bitops.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- twin-0.5.1/server/HW/hw_tty_linux/kbd_raw1.h.orig	2003-05-31 09:52:10.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty_linux/kbd_raw1.h	2004-01-04 12:47:50.734975424 +0100
-@@ -40,7 +40,6 @@
- #include <linux/kd.h>
- #include <linux/keyboard.h>
- #include <linux/vt.h>
--#include <linux/bitops.h>
- 
- 
- #define SIZE(array)		(sizeof(array)/sizeof(array[0]))
-@@ -74,7 +73,50 @@
- 
- #define U(x) ((x) ^ 0xf000)
- 
-+/*
-+ * first three routines from <asm-generic/bitops.h> in Linux sources
-+ * (with cli/sti removed)
-+ * C language equivalents written by Theodore Ts'o, 9/26/92
-+ */
-+
-+static __inline__ int set_bit(int nr,long * addr)
-+{
-+	int	mask, retval;
-+
-+	addr += nr >> 5;
-+	mask = 1 << (nr & 0x1f);
-+	retval = (mask & *addr) != 0;
-+	*addr |= mask;
-+	return retval;
-+}
-+
-+static __inline__ int clear_bit(int nr, long * addr)
-+{
-+	int	mask, retval;
- 
-+	addr += nr >> 5;
-+	mask = 1 << (nr & 0x1f);
-+	retval = (mask & *addr) != 0;
-+	*addr &= ~mask;
-+	return retval;
-+}
-+
-+static __inline__ int test_bit(int nr, long * addr)
-+{
-+	int	mask;
-+
-+	addr += nr >> 5;
-+	mask = 1 << (nr & 0x1f);
-+	return ((mask & *addr) != 0);
-+}
-+
-+/* non-atomic version */
-+static __inline__ int test_and_set_bit(int nr, long * addr)
-+{
-+	int old = test_bit(nr, addr);
-+	set_bit(nr, addr);
-+	return old;
-+}
- 
- /* only one display at time can be in raw-keyboard mode... results in much simpler code */
- 
diff --git a/twin-declarations.patch b/twin-declarations.patch
deleted file mode 100644
index 2185873..0000000
--- a/twin-declarations.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- twin-0.5.1/libs/libTw/libTw.c.old	2007-09-30 19:17:27.000000000 +0200
-+++ twin-0.5.1/libs/libTw/libTw.c	2007-09-30 19:17:55.000000000 +0200
-@@ -1210,6 +1210,7 @@
-     return (tw_d)0;
- }
- 
-+static void DeleteAllListeners(tlistener);
- /* just like all Tw_* functions, this requires LOCK not to be held */
- /*
-  * Tw_Close() is not completely thread-safe, but it would be useless anyway
-@@ -1220,8 +1221,8 @@
- /**
-  * closes a server connection
-  */
-+
- void Tw_Close(tw_d TwD) {
--    static void DeleteAllListeners(tlistener);
-     s_tw_errno *E;
-     byte *q;
-     int i;
---- twin-0.5.1/server/HW/hw_tty_common/mouse_xterm.h.old	2007-09-30 19:23:02.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty_common/mouse_xterm.h	2007-09-30 19:24:28.000000000 +0200
-@@ -8,7 +8,7 @@
-  */
- 
- static void xterm_QuitMouse(void);
--static void xterm_MouseEvent(int fd, display_hw hw);
-+void xterm_MouseEvent(int fd, display_hw hw);
- static void xterm_ConfigureMouse(udat resource, byte todefault, udat value);
- 
- 
-@@ -97,7 +97,7 @@
- }
- 
- 
--static void xterm_MouseEvent(int fd, display_hw hw) {
-+void xterm_MouseEvent(int fd, display_hw hw) {
-     static dat prev_x, prev_y;
-     udat Buttons = 0, Id;
-     byte *s = xterm_MouseData;
---- twin-0.5.1/server/HW/hw_tty_common/kbd_stdin.h.old	2007-09-30 19:23:11.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty_common/kbd_stdin.h	2007-09-30 19:23:48.000000000 +0200
-@@ -273,9 +273,9 @@
- 
- 
- static byte xterm_MouseData[10] = "\033[M#!!!!";
-+void xterm_MouseEvent(int, display_hw);
- 
- static void stdin_KeyboardEvent(int fd, display_hw hw) {
--    static void xterm_MouseEvent(int, display_hw);
-     static byte buf[SMALLBUFF];
-     static fd_set rfds;
-     static struct timeval t;
diff --git a/twin-dont_strip.patch b/twin-dont_strip.patch
deleted file mode 100644
index b8623c9..0000000
--- a/twin-dont_strip.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- twin-0.5.1/makerules.in.old	2007-10-03 18:48:04.000000000 +0200
-+++ twin-0.5.1/makerules.in	2007-10-03 18:48:39.000000000 +0200
-@@ -43,8 +43,6 @@
-      # detected by `./configure' :
-      CFLAGS+=$(CC_AC_FLAGS)
-    endif
--   # strip installed binaries
--   INSTALLFLAGS+=-s
-  endif
- endif
- 
diff --git a/twin-ggi.patch b/twin-ggi.patch
new file mode 100644
index 0000000..c05cb5a
--- /dev/null
+++ b/twin-ggi.patch
@@ -0,0 +1,11 @@
+--- twin-0.8.1/server/hw/hw_ggi.c.orig	2019-12-23 21:33:52.000000000 +0100
++++ twin-0.8.1/server/hw/hw_ggi.c	2023-02-05 20:12:21.797220740 +0100
+@@ -567,7 +567,7 @@ static byte GGI_InitHW(void) {
+ }
+ 
+ EXTERN_C byte InitModule(module Module) {
+-  Module->Private = GGI_InitHW;
++  Module->Init = GGI_InitHW;
+   return ttrue;
+ }
+ 
diff --git a/twin-gpm_wheel.patch b/twin-gpm_wheel.patch
deleted file mode 100644
index 0234eeb..0000000
--- a/twin-gpm_wheel.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- twin-0.5.1/server/HW/hw_tty_linux/mouse_gpm.h.old	2007-10-04 14:53:55.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty_linux/mouse_gpm.h	2007-10-04 18:05:53.000000000 +0200
-@@ -117,10 +117,10 @@
- static void GPM_MouseEvent(int fd, display_hw hw) {
-     int left = 0;
-     udat IdButtons, Buttons = 0;
-+    static udat oldWheel = 0;
-     Gpm_Event GPM_EV;
-     
-     SaveHW;
--    
-     /*
-      * All other parts of twin read and parse data from fds in big chunks,
-      * while Gpm_GetEvent() reads and parses only a single event at time.
-@@ -170,7 +170,17 @@
- 	    (IdButtons & GPM_B_WHEEL_FWD ? HOLD_WHEEL_FWD : 0) |
- #endif	
- 	    0;
--	
-+	if (GPM_EV.wdy > 0) {
-+		if (oldWheel & HOLD_WHEEL_REV) oldWheel &= ~HOLD_WHEEL_REV;
-+		else oldWheel |= HOLD_WHEEL_REV;
-+	}
-+	else if (GPM_EV.wdy < 0) {
-+		if (oldWheel & HOLD_WHEEL_FWD) oldWheel &= ~HOLD_WHEEL_FWD;
-+		else oldWheel |= HOLD_WHEEL_FWD;
-+	} else oldWheel = 0;
-+	Buttons &= ~(HOLD_WHEEL_REV|HOLD_WHEEL_FWD);
-+	Buttons |= oldWheel;
-+
- 	MouseEventCommon(GPM_EV.x, GPM_EV.y, GPM_EV.dx, GPM_EV.dy, Buttons);
- 	
-     } while (loopN-- && ioctl(GPM_fd, FIONREAD, &left) >= 0 && left > 0);
diff --git a/twin-ncursesw.patch b/twin-ncursesw.patch
index 6d6a7db..124030a 100644
--- a/twin-ncursesw.patch
+++ b/twin-ncursesw.patch
@@ -1,11 +1,11 @@
---- twin-0.5.1/configure.in.old	2007-09-30 19:59:16.000000000 +0200
-+++ twin-0.5.1/configure.in	2007-09-30 19:59:26.000000000 +0200
-@@ -440,7 +440,7 @@
- 
- LIBS=
- 
--AC_CHECK_LIB(termcap,tgetent,,AC_CHECK_LIB(ncurses,tgetent))
-+AC_CHECK_LIB(termcap,tgetent,,AC_CHECK_LIB(ncursesw,tgetent))
- 
+--- twin-0.8.1/configure.ac.orig	2019-12-23 21:33:52.000000000 +0100
++++ twin-0.8.1/configure.ac	2023-02-05 16:57:46.023807167 +0100
+@@ -193,7 +193,7 @@ AC_CHECK_MEMBER([Gpm_Event.wdy],,, [[#in
+ AC_SEARCH_LIBS(pthread_create, [pthread c_r])         dnl -lc_r is needed on FreeBSD to use pthread functions
+                                                       dnl reset LIBS, because we check -lgpm again
  LIBS=
+-AC_SEARCH_LIBS(tgetent,        [gpm tinfo ncurses termcap])
++AC_SEARCH_LIBS(tgetent,        [tinfow ncursesw tinfo ncurses termcap])
  
+ if test "$have_x" = yes; then
+   save_CPPFLAGS="$CPPFLAGS"
diff --git a/twin-raw.patch b/twin-raw.patch
deleted file mode 100644
index 050e765..0000000
--- a/twin-raw.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- twin-0.5.1/server/HW/hw_tty.c.old	2007-10-03 21:04:07.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty.c	2007-10-03 21:04:40.000000000 +0200
-@@ -339,8 +339,8 @@
- 	    } else if (!strncmp(arg, ",termcap", 8)) {
- 		try_termcap = !(autotry_video = !strncmp(arg+8, "=no", 3)) << 1;
- 		arg = strchr(arg+8, ',');
--	    } else if (!strncmp(arg, ",raw", 7)) {
--		try_lrawkbd = !(autotry_kbd = !strncmp(arg+7, "=no", 3)) << 1;
-+	    } else if (!strncmp(arg, ",raw", 4)) {
-+		try_lrawkbd = !(autotry_kbd = !strncmp(arg+4, "=no", 3)) << 1;
- 		arg = strchr(arg+7, ',');
- 	    } else if (!strncmp(arg, ",ctty", 5)) {
- 		arg = strchr(arg+5, ',');
diff --git a/twin-utf8.patch b/twin-utf8.patch
deleted file mode 100644
index 586b139..0000000
--- a/twin-utf8.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- twin-0.5.1/server/HW/hw_tty.c.old	2007-10-03 11:11:00.000000000 +0200
-+++ twin-0.5.1/server/HW/hw_tty.c	2007-10-03 14:12:44.000000000 +0200
-@@ -476,6 +476,10 @@
- 	tty_UTF_16_to_charset = Tutf_UTF_16_to_charset_function(tty_charset);
- 	tty_charset_to_UTF_16 = Tutf_charset_to_UTF_16_array(tty_charset);
-     }
-+    if (tty_charset_to_UTF_16 == Tutf_UTF_8_to_UTF_16) {
-+    	tty_can_utf8 = TRUE;
-+    	utf8used = TRUE;
-+    }
- #else
-     if (charset) {
- 	FreeMem(charset);
---- twin-0.5.1/server/tty.c.old	2003-05-31 09:52:10.000000000 +0200
-+++ twin-0.5.1/server/tty.c	2007-10-03 14:13:25.000000000 +0200
-@@ -1493,7 +1493,7 @@
- 	return;
-     
-     common(Window);
--    
-+
-     while (!(*Flags & TTY_STOPPED) && Len) {
- 	c = *AsciiSeq++;
- 	Len--;
---- twin-0.5.1/server/methods.c.old	2007-10-03 14:05:31.000000000 +0200
-+++ twin-0.5.1/server/methods.c	2007-10-03 14:21:59.000000000 +0200
-@@ -25,6 +25,9 @@
- #include "hw.h"
- #include "hw_multi.h"
- 
-+#include <langinfo.h>
-+#include <strings.h>
-+
- #include <Tw/Tw.h>
- #include <Tw/Twstat.h>
- #include <Tw/Twstat_defs.h>
-@@ -931,7 +934,8 @@
- #endif	
-     Data->G1 = Data->saveG1 = GRAF_MAP;
- 
--    Data->utf = Data->utf_count = Data->utf_char = 0;
-+    Data->utf_count = Data->utf_char = 0;
-+    Data->utf = !strcasecmp(nl_langinfo(CODESET), "UTF-8");
- #ifdef CONF__UNICODE
-     Data->InvCharset = Tutf_UTF_16_to_ISO_8859_1;
- #endif
---- twin-0.5.1/server/main.c.old	2007-10-03 14:30:24.000000000 +0200
-+++ twin-0.5.1/server/main.c	2007-10-03 14:33:01.000000000 +0200
-@@ -16,6 +16,7 @@
-  *
-  */
- 
-+#include <locale.h>
- #include <signal.h>
- 
- #include "twin.h"
-@@ -288,7 +289,8 @@
-     fd_set read_fds, write_fds, *pwrite_fds;
-     struct timeval sel_timeout, *this_timeout;
-     int num_fds;
--    
-+
-+    setlocale(LC_ALL, "");    
-     DropPrivileges();
- 
-     main_argv_usable_len = ComputeUsableLenArgv(main_argv = (byte **)argv);
---- twin-0.5.1/libs/libTutf/libTutf.c.old	2007-10-03 10:56:31.000000000 +0200
-+++ twin-0.5.1/libs/libTutf/libTutf.c	2007-10-03 12:41:36.000000000 +0200
-@@ -205,6 +205,7 @@
- #include "template.c"
- #undef TEMPLATE
- 
-+#include "utf_8.c"
- 
- #define _NLIST(EL) \
- 	EL(T_MAP(ASCII)) \
-@@ -224,9 +225,11 @@
- 	EL(T_MAP(UTF_16)) _NLIST(EL)
- 
- typedef enum {
-+    	
- #define DECL_TYPE(x) T_CAT(T_ID_,x) ,
-     _LIST(DECL_TYPE)
- #undef DECL_TYPE
-+    T_ID_UTF_8,
- } id_e;
- 
- #define DECL_NAME(ch) static byte *T_CAT(names_,ch) [] = { T_CAT(T_NAME_,ch), T_CAT(T_ALIASES_,ch), NULL };
-@@ -244,6 +247,7 @@
- static Tutf_struct Tutf_structs[] = {
-     { T_CAT(names_,UTF_16), NULL, NULL },
-     _NLIST(DECL_CH)
-+    { names_UTF_8, Tutf_UTF_8_to_UTF_16, Tutf_UTF_16_to_UTF_8 },
-     { NULL }
- };
- 
---- /dev/null	2007-10-03 09:29:12.396354042 +0200
-+++ twin-0.5.1/libs/libTutf/utf_8.c	2007-10-03 14:48:36.000000000 +0200
-@@ -0,0 +1,26 @@
-+byte *names_UTF_8[] = { "UTF-8", "UTF8", NULL };
-+
-+/* fake */
-+hwfont Tutf_UTF_8_to_UTF_16[0x100] = {
-+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
-+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
-+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
-+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
-+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
-+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
-+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
-+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
-+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
-+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
-+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
-+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
-+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
-+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
-+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
-+};
-+
-+hwfont Tutf_UTF_16_to_UTF_8(hwfont c)
-+{
-+    return c;
-+}
---- twin-0.5.1/include/Tutf/Tutf.h.old	2007-10-03 10:40:14.000000000 +0200
-+++ twin-0.5.1/include/Tutf/Tutf.h	2007-10-03 10:42:38.000000000 +0200
-@@ -423,6 +423,8 @@
- hwfont Tutf_UTF_16_to_ISO_8859_15(hwfont c);
- hwfont Tutf_UTF_16_to_ISO_8859_16(hwfont c);
- 
-+hwfont Tutf_UTF_16_to_UTF_8(hwfont c);
-+
- hwfont Tutf_UTF_16_to_CP437(hwfont c);
- hwfont Tutf_UTF_16_to_CP737(hwfont c);
- hwfont Tutf_UTF_16_to_CP775(hwfont c);
-@@ -469,6 +471,8 @@
- extern hwfont Tutf_ISO_8859_15_to_UTF_16[0x100];
- extern hwfont Tutf_ISO_8859_16_to_UTF_16[0x100];
- 
-+extern hwfont Tutf_UTF_8_to_UTF_16[0x100];
-+
- extern hwfont Tutf_CP437_to_UTF_16[0x100];
- extern hwfont Tutf_CP737_to_UTF_16[0x100];
- extern hwfont Tutf_CP775_to_UTF_16[0x100];
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/twin.git/commitdiff/bcf5944d272d8efded2d4e6f1322936dab664d76



More information about the pld-cvs-commit mailing list