multimedia/libdv: Switch to Gstreamer's fork
This repo switches to meson and includes various build fixes that makes our port much cleaner. Drop sample applications as they serve no usable purpose and adds unnecessary dependencies Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D32800
This commit is contained in:
parent
54fe8b0530
commit
3218e783d9
9 changed files with 39 additions and 126 deletions
|
@ -1,59 +1,30 @@
|
|||
# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
|
||||
|
||||
PORTNAME= libdv
|
||||
PORTVERSION= 1.0.0
|
||||
PORTREVISION= 6
|
||||
DISTVERSION= 1.0.0
|
||||
PORTREVISION= 7
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Quasar DV codec (libdv): software codec for DV video encoding format
|
||||
COMMENT= Quasar DV codec (libdv) is a software codec for DV video
|
||||
|
||||
LICENSE= LGPL21
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libpopt.so:devel/popt
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --disable-gtk
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
INSTALL_TARGET= install-strip
|
||||
USES= jpeg libtool pathfix pkgconfig
|
||||
USES= localbase meson pkgconfig
|
||||
|
||||
USE_GITLAB= yes
|
||||
GL_SITE= https://gitlab.freedesktop.org/gstreamer
|
||||
GL_ACCOUNT= meson-ports
|
||||
GL_PROJECT= libdv
|
||||
GL_COMMIT= 24218c36bed3b0a3bd5a57d5790ac12ade44e88d
|
||||
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
LDFLAGS_i386= -Wl,-znotext
|
||||
|
||||
DOCS= AUTHORS COPYING COPYRIGHT ChangeLog NEWS README \
|
||||
README.dvconnect README.encoder TODO
|
||||
|
||||
OPTIONS_DEFINE= SDL DOCS
|
||||
|
||||
SDL_USES= sdl
|
||||
SDL_USE= SDL=sdl
|
||||
SDL_CONFIGURE_ENABLE= sdl
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|stdint.h|sys/types.h|' \
|
||||
${WRKSRC}/libdv/dv.h \
|
||||
${WRKSRC}/libdv/dv_types.h \
|
||||
${WRKSRC}/libdv/headers.c \
|
||||
${WRKSRC}/libdv/encode.c
|
||||
@${REINPLACE_CMD} -E -e 's|^void swab.+$$||' ${WRKSRC}/libdv/encode.c
|
||||
@${REINPLACE_CMD} -e 's|SDL/||' ${WRKSRC}/playdv/display.h
|
||||
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/encodedv/dvavi.c \
|
||||
${WRKSRC}/encodedv/dvconnect.c
|
||||
# XXX - revise at every port update
|
||||
# protect popt from prefix changes
|
||||
@${REINPLACE_CMD} -E -e 's|(@REQUIRES_NOPKGCONFIG@)|-L${PREFIX}/include \1|' \
|
||||
${WRKSRC}/libdv.pc.in
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
|
||||
MESON_ARGS= -Dpopt=enabled
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
# XXX - work around compiler bug
|
||||
# Optimizations -O{1,s,2,3} work
|
||||
# However, lack of -O{1,s,2,3} or -O0 BREAK the build
|
||||
# Therefore, make sure we have AT LEAST -O and avoid -O0
|
||||
CFLAGS:= -O ${CFLAGS:N-O0}
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHA256 (libdv-1.0.0.tar.gz) = a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba
|
||||
SIZE (libdv-1.0.0.tar.gz) = 574565
|
||||
TIMESTAMP = 1635841807
|
||||
SHA256 (meson-ports-libdv-24218c36bed3b0a3bd5a57d5790ac12ade44e88d_GL0.tar.gz) = 6fb04ac45146f7c4a642c973b2ce70e03a771767997d420f7934c064d3fa7cfd
|
||||
SIZE (meson-ports-libdv-24218c36bed3b0a3bd5a57d5790ac12ade44e88d_GL0.tar.gz) = 577788
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- configure.orig Tue Nov 30 12:23:44 2004
|
||||
+++ configure Sun Dec 10 04:22:48 2006
|
||||
@@ -20393,8 +20393,6 @@
|
||||
# FreeBSD and OpenBSD have neither -lpthread nor integrated pthreads in libc.
|
||||
# Instead -pthread is used to the compiler/linker to get pthreads working right.
|
||||
if test x$OS_ARCH = xFreeBSD -o x$OS_ARCH = xOpenBSD; then
|
||||
- CFLAGS="$CFLAGS -pthread"
|
||||
- CXXFLAGS="$CXXFLAGS -pthread"
|
||||
fi
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- encodedv/dvavi.c.orig Wed Jan 14 04:29:26 2004
|
||||
+++ encodedv/dvavi.c Tue Jul 20 21:07:08 2004
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
|
@ -1,10 +0,0 @@
|
|||
--- encodedv/dvconnect.c.orig Wed Jul 3 14:44:37 2002
|
||||
+++ encodedv/dvconnect.c Wed Jul 3 14:51:44 2002
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
|
@ -1,12 +0,0 @@
|
|||
--- libdv/encode.c.orig Thu Dec 14 23:24:41 2006
|
||||
+++ libdv/encode.c Thu Dec 14 23:25:20 2006
|
||||
@@ -513,8 +513,7 @@
|
||||
emms();
|
||||
#else
|
||||
for (i = 0; i < 64; i++) {
|
||||
- // *(unsigned short*) ((char*) zigzag + reorder[i])=bl->coeffs[i];
|
||||
- zigzag[reorder[i] - 1] = bl->coeffs[i];
|
||||
+ *(unsigned short*) ((char*) zigzag + reorder[i])=bl->coeffs[i];
|
||||
}
|
||||
memcpy(bl->coeffs, zigzag, 64 * sizeof(dv_coeff_t));
|
||||
#endif
|
21
multimedia/libdv/files/patch-meson.build
Normal file
21
multimedia/libdv/files/patch-meson.build
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- meson.build.orig 2021-11-02 09:05:08 UTC
|
||||
+++ meson.build
|
||||
@@ -45,13 +45,13 @@ libm = cc.find_library('m', required: false)
|
||||
|
||||
# Don't bother with popt on non-gcc build, because we make heavy use of
|
||||
# gcc struct initialization extension in our popt code. (Could be fixed)
|
||||
-if cc.get_id() == 'gcc'
|
||||
+#if cc.get_id() == 'gcc'
|
||||
popt_dep = dependency('popt', required: get_option('popt'))
|
||||
cdata.set10('HAVE_LIBPOPT', popt_dep.found())
|
||||
-else
|
||||
- assert(not get_option('popt').enabled(), 'popt requested via options but was not found.')
|
||||
- popt_dep = dependency('', required: false)
|
||||
-endif
|
||||
+#else
|
||||
+# assert(not get_option('popt').enabled(), 'popt requested via options but was not found.')
|
||||
+# popt_dep = dependency('', required: false)
|
||||
+#endif
|
||||
|
||||
if get_option('yuv-format') == 'YV12'
|
||||
cdata.set10('YUV_420_USE_YV12', true)
|
|
@ -1,22 +0,0 @@
|
|||
--- playdv/oss.c.orig Sun Nov 18 21:50:24 2001
|
||||
+++ playdv/oss.c Sun Nov 18 21:53:48 2001
|
||||
@@ -36,6 +36,19 @@
|
||||
|
||||
#include "oss.h"
|
||||
|
||||
+#ifndef O_LARGEFILE
|
||||
+# define O_LARGEFILE 0
|
||||
+#endif
|
||||
+
|
||||
+#ifndef AFMT_S16_NE
|
||||
+# include <machine/endian.h>
|
||||
+# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
+# define AFMT_S16_NE AFMT_S16_LE
|
||||
+# else
|
||||
+# define AFMT_S16_NE AFMT_S16_BE
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
static const char *default_device = "/dev/dsp";
|
||||
|
||||
dv_oss_t *
|
|
@ -1,22 +1,7 @@
|
|||
bin/dubdv
|
||||
bin/dvconnect
|
||||
bin/encodedv
|
||||
include/libdv/dv.h
|
||||
include/libdv/dv_config.h
|
||||
include/libdv/dv_types.h
|
||||
lib/libdv.a
|
||||
lib/libdv.so
|
||||
lib/libdv.so.4
|
||||
lib/libdv.so.4.0.3
|
||||
libdata/pkgconfig/libdv.pc
|
||||
man/man1/dubdv.1.gz
|
||||
man/man1/dvconnect.1.gz
|
||||
man/man1/encodedv.1.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
|
||||
%%PORTDOCS%%%%DOCSDIR%%/COPYING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
|
||||
%%PORTDOCS%%%%DOCSDIR%%/NEWS
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.dvconnect
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.encoder
|
||||
%%PORTDOCS%%%%DOCSDIR%%/TODO
|
||||
|
|
Loading…
Reference in a new issue