multimedia/pwcbsd: only provide the kernel module

pwcview(1) is provided by another port: multimedia/pwcview (same version
provided).

reduce this port to only provide the kernel modules.

While working on provide a repos per releases for kernel modules, having
ports that only provide the kernel modules simplifies the work, it
also make this port cross buildable which is how the kernel module
repositories are provided.
This commit is contained in:
Baptiste Daroussin 2024-12-12 13:55:35 +01:00
parent 6e9f553c28
commit 4000ea4dcd
3 changed files with 6 additions and 60 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= pwcbsd
PORTVERSION= 1.4.1
PORTREVISION= 14
PORTREVISION= 15
CATEGORIES= multimedia sysutils
MASTER_SITES= http://raaf.atspace.org/ \
http://www.bsd-geek.de/FreeBSD/distfiles/ \
@ -12,54 +12,15 @@ WWW= http://raaf.atspace.org/
LICENSE= GPLv2
CONFLICTS= pwcview
SSP_UNSAFE= kernel module does not support ssp
USES= kmod
USES= kmod uidfix
WRKSRC= ${WRKDIR}/${PORTNAME}
OPTIONS_DEFINE= PROGRAMS MMAP
OPTIONS_DEFAULT= PROGRAMS
PROGRAMS_DESC= Build the programs
MMAP_DESC= Enable mmap support (MAY CRASH YOUR SYSTEM)
MAKEFILE= Makefile.kld
CFLAGS+= -Wno-error
.include <bsd.port.options.mk>
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= requires kernel source files
.endif
.if ${PORT_OPTIONS:MMMAP}
ALL_TARGET= mmap
.else
ALL_TARGET= all
.endif
.if ${PORT_OPTIONS:MPROGRAMS}
ALL_TARGET+= pwcview
PROGRAMS= pwcview
USES+= jpeg sdl
USE_SDL= sdl
PLIST_SUB+= PROGRAMS=""
.else
PLIST_SUB+= PROGRAMS="@comment "
.endif
post-patch:
.if ${PORT_OPTIONS:MPROGRAMS}
@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|g' ${WRKSRC}/Makefile
.endif
do-install:
${MKDIR} ${STAGEDIR}${KMODDIR}
${INSTALL_KLD} ${WRKSRC}/pwc.ko ${STAGEDIR}${KMODDIR}
PLIST_FILES= ${KMODDIR}/pwc.ko \
share/man/man4/pwc.4.gz
post-install:
${INSTALL_MAN} ${WRKSRC}/pwc.4 ${STAGEDIR}${PREFIX}/share/man/man4
.if ${PORT_OPTIONS:MPROGRAMS}
${INSTALL_PROGRAM} ${PROGRAMS:S|^|${WRKSRC}/|} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${PROGRAMS:S|^|${WRKSRC}/|}.1 ${STAGEDIR}${PREFIX}/share/man/man1
.endif
.include <bsd.port.mk>

View file

@ -1,11 +0,0 @@
--- pwcview.c.orig 2007-10-09 07:03:10 UTC
+++ pwcview.c
@@ -837,6 +837,8 @@ void jpeg_write(int height, JSAMPIMAGE jimage, struct
jdata[1] = jimage[1];
jdata[2] = jimage[2];
+ cinfo->raw_data_in = TRUE;
+ cinfo->do_fancy_downsampling = FALSE;
jpeg_stdio_dest(cinfo, outfile);
jpeg_start_compress(cinfo, TRUE);

View file

@ -1,4 +0,0 @@
%%PROGRAMS%%bin/pwcview
%%PROGRAMS%%share/man/man1/pwcview.1.gz
share/man/man4/pwc.4.gz
/%%KMODDIR%%/pwc.ko