mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
multimedia/w_scan: update to 20170107, which adds support for DVB-T2
- take maintainership - drop LINUX option, the Linux binary is no longer pre-shipped - pet portlint
This commit is contained in:
parent
72e2607d39
commit
93106c7147
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=445048
@ -2,45 +2,34 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= w_scan
|
||||
PORTVERSION= 20120415
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 20170107
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://wirbel.htpc-forum.de/w_scan/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= rene@FreeBSD.org
|
||||
COMMENT= Perform frequency scans for DVB and ATSC transmissions
|
||||
|
||||
LICENSE= GPLv2
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat
|
||||
BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= dos2unix gettext iconv localbase tar:bzip2
|
||||
DOS2UNIX_GLOB= *.c *.h
|
||||
LDFLAGS+= ${ICONV_LIB}
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
PORTDOCS= COPYING ChangeLog README
|
||||
PLIST_FILES= bin/${PORTNAME} \
|
||||
man/man1/${PORTNAME}.1.gz
|
||||
|
||||
OPTIONS_DEFINE= LINUX DOCS
|
||||
|
||||
LINUX_DESC= Install Linux binary too (linux-w_scan)
|
||||
LINUX_USES= linux
|
||||
LINUX_RUN_DEPENDS= linux_dvbwrapper-kmod>=1.0:multimedia/linux_dvbwrapper-kmod
|
||||
LINUX_PLIST_FILES= bin/linux-${PORTNAME}
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -f ${FILESDIR}/types.sed ${WRKSRC}/configure ${WRKSRC}/*.c ${WRKSRC}/*.h
|
||||
@${CP} ${WRKSRC}/${PORTNAME} ${WRKSRC}/linux-${PORTNAME}
|
||||
|
||||
post-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
|
||||
|
||||
post-install-LINUX-on:
|
||||
(cd ${WRKSRC} && ${INSTALL_PROGRAM} linux-${PORTNAME} ${STAGEDIR}${PREFIX}/bin)
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (w_scan-20120415.tar.bz2) = 02b81bf6f64f3d1b9965e79e2e69a70e96766facf0f5a57499d1ca7262aa1847
|
||||
SIZE (w_scan-20120415.tar.bz2) = 361591
|
||||
TIMESTAMP = 1499198536
|
||||
SHA256 (w_scan-20170107.tar.bz2) = 38e0f38a7bf06cff6d6ea01652ad4ee60da2cb0e937360468f936da785b46ffe
|
||||
SIZE (w_scan-20170107.tar.bz2) = 245517
|
||||
|
@ -1,39 +0,0 @@
|
||||
The code is using gnu C extensions. The following new patchfile under files/ fixes the issue:
|
||||
|
||||
# cat files/patch-descriptors.c
|
||||
--- descriptors.c.orig 2016-06-20 13:13:56 UTC
|
||||
+++ descriptors.c
|
||||
@@ -1000,6 +1000,16 @@ void parse_T2_delivery_system_descriptor
|
||||
}
|
||||
}
|
||||
|
||||
+__u8 LeapYear(__u16 year) {
|
||||
+ if ((year % 400) == 0)
|
||||
+ return 1;
|
||||
+ else if ((year % 100) == 0)
|
||||
+ return 0;
|
||||
+ else if ((year % 4) == 0)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
/* 300468 v011101 annex C, Conversion between time and date conventions
|
||||
* NOTE: These formulas are applicable between the inclusive dates 1900 March 1 to 2100 February 28.
|
||||
@@ -1011,16 +1021,6 @@ struct tm modified_julian_date_to_utc(__
|
||||
int _M = (int) (MJD - 14956.1 - (int) (_Y * 365.25)) / 30.6001;
|
||||
int K = (_M == 14) ? 1 : (_M == 15) ? 1 : 0;
|
||||
|
||||
- __u8 LeapYear(__u16 year) {
|
||||
- if ((year % 400) == 0)
|
||||
- return 1;
|
||||
- else if ((year % 100) == 0)
|
||||
- return 0;
|
||||
- else if ((year % 4) == 0)
|
||||
- return 1;
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
memset(&utc, 0, sizeof(struct tm));
|
||||
utc.tm_mday = MJD - 14956 - (int) (_Y * 365.25) - (int) (_M * 30.6001);
|
||||
utc.tm_year = _Y + K;
|
@ -1,25 +0,0 @@
|
||||
--- scan.c.orig 2016-06-20 13:13:56 UTC
|
||||
+++ scan.c
|
||||
@@ -1816,7 +1816,11 @@ static int set_frontend(int frontend_fd,
|
||||
case SCAN_TERRESTRIAL:
|
||||
set_cmd_sequence(DTV_DELIVERY_SYSTEM, t->param.u.terr.delivery_system);
|
||||
if (t->param.u.terr.delivery_system == SYS_DVBT2) {
|
||||
+#ifndef DTV_DVBT2_PLP_ID
|
||||
+ set_cmd_sequence(DTV_DVBT2_PLP_ID_LEGACY, t->pids.plp_id);
|
||||
+#else
|
||||
set_cmd_sequence(DTV_DVBT2_PLP_ID, t->pids.plp_id);
|
||||
+#endif
|
||||
}
|
||||
set_cmd_sequence(DTV_FREQUENCY, t->param.frequency);
|
||||
set_cmd_sequence(DTV_INVERSION, t->param.inversion);
|
||||
@@ -3010,8 +3014,8 @@ int main (int argc, char **argv)
|
||||
cleanup();
|
||||
return -1;
|
||||
}
|
||||
- if (((adapter > 7) && (adapter != 999)) || (adapter < 0)) {
|
||||
- info("Invalid adapter: out of range (0..7)\n");
|
||||
+ if (((adapter > 255) && (adapter != 999)) || (adapter < 0)) {
|
||||
+ info("Invalid adapter: out of range (0..255)\n");
|
||||
bad_usage(argv[0]);
|
||||
cleanup();
|
||||
return -1;
|
Loading…
Reference in New Issue
Block a user