auto-import zvbi-0.2.24-1 on branch devel from zvbi-0.2.24-1.src.rpm

epel10^2^2
oddsocks 18 years ago
parent 254314ee53
commit 77415a7cf7

@ -1 +1 @@
zvbi-0.2.22.tar.bz2 zvbi-0.2.24.tar.bz2

@ -1 +1 @@
a01cbe39a48579ba92582ff75a5e37c2 zvbi-0.2.22.tar.bz2 918c8ebb03c0e2f3272e0d90a92f2289 zvbi-0.2.24.tar.bz2

@ -0,0 +1,128 @@
diff -Nrbu zvbi-0.2.22/contrib/x11font.c zvbi-0.2.22-OK/contrib/x11font.c
--- zvbi-0.2.24/contrib/x11font.c.orig 2006-02-10 09:25:36.000000000 +0300
+++ zvbi-0.2.24/contrib/x11font.c 2007-03-12 16:55:06.000000000 +0300
@@ -12,31 +12,31 @@
{
fprintf(fp,
"STARTFONT 2.1\n"
- "FONT -%s-%s-medium-%s-normal--%d-%d-75-75-c-%d-iso10646-1\n"
+ "FONT -%s-%s-Medium-%s-Normal--%d-%d-75-75-C-%d-ISO10646-1\n"
"SIZE %d 75 75\n"
- "FONTBOUNDINGBOX 6 13 0 -2\n"
+ "FONTBOUNDINGBOX %d %d 0 0\n"
"STARTPROPERTIES 25\n"
"FONTNAME_REGISTRY \"\"\n"
"FOUNDRY \"%s\"\n"
"FAMILY_NAME \"%s\"\n"
- "WEIGHT_NAME \"medium\"\n"
+ "WEIGHT_NAME \"Medium\"\n"
"SLANT \"%s\"\n"
- "SETWIDTH_NAME \"normal\"\n"
+ "SETWIDTH_NAME \"Normal\"\n"
"ADD_STYLE_NAME \"\"\n"
"PIXEL_SIZE %d\n"
"POINT_SIZE %d\n"
"RESOLUTION_X 75\n"
"RESOLUTION_Y 75\n"
- "SPACING \"c\"\n"
+ "SPACING \"C\"\n"
"AVERAGE_WIDTH %d\n"
- "CHARSET_REGISTRY \"iso10646\"\n"
+ "CHARSET_REGISTRY \"ISO10646\"\n"
"CHARSET_ENCODING \"1\"\n"
"COPYRIGHT \"fixme\"\n"
"CAP_HEIGHT 9\n"
"X_HEIGHT 18\n"
- "FONT \"-%s-%s-medium-%s-normal--%d-%d-75-75-c-%d-iso10646-1\"\n"
+ "FONT \"-%s-%s-Medium-%s-Normal--%d-%d-75-75-C-%d-ISO10646-1\"\n"
"WEIGHT 10\n"
- "RESOLUTION 103\n"
+ "RESOLUTION 75\n"
"QUAD_WIDTH %d\n"
"DEFAULT_CHAR 0\n"
"FONT_ASCENT %d\n"
@@ -44,6 +44,7 @@
"ENDPROPERTIES\n",
foundry,name,slant,height,height*10,width*10,
height,
+ width,height,
foundry,name,slant,height,height*10,width*10,
foundry,name,slant,height,height*10,width*10,
width,height);
@@ -53,11 +54,11 @@
print_font(const char *filename,
const char *foundry,
const char *name, int italic,
- uint8_t *font, int cw, int ch, int cpl,
+ uint8_t *font, int cw, int ch, int cpl, int hs,
int count, unsigned int (*map)(unsigned int,int), int invalid)
{
FILE *fp;
- int x,y,i,c,on,bit,byte,mask1,mask2;
+ int x,y,s,i,c,on,bit,byte,mask1,mask2;
fp = stdout;
if (NULL != filename) {
@@ -67,7 +68,7 @@
fprintf(stderr,"writing %s\n",filename);
}
- print_head(fp, foundry, name, italic ? "i" : "r", cw, ch);
+ print_head(fp, foundry, name, italic ? "I" : "R", cw, ch*hs);
fprintf(fp,"CHARS %d\n", count);
for (i = 0; i < 0xffff; i++) {
@@ -82,8 +83,9 @@
"BBX %d %d 0 0\n"
"BITMAP\n",
i,cw*10,cw,
- cw,ch);
+ cw,ch*hs);
for (y = 0; y < ch; y++) {
+ for (s = 0; s < hs; s++) {
bit = cpl * cw * y + cw * c;
byte = 0;
for (x = 0; x < cw; x++) {
@@ -100,6 +102,7 @@
}
fprintf(fp,"%02x\n",byte);
}
+ }
fprintf(fp,"ENDCHAR\n");
}
fprintf(fp,"ENDFONT\n");
@@ -109,17 +112,23 @@
}
int
-main ()
+main(int argc, char *argv[])
{
- print_font("teletext.bdf","ets","teletext",0,(uint8_t *) wstfont2_bits,
- TCW,TCH,TCPL,1448,unicode_wstfont2,357);
- print_font("teletexti.bdf","ets","teletext",1,(uint8_t *) wstfont2_bits,
- TCW,TCH,TCPL,1449,unicode_wstfont2,357);
- print_font("caption.bdf","ets","caption",0,(uint8_t *) ccfont2_bits,
- CCW,CCH,CCPL,120,unicode_ccfont2,15);
- print_font("captioni.bdf","ets","caption",1,(uint8_t *) ccfont2_bits,
- CCW,CCH,CCPL,120,unicode_ccfont2,15 + 4 * 32);
+ print_font("teletext1.bdf","Ets","Teletext",0,wstfont2_bits,
+ TCW,TCH,TCPL,1,1448,unicode_wstfont2,357);
+ print_font("teletext2.bdf","Ets","Teletext",0,wstfont2_bits,
+ TCW,TCH,TCPL,2,1448,unicode_wstfont2,357);
+ print_font("teletext4.bdf","Ets","Teletext",0,wstfont2_bits,
+ TCW,TCH,TCPL,4,1448,unicode_wstfont2,357);
+ print_font("teletext1i.bdf","Ets","Teletext",1,wstfont2_bits,
+ TCW,TCH,TCPL,1,1449,unicode_wstfont2,357);
+ print_font("teletext2i.bdf","Ets","Teletext",1,wstfont2_bits,
+ TCW,TCH,TCPL,2,1449,unicode_wstfont2,357);
+ print_font("teletext4i.bdf","Ets","Teletext",1,wstfont2_bits,
+ TCW,TCH,TCPL,4,1449,unicode_wstfont2,357);
+ print_font("caption.bdf","Ets","Caption",0,ccfont2_bits,
+ CCW,CCH,CCPL,1,120,unicode_ccfont2,15);
+ print_font("captioni.bdf","Ets","Caption",1,ccfont2_bits,
+ CCW,CCH,CCPL,1,120,unicode_ccfont2,15 + 4 * 32);
return 0;
}
-
-

