Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 9 changed files with 609 additions and 33 deletions.
43 changes: 10 additions & 33 deletions multimedia/ogmtools/Makefile
@@ -1,51 +1,28 @@
PORTNAME= ogmtools
PORTVERSION= 1.5
PORTREVISION= 16
PORTREVISION= 17
CATEGORIES= multimedia audio
MASTER_SITES= http://www.bunkus.org/videotools/ogmtools/

MAINTAINER= multimedia@FreeBSD.org
COMMENT= Tools to extract from/get info about/create OGG media streams
WWW= https://www.bunkus.org/videotools/ogmtools/

LIB_DEPENDS= libvorbis.so:audio/libvorbis
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

USES= tar:bzip2
LIB_DEPENDS= libogg.so:audio/libogg \
libvorbis.so:audio/libvorbis

USES= autoreconf localbase:ldflags tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-ogg-prefix=${LOCALBASE} \
--with-vorbis-prefix=${LOCALBASE}

OPTIONS_DEFINE= DVDREAD
OPTIONS_DEFAULT= DVDREAD
OPTIONS_DEFAULT=DVDREAD
OPTIONS_SUB= yes
DVDREAD_DESC= DVD title chapter extraction via libdvdread

DVDREAD_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread
DVDREAD_CONFIGURE_ON= --with-dvdread \
--with-dvdread-includes=${LOCALBASE} \
--with-dvdread-libs=${LOCALBASE}
DVDREAD_CONFIGURE_OFF= --without-dvdread
OPTIONS_SUB= yes

post-patch:
# disable GNU auto* tools
@${FIND} ${WRKSRC} -type f -name "Makefile.in" | ${XARGS} \
-n 10 ${REINPLACE_CMD} -E -e \
's!^(ACLOCAL|AUTOCONF|AUTOMAKE|AUTOHEADER).+$$!\1=${TRUE}!'
# C{,XX}FLAGS safeness
@${REINPLACE_CMD} -E -e \
's|^(CFLAGS).*(-DLINUX)|\1=${CFLAGS} \2|' \
${WRKSRC}/avilib/Makefile.in
@${REINPLACE_CMD} -E -e \
's|^(CFLAGS[[:space:]]*)=|\1+=|; \
s|^(CXXFLAGS[[:space:]]*)=|\1+=|' \
${WRKSRC}/Makefile.in

post-configure:
# malloc.h -> stdlib.h
# stdint.h -> inttypes.h
@${FIND} ${WRKSRC} -type f | ${XARGS} \
-n 10 ${REINPLACE_CMD} -E -e \
's!malloc.h!stdlib.h!; \
s|stdint.h|inttypes.h|'
DVDREAD_CONFIGURE_WITH= dvdread

.include <bsd.port.mk>
11 changes: 11 additions & 0 deletions multimedia/ogmtools/files/patch-avilib_avidump.c
@@ -0,0 +1,11 @@
--- avilib/avidump.c.orig 2004-11-02 15:30:16 UTC
+++ avilib/avidump.c
@@ -54,7 +54,7 @@
((x<<8) & 0x00ff0000) |\
((x<<24) & 0xff000000))
# define SWAP8(x) (((SWAP4(x)<<32) & 0xffffffff00000000ULL) |\
- (SWAP4(x)))
+ SWAP4(x))
#else
# define SWAP2(a) (a)
# define SWAP4(a) (a)
12 changes: 12 additions & 0 deletions multimedia/ogmtools/files/patch-configure.in
@@ -0,0 +1,12 @@
--- configure.in.orig 2023-07-04 22:25:24 UTC
+++ configure.in
@@ -31,7 +31,7 @@ fi
dnl Check for headers
AC_HEADER_STDC()

-CFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
-CXXFLAGS="-Wall -Wno-sign-compare @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@"
+CFLAGS="-Wall -Wno-sign-compare $OGG_CFLAGS $VORBIS_CFLAGS $AVILIB_CFLAGS $DEBUG_CFLAGS $PROFILING_CFLAGS $CFLAGS"
+CXXFLAGS="-Wall -Wno-sign-compare $OGG_CFLAGS $VORBIS_CFLAGS $AVILIB_CFLAGS $DEBUG_CFLAGS $PROFILING_CFLAGS $CXXFLAGS"

AC_OUTPUT(Makefile avilib/Makefile)

0 comments on commit 6b5a0d0

Please sign in to comment.