2004-10-15 14:12:15 +02:00
#
# New ports collection makefile for: pvr250
# Date created: 10 October 2004
# Whom: Edwin Groothuis <edwin@mavetju.org>
#
# $FreeBSD$
#
PORTNAME = pvr250
2005-01-12 03:49:33 +01:00
PORTVERSION = 20041230
2005-01-20 07:28:45 +01:00
PORTREVISION = 1
2004-10-15 14:12:15 +02:00
CATEGORIES = multimedia
MASTER_SITES = http://www.mavetju.org/download/adopted/
2004-10-16 02:41:22 +02:00
DISTFILES = ${ CXMSHAR } hcwPVRP2.sys ${ PVRTOOLS } .tar.gz
2004-12-15 05:33:47 +01:00
IGNOREFILES = hcwPVRP2.sys # Varies from month to month
2004-10-15 14:12:15 +02:00
MAINTAINER = edwin@mavetju.org
2004-10-16 02:43:02 +02:00
COMMENT = Hauppauge PVR-250/350 TV cards driver for the cxm device
2004-10-15 14:12:15 +02:00
2004-12-13 22:21:41 +01:00
PVRTOOLS = pvr250-1.1
2004-11-09 01:42:13 +01:00
CXMSHAR = cxm-${ PORTVERSION } .shar
2004-10-16 02:41:22 +02:00
2004-10-15 14:12:15 +02:00
WRKSRC = ${ WRKDIR }
2004-10-16 02:41:22 +02:00
USE_REINPLACE = yes
2004-10-15 14:12:15 +02:00
RESTRICTED_FILES = hcwPVRP2.sys
RESTRICTED = "This port uses a binary driver which is owned by Hauppauge"
NO_PACKAGE = ${ RESTRICTED }
NO_CDROM = ${ RESTRICTED }
OPTIONS = USBROADCAST "US Broadcast" Off \
USCABLE "US Cable" Off \
BGBROADCAST "B/G Broadcast" Off \
2005-01-20 07:28:45 +01:00
BGCABLE "B/G Cable" Off \
2004-10-15 14:12:15 +02:00
BGAUSTRALIA "B/G Australia" Off \
IBROADCAST "I Broadcast" Off \
LBROADCAST "L Broadcast" Off
2004-10-16 02:41:22 +02:00
MAN4 = cxm.4
2004-10-15 14:12:15 +02:00
pre-everything ::
@${ ECHO_CMD } "Some tuners (for example the Philips FQ1216M) supports multiple standards."
@${ ECHO_CMD } "Use the following configuration screen (or 'make config') to choose your local TV channel system if you have such a tuner."
@${ ECHO_CMD } "At this moment only the Philips FQ1216M is known to do this. If you don't have one, just ignore it. If you have one, select one (1) entry."
@sleep 5
. i n c l u d e < b s d . p o r t . p r e . m k >
. i f d e f i n e d ( W I T H _ U S B R O A D C A S T )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-usbroadcast
. e n d i f
. i f d e f i n e d ( W I T H _ U S C A B L E )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-uscable
. e n d i f
. i f d e f i n e d ( W I T H _ B G B R O A D C A S T )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-bgbroadcast
. e n d i f
2005-01-20 07:28:45 +01:00
. i f d e f i n e d ( W I T H _ B G C A B L E )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-bgcable
. e n d i f
2004-10-15 14:12:15 +02:00
. i f d e f i n e d ( W I T H _ B G A U S T R A L I A )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-bgaustralia
. e n d i f
. i f d e f i n e d ( W I T H _ I B R O A D C A S T )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-ibroadcast
. e n d i f
. i f d e f i n e d ( W I T H _ L B R O A D C A S T )
EXTRA_PATCHES = ${ FILESDIR } /patchtuner-lbroadcast
. e n d i f
. i f $ { O S V E R S I O N } < 5 0 0 0 0 0
2004-10-16 02:41:22 +02:00
MODULESDIR = /modules
2004-10-15 14:12:15 +02:00
. e l s e
2004-10-16 02:41:22 +02:00
MODULESDIR = /boot/kernel
2004-10-15 14:12:15 +02:00
. e n d i f
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 )
2004-10-16 02:41:22 +02:00
IGNORE = You need the file hcwPVRP2.sys from the CD coming with the PVR-250/350 card. Please place this file in ${ DISTDIR } and run make again.
2004-10-15 14:12:15 +02:00
. e n d i f
. i f ! e x i s t s ( / u s r / s r c / s y s / d e v / i i c b u s / i i c b b . c )
IGNORE = You need the kernel sources installed to build this module.
. e n d i f
patch-iicbb :
. i f $ { O S V E R S I O N } < 5 0 0 0 0 0
@if [ -z " ` ${ GREP } cxm_iic /usr/src/sys/dev/iicbus/iicbb.c` " ] ; then \
${ PATCH } /usr/src/sys/dev/iicbus/iicbb.c ${ WRKDIR } /dev/cxm/Patch.iicbb-fbsd4; \
${ ECHO_CMD } "Patched /usr/src/sys/dev/iicbus/iicbb.c" ; \
else \
${ ECHO_CMD } "/usr/src/sys/dev/iicbus/iicbb.c was already patched" ; \
fi
. e l s e
@if [ -z " ` ${ GREP } cxm_iic /usr/src/sys/dev/iicbus/iicbb.c` " ] ; then \
${ PATCH } /usr/src/sys/dev/iicbus/iicbb.c ${ WRKDIR } /dev/cxm/Patch.iicbb-fbsd5; \
${ ECHO_CMD } "Patched /usr/src/sys/dev/iicbus/iicbb.c" ; \
else \
${ ECHO_CMD } "/usr/src/sys/dev/iicbus/iicbb.c was already patched" ; \
fi
. e n d i f
do-extract :
${ MKDIR } ${ WRKDIR }
cd ${ WRKDIR } ; \
2004-10-16 02:41:22 +02:00
${ SH } ${ DISTDIR } /${ CXMSHAR } ; \
${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ _DISTDIR } /${ PVRTOOLS } .tar.gz ${ EXTRACT_AFTER_ARGS } ;
post-patch :
. i f $ { O S V E R S I O N } > 5 0 0 0 0 0
${ REINPLACE_CMD } -e 's/bktr0/cxm0/' \
${ WRKDIR } /${ PVRTOOLS } /setchannel.c \
${ WRKDIR } /${ PVRTOOLS } /setsize.c
. e n d i f
2004-10-15 14:12:15 +02:00
do-configure :
cd ${ WRKDIR } /dev/cxm; \
${ CC } -Wall -o cxm_extract_fw cxm_extract_fw.c; \
./cxm_extract_fw ${ DISTDIR } /hcwPVRP2.sys
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 :
2004-10-16 02:41:22 +02:00
${ INSTALL_DATA } ${ WRKDIR } /modules/cxm/cxm/cxm.ko ${ MODULESDIR }
${ INSTALL_DATA } ${ WRKDIR } /modules/cxm/cxm_iic/cxm_iic.ko ${ MODULESDIR }
${ INSTALL_MAN } ${ WRKDIR } /${ PVRTOOLS } /cxm.4 ${ PREFIX } /man/man4/cxm.4
${ INSTALL_PROGRAM } ${ WRKDIR } /${ PVRTOOLS } /setchannel ${ PREFIX } /bin/pvr250-setchannel
${ INSTALL_PROGRAM } ${ WRKDIR } /${ PVRTOOLS } /setsize ${ PREFIX } /bin/pvr250-setsize
2004-10-15 14:12:15 +02:00
. i f $ { O S V E R S I O N } < 5 0 0 0 0 0
cd /dev; \
./MAKEDEV bktr0
. e n d i f
post-install :
@${ CAT } ${ PKGMESSAGE }
. i n c l u d e < b s d . p o r t . p o s t . m k >