summaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-12-11 01:52:17 +0000
committersobomax <sobomax@FreeBSD.org>2002-12-11 01:52:17 +0000
commit84ffb9f4d8f20ae8dfd470251ae14fda4d7f971e (patch)
treea52b50baa24d667d12f490052ca7fa299489ceec /comms
parent4c1d556455f3b4fd7e02aa2d2d8d23add1588cfb (diff)
downloadFreeBSD-ports-84ffb9f4d8f20ae8dfd470251ae14fda4d7f971e.zip
FreeBSD-ports-84ffb9f4d8f20ae8dfd470251ae14fda4d7f971e.tar.gz
- Unbreak on 5-CURRENT;
- improve startup script, so that it works right OOB and bump PORTREVISION; - make it respecting global CFLAGS, while I'm here. Prompted by: IBM ThinkPad 600E
Diffstat (limited to 'comms')
-rw-r--r--comms/mwavem/Makefile6
-rw-r--r--comms/mwavem/files.5/patch-src::drivers::3780i.c58
-rw-r--r--comms/mwavem/files.5/patch-src::drivers::Makefile53
-rw-r--r--comms/mwavem/files.5/patch-src::drivers::mwave.c13
-rw-r--r--comms/mwavem/files/mwavem.sh2
-rw-r--r--comms/mwavem/files/patch-configure14
6 files changed, 144 insertions, 2 deletions
diff --git a/comms/mwavem/Makefile b/comms/mwavem/Makefile
index 99f4d7e..6fb11c7 100644
--- a/comms/mwavem/Makefile
+++ b/comms/mwavem/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mwavem-fbsd
PORTVERSION= 1.2
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= ftp://www-126.ibm.com/pub/acpmodem/ \
http://www.escape.com/~simonw/
@@ -40,6 +40,10 @@ LTHREADVERSION= 3
.endif
LIB_DEPENDS= lthread.${LTHREADVERSION}:${PORTSDIR}/devel/linuxthreads
+.if ${OSVERSION} >= 500000
+EXTRA_PATCHES!= ${ECHO_CMD} ${PKGDIR}/files.5/patch-*
+.endif
+
pre-build:
${REINPLACE_CMD} -e "s@ /modules@ ${PREFIX}/share/mwavem@g" \
${WRKSRC}/src/drivers/Makefile
diff --git a/comms/mwavem/files.5/patch-src::drivers::3780i.c b/comms/mwavem/files.5/patch-src::drivers::3780i.c
new file mode 100644
index 0000000..8768c47
--- /dev/null
+++ b/comms/mwavem/files.5/patch-src::drivers::3780i.c
@@ -0,0 +1,58 @@
+
+$FreeBSD$
+
+--- src/drivers/3780i.c 2002/12/11 00:57:53 1.1
++++ src/drivers/3780i.c 2002/12/11 00:59:00
+@@ -419,7 +419,7 @@
+ /* Transfer the memory block */
+ while (uCount-- !=0) {
+ val=InWordDsp(DSP_MsaDataDSISHigh);
+- if (susword (pusBuffer++, val))
++ if (suword16 (pusBuffer++, val))
+ return EFAULT;
+
+ PRINTK_3(TRACE_3780I,"3780I::dsp3780I_ReadDStore uCount %x val %x\n",uCount,val);
+@@ -450,7 +450,7 @@
+ /* Transfer the memory block */
+ while (uCount-- !=0) {
+ val=InWordDsp(DSP_ReadAndClear);
+- if (susword (pusBuffer++, val))
++ if (suword16 (pusBuffer++, val))
+ return EFAULT;
+
+ PRINTK_3(TRACE_3780I,"3780I::dsp3780I_ReadAndCleanDStore uCount %x val %x\n",uCount,val);
+@@ -481,7 +481,7 @@
+ /* Transfer the memory block */
+ while (uCount-- !=0) {
+ int val;
+- if ( (val = fusword (pusBuffer++)) == -1) return EFAULT;
++ if ( (val = fuword16 (pusBuffer++)) == -1) return EFAULT;
+ OutWordDsp(DSP_MsaDataDSISHigh, val);
+
+ PRINTK_3(TRACE_3780I,"3780I::dsp3780I_WriteDStore uCount %x val %x\n",uCount,val);
+@@ -518,12 +518,12 @@
+ s = splhigh();
+ val_lo=InWordDsp(DSP_MsaDataISLow);
+ val_hi=InWordDsp(DSP_MsaDataDSISHigh);
+- if (susword (pusBuffer++, val_lo))
++ if (suword16 (pusBuffer++, val_lo))
+ {
+ splx (s);
+ return EFAULT;
+ }
+- if (susword (pusBuffer++, val_hi))
++ if (suword16 (pusBuffer++, val_hi))
+ {
+ splx (s);
+ return EFAULT;
+@@ -560,8 +560,8 @@
+ while (uCount-- !=0) {
+ int val_lo,val_hi;
+ int s;
+- if ( (val_lo = fusword (pusBuffer++)) == -1) return EFAULT;
+- if ( (val_hi = fusword (pusBuffer++)) == -1) return EFAULT;
++ if ( (val_lo = fuword16 (pusBuffer++)) == -1) return EFAULT;
++ if ( (val_hi = fuword16 (pusBuffer++)) == -1) return EFAULT;
+ s = splhigh();
+ OutWordDsp(DSP_MsaDataISLow, val_lo);
+ OutWordDsp(DSP_MsaDataDSISHigh, val_hi);
diff --git a/comms/mwavem/files.5/patch-src::drivers::Makefile b/comms/mwavem/files.5/patch-src::drivers::Makefile
new file mode 100644
index 0000000..64bfa11
--- /dev/null
+++ b/comms/mwavem/files.5/patch-src::drivers::Makefile
@@ -0,0 +1,53 @@
+
+$FreeBSD$
+
+--- src/drivers/Makefile 2002/12/11 00:24:46 1.1
++++ src/drivers/Makefile 2002/12/11 01:31:15
+@@ -20,24 +20,32 @@
+
+ all: $(MODULE).ko
+
+-mwave.o: smapi.h 3780i.h tp3780i.h
++mwave.o: smapi.h 3780i.h tp3780i.h bus_if.h device_if.h isa_if.h
+
+-tp3780i.o: smapi.h tp3780i.h 3780i.h mwavepub.h
++tp3780i.o: smapi.h tp3780i.h 3780i.h mwavepub.h bus_if.h device_if.h isa_if.h
+
+-3780i.o: 3780i.h smapi.h
++3780i.o: 3780i.h smapi.h bus_if.h device_if.h isa_if.h
+
+-smapi.o: smapi.h
++smapi.o: smapi.h bus_if.h device_if.h isa_if.h
++
++bus_if.h::
++ awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h
++
++device_if.h::
++ awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h
++
++isa_if.h::
++ awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/isa/isa_if.m -h
+
+ $(MWAVE_OBJS): mwavedd.h
+
+ $(MODULE).ko: $(MODULE).kld
+- gensetdefs $(MODULE).kld
+- $(CC) $(CFLAGS) -c setdef0.c
+- $(CC) $(CFLAGS) -c setdef1.c
+- $(LD) -Bshareable $(LDFLAGS) -o $@ setdef0.o $(MODULE).kld setdef1.o
++ touch export_syms
++ awk -f /usr/src/sys/conf/kmod_syms.awk $(MODULE).kld export_syms | xargs -J% objcopy % $(MODULE).kld
++ $(LD) -Bshareable -d -warn-common -o $@ $(MODULE).kld
+
+ $(MODULE).kld: $(MWAVE_OBJS)
+- $(LD) $(LDFLAGS) -r -o $@ $(MWAVE_OBJS)
++ $(LD) -d -warn-common -r -d -o $@ $(MWAVE_OBJS)
+
+
+ ###
+@@ -51,4 +59,4 @@
+
+ unload:; kldunload $(MODULE)
+
+-clean distclean:; -rm -f *.o *.ver *~ *.kld *.ko setdef?.c setdefs.h
++clean distclean:; -rm -f *.o *.ver *~ *.kld *.ko setdef?.c setdefs.h bus_if.h device_if.h isa_if.h
diff --git a/comms/mwavem/files.5/patch-src::drivers::mwave.c b/comms/mwavem/files.5/patch-src::drivers::mwave.c
new file mode 100644
index 0000000..80070a1
--- /dev/null
+++ b/comms/mwavem/files.5/patch-src::drivers::mwave.c
@@ -0,0 +1,13 @@
+
+$FreeBSD$
+
+--- src/drivers/mwave.c 2002/12/11 00:20:13 1.1
++++ src/drivers/mwave.c 2002/12/11 00:22:11
+@@ -236,7 +236,6 @@
+
+ pDrvData->IPCs[ipcnum].bIsHere=FALSE;
+ pDrvData->IPCs[ipcnum].bIsEnabled=TRUE;
+- current->p_nice=-16; /* boost to provide priority timing */
+
+ PRINTK_2(TRACE_MWAVE,"mwave::mwave_ioctl IOCTL_MW_REGISTER_IPC ipcnum %x exit\n",ipcnum);
+ }
diff --git a/comms/mwavem/files/mwavem.sh b/comms/mwavem/files/mwavem.sh
index ae58f04..e65ae88 100644
--- a/comms/mwavem/files/mwavem.sh
+++ b/comms/mwavem/files/mwavem.sh
@@ -20,7 +20,7 @@ case "$1" in
;;
start )
echo -n ' internal modem'
- kldstat -n mwave 2>/dev/null >/dev/null || kldload /usr/local/share/mwavem/mwave
+ kldstat -n mwave 2>/dev/null >/dev/null || kldload /usr/local/share/mwavem/mwave.ko
${MWAVEM_PATH}${MWAVEM_NAME} > /dev/null &
;;
esac
diff --git a/comms/mwavem/files/patch-configure b/comms/mwavem/files/patch-configure
new file mode 100644
index 0000000..61840fd
--- /dev/null
+++ b/comms/mwavem/files/patch-configure
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- configure 2002/12/11 01:43:43 1.1
++++ configure 2002/12/11 01:44:01
+@@ -1305,7 +1305,7 @@
+
+
+ INCLUDES="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -I\$(top_srcdir)/src/include -I\$(top_srcdir)/src/drivers"
+-CFLAGS="$INCLUDES -O2 -fomit-frame-pointer -Wall"
++CFLAGS="$CFLAGS $INCLUDES -fomit-frame-pointer -Wall"
+
+ dsp_dir=` test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
+ test "x$prefix" = xNONE && prefix=${exec_prefix}
OpenPOWER on IntegriCloud