@ -1,19 +1,19 @@
Name: zvbi Name: zvbi
Version: 0.2.22 Version: 0.2.24
Release: 2%{?dist} Release: 1%{?dist}
Summary: Raw VBI, Teletext and Closed Caption decoding library Summary: Raw VBI, Teletext and Closed Caption decoding library
Group: System Environment/Libraries Group: System Environment/Libraries
License: GPL License: GPL
URL: http://zapping.sourceforge.net/ZVBI/index.html URL: http://zapping.sourceforge.net/ZVBI/index.html
Source0: http://dl.sf.net/zapping/%{name}-%{version}.tar.bz2 Source0: http://dl.sf.net/zapping/%{name}-%{version}.tar.bz2
Patch0: zvbi-0.2.24-tvfonts.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: fontconfig
BuildRequires: gettext BuildRequires: gettext
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: libICE-devel BuildRequires: libICE-devel
BuildRequires: xorg-x11-font-utils BuildRequires: xorg-x11-font-utils
BuildRequires: fontconfig
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service Requires(preun): /sbin/service
@ -42,6 +42,12 @@ Development files for zvbi
%package fonts %package fonts
Summary: Fonts from zvbi converted to X11 Summary: Fonts from zvbi converted to X11
Group: User Interface/X Group: User Interface/X
Requires(post): fontconfig
Requires(postun): fontconfig
Requires(post): chkfontpath
Requires(postun): chkfontpath
Obsoletes: xawtv-tv-fonts < 3.95
Provides: xawtv-tv-fonts >= 3.95
%description fonts %description fonts
Fonts from zvbi converted for use with X11 Fonts from zvbi converted for use with X11
@ -49,6 +55,13 @@ Fonts from zvbi converted for use with X11
%prep %prep
%setup -q %setup -q
%patch -p1 -b .orig
#Fix character encodings (note ChangeLog's encoding is broken, hence sed)
sed -i 's/\xC3\xB2/\xF2/g' ChangeLog
sed -i 's/\xC2\x81//g' ChangeLog
iconv -f iso8859-1 ChangeLog -t utf8 > ChangeLog.conv && /bin/mv -f ChangeLog.conv ChangeLog
iconv -f iso8859-1 README -t utf8 > README.conv && /bin/mv -f README.conv README
%build %build
@ -58,6 +71,19 @@ Fonts from zvbi converted for use with X11
%configure --disable-rpath --enable-v4l --enable-dvb --enable-proxy %configure --disable-rpath --enable-v4l --enable-dvb --enable-proxy
make %{?_smp_mflags} make %{?_smp_mflags}
#Generate fonts, fonts.alias and fonts.dir
pushd contrib
./x11font
for font in *.bdf
do
bdftopcf $font | gzip -9 -c > ${font%.bdf}.pcf.gz
done
mkfontdir -x .bdf .
cat >fonts.alias <<EOF
teletext -ets-teletext-medium-r-normal--*-200-75-75-c-120-iso10646-1
EOF
popd
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
@ -71,22 +97,13 @@ make install DESTDIR=%{buildroot}
#Install init script #Install init script
install -m0755 daemon/zvbid.init %{buildroot}%{_sysconfdir}/rc.d/init.d/zvbid install -m0755 daemon/zvbid.init %{buildroot}%{_sysconfdir}/rc.d/init.d/zvbid
#Generate and install fonts #Install fonts
pushd contrib install -m 0644 contrib/*.pcf.gz %{buildroot}%{_datadir}/fonts/%{name}
./x11font install -m 0644 contrib/fonts.* %{buildroot}%{_datadir}/fonts/%{name}
bdftopcf teletext.bdf | gzip -9 -c > %{buildroot}%{_datadir}/fonts/%{name}/teletext.pcf.gz
bdftopcf teletexti.bdf | gzip -9 -c > %{buildroot}%{_datadir}/fonts/%{name}/teletexti.pcf.gz
bdftopcf caption.bdf | gzip -9 -c > %{buildroot}%{_datadir}/fonts/%{name}/caption.pcf.gz
bdftopcf captioni.bdf | gzip -9 -c > %{buildroot}%{_datadir}/fonts/%{name}/captioni.pcf.gz
popd
# %%ghost the fonts.cache-1 file #%%ghost the fonts.cache-1 and fonts.dir
touch %{buildroot}%{_datadir}/fonts/%{name}/fonts.cache-1 touch %{buildroot}%{_datadir}/fonts/%{name}/fonts.cache-1
#Some cleanups
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -112,45 +129,54 @@ fi
%post fonts %post fonts
if [ -x /usr/bin/fc-cache ]; then fc-cache -f %{_datadir}/fonts/%{name} || :
/usr/bin/fc-cache -f %{_datadir}/fonts/%{name} chkfontpath -q -a %{_datadir}/fonts/%{name} || :
fi
%postun fonts %postun fonts
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
if [ -x /usr/bin/fc-cache ]; then fc-cache -f %{_datadir}/fonts || :
/usr/bin/fc-cache -f %{_datadir}/fonts chkfontpath -q -r %{_datadir}/fonts/%{name} || :
fi
fi fi
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/%{name}-chains %{_bindir}/%{name}*
%{_bindir}/%{name}-ntsc-cc
%{_sbindir}/zvbid %{_sbindir}/zvbid
%{_sysconfdir}/rc.d/init.d/zvbid %{_sysconfdir}/rc.d/init.d/zvbid
%{_libdir}/libzvbi-chains.so.0* %{_libdir}/*.so.*
%{_libdir}/libzvbi.so.0* %{_mandir}/man1/*
%{_mandir}/man1/zvbi* %exclude %{_libdir}/*.a
%exclude %{_libdir}/*.la
%doc ABOUT-NLS AUTHORS BUGS ChangeLog COPYING NEWS README TODO %doc ABOUT-NLS AUTHORS BUGS ChangeLog COPYING NEWS README TODO
%files devel %files devel
%{_includedir}/libzvbi.h %{_includedir}/libzvbi.h
%{_libdir}/libzvbi-chains.so %{_libdir}/*.so
%{_libdir}/libzvbi.so
%{_libdir}/pkgconfig/%{name}-0.2.pc %{_libdir}/pkgconfig/%{name}-0.2.pc
%files fonts %files fonts
%dir %{_datadir}/fonts/%{name} %dir %{_datadir}/fonts/%{name}
%{_datadir}/fonts/%{name}/*.gz %{_datadir}/fonts/%{name}/*.gz
%{_datadir}/fonts/%{name}/fonts.dir
%{_datadir}/fonts/%{name}/fonts.alias
%ghost %{_datadir}/fonts/%{name}/fonts.cache-1 %ghost %{_datadir}/fonts/%{name}/fonts.cache-1
%changelog %changelog
* Tue Mar 13 2007 Ian Chapman <packages@amiga-hardware.com> 0.2.24-1%{?dist}
- Upgrade to 0.2.24
- Convert README and ChangeLog to UTF-8
- Added patch for x11font to generate more font sizes useful for other
applications such as xawtv (courtesy of Dmitry Butskoy)
- Fonts sub-rpm now obsoletes and provides xawtv-tv-fonts
- Split font generation and font installation into separate sections
- Various other minor changes to the spec
- Added xfs support for the fonts
* Fri Sep 01 2006 Ian Chapman <packages@amiga-hardware.com> 0.2.22-2%{?dist} * Fri Sep 01 2006 Ian Chapman <packages@amiga-hardware.com> 0.2.22-2%{?dist}
- Minor spec cleanups - Minor spec cleanups

Loading…
Cancel
Save