rpms/alevt/F-10 alevt-1.6.2-doublefont.patch, NONE, 1.1 alevt.spec, 1.2, 1.3

Lucian Langa lucilanga at fedoraproject.org
Fri Dec 5 08:43:00 UTC 2008


Author: lucilanga

Update of /cvs/pkgs/rpms/alevt/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1721

Modified Files:
	alevt.spec 
Added Files:
	alevt-1.6.2-doublefont.patch 
Log Message:
* Fri Dec 05 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-8
- update build requires

* Fri Dec 05 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-7
- add doublefont patch; fixes #459294

alevt-1.6.2-doublefont.patch:

--- NEW FILE alevt-1.6.2-doublefont.patch ---
diff -Naur alevt-1.6.2/exp-gfx.c alevt-1.6.2-mod/exp-gfx.c
--- alevt-1.6.2/exp-gfx.c	2007-12-03 04:56:06.000000000 +0200
+++ alevt-1.6.2-mod/exp-gfx.c	2008-12-03 22:32:16.000000000 +0200
@@ -21,7 +21,9 @@
 	  int sep)
 {
   int x,y;
-  unsigned char* src= (latin1 ? font1_bits : font2_bits);
+  unsigned char* src= double_font? 
+				(latin1? font3_bits : font4_bits) : 
+				(latin1? font1_bits : font2_bits);
   int dest_x=_x*CW;
   int dest_y=_y*CH;
       
diff -Naur alevt-1.6.2/font.c alevt-1.6.2-mod/font.c
--- alevt-1.6.2/font.c	1999-10-08 01:20:00.000000000 +0300
+++ alevt-1.6.2-mod/font.c	2008-12-03 21:26:36.000000000 +0200
@@ -1,3 +1,5 @@
 #define static /* I want them global */
 #include "font1.xbm"
 #include "font2.xbm"
+#include "font3.xbm"
+#include "font4.xbm"
diff -Naur alevt-1.6.2/font.h alevt-1.6.2-mod/font.h
--- alevt-1.6.2/font.h	1999-10-08 01:24:02.000000000 +0300
+++ alevt-1.6.2-mod/font.h	2008-12-03 22:30:02.000000000 +0200
@@ -9,10 +9,18 @@
 
 extern unsigned char font1_bits[];
 extern unsigned char font2_bits[];
+extern unsigned char font3_bits[];
+extern unsigned char font4_bits[];
 
-#define font_width	font1_width
-#define font_height	font1_height
-#define CW		(font_width/32)        /* pixel width of a character */
-#define CH		(font_height/8)        /* pixel height of a character */
+
+//#define font_width	font1_width
+//#define font_height	font1_height
+//#define CW		(font_width/32)        /* pixel width of a character */
+//externint CW =	(font_width/32);        /* pixel width of a character */
+int CW;
+int CH;
+int font_width;
+int font_height;
+int double_font;
 
 #endif
diff -Naur alevt-1.6.2/main.c alevt-1.6.2-mod/main.c
--- alevt-1.6.2/main.c	2007-12-03 05:45:29.000000000 +0200
+++ alevt-1.6.2-mod/main.c	2008-12-04 08:16:13.000000000 +0200
@@ -22,6 +22,11 @@
 static int fine_tune = 1; // auto = 999;
 static int erc = 1;
 static int newbttv = -1;
+int double_font = 0;
+int font_width = 288;
+int font_height = 128;
+int CW;
+int CH;
 
 
 static void
@@ -43,6 +48,7 @@
 	    "    -[no]erc\t\t\tenabled\n"
 	    "    -[no]bell\t\t\tenabled\n"
 	    "    -charset latin-1/2\t\tlatin-1\n"
+	    "    -doublefont\n"
 	    "\n"
 	    "  Order is important!  Each page number\n"
 	    "  opens a new window with the previously\n"
@@ -126,6 +132,7 @@
 	{ "-bell", "-b", 0 },
 	{ "-nobell", "-nb", 0 },
 	{ "-charset", "-latin", 1 },
+	{ "-doublefont", "-df", 0 },
     };
     int i;
 
@@ -163,6 +170,9 @@
     int opt, ind;
     char *arg;
 
+    CW = (font_width/32);
+    CH = (font_height/8);
+
     setprgname(argv[0]);
 
     fdset_init(fds);
@@ -235,6 +245,13 @@
 		else
 		    fatal("bad charset (not latin-1/2)");
 		break;
+	    case 19:	// double font size
+		double_font = 1;
+		font_width=576;
+		font_height=256;
+		CW = (font_width/32);
+		CH = (font_height/8);
+		break;
 	    case 12:	// debug
 		debug++;
 		break;
