Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 2021 21:54:10 GMT
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3218e783d928 - main - multimedia/libdv: Switch to Gstreamer's fork
Message-ID:  <202111032154.1A3LsAwI051421@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3218e783d9285d3b0a572c896765be0ddd6791d9

commit 3218e783d9285d3b0a572c896765be0ddd6791d9
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2021-11-03 21:51:48 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2021-11-03 21:53:44 +0000

    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
---
 multimedia/libdv/Makefile                         | 57 ++++++-----------------
 multimedia/libdv/distinfo                         |  5 +-
 multimedia/libdv/files/patch-configure            | 11 -----
 multimedia/libdv/files/patch-encodecv-dvavi.c     | 10 ----
 multimedia/libdv/files/patch-encodedv-dvconnect.c | 10 ----
 multimedia/libdv/files/patch-libdv__encode.c      | 12 -----
 multimedia/libdv/files/patch-meson.build          | 21 +++++++++
 multimedia/libdv/files/patch-playdv-oss.c         | 22 ---------
 multimedia/libdv/pkg-plist                        | 17 +------
 9 files changed, 39 insertions(+), 126 deletions(-)

diff --git a/multimedia/libdv/Makefile b/multimedia/libdv/Makefile
index 3c47a69e55ef..6ce49ca6c1e4 100644
--- a/multimedia/libdv/Makefile
+++ b/multimedia/libdv/Makefile
@@ -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}
diff --git a/multimedia/libdv/distinfo b/multimedia/libdv/distinfo
index 31f90b71156e..09b08bebc889 100644
--- a/multimedia/libdv/distinfo
+++ b/multimedia/libdv/distinfo
@@ -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
diff --git a/multimedia/libdv/files/patch-configure b/multimedia/libdv/files/patch-configure
deleted file mode 100644
index 15393bab6bee..000000000000
--- a/multimedia/libdv/files/patch-configure
+++ /dev/null
@@ -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
- 
- 
diff --git a/multimedia/libdv/files/patch-encodecv-dvavi.c b/multimedia/libdv/files/patch-encodecv-dvavi.c
deleted file mode 100644
index 8cb7a98d3347..000000000000
--- a/multimedia/libdv/files/patch-encodecv-dvavi.c
+++ /dev/null
@@ -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>
diff --git a/multimedia/libdv/files/patch-encodedv-dvconnect.c b/multimedia/libdv/files/patch-encodedv-dvconnect.c
deleted file mode 100644
index b180dad296f5..000000000000
--- a/multimedia/libdv/files/patch-encodedv-dvconnect.c
+++ /dev/null
@@ -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>
diff --git a/multimedia/libdv/files/patch-libdv__encode.c b/multimedia/libdv/files/patch-libdv__encode.c
deleted file mode 100644
index e3c47375d776..000000000000
--- a/multimedia/libdv/files/patch-libdv__encode.c
+++ /dev/null
@@ -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
diff --git a/multimedia/libdv/files/patch-meson.build b/multimedia/libdv/files/patch-meson.build
new file mode 100644
index 000000000000..c901a269603f
--- /dev/null
+++ b/multimedia/libdv/files/patch-meson.build
@@ -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)
diff --git a/multimedia/libdv/files/patch-playdv-oss.c b/multimedia/libdv/files/patch-playdv-oss.c
deleted file mode 100644
index c95592086a08..000000000000
--- a/multimedia/libdv/files/patch-playdv-oss.c
+++ /dev/null
@@ -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 *
diff --git a/multimedia/libdv/pkg-plist b/multimedia/libdv/pkg-plist
index 2c2f46e323d6..f110855e807f 100644
--- a/multimedia/libdv/pkg-plist
+++ b/multimedia/libdv/pkg-plist
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111032154.1A3LsAwI051421>