mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-13 07:34:50 +00:00
cb4d0836d6
repocopied from the 2.5.6 ports multimedia/avidemux2 (left in the tree for now for people that want a gtk ui etc.) - Set CONFLICTS as only one avidemux version can be installed at a time. - Don't import the 2.6.8 gtk ui as it crashes at startup and apparently is abandoned upstream. (In the unlikely case that someone wants to fix it, it is available at my redports tree.) - As with the old version start by installing multimedia/avidemux26-plugins, it is needed and depends on the other ports. - (portlint is still not happy but I guess it cannot know everything...) Submitted by: frogs <4721@hushmail.com> (initial port)
245 lines
5.9 KiB
Makefile
245 lines
5.9 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
|
|
AVIDEMUX2_VERSION= 2.5.6
|
|
PORTREVISION= 5
|
|
MASTER_SITES= BERLIOS \
|
|
SF/avidemux/avidemux/${PORTVERSION}
|
|
DISTNAME= avidemux_${PORTVERSION}
|
|
|
|
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
|
|
LIB_DEPENDS+= libmad.so:${PORTSDIR}/audio/libmad \
|
|
liba52.so:${PORTSDIR}/audio/liba52 \
|
|
libpng15.so:${PORTSDIR}/graphics/png \
|
|
libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
|
|
libdca.so:${PORTSDIR}/multimedia/libdca \
|
|
libexecinfo.so:${PORTSDIR}/devel/libexecinfo
|
|
|
|
LICENSE= GPLv2
|
|
|
|
CONFLICTS= avidemux2-2.[0-46-9].* avidemux26-*
|
|
|
|
USE_GNOME= libxml2
|
|
USE_QT4= # empty
|
|
|
|
WANT_SDL= yes
|
|
USES= cmake:outsource pkgconfig iconv gmake compiler:features
|
|
CMAKE_USE_PTHREAD=yes
|
|
CMAKE_ARGS+= -DTHREADS_HAVE_PTHREAD_ARG:STRING="${PTHREAD_LIBS}"
|
|
CFLAGS+= -Wno-return-type
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
|
|
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
|
|
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
|
|
|
|
OPTIONS_DEFINE= GTK2 QT4 FREETYPE FONTCONFIG OSS ESOUND JACK PULSEAUDIO XVIDEO FAAC \
|
|
FAAD X264 VPX XVID SDL AMR VORBIS NLS LAME
|
|
OPTIONS_DEFAULT= GTK2 FREETYPE FONTCONFIG OSS XVIDEO VPX XVID SDL FAAD VORBIS
|
|
|
|
.if !defined(PACKAGE_BUILDING)
|
|
OPTIONS_DEFAULT+= LAME FAAC AMR
|
|
.endif
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
USES+= gettext
|
|
PLIST_SUB+= NLS=""
|
|
. if ${PORT_OPTIONS:MQT4}
|
|
PLIST_SUB+= QT_NLS=""
|
|
. else
|
|
PLIST_SUB+= QT_NLS="@comment "
|
|
. endif
|
|
.else
|
|
CMAKE_ARGS+= -DNO_NLS:BOOL=ON
|
|
PLIST_SUB+= NLS="@comment " QT_NLS="@comment "
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# is this kosher? the result seems to run tho... (see ports/185997)
|
|
.if $(COMPILER_FEATURES:Mlibc++)
|
|
LDFLAGS+= -lc++
|
|
.endif
|
|
|
|
.if ${COMPILER_TYPE} == clang
|
|
USE_GCC= yes
|
|
.endif
|
|
|
|
# for libexecinfo: (so that __builtin_frame_address() finds the top
|
|
# of the stack)
|
|
.if ${ARCH} == "amd64"
|
|
CFLAGS+= -fno-omit-frame-pointer
|
|
.endif
|
|
|
|
# We haven't ALSA(Never) & Aften(Yet) on FreeBSD
|
|
CMAKE_ARGS+= -DARTS:BOOL=OFF -DALSA:BOOL=OFF -DAFTEN:BOOL=OFF
|
|
|
|
.if empty(PORT_OPTIONS:MGTK2) && empty(PORT_OPTIONS:MQT4)
|
|
CMAKE_ARGS+= -DX11:BOOL=OFF
|
|
.else
|
|
USE_GNOME+= libxslt desktopfileutils
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MGTK2}
|
|
USE_GNOME+= gnomeprefix gnomehack gtk20
|
|
PLIST_SUB+= GTK=""
|
|
.else
|
|
CMAKE_ARGS+= -DGTK:BOOL=OFF
|
|
PLIST_SUB+= GTK="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MQT4}
|
|
CMAKE_ARGS+= -DLRELEASE_EXECUTABLE=${LOCALBASE}/bin/lrelease-qt4
|
|
USE_QT4= qmake_build moc_build rcc_build uic_build linguist_build gui
|
|
PLIST_SUB+= QT4=""
|
|
.else
|
|
CMAKE_ARGS+= -DQT4:BOOL=OFF
|
|
PLIST_SUB+= QT4="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOSS}
|
|
CMAKE_ARGS+= -DOSS_SUPPORT:BOOL=ON
|
|
.else
|
|
CMAKE_ARGS+= -DOSS_SUPPORT:BOOL=OFF
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MESOUND}
|
|
USE_GNOME+= esound
|
|
PLIST_SUB+= ESD=""
|
|
.else
|
|
CMAKE_ARGS+= -DESD:BOOL=OFF
|
|
PLIST_SUB+= ESD="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MJACK}
|
|
LIB_DEPENDS+= libjack.so:${PORTSDIR}/audio/jack
|
|
PLIST_SUB+= JACK=""
|
|
.else
|
|
CMAKE_ARGS+= -DJACK:BOOL=OFF
|
|
PLIST_SUB+= JACK="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MPULSEAUDIO}
|
|
LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio
|
|
PLIST_SUB+= PULSE=""
|
|
.else
|
|
CMAKE_ARGS+= -DPULSEAUDIOSIMPLE:BOOL=OFF
|
|
PLIST_SUB+= PULSE="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFREETYPE}
|
|
LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2
|
|
PLIST_SUB+= FREETYPE=""
|
|
.else
|
|
CMAKE_ARGS+= -DFREETYPE2:BOOL=OFF
|
|
PLIST_SUB+= FREETYPE="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFONTCONFIG}
|
|
LIB_DEPENDS+= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
|
|
.else
|
|
CMAKE_ARGS+= -DFONTCONFIG:BOOL=OFF
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MXVIDEO}
|
|
#LIB_DEPENDS+= Xv:${PORTSDIR}/x11/libXv
|
|
USE_XORG+= xv
|
|
.else
|
|
CMAKE_ARGS+= -DXVIDEO:BOOL=OFF
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFAAC}
|
|
LIB_DEPENDS+= libfaac.so:${PORTSDIR}/audio/faac
|
|
PLIST_SUB+= FAAC=""
|
|
.else
|
|
CMAKE_ARGS+= -DFAAC:BOOL=OFF
|
|
PLIST_SUB+= FAAC="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MLAME}
|
|
LIB_DEPENDS+= libmp3lame.so:${PORTSDIR}/audio/lame
|
|
PLIST_SUB+= LAME=""
|
|
.else
|
|
CMAKE_ARGS+= -DLAME:BOOL=OFF
|
|
PLIST_SUB+= LAME="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MFAAD}
|
|
LIB_DEPENDS+= libfaad.so:${PORTSDIR}/audio/faad
|
|
PLIST_SUB+= FAAD=""
|
|
.else
|
|
CMAKE_ARGS+= -DFAAD:BOOL=OFF -DNeAAC:BOOL=OFF
|
|
PLIST_SUB+= FAAD="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MX264}
|
|
LIB_DEPENDS+= libx264.so:${PORTSDIR}/multimedia/x264
|
|
PLIST_SUB+= X264=""
|
|
.else
|
|
CMAKE_ARGS+= -DX264:BOOL=OFF
|
|
PLIST_SUB+= X264="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MVPX}
|
|
LIB_DEPENDS+= libvpx.so:${PORTSDIR}/multimedia/libvpx
|
|
.else
|
|
CMAKE_ARGS+= -DVPXDEC:BOOL=OFF
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MXVID}
|
|
LIB_DEPENDS+= libxvidcore.so:${PORTSDIR}/multimedia/xvid
|
|
PLIST_SUB+= XVID=""
|
|
.else
|
|
CMAKE_ARGS+= -DXVID:BOOL=OFF
|
|
PLIST_SUB+= XVID="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSDL}
|
|
USE_SDL= sdl
|
|
PLIST_SUB+= SDL=""
|
|
.else
|
|
CMAKE_ARGS+= -DSDL:BOOL=OFF
|
|
PLIST_SUB+= SDL="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MVORBIS}
|
|
LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis
|
|
PLIST_SUB+= VORBIS=""
|
|
.else
|
|
CMAKE_ARGS+= -DLIBVORBIS:BOOL=OFF -DVORBIS:BOOL=OFF
|
|
PLIST_SUB+= VORBIS="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MAMR}
|
|
LIB_DEPENDS+= libopencore-amrnb.so:${PORTSDIR}/audio/opencore-amr
|
|
PLIST_SUB+= AMRNB=""
|
|
PLIST_SUB+= AMRWB=""
|
|
.else
|
|
CMAKE_ARGS+= -DOPENCORE_AMRNB:BOOL=OFF
|
|
PLIST_SUB+= AMRNB="@comment "
|
|
CMAKE_ARGS+= -DOPENCORE_AMRWB:BOOL=OFF
|
|
PLIST_SUB+= AMRWB="@comment "
|
|
.endif
|
|
|
|
.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
|
|
BROKEN= Does not compile on ia64, powerpc, or sparc64
|
|
.endif
|
|
|
|
post-extract:
|
|
@${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' \
|
|
${WRKSRC}/avidemux/ADM_libraries/ADM_mplex/ADM_mplexout.cpp
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/*/*/Makefile
|
|
@${REINPLACE_CMD} '/--enable-shared/s,,& --cc=${CC},' ${WRKSRC}/cmake/admFFmpegBuild.cmake
|
|
@${REINPLACE_CMD} '/sub $$1/s,sub,subl,' ${WRKSRC}/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp
|
|
@${CP} ${FILESDIR}/execinfo.cpp ${WRKSRC}/cmake_compile_check/
|
|
@${CP} ${FILESDIR}/*.patch ${WRKSRC}/cmake/patches/
|
|
@${MKDIR} ${CONFIGURE_WRKSRC}/config
|
|
@${LN} -s ${LOCALBASE}/include/iconv.h ${CONFIGURE_WRKSRC}/config
|
|
|
|
post-configure-common:
|
|
@${FIND} ${CONFIGURE_WRKSRC}/avidemux -name link.txt -print0 |${XARGS} -0 ${REINPLACE_CMD} 's|-ldl||'
|