2013-09-20 22:57:48 +02:00
# Created by: usleepless <usleepless@gmail.com>
2004-10-15 14:12:15 +02:00
# $FreeBSD$
2006-10-06 02:23:21 +02:00
PORTNAME = pvrxxx
PORTVERSION = 20060822
2007-10-07 04:56:19 +02:00
PORTREVISION = 1
2007-06-29 11:16:42 +02:00
CATEGORIES = multimedia kld
2004-10-15 14:12:15 +02:00
MASTER_SITES = http://www.mavetju.org/download/adopted/
2006-10-06 02:23:21 +02:00
DISTFILES = ${ CXMSHAR } ${ PVRTOOLS } .tar.gz hcwPVRP2.sys HcwMakoA.ROM pvrxxx_gpl.tgz
2004-12-15 05:33:47 +01:00
IGNOREFILES = hcwPVRP2.sys # Varies from month to month
2004-10-15 14:12:15 +02:00
2006-10-06 02:23:21 +02:00
MAINTAINER = usleep@gmail.com
COMMENT = Hauppauge PVR-150/500 TV cards driver for the cxm device, based on the pv250-port
CONFLICTS = pvr250-*
2004-10-15 14:12:15 +02:00
2005-05-02 02:31:44 +02:00
PVRTOOLS = pvr250-1.2
2006-10-06 02:23:21 +02:00
CXMSHAR = cxm-20051030.shar
2004-10-16 02:41:22 +02:00
2004-10-15 14:12:15 +02:00
WRKSRC = ${ WRKDIR }
2006-10-06 02:23:21 +02:00
NOFETCHFILES = hcwPVRP2.sys HcwMakoA.ROM
2004-10-15 14:12:15 +02:00
2006-10-06 02:23:21 +02:00
RESTRICTED_FILES = hcwPVRP2.sys HcwMakoA.ROM
RESTRICTED = This port uses a binary driver which is owned by Hauppauge
2004-10-15 14:12:15 +02:00
2004-10-16 02:41:22 +02:00
MAN4 = cxm.4
2005-05-02 02:31:44 +02:00
MAN1 = pvr250-setchannel.1
2004-10-15 14:12:15 +02:00
2013-09-20 22:57:48 +02:00
NO_STAGE = yes
2004-10-15 14:12:15 +02:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2006-10-06 02:23:21 +02:00
MODULESDIR = /boot/modules
2004-10-16 02:41:22 +02:00
PLIST_SUB = MODULESDIR = ${ MODULESDIR }
2004-10-15 14:12:15 +02:00
. i f ! e x i s t s ( $ { D I S T D I R } / h c w P V R P 2 . s y s )
2011-01-24 04:52:46 +01:00
IGNORE = you need the file hcwPVRP2.sys from the CD coming with the PVR-150/500 card. Please place this file in ${ DISTDIR } and run make again. Check http://ivtvdriver.org/index.php/Firmware for the recommended version
2006-10-06 02:23:21 +02:00
. e n d i f
. i f ! e x i s t s ( $ { D I S T D I R } / H c w M a k o A . R O M )
2011-01-24 04:52:46 +01:00
IGNORE = you need the file HcwMakoA.ROM from the CD coming with the PVR-150/500 card. Please place this file in ${ DISTDIR } and run make again. Check http://ivtvdriver.org/index.php/Firmware for the recommended version
2004-10-15 14:12:15 +02:00
. e n d i f
2010-12-17 04:51:24 +01:00
. i f ! e x i s t s ( $ { S R C _ B A S E } / s y s / d e v / i i c b u s / i i c b b . c )
2011-01-24 04:52:46 +01:00
IGNORE = you need the kernel sources installed to build this module
2004-10-15 14:12:15 +02:00
. e n d i f
patch-iicbb :
2010-12-17 04:51:24 +01:00
@if [ -z " ` ${ GREP } cxm_iic ${ SRC_BASE } /sys/dev/iicbus/iicbb.c` " ] ; then \
2005-12-03 03:18:48 +01:00
${ PATCH } -d/sys <${ WRKDIR } /dev/cxm/Patch.iicbb-fbsd5; \
2010-12-17 04:51:24 +01:00
${ ECHO_CMD } " Patched ${ SRC_BASE } /sys/dev/iicbus/iicbb.c " ; \
2004-10-15 14:12:15 +02:00
else \
2010-12-17 04:51:24 +01:00
${ ECHO_CMD } " ${ SRC_BASE } /sys/dev/iicbus/iicbb.c was already patched " ; \
2004-10-15 14:12:15 +02:00
fi
do-extract :
${ MKDIR } ${ WRKDIR }
cd ${ WRKDIR } ; \
2004-10-16 02:41:22 +02:00
${ SH } ${ DISTDIR } /${ CXMSHAR } ; \
2006-10-06 02:23:21 +02:00
${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ _DISTDIR } /${ PVRTOOLS } .tar.gz ${ EXTRACT_AFTER_ARGS } ; \
cd modules/cxm/cxm; \
2011-01-24 04:52:46 +01:00
${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ _DISTDIR } /pvrxxx_gpl.tgz ${ EXTRACT_AFTER_ARGS } ;
2004-10-16 02:41:22 +02:00
post-patch :
2005-05-09 05:14:09 +02:00
${ REINPLACE_CMD } -e 's/tuner0/cxm0/' \
2005-05-02 02:31:44 +02:00
${ WRKDIR } /${ PVRTOOLS } /setchannel.c
2004-10-15 14:12:15 +02:00
do-configure :
cd ${ WRKDIR } /dev/cxm; \
${ CC } -Wall -o cxm_extract_fw cxm_extract_fw.c; \
2006-10-06 02:23:21 +02:00
./cxm_extract_fw ${ DISTDIR } /hcwPVRP2.sys; \
cd ../../modules/cxm/cxm; \
../../../dev/cxm/cxm_extract_fw ${ DISTDIR } /HcwMakoA.ROM;
2004-10-15 14:12:15 +02:00
do-build :
2004-10-16 02:41:22 +02:00
cd ${ WRKDIR } /modules/cxm; ${ MAKE }
cd ${ WRKDIR } /${ PVRTOOLS } ; ${ MAKE }
2004-10-15 14:12:15 +02:00
do-install :
2007-10-07 04:56:19 +02:00
${ INSTALL_KLD } ${ WRKDIR } /modules/cxm/cxm/cxm.ko ${ MODULESDIR }
${ INSTALL_KLD } ${ WRKDIR } /modules/cxm/cxm_iic/cxm_iic.ko ${ MODULESDIR }
2004-10-16 02:41:22 +02:00
${ INSTALL_MAN } ${ WRKDIR } /${ PVRTOOLS } /cxm.4 ${ PREFIX } /man/man4/cxm.4
2005-05-02 02:31:44 +02:00
${ INSTALL_MAN } ${ WRKDIR } /${ PVRTOOLS } /pvr250-setchannel.1 ${ PREFIX } /man/man1/pvr250-setchannel.1
2004-10-16 02:41:22 +02:00
${ INSTALL_PROGRAM } ${ WRKDIR } /${ PVRTOOLS } /setchannel ${ PREFIX } /bin/pvr250-setchannel
2004-10-15 14:12:15 +02:00
post-install :
@${ CAT } ${ PKGMESSAGE }
. i n c l u d e < b s d . p o r t . p o s t . m k >