diff options
Diffstat (limited to 'multimedia/libmovtar')
-rw-r--r-- | multimedia/libmovtar/Makefile | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/multimedia/libmovtar/Makefile b/multimedia/libmovtar/Makefile index be4a73e84d7e..1a1b04ea834f 100644 --- a/multimedia/libmovtar/Makefile +++ b/multimedia/libmovtar/Makefile @@ -15,27 +15,45 @@ MASTER_SITE_SUBDIR= mjpeg MAINTAINER= lioux@FreeBSD.org COMMENT= Supports reading/writing of MJPEG video in YUV 4:2:2 JPEG -LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg - USE_SDL= sdl USE_GNOME= gtk12 USE_GMAKE= yes USE_REINPLACE= yes -USE_SIZE= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-m4data-prefix=${PREFIX}/share -CONFIGURE_ENV= LOCALBASE="${LOCALBASE}" +CONFIGURE_ARGS= --with-m4data-prefix=${PREFIX}/share +CONFIGURE_ENV= LOCALBASE="${LOCALBASE}" MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ PTHREAD_LIBS=${PTHREAD_LIBS} +.if exists(${LOCALBASE}/lib/libjpeg-mmx.a) +OPTIONS+= JPEGMMX "Enable Jpeg-mmx support by defining" OFF +.else +OPTIONS+= JPEGMMX "Enable Jpeg-mmx support by defining" ON +.endif + .include <bsd.port.pre.mk> +.if defined(WITH_JPEGMMX) && (${ARCH} == "i386") +LIB_DEPENDS+= jpeg-mmx.62:${PORTSDIR}/graphics/jpeg-mmx + +CONFIGURE_ARGS+= --with-jpeg-mmx=${LOCALBASE} +.else +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg + +CONFIGURE_ARGS+= --without-jpeg-mmx +.endif + post-patch: @${REINPLACE_CMD} -e 's|SDL/|SDL11/|' \ ${WRKSRC}/rtjpeg/rtjshow.c \ ${WRKSRC}/movtar_play.c - @${REINPLACE_CMD} -E -e 's|^(LIBS="-ljpeg )|\1 -L${LOCALBASE}/lib|; \ - s|(LIBS -ljpeg)"|\1 -L${LOCALBASE}/lib"|' \ +# Add library patch when using -ljpeg +# Use proper locations when using -ljpeg-mmx + @${REINPLACE_CMD} -E \ + -e 's|^(LIBS="-ljpeg )|\1 -L${LOCALBASE}/lib|' \ + -e 's|(LIBS -ljpeg)"|\1 -L${LOCALBASE}/lib"|' \ + -e 's|^(LIBS="-L) (\$$JPEGDIR) \$$DEFAULT_JPEGDIR_L|\1\2/lib|' \ + -e 's|-I (\$$JPEGDIR) \$$DEFAULT_JPEGDIR_I|-I\1/include|' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} .if ${ARCH} != "i386" # emms opcode should be noop in non-i386 non-MMX ARCH |