freebsd-ports/multimedia/libmpeg2/Makefile
Piotr Kubaj 7c696d31ec multimedia/libmpeg2: fix build on powerpc
AltiVec code is broken on powerpc:
motion_comp_altivec.c:48:12: warning: implicit declaration of function 'vec_ld' is invalid in C99 [-Wimplicit-function-declaration]
    return vec_ld (A, (uint8_t *)B);
           ^
motion_comp_altivec.c:48:34: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
    return vec_ld (A, (uint8_t *)B);
                                 ^
motion_comp_altivec.c:48:12: error: returning 'int' from a function with incompatible result type 'vector_u8_t' (vector of 16 'unsigned char' values)
    return vec_ld (A, (uint8_t *)B);
2021-11-16 12:03:41 +00:00

55 lines
1.4 KiB
Makefile

# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
PORTNAME= libmpeg2
PORTVERSION= 0.5.1
PORTREVISION= 6
CATEGORIES= multimedia
MASTER_SITES= http://libmpeg2.sourceforge.net/files/
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Free library for decoding MPEG-2 and MPEG-1 video streams
USES= libtool pathfix
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --enable-shared
CFLAGS_powerpc= -mno-altivec
LDFLAGS_armv6= -Wl,-z,notext
LDFLAGS_armv7= -Wl,-z,notext
PORTDOCS= libmpeg2.txt README
OPTIONS_DEFINE= DOCS SDL X11
SDL_USES= sdl
SDL_USE= SDL=sdl
SDL_CONFIGURE_ENABLE= sdl
X11_USES= xorg
X11_USE= XORG=x11,xext,sm,ice,xv
X11_CONFIGURE_WITH= x
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's| -O3|| ; s|<termio|&s|' \
${WRKSRC}/configure
# AMD64 prefers position independent code
.if ${ARCH:tl} == "amd64"
@${REINPLACE_CMD} -e '/CFLAGS/s| -prefer-non-pic||' \
${WRKSRC}/configure
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/libvo/libvo.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/include/video_out.h \
${STAGEDIR}${PREFIX}/include/mpeg2dec
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpeg2convert.so.0
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpeg2.so.0
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/libmpeg2.txt ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>