On Mon, Nov 03, 2014 at 08:38:18PM +0100, Landry Breuil wrote:
> On Sun, Nov 02, 2014 at 05:57:06AM -0500, Brad Smith wrote:
> > On 02/11/14 5:31 AM, Stuart Henderson wrote:
> > >On 2014/11/02 05:18, Brad Smith wrote:
> > >>On 02/11/14 5:08 AM, Stuart Henderson wrote:
> > >>>On 2014/11/02 04:21, Brad Smith wrote:
> > >>>>Here is an update to x265 1.4.
> > >>>>
> > >>>>OK?
> > >>>
> > >>>Personally I'd do something like this,
> > >>>
> > >>>DISTNAME= x265-1.4
> > >>>DISTFILES= ${DISTNAME}{1.4}${EXTRACT_SUFX}
> > >>>(and get rid of DIST_SUBDIR/regen distinfo)
> > >>>
> > >>>even if only so that "cd /usr/ports/*/x265" works without picking up the
> > >>>directory in distfiles. But I'm OK either way.
> > >>
> > >>I don't like the naming either but I don't want to have to take
> > >>the upstream dist file and rename it and host it elsewhere. What
> > >>is the point of the {1.4} there in DISTFILES? I'll speak to upstream
> > >>and see if I can get them to prefix the file name with x265-.
> > >
> > >That uses ftp -o to rename the output file, so it fetches from 1.4.tar.bz2
> > >and writes to /usr/ports/distfiles/x265-1.4.tar.bz2. Alternatively use a
> > >variable and do e.g.
> > >
> > >V= 1.4
> > >DISTNAME= x265-$V
> > >DISTFILES= ${DISTNAME}{$V}${EXTRACT_SUFX}
> >
> > Oh, ok. Then I'll use that as a workaround. Hopefully upstream will
> > heed my bug report asking for a rename of the distfile.
> >
> > >>>> BROKEN-mips64el = undefined reference to
> > >>>> `__sync_val_compare_and_swap_8'
> > >>>> BROKEN-powerpc = undefined reference to
> > >>>> `__sync_val_compare_and_swap_8'
> > >>>
> > >>>considering this is a dependency of ffmpeg: ouch
> > >>
> > >>Ya, the whole atomics situation is pretty bad for some of these archs.
> > >>There are quite a few ports broken due to this and it isn't going to
> > >>get any better over time.
> > >
> > >Since this blocks most audio/video players and a number of other things
> > >(minidlna, motion, asterisk) which do make sense on at least ppc/loongson,
> > >what do you think about making the dependency in ffmpeg conditional by
> > >arch?
> >
> > I'll definitely consider it. I'll speak to the authors and see if there
> > are any other options before doing that though.
>
> You'd better do smth quick, since it's already causing issues. Last ppc pkg
> snap
> uploaded to the mirrors doesnt have ffmpeg/mplayer/mpd.
And here's a quickly hacked diff, bumped REVISION for safety since arg
order is shuffled on archs that have x265 - ive restricted it to
alpha/amd64/i386/sparc64, since only those archs have an x265 package so
far.
Currently building on ppc and amd64, if it packages i'll commit that to
fix that sucky situation.
Landry
Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
retrieving revision 1.108
diff -u -r1.108 Makefile
--- Makefile 23 Oct 2014 07:41:45 -0000 1.108
+++ Makefile 4 Nov 2014 08:44:14 -0000
@@ -5,7 +5,7 @@
V= 20141010
DISTNAME= ffmpeg-git-${V}
PKGNAME= ffmpeg-${V}
-REVISION= 0
+REVISION= 1
CATEGORIES= graphics multimedia
MASTER_SITES= http://comstyle.com/source/
EXTRACT_SUFX= .tar.xz
@@ -30,7 +30,7 @@
WANTLIB= SDL X11 Xext Xfixes Xv bz2 c crypto gsm m mp3lame opus \
pthread schroedinger-1.0>=2 sndio speex ssl theoradec \
- theoraenc vorbis vorbisenc vpx>=5 x264>=8 x265 xvidcore \
+ theoraenc vorbis vorbisenc vpx>=5 x264>=8 xvidcore \
z
MODULES= lang/clang
@@ -53,11 +53,9 @@
multimedia/libvpx>=1.3.0 \
multimedia/schroedinger>=1.0.10 \
multimedia/x264>=20111027 \
- multimedia/x265 \
multimedia/xvidcore
# inter-library dependencies for the current configuration
-LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lgsm -lmp3lame -lopus
-lschroedinger-1.0 -lspeex -ltheoradec -ltheoraenc -lvorbis -lvorbisenc -lvpx
-lx264 -lx265 -lxvidcore -lz -pthread
LIBavdevice_EXTRALIBS=-L${X11BASE}/lib -lX11 -lXext -lXfixes -lXv -lsndio
LIBavfilter_EXTRALIBS=
LIBavformat_EXTRALIBS=-L${LOCALBASE}/lib -lbz2 -lssl -lcrypto -pthread
@@ -77,6 +75,18 @@
FFMPEG_ARCH= ${MACHINE_ARCH}
.endif
+# x265 only builds on archs with working builtin atomics
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH}
== "sparc64" || ${MACHINE_ARCH} == "alpha"
+LIB_DEPENDS += multimedia/x265
+WANTLIB += x265
+CONFIGURE_ARGS += --enable-libx265
+CONFIGURE_ENV += LIBavcodec_REQUIRES="libavutil libswresample opus
schroedinger-1.0 speex theoraenc vpx x264 x265"
+LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lgsm -lmp3lame -lopus
-lschroedinger-1.0 -lspeex -ltheoradec -ltheoraenc -lvorbis -lvorbisenc -lvpx
-lx264 -lx265 -lxvidcore -lz -pthread
+.else
+CONFIGURE_ENV += LIBavcodec_REQUIRES="libavutil libswresample opus
schroedinger-1.0 speex theoraenc vpx x264"
+LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lgsm -lmp3lame -lopus
-lschroedinger-1.0 -lspeex -ltheoradec -ltheoraenc -lvorbis -lvorbisenc -lvpx
-lx264 -lxvidcore -lz -pthread
+.endif
+
OPTFLAGS= ${CFLAGS}
# until the system headers are fixed properly.
@@ -114,7 +124,6 @@
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
- --enable-libx265 \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
@@ -142,7 +151,6 @@
LIBpostproc_LINKFLAGS="" \
LIBswresample_LINKFLAGS="" \
LIBswscale_LINKFLAGS="" \
- LIBavcodec_REQUIRES="libavutil libswresample opus
schroedinger-1.0 speex theoraenc vpx x264 x265" \
LIBavdevice_REQUIRES="libavcodec libavfilter libavformat
libavutil libpostproc libswresample libswscale" \
LIBavfilter_REQUIRES="libavcodec libavformat libavresample
libavutil libpostproc libswresample libswscale" \
LIBavformat_REQUIRES="libavcodec libavutil libswresample" \