diff -Naur alevt-1.6.2/Makefile alevt-1.6.2-mod/Makefile
--- alevt-1.6.2/Makefile	2007-12-03 07:19:54.000000000 +0200
+++ alevt-1.6.2-mod/Makefile	2008-12-03 22:38:58.000000000 +0200
@@ -33,8 +33,8 @@
 alevt-cap: $(COBJS)
 	$(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS)
 
-font.o: font1.xbm font2.xbm
-fontsize.h: font1.xbm font2.xbm
+font.o: font1.xbm font2.xbm font3.xbm font4.xbm
+fontsize.h: font1.xbm font2.xbm font3.xbm font4.xbm
 	fgrep -h "#define" font1.xbm font2.xbm >fontsize.h
 
 font1.xbm: bdf2xbm $(FONT)-latin-1.bdf
@@ -43,6 +43,14 @@
 font2.xbm: bdf2xbm $(FONT)-latin-2.bdf
 	./bdf2xbm font2 <$(FONT)-latin-2.bdf >font2.xbm
 
+font3.xbm: bdf2xbm $(FONT)-latin-1.bdf
+	./bdf2xbm font1 <$(FONT)-latin-1.bdf >font3.xbm
+	/usr/bin/convert -filter Point -resize 200% font1.xbm font3.xbm
+
+font4.xbm: bdf2xbm $(FONT)-latin-2.bdf
+	./bdf2xbm font1 <$(FONT)-latin-1.bdf >font4.xbm
+	/usr/bin/convert -filter Point -resize 200% font2.xbm font4.xbm
+
 bdf2xbm: bdf2xbm.c
 	$(HOSTCC) bdf2xbm.c -o bdf2xbm
 
diff -Naur alevt-1.6.2/xio.c alevt-1.6.2-mod/xio.c
--- alevt-1.6.2/xio.c	2007-12-03 08:18:04.000000000 +0200
+++ alevt-1.6.2-mod/xio.c	2008-12-03 22:33:06.000000000 +0200
@@ -130,7 +130,9 @@
     int i;
 
     xio->font[0] = XCreateBitmapFromData(xio->dpy, xio->root,
-					    latin1 ? font1_bits : font2_bits,
+					double_font?
+					    (latin1 ? font3_bits : font1_bits) : 
+					    (latin1 ? font1_bits : font2_bits),
 						    font_width, font_height);
     xio->font[1] = XCreatePixmap(xio->dpy, xio->root,
     					font_width, font_height*2, 1);


Index: alevt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/alevt/F-10/alevt.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- alevt.spec	23 Aug 2008 07:32:26 -0000	1.2
+++ alevt.spec	5 Dec 2008 08:42:30 -0000	1.3
@@ -1,6 +1,6 @@
 Name: alevt
 Version: 1.6.2
-Release: 6%{?dist}
+Release: 8%{?dist}
 Summary: Teletext decoder/browser
 Group:  Applications/Multimedia
 License: GPLv2
@@ -9,10 +9,12 @@
 Source1: alevt.desktop
 Patch0: alevt-1.6.2-pixmap.patch
 Patch1: alevt-1.6.2-manpath.patch
+Patch2: alevt-1.6.2-doublefont.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: libX11-devel
 BuildRequires: libpng-devel
 BuildRequires: desktop-file-utils
+BuildRequires: ImageMagick
 
 %description
 AleVT is a teletext/videotext decoder and browser for the
@@ -26,6 +28,7 @@
 %setup -q
 %patch0 -p1 -b .pixmap
 %patch1 -p1 -b .manpath
+%patch2 -p1 -b .doublefont
 
 %build
 # alevt does not have standard build system, so we populate OPT, 
@@ -52,14 +55,20 @@
 %{_bindir}/alevt
 %{_bindir}/alevt-date
 %{_bindir}/alevt-cap
-%{_datadir}/applications/*%{name}.desktop
+%{_datadir}/applications/%{name}.desktop
 %{_mandir}/man?/%{name}*
 %{_datadir}/pixmaps/mini-alevt.xpm
 %doc README CHANGELOG COPYRIGHT
 
 %changelog
+* Fri Dec 05 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-8
+- update build requires
+
+* Fri Dec 05 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-7
+- add doublefont patch; fixes #459294
+
 * Sat Aug 23 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-6
-fix for #458818
+- fix for #458818
 
 * Tue Jul 28 2008 Lucian Langa <cooly at gnome.eu.org> - 1.6.2-5
 - Misc cleanups




More information about the fedora-extras-commits mailing list