!1 package init

Merge pull request !1 from byeX012/Feat_pi
This commit is contained in:
openeuler-ci-bot 2019-12-04 16:08:58 +08:00 committed by Gitee
commit d0ea3416ec
4 changed files with 277 additions and 0 deletions

128
zvbi-0.2.24-tvfonts.patch Normal file
View File

@ -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;
}
-
-

11
zvbi-0.2.25-openfix.patch Normal file
View File

@ -0,0 +1,11 @@
--- zvbi-0.2.25/src/chains.c.orig 2007-03-09 05:11:52.000000000 +0000
+++ zvbi-0.2.25/src/chains.c 2007-08-23 21:29:44.000000000 +0100
@@ -168,7 +168,7 @@
return 0;
}
-int open(const char *pathname, int flags, ...)
+int (open)(const char *pathname, int flags, ...)
{
va_list args;
mode_t mode = 0;

BIN
zvbi-0.2.35.tar.bz2 Normal file

Binary file not shown.

138
zvbi.spec Normal file
View File

@ -0,0 +1,138 @@
Name: zvbi
Version: 0.2.35
Release: 7
Summary: A library provides functions to capture and decode VBI data
License: LGPLv2+ and GPLv2+ and BSD
URL: http://zapping.sourceforge.net/ZVBI/index.html
Source0: http://downloads.sourceforge.net/zapping/%{name}-%{version}.tar.bz2
Patch0001: %{name}-0.2.24-tvfonts.patch
Patch0002: %{name}-0.2.25-openfix.patch
BuildRequires: gcc-c++ doxygen fontconfig gettext >= 0.16.1 libpng-devel
BuildRequires: libICE-devel xorg-x11-font-utils systemd-units
Requires(post): systemd-units fontconfig
Requires(preun): systemd-units
Requires(postun): systemd-units fontconfig
provides: %{name}-fonts = %{version}-%{release}
Obsoletes: %{name}-fonts < %{version}-%{release}
Provides: xawtv-tv-fonts >= 3.95
Obsoletes: xawtv-tv-fonts < 3.95
%description
The ZVBI library provides functions to read from Linux V4L, V4L2 and
FreeBSD BKTR raw VBI capture devices, from Linux DVB devices and
from a VBI proxy to share V4L and V4L2 VBI devices between multiple
applications.
It can demodulate raw to sliced VBI data in software, with support
for a wide range of formats, has functions to decode several popular
services including Teletext and Closed Caption, a Teletext cache
with search function, various text export and rendering functions.
%package devel
Summary: Development files for zvbi
Requires: %{name} = %{version}-%{release} pkgconfig
%description devel
The zvbi-devel package contains development files for zvbi.
%package help
Summary: Documents for zvbi
%description help
The zvbi-help package contains related documents.
%prep
%autosetup -n %{name}-%{version} -p1
cat >zvbid.service <<EOF
[Unit]
Description=A Proxy For VBI Devices
After=syslog.target
[Service]
Type=forking
ExecStart=%{_sbindir}/zvbid
[Install]
WantedBy=multi-user.target
EOF
%build
%configure --disable-rpath --enable-v4l --enable-dvb --enable-proxy
%make_build
cd contrib
./x11font
for font in *.bdf
do
bdftopcf $font | gzip -9 -c > ${font%.bdf}.pcf.gz
done
mkfontdir -x .bdf .
echo "teletext -ets-teletext-medium-r-normal--*-200-75-75-c-120-iso10646-1" > fonts.alias
cd ..
%install
install -d %{buildroot}%{_datadir}/fonts/%{name}
%make_install
%delete_la_and_a
%find_lang %{name}
install -d %{buildroot}%{_unitdir}
install -m 644 zvbid.service %{buildroot}%{_unitdir}
install -m 0644 -p contrib/*.pcf.gz %{buildroot}%{_datadir}/fonts/%{name}
install -m 0644 -p contrib/fonts.* %{buildroot}%{_datadir}/fonts/%{name}
touch %{buildroot}%{_datadir}/fonts/%{name}/fonts.cache-1
install -d %{buildroot}%{_sysconfdir}/X11/fontpath.d
ln -sf %{_datadir}/fonts/%{name} %{buildroot}%{_sysconfdir}/X11/fontpath.d/%{name}
%post
/sbin/ldconfig
%systemd_post zvbid.service
fc-cache -f %{_datadir}/fonts/%{name} || :
%preun
%systemd_preun zvbid.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart zvbid.service
if [ "$1" = "0" ]; then
fc-cache -f %{_datadir}/fonts || :
fi
%files -f %{name}.lang
%doc AUTHORS COPYING COPYING.LIB
%{_bindir}/%{name}*
%{_sbindir}/zvbid
%{_unitdir}/zvbid.service
%{_libdir}/*.so.*
%exclude %{_initrddir}
%dir %{_datadir}/fonts/%{name}
%{_datadir}/fonts/%{name}/*.gz
%{_datadir}/fonts/%{name}/fonts.dir
%{_datadir}/fonts/%{name}/fonts.alias
%{_sysconfdir}/X11/fontpath.d/%{name}
%ghost %{_datadir}/fonts/%{name}/fonts.cache-1
%files devel
%{_includedir}/libzvbi.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}-0.2.pc
%files help
%doc BUGS ChangeLog NEWS README TODO
%{_mandir}/man1/*
%changelog
* Mon Dec 02 2019 Jiangping Hu <hujiangping@huawei.com> - 0.2.35-7
- Package init