multimedia/m2vrequantiser: fix build on powerpc* with clang, simplify port

This commit is contained in:
Piotr Kubaj 2020-06-10 20:59:21 +00:00
parent 73a20c3860
commit 4ad051b291
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=538439
2 changed files with 14 additions and 6 deletions

View File

@ -10,10 +10,9 @@ DISTNAME= M2VRequantiser-v${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Requantize MPEG-2 streams without recompressing
PATCH_STRIP= -p1
CFLAGS+= -Duint=unsigned
MAKE_ARGS+= CC="${CC}" CXX="${CXX}"
PLIST_FILES+= bin/M2VRequantiser
CFLAGS= -Duint=unsigned
MAKE_ARGS= CC="${CC}" CXX="${CXX}"
PLIST_FILES= bin/M2VRequantiser
post-patch:
${REINPLACE_CMD} 's|$$(PREFIX)|$${DESTDIR}$$(PREFIX)|' ${WRKSRC}/Makefile

View File

@ -1,5 +1,14 @@
--- a/main.c
+++ b/main.c
--- main.c
+++ main.c
@@ -30,7 +30,7 @@ Thanks to Sven Goethel for error resilience patches
#define NDEBUG // turns off asserts
#define REMOVE_BYTE_STUFFING // removes series of 0x00
-#if defined(__ppc__) || defined(__ppc64__)
+#if (defined(__ppc__) || defined(__ppc64__)) && !defined(__clang__)
#define USE_GLOBAL_REGISTER // assign registers to bit buffers
#elif defined(__i386__) || defined (__x86_64__)
// #define USE_GLOBAL_REGISTER // assign registers to bit buffers
@@ -2315,7 +2315,7 @@ int main (int argc, const char * argv[])
if (argc < 5) { USAGE }
delta_bright = atoi(argv[4]);