summaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authoritetcu <itetcu@FreeBSD.org>2006-06-17 21:16:13 +0000
committeritetcu <itetcu@FreeBSD.org>2006-06-17 21:16:13 +0000
commite0066eacecf989dc3f1b4f60b44ad2df1d59a236 (patch)
treedd8beffa33f6a638dcd6eba02a674308bea47748 /comms
parentc6be8b0fc823bb539559ac9926a53294d23e1fef (diff)
downloadFreeBSD-ports-e0066eacecf989dc3f1b4f60b44ad2df1d59a236.zip
FreeBSD-ports-e0066eacecf989dc3f1b4f60b44ad2df1d59a236.tar.gz
- fix the build for FreeBSD >= 600000
- we now install the module in KMODDIR instead of ${LOCALBASE}/lib therefor the pkg-plist and the rc.d startup script where adapted - adapt the pkg-message to match reality PR: ports/95915 Submitted by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Diffstat (limited to 'comms')
-rw-r--r--comms/vpb-driver/Makefile12
-rw-r--r--comms/vpb-driver/files/patch-FreeBSD-Makefile7
-rw-r--r--comms/vpb-driver/files/patch-FreeBSD-vpb.c36
-rw-r--r--comms/vpb-driver/files/pkg-message.in16
-rw-r--r--comms/vpb-driver/files/vpb.sh.in2
-rw-r--r--comms/vpb-driver/pkg-plist4
6 files changed, 40 insertions, 37 deletions
diff --git a/comms/vpb-driver/Makefile b/comms/vpb-driver/Makefile
index ac1b2e7..5715753 100644
--- a/comms/vpb-driver/Makefile
+++ b/comms/vpb-driver/Makefile
@@ -7,7 +7,7 @@
PORTNAME= vpb-driver
PORTVERSION= 2.4.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= http://www.voicetronix.com/Downloads/
@@ -18,7 +18,11 @@ USE_GMAKE= yes
USE_RC_SUBR= vpb.sh
SUB_FILES+= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
-MAKE_ENV+= KMODDIR=${PREFIX}/lib
+KMODDIR?= /boot/modules
+MAKE_ENV+= KMODDIR=${KMODDIR}
+
+PLIST_SUB+= KMODDIR=${KMODDIR}
+SUB_LIST+= KMODDIR=${KMODDIR}
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
@@ -36,8 +40,8 @@ IGNORE= requires kernel source (/usr/src/sys) to build
BROKEN= Does not compile on sparc64
.endif
-.if ${OSVERSION} < 502000 || ${OSVERSION} >= 600000
-IGNORE= is not for FreeBSD versions < 502000, or >= 600000
+.if ${OSVERSION} < 502000
+IGNORE= is not for FreeBSD versions < 502000
.endif
do-configure:
diff --git a/comms/vpb-driver/files/patch-FreeBSD-Makefile b/comms/vpb-driver/files/patch-FreeBSD-Makefile
index 507900f..c452f0a 100644
--- a/comms/vpb-driver/files/patch-FreeBSD-Makefile
+++ b/comms/vpb-driver/files/patch-FreeBSD-Makefile
@@ -1,8 +1,9 @@
---- FreeBSD/Makefile Thu Jan 1 10:00:00 1970
-+++ FreeBSD/Makefile Fri Feb 11 16:21:52 2005
-@@ -0,0 +1,5 @@
+--- FreeBSD/Makefile.orig Mon Apr 10 09:28:04 2006
++++ FreeBSD/Makefile Mon Apr 10 09:40:04 2006
+@@ -0,0 +1,6 @@
+SRCS=vpb.c
+SRCS+=bus_if.h device_if.h pci_if.h
+KMOD=vpb
++WERROR=
+
+.include <bsd.kmod.mk>
diff --git a/comms/vpb-driver/files/patch-FreeBSD-vpb.c b/comms/vpb-driver/files/patch-FreeBSD-vpb.c
index e94ea3a..f7953e8 100644
--- a/comms/vpb-driver/files/patch-FreeBSD-vpb.c
+++ b/comms/vpb-driver/files/patch-FreeBSD-vpb.c
@@ -1,5 +1,5 @@
---- FreeBSD/vpb.c Mon May 3 13:49:58 2004
-+++ FreeBSD/vpb.c Mon Mar 14 10:47:29 2005
+--- FreeBSD/vpb.c.orig Mon May 3 05:49:58 2004
++++ FreeBSD/vpb.c Mon Apr 10 09:35:03 2006
@@ -52,8 +52,6 @@
#define BLOCK_DELAY 1 /* delay (us) between adjacent blocks */
#define SIZE_LCR 128 /* size of 9050 local config reg space in bytes */
@@ -38,7 +38,7 @@
#include <machine/clock.h>
#include <vm/vm.h>
#include <vm/pmap.h>
-@@ -113,26 +115,34 @@
+@@ -113,26 +115,36 @@
\*---------------------------------------------------------------------------*/
/* Character device entry points */
@@ -71,7 +71,7 @@
- nopsize,
- D_TTY,
- -1
-+#if __FreeBSD_version > 503000
++#if __FreeBSD_version > 502103
+ .d_version = D_VERSION,
+#endif
+ .d_open = vpb_open,
@@ -80,7 +80,9 @@
+ .d_write = vpb_write,
+ .d_ioctl = vpb_ioctl,
+ .d_name = "vpb",
++#if __FreeBSD_version < 502103
+ .d_maj = CDEV_MAJOR,
++#endif
};
/* number of valid PCI devices detected */
@@ -89,7 +91,7 @@
/* translated base address of PLX9050 regions */
static unsigned char *base0[MAX_V4PCI];
-@@ -144,7 +154,7 @@
+@@ -144,7 +156,7 @@
static short buf[SIZE_WD];
/* vars */
@@ -98,7 +100,7 @@
static device_method_t vpb_methods[] = {
/* Device interface */
-@@ -154,15 +164,19 @@
+@@ -154,15 +166,19 @@
DEVMETHOD(device_shutdown, vpb_shutdown),
DEVMETHOD(device_suspend, vpb_suspend),
DEVMETHOD(device_resume, vpb_resume),
@@ -120,7 +122,7 @@
};
static devclass_t vpb_devclass;
-@@ -173,7 +187,7 @@
+@@ -173,7 +189,7 @@
open/close/read/write at this point */
static int
@@ -129,7 +131,7 @@
{
int err = 0;
-@@ -181,7 +195,7 @@
+@@ -181,7 +197,7 @@
}
static int
@@ -138,7 +140,7 @@
{
int err=0;
-@@ -189,7 +203,7 @@
+@@ -189,7 +205,7 @@
}
static int
@@ -147,7 +149,7 @@
{
int err = 0;
-@@ -197,7 +211,7 @@
+@@ -197,7 +213,7 @@
}
static int
@@ -156,7 +158,7 @@
{
int err = 0;
-@@ -205,7 +219,7 @@
+@@ -205,7 +221,7 @@
}
static int
@@ -165,7 +167,7 @@
{
VPB_DATA *vpb_data; /* ioctl parameters from user space */
short *data; /* user space address of data */
-@@ -318,8 +332,14 @@
+@@ -318,8 +334,14 @@
int subsystem;
char *s;
@@ -180,7 +182,7 @@
/* check that subsytem ID & Subsytem Vendor matches */
subsystem = pci_read_config(dev, 0x2c, 4);
s = (char*)&subsystem;
-@@ -327,7 +347,7 @@
+@@ -327,7 +349,7 @@
if ((s[3] == 'V') && (s[2] == '4') && (s[1] == 'V') && (s[0] == 'T')) {
printf("V4PCI %d found!\n", numPCI);
@@ -189,7 +191,7 @@
return 0;
}
}
-@@ -341,13 +361,16 @@
+@@ -341,13 +363,16 @@
vpb_attach(device_t dev)
{
vm_offset_t paddr;
@@ -208,7 +210,7 @@
/* OK, V4PCI found, so map address regions..... */
paddr = (vm_offset_t)pci_read_config(dev, PCI_BASE_ADDR0, 4) & ~0xf;
-@@ -357,7 +380,9 @@
+@@ -357,7 +382,9 @@
base2[numPCI] = pmap_mapdev(paddr, sizeof(short)*SIZE_WD);
/* set wait-states */
@@ -219,7 +221,7 @@
numPCI++;
-@@ -369,6 +394,11 @@
+@@ -369,6 +396,11 @@
static int
vpb_detach(device_t dev)
{
@@ -231,7 +233,7 @@
return 0;
}
-@@ -491,4 +521,4 @@
+@@ -491,4 +523,4 @@
cntrl &= 1;
return(cntrl);
}
diff --git a/comms/vpb-driver/files/pkg-message.in b/comms/vpb-driver/files/pkg-message.in
index f6f5683..14304b2 100644
--- a/comms/vpb-driver/files/pkg-message.in
+++ b/comms/vpb-driver/files/pkg-message.in
@@ -3,25 +3,21 @@ IMPORTANT INFORMATION!
To load(use) the driver, run (as root):
- # kldload %%PREFIX%%/lib/vpb.ko
+ # kldload %%KMODDIR%%/vpb.ko
To unload it:
# kldunload vpb
-Alternatively you can copy the provided sample script
+Alternatively you can add
- %%PREFIX%%/etc/rc.d/vpb.sh.sample
-
-to
-
- %%PREFIX%%/etc/rc.d/vpb.sh
+ vpb_driver_enable="YES"
-and add
+to your /etc/rc.conf file or
- vpb_driver_enable="YES"
+ vpb_load="YES"
-to your /etc/rc.conf file.
+to your /boot/loader.conf file.
This port is based on the original driver for FreeBSD RELENG_4 by Voicetronix.
I have updated the driver to compile as a kernel loadable module and added
diff --git a/comms/vpb-driver/files/vpb.sh.in b/comms/vpb-driver/files/vpb.sh.in
index 5628aae..f7fe5a2 100644
--- a/comms/vpb-driver/files/vpb.sh.in
+++ b/comms/vpb-driver/files/vpb.sh.in
@@ -21,7 +21,7 @@ name=vpb_driver
rcvar=`set_rcvar`
required_dirs=
-vpb_module=%%PREFIX%%/lib/vpb.ko
+vpb_module=%%KMODDIR%%/vpb.ko
required_files=${vpb_module}
start_cmd=start_cmd
diff --git a/comms/vpb-driver/pkg-plist b/comms/vpb-driver/pkg-plist
index ec37dbf..f992511 100644
--- a/comms/vpb-driver/pkg-plist
+++ b/comms/vpb-driver/pkg-plist
@@ -2,7 +2,7 @@ etc/vpb/vlcmain.out
etc/vpb/vpbmain_isa.out
etc/vpb/vpbmain_pci.out
include/vpbapi.h
-lib/gettext/linker.hints
lib/libvpb.a
-lib/vpb.ko
@dirrm etc/vpb
+@cwd /
+%%KMODDIR%%/vpb.ko
OpenPOWER on IntegriCloud