2013-02-22 14:43:40 +01:00
|
|
|
# Created by: Andrew Thompson <andy@fud.org.nz>
|
2004-11-22 21:26:08 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2012-08-21 10:27:01 +02:00
|
|
|
PORTNAME= handbrake
|
2014-02-14 21:00:13 +01:00
|
|
|
PORTVERSION= 0.9.9
|
The FreeBSD x11@ and graphics team proudly presents
a zeising, kwm production, with help from dumbbell, bdrewery:
NEW XORG ON FREEBSD 9-STABLE AND 10-STABLE
This update switches over to use the new xorg stack by default on FreeBSD 9
and 10 stable, on osversions where vt(9) is available.
It is still possible to use the old stack by specifying WITHOUT_NEW_XORG in
/etc/make.conf .
FreeBSD 8-STABLE and released versions of FreeBSD still use
the old version.
A package repository with binary packages for new xorg will
be available soon.
This patch also contains updates of libxcb and related ports, pixman, as well
as some drivers and utilities.
Bump portrevisions for xf86-* ports, as well as virtualbox-ose-additions due
to xserver version change.
Apart from these updates, the way shared libraries are handled has been
changed for all xorg ports, as well as libxml2 and freetype, which means
ltverhack is gone and as a consequence shared libraries have been bumped.
The plan is that this change will make library bumps less likely in the
future.
All affected ports have had their portrevisions bumped as a consequence of
this.
Fix some issues where WITH_NEW_XORG weren't detected properly on CURRENT.
Update instructions, hardware support, and more notes can be found on
https://wiki.freebsd.org/Graphics
Thanks to: all testers, bdrewery and the FreeBSD x11@ team
exp-run by: bdrewery [1]
PR: ports/187602 [1]
Approved by: portmgr (bdrewery), core (jhb)
2014-04-16 20:28:47 +02:00
|
|
|
PORTREVISION= 1
|
2012-08-21 10:27:01 +02:00
|
|
|
CATEGORIES= multimedia
|
2012-08-23 05:47:15 +02:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} \
|
|
|
|
http://download.handbrake.fr/handbrake/contrib/:contrib
|
|
|
|
DISTFILES= HandBrake-${PORTVERSION}.tar.bz2 \
|
2012-08-21 10:27:01 +02:00
|
|
|
a52dec-0.7.4.tar.gz:contrib \
|
2012-08-23 05:47:15 +02:00
|
|
|
faac-1.28.tar.gz:contrib \
|
|
|
|
faad2-2.7.tar.gz:contrib \
|
2014-02-14 21:00:13 +01:00
|
|
|
libav-v9.6.tar.bz2:contrib \
|
2012-08-21 10:27:01 +02:00
|
|
|
lame-3.98.tar.gz:contrib \
|
2014-02-14 21:00:13 +01:00
|
|
|
libbluray-0.2.3.tar.bz2:contrib \
|
2012-08-23 05:47:15 +02:00
|
|
|
libdca-r81-strapped.tar.gz:contrib \
|
|
|
|
libdvdnav-svn1168.tar.gz:contrib \
|
|
|
|
libdvdread-svn1168.tar.gz:contrib \
|
|
|
|
libmkv-0.6.5-0-g82075ae.tar.gz:contrib \
|
|
|
|
mp4v2-trunk-r355.tar.bz2:contrib \
|
|
|
|
mpeg2dec-0.5.1.tar.gz:contrib \
|
2014-02-14 21:00:13 +01:00
|
|
|
x264-r2273-b3065e6.tar.gz:contrib
|
2012-08-23 05:47:15 +02:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
2004-11-22 21:26:08 +01:00
|
|
|
|
2014-02-09 00:23:36 +01:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2012-08-23 05:47:15 +02:00
|
|
|
COMMENT= Versatile DVD ripper and video transcoder
|
2004-11-22 21:26:08 +01:00
|
|
|
|
2012-08-23 05:47:15 +02:00
|
|
|
LICENSE= GPLv2
|
2004-11-22 21:26:08 +01:00
|
|
|
|
2012-08-23 05:47:15 +02:00
|
|
|
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
|
2014-02-14 21:00:13 +01:00
|
|
|
LIB_DEPENDS= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
|
|
|
|
libfreetype.so:${PORTSDIR}/print/freetype2 \
|
|
|
|
libfribidi.so:${PORTSDIR}/converters/fribidi \
|
|
|
|
libxml2.so:${PORTSDIR}/textproc/libxml2 \
|
|
|
|
libass.so:${PORTSDIR}/multimedia/libass \
|
|
|
|
libogg.so:${PORTSDIR}/audio/libogg \
|
|
|
|
libvorbis.so:${PORTSDIR}/audio/libvorbis \
|
|
|
|
libvorbisenc.so:${PORTSDIR}/audio/libvorbis \
|
|
|
|
libtheoradec.so:${PORTSDIR}/multimedia/libtheora \
|
|
|
|
libtheoraenc.so:${PORTSDIR}/multimedia/libtheora \
|
|
|
|
libsamplerate.so:${PORTSDIR}/audio/libsamplerate
|
2013-06-17 11:23:52 +02:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/lib/libdvdcss.so:${PORTSDIR}/multimedia/libdvdcss
|
2008-12-18 00:44:02 +01:00
|
|
|
|
2014-02-14 21:00:13 +01:00
|
|
|
USES= gmake pkgconfig iconv
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libtool aclocal
|
2010-12-08 23:26:19 +01:00
|
|
|
LIBTOOLFILES= configure
|
2012-08-23 05:47:15 +02:00
|
|
|
USE_PYTHON_BUILD= yes
|
2012-08-23 18:37:51 +02:00
|
|
|
WANT_GNOME= yes
|
2008-12-18 00:44:02 +01:00
|
|
|
|
2012-08-21 10:27:01 +02:00
|
|
|
WRKSRC= ${WRKDIR}/HandBrake-${PORTVERSION}
|
2012-08-23 05:47:15 +02:00
|
|
|
PLIST_FILES= bin/HandBrakeCLI
|
|
|
|
|
2012-08-23 18:37:51 +02:00
|
|
|
CONFIGURE_ARGS= --force
|
2012-08-23 05:47:15 +02:00
|
|
|
CONFIGURE_TARGET= build
|
2004-11-22 21:26:08 +01:00
|
|
|
|
2012-08-23 05:47:15 +02:00
|
|
|
BUILD_WRKSRC= ${WRKSRC}/build
|
|
|
|
MAKEFILE= GNUmakefile
|
|
|
|
ALL_TARGET= #
|
2013-02-22 16:31:23 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2008-12-22 08:51:58 +01:00
|
|
|
|
2012-08-23 05:47:15 +02:00
|
|
|
NOPRECIOUSMAKEVARS= yes # for ffmpeg and x264
|
2007-12-13 17:50:15 +01:00
|
|
|
|
2012-08-24 09:25:16 +02:00
|
|
|
OPTIONS_DEFINE= X11
|
|
|
|
X11_DESC= Build GTK+2 based GUI program
|
|
|
|
OPTIONS_DEFAULT= X11
|
2012-08-23 18:37:51 +02:00
|
|
|
|
2007-12-13 17:50:15 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-08-23 18:37:51 +02:00
|
|
|
# Recent GNU binutils are required to handle inline SSSE3 asm (in x264), and
|
|
|
|
# to support --exclude-libs option for ld(1) when building GUI program
|
2012-08-24 09:25:16 +02:00
|
|
|
.if ${PORT_OPTIONS:MX11} || ${OSVERSION} < 802509 || \
|
2012-08-23 18:37:51 +02:00
|
|
|
${OSVERSION} >= 900000 && ${OSVERSION} < 900033
|
2013-02-22 14:43:40 +01:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/ld:${PORTSDIR}/devel/binutils
|
2012-08-23 05:47:15 +02:00
|
|
|
CONFIGURE_ENV= COMPILER_PATH=${LOCALBASE}/bin
|
|
|
|
MAKE_ENV= COMPILER_PATH=${LOCALBASE}/bin
|
2007-12-13 17:50:15 +01:00
|
|
|
.endif
|
|
|
|
|
2012-08-24 09:25:16 +02:00
|
|
|
.if ${PORT_OPTIONS:MX11}
|
2012-08-23 18:37:51 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-gtk-update-checks --disable-gst
|
2013-08-14 13:58:53 +02:00
|
|
|
LIB_DEPENDS+= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
|
|
|
|
libnotify.so:${PORTSDIR}/devel/libnotify
|
|
|
|
USE_GNOME= gtk20
|
2012-08-23 18:37:51 +02:00
|
|
|
PLIST_FILES+= bin/HandBrake
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-gtk
|
|
|
|
.endif
|
|
|
|
|
2014-02-14 21:00:13 +01:00
|
|
|
# Enforce linking to the system c++ standard lib
|
|
|
|
.if ${OSVERSION} >= 1000054
|
|
|
|
LDFLAGS+= -lc++
|
|
|
|
.else
|
|
|
|
LDFLAGS+= -lstdc++
|
|
|
|
.endif
|
|
|
|
|
2008-12-22 08:51:58 +01:00
|
|
|
run-autotools-aclocal:
|
2012-08-23 05:47:15 +02:00
|
|
|
@${DO_NADA}
|
|
|
|
|
|
|
|
# HandBrake tries to fetch its dependencies during build phase, which is not
|
|
|
|
# considered good in FreeBSD. Instead, we will prepare everything manually.
|
|
|
|
post-extract: .SILENT
|
|
|
|
# Unversioned directories can be copied in a loop
|
2014-02-14 21:00:13 +01:00
|
|
|
.for d in a52dec lame libdca libdvdnav libdvdread mpeg2dec x264
|
2012-08-23 05:47:15 +02:00
|
|
|
${MKDIR} ${BUILD_WRKSRC}/contrib/${d}
|
|
|
|
${MV} ${WRKDIR}/${d} ${BUILD_WRKSRC}/contrib/${d}
|
|
|
|
.endfor
|
|
|
|
# Others had to be processed one by one due to irregular (versioned) names
|
2014-02-14 21:00:13 +01:00
|
|
|
cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 ffmpeg libbluray libmkv mp4v2
|
2012-08-23 05:47:15 +02:00
|
|
|
${MV} ${WRKDIR}/faac-1.28 ${BUILD_WRKSRC}/contrib/faac
|
|
|
|
${MV} ${WRKDIR}/faad2-2.7 ${BUILD_WRKSRC}/contrib/faad2
|
2014-02-14 21:00:13 +01:00
|
|
|
${MV} ${WRKDIR}/libav-v9.6 ${BUILD_WRKSRC}/contrib/ffmpeg/libav-v9.6
|
|
|
|
${MV} ${WRKDIR}/libbluray-0.2.3 ${BUILD_WRKSRC}/contrib/libbluray
|
2012-08-23 05:47:15 +02:00
|
|
|
${MV} ${WRKDIR}/libmkv-0.6.5-0-g82075ae ${BUILD_WRKSRC}/contrib/libmkv
|
|
|
|
${MV} ${WRKDIR}/mp4v2-trunk-r355 ${BUILD_WRKSRC}/contrib/mp4v2
|
2013-08-14 13:58:53 +02:00
|
|
|
# Avoid conflict with `print/harfbuzz' (also installs "hb.h")
|
|
|
|
${MV} ${WRKSRC}/libhb/hb.h ${WRKSRC}/libhb/hb-of-handbrake.h
|
2014-02-14 21:00:13 +01:00
|
|
|
# Mark all bundled dependencies as extracted
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/a52dec/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/faac/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/faad2/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/ffmpeg/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/lame/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/libbluray/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/libdca/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdnav/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdread/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/libmkv/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/mp4v2/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/mpeg2dec/.stamp.extract
|
|
|
|
${TOUCH} ${BUILD_WRKSRC}/contrib/x264/.stamp.extract
|
2006-05-07 19:33:05 +02:00
|
|
|
|
2006-07-02 17:47:55 +02:00
|
|
|
post-patch:
|
2012-08-23 05:47:15 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|machine/soundcard|sys/soundcard|' \
|
|
|
|
${BUILD_WRKSRC}/contrib/a52dec/a52dec/libao/audio_out_oss.c
|
|
|
|
@${REINPLACE_CMD} -e 's|-ldl|-lc| ; s|\[dl\]|[c]|' \
|
2014-02-14 21:00:13 +01:00
|
|
|
${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.2.3/configure.ac
|
2012-08-23 05:47:15 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/libhb/fifo.c
|
2013-06-17 11:23:52 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|libdvdcss\.so\.2|libdvdcss.so|' \
|
|
|
|
${BUILD_WRKSRC}/contrib/libdvdread/libdvdread/src/dvd_input.c
|
2013-08-14 13:58:53 +02:00
|
|
|
@${FIND} ${WRKSRC} -type f -name '*.[ch]' -print0 | ${XARGS} -0 \
|
|
|
|
${REINPLACE_CMD} -e '/#include/s|hb\.h|hb-of-handbrake.h|'
|
2014-02-14 21:00:13 +01:00
|
|
|
@${REINPLACE_CMD} -e "s|ToolProbe( 'GCC.gcc', 'gcc',|ToolProbe( 'GCC.gcc', '${CC}',|" \
|
|
|
|
${WRKSRC}/make/configure.py
|
|
|
|
@${REINPLACE_CMD} -e 's|avcodec avformat avutil avresample|avformat avcodec avresample avutil|' \
|
|
|
|
${WRKSRC}/libhb/module.defs ${WRKSRC}/test/module.defs
|
|
|
|
${TR} -d '\r' < ${WRKSRC}/contrib/mpeg2dec/A02-gwluserdata.patch > ${WRKDIR}/A02-gwluserdata.patch
|
|
|
|
${MV} ${WRKDIR}/A02-gwluserdata.patch ${WRKSRC}/contrib/mpeg2dec/
|
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e 's|%%REP_CC%%|${CC}|g' \
|
|
|
|
-e 's|%%REP_CXX%%|${CXX}|g' \
|
2014-02-16 23:41:10 +01:00
|
|
|
-e 's|%%REP_I%%|-I./contrib/include -I${LOCALBASE}/include|g' \
|
2014-02-14 21:00:13 +01:00
|
|
|
-e 's|%%REP_L%%|-L${LOCALBASE}/lib|g' \
|
2014-02-16 23:41:10 +01:00
|
|
|
-e 's|%%REP_ARCHS%%|${CPUTYPE}|g' \
|
2014-02-14 21:00:13 +01:00
|
|
|
-e 's|%%REP_ICONV%%|${ICONV_LIB:S/-l//}|g' \
|
|
|
|
${WRKSRC}/custom.defs
|
2004-11-22 21:26:08 +01:00
|
|
|
|
|
|
|
do-install:
|
2014-02-14 21:00:13 +01:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/HandBrakeCLI ${STAGEDIR}${PREFIX}/bin
|
2012-08-24 09:25:16 +02:00
|
|
|
.if ${PORT_OPTIONS:MX11}
|
2014-02-14 21:00:13 +01:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gtk/src/ghb ${STAGEDIR}${PREFIX}/bin/HandBrake
|
2012-08-23 18:37:51 +02:00
|
|
|
.endif
|
2004-11-22 21:26:08 +01:00
|
|
|
|
2007-12-13 17:50:15 +01:00
|
|
|
.include <bsd.port.post.mk>
|