rpms/fmio/F-7 fmio-2.0.8-nodirectio.patch, NONE, 1.1 README.fedora, 1.2, 1.3 fmio.spec, 1.2, 1.3

Andy Shevchenko (andriy) fedora-extras-commits at redhat.com
Sun Nov 11 23:51:19 UTC 2007


Author: andriy

Update of /cvs/extras/rpms/fmio/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22807

Modified Files:
	README.fedora fmio.spec 
Added Files:
	fmio-2.0.8-nodirectio.patch 
Log Message:
Should fix #222758, #205721.

fmio-2.0.8-nodirectio.patch:

--- NEW FILE fmio-2.0.8-nodirectio.patch ---
diff -up fmio-2.0.8/Makefile.nodirectio fmio-2.0.8/Makefile
--- fmio-2.0.8/Makefile.nodirectio	2007-11-12 01:10:10.000000000 +0200
+++ fmio-2.0.8/Makefile	2007-11-12 01:29:13.000000000 +0200
@@ -1,4 +1,7 @@
-SUBDIRS = src utils xsrc
+SUBDIRS = src xsrc
+ifeq ($(WITH_DIRECT_IO),y)
+SUBDIRS += utils
+endif
 
 all:
 	for i in $(SUBDIRS); do \
diff -up fmio-2.0.8/src/radio.c.nodirectio fmio-2.0.8/src/radio.c
--- fmio-2.0.8/src/radio.c.nodirectio	2007-11-12 01:10:10.000000000 +0200
+++ fmio-2.0.8/src/radio.c	2007-11-12 01:10:10.000000000 +0200
@@ -46,6 +46,7 @@
 #define MMAX(a,b)	((a) >= (b) ? (a) : (b))
 
 EXPORT_FUNC export_db[] = {
+#ifdef USE_DIRECT_IO
 	export_aztech,		/* Aztech/PackardBell */
 #ifdef USE_BKTR
 	export_bktr,		/* Brooktree BT848/BT878 or Video4Linux */
@@ -76,6 +77,9 @@ EXPORT_FUNC export_db[] = {
 	export_xtreme,		/* AIMS Lab Highway Xtreme */
 #endif /* BSDBKTR */
 	export_zx		/* Zoltrix RadioPlus */
+#else
+	export_bktr
+#endif /* USE_DIRECT_IO */
 };
 
 struct tuner_drv_t **drv_db;
diff -up fmio-2.0.8/src/Makefile.nodirectio fmio-2.0.8/src/Makefile
--- fmio-2.0.8/src/Makefile.nodirectio	2007-11-12 01:10:10.000000000 +0200
+++ fmio-2.0.8/src/Makefile	2007-11-12 01:10:10.000000000 +0200
@@ -23,17 +23,23 @@ HDRS= bu2614.h lm700x.h pt2254a.h radio.
 ALLHDRS= $(HDRS) export.h mixer.h ostypes.h pci.h
 OBJS= access.o bu2614.o lm700x.o mixer.o pci.o pt2254a.o radio.o tc921x.o \
 	tea5757.o
-DRVS= aztech.o bktr.o bmc-hma.o bsdradio.o ecoradio.o \
+DRVS= bktr.o
+
+ifeq ($(WITH_DIRECT_IO),y)
+DIRECT_IO_DRVS= aztech.o bmc-hma.o bsdradio.o ecoradio.o \
 	gemtek-isa.o gemtek-pci.o radiotrack.o radiotrackII.o \
 	sf16fmd2.o sf16fmr.o sf16fmr2.o sf64pce2.o sf64pcr.o sf256pcpr.o \
 	sf256pcsr.o spase.o terratec-isa.o trust.o xtreme.o zoltrix.o
 
+CFLAGS += -DUSE_DIRECT_IO
+endif
+
 FMIOOBJ= fmio.o
 FMIO= fmio
 MANPAGE= fmio.1
 CATPAGE= fmio.0
 
-REMOVABLE= $(FMIOOBJ) $(FMIO) $(OBJS) $(DRVS) libradio.so *core
+REMOVABLE= $(FMIOOBJ) $(FMIO) $(OBJS) $(DIRECT_IO_DRVS) $(DRVS) libradio.so *core
 
 PREFIX?= $(DESTDIR)$(prefix)
 LIBDIR?= $(DESTDIR)$(libdir)
@@ -89,9 +95,9 @@ clean:
 distclean:
 	rm -f $(REMOVABLE) $(CATPAGE)
 
-libradio.so: $(ALLHDRS) $(OBJS) $(DRVS)
+libradio.so: $(ALLHDRS) $(OBJS) $(DIRECT_IO_DRVS) $(DRVS)
 	rm -f $@
-	$(CC) -o $@ -shared $(CFLAGS) $(LDFLAGS) $(OBJS) $(DRVS)
+	$(CC) -o $@ -shared $(CFLAGS) $(LDFLAGS) $(OBJS) $(DIRECT_IO_DRVS) $(DRVS)
 
 fmio.0: $(MANPAGE)
 	@echo "groff -Tascii -mandoc $(MANPAGE) > $@"
diff -up fmio-2.0.8/src/radio_drv.h.nodirectio fmio-2.0.8/src/radio_drv.h
--- fmio-2.0.8/src/radio_drv.h.nodirectio	2003-05-13 18:08:44.000000000 +0300
+++ fmio-2.0.8/src/radio_drv.h	2007-11-12 01:10:10.000000000 +0200
@@ -32,7 +32,16 @@
 #include <sys/ioctl.h>
 
 #ifdef linux
+#ifdef USE_DIRECT_IO
 #include <sys/io.h>
+#else
+#define inl(a)		0x00
+#define inw(a)		0x00
+#define inb(a)		0x00
+#define outl(a, b)
+#define outw(a, b)
+#define outb(a, b)
+#endif
 #include <linux/videodev.h>
 #elif defined __FreeBSD__
 #include <machine/ioctl_bt848.h>
diff -up fmio-2.0.8/src/access.c.nodirectio fmio-2.0.8/src/access.c
--- fmio-2.0.8/src/access.c.nodirectio	2003-05-13 18:08:44.000000000 +0300
+++ fmio-2.0.8/src/access.c	2007-11-12 01:10:10.000000000 +0200
@@ -52,7 +52,7 @@ const char *radio_device_1 = "/dev/radio
 const char *radio_device_2 = "/dev/radio0";
 #endif /* linux */
 
-#ifdef __FreeBSD__
+#if defined __FreeBSD__ && defined USE_DIRECT_IO
 const char *devio = "/dev/io";
 static int fd = -1;
 
@@ -75,13 +75,13 @@ fbsd_release_ioperms(void) {
 
 	return 0;
 }
-#elif defined __QNXNTO__
+#elif defined __QNXNTO__ && defined USE_DIRECT_IO
 int
 qnx_iopl_acquire() {
 	ThreadCtl(_NTO_TCTL_IO, 0);
 	return 0;
 }
-#elif defined linux
+#elif defined linux && defined USE_DIRECT_IO
 int
 os_iopl(int v) {
 	if (iopl(v) < 0) {
@@ -100,7 +100,7 @@ os_ioperms(u_int32_t port, int no, int v
 
 	return 0;
 }
-#elif defined __OpenBSD__ || defined __NetBSD__
+#elif (defined __OpenBSD__ || defined __NetBSD__) && defined USE_DIRECT_IO
 int
 os_iopl(int v) {
 	struct i386_iopl_args iopls;


Index: README.fedora
===================================================================
RCS file: /cvs/extras/rpms/fmio/F-7/README.fedora,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.fedora	25 Oct 2006 10:36:19 -0000	1.2
+++ README.fedora	11 Nov 2007 23:50:47 -0000	1.3
@@ -13,3 +13,7 @@
 
 If you like to use native fmio's driver you should switch on setuid bit and
 choose any driver you want.
+
+However, starting from fmio 2.0.8-9 the only v4l driver is supported.
+If you should like to revert original behaviour (works only on x86 family
+platforms), please, rebuild package with --define '_with_direct_io 1'.


Index: fmio.spec
===================================================================
RCS file: /cvs/extras/rpms/fmio/F-7/fmio.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- fmio.spec	8 Sep 2006 10:26:33 -0000	1.2
+++ fmio.spec	11 Nov 2007 23:50:47 -0000	1.3
@@ -1,7 +1,7 @@
 Summary:	FM radio card manipulation utility
 Name:		fmio
 Version:	2.0.8
-Release:	8.0%{?dist}
+Release:	10%{?dist}
 License:	BSD
 Group:		Applications/Multimedia
 URL:		http://jumbo.narod.ru/fmio.html
@@ -11,9 +11,10 @@
 Patch0:		fmio-2.0.8-build.asp.patch
 Patch1:		fmio-2.0.8-sysconfdir.asp.patch
 Patch2:		fmio-2.0.8-dyn.asp.patch
+# Do not build drivers with direct I/O by default
+# (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205721)
+Patch3:		fmio-2.0.8-nodirectio.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205721
-ExclusiveArch:	%ix86 x86_64
 
 %description
 The fmio is a small program to set and change fm radio card parameters.
@@ -22,9 +23,9 @@
 driver supports it).
 
 %package devel
-Summary: Header files and libraries for developing apps which will use fmio
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Summary:	Header files and libraries for developing apps which will use fmio
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
 The fmio-devel package contains headers needed
@@ -34,16 +35,18 @@
 will use the fmio library.
 
 %package wmfmio
-Summary: WindowMaker dockable application to manipulate FM radio card
-Group: Applications/Multimedia
-Requires: %{name} = %{version}-%{release}
-Requires: WindowMaker
+Summary:	WindowMaker dockable application to manipulate FM radio card
+Group:		Applications/Multimedia
+Requires:	%{name} = %{version}-%{release}
+# It is not a WindoMaker's dock application
+# (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=222758)
+#Requires:	WindowMaker
 %if 0%{?fedora} > 4
-BuildRequires: libX11-devel
-BuildRequires: libXpm-devel
-BuildRequires: libXext-devel
+BuildRequires:	libX11-devel
+BuildRequires:	libXpm-devel
+BuildRequires:	libXext-devel
 %else
-BuildRequires: XFree86-devel
+BuildRequires:	XFree86-devel
 %endif
 
 %description wmfmio
@@ -56,6 +59,7 @@
 %patch0 -p1 -b .build
 %patch1 -p1 -b .sysconfdir
 %patch2 -p1 -b .dyn
+%patch3 -p1 -b .nodirectio
 
 # make LICENSE file
 export TOPDIR=`pwd`
@@ -68,6 +72,9 @@
 %if 0%{?fedora} > 4
 export LIBDIR="-L%{_libdir}"
 %endif
+%if 0%{?_with_direct_io}
+export WITH_DIRECT_IO=y
+%endif
 make %{?_smp_mflags}
 
 %install
@@ -103,8 +110,10 @@
 %{_bindir}/fmio-wrapper.py
 %exclude %{_bindir}/fmio-wrapper.py[co]
 %{_mandir}/man1/fmio.1*
+%if 0%{?_with_direct_io}
 %{_bindir}/bktrctl
 %{_bindir}/fmrinit
+%endif
 %doc Changelog README doc/FAQ
 %doc README.fedora
 %doc LICENSE
@@ -122,6 +131,10 @@
 %config(noreplace) %{_sysconfdir}/wmfmiorc
 
 %changelog
+* Sun Nov 11 2007 Andy Shevchenko <andy at smile.org.ua> 2.0.8-10
+- do not require WindowMaker for GUI part (#222758)
+- do not build drivers with direct I/O (#205721)
+
 * Fri Sep 08 2006 Andy Shevchenko <andy at smile.org.ua> 2.0.8-8.0
 - do not build on non-x86 arches (#205721)
 




More information about the fedora-extras-commits mailing list