Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
configure/Makefile.ffmpeg: fix the libx265 static build
  • Loading branch information
perexg committed Sep 25, 2015
1 parent a8d97b9 commit 484335a
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .doozer.json
Expand Up @@ -43,7 +43,7 @@
],

"buildcmd": [
"./configure --disable-dvbscan --enable-libffmpeg_static --disable-libffmpeg_static_x264 --enable-hdhomerun_static",
"./configure --disable-dvbscan --enable-libffmpeg_static --disable-libx264_static --enable-hdhomerun_static",
"make -j ${PARALLEL}"
]
},
Expand Down Expand Up @@ -90,7 +90,7 @@
],

"buildcmd": [
"./configure --disable-dvbscan --enable-libffmpeg_static --disable-libffmpeg_static_x264 --enable-hdhomerun_static",
"./configure --disable-dvbscan --enable-libffmpeg_static --disable-libx264_static --enable-hdhomerun_static",
"make -j ${PARALLEL}"
]
}
Expand Down
5 changes: 3 additions & 2 deletions Makefile.ffmpeg
Expand Up @@ -52,7 +52,8 @@ export PATH := $(LIBAVDIR)/build/ffmpeg/bin:$(PATH)
ECFLAGS = -I$(LIBAVDIR)/build/ffmpeg/include
ELIBS = -L$(LIBAVDIR)/build/ffmpeg/lib -ldl

CONFIGURE = PKG_CONFIG=/tmp/nobin/pkg-config ./configure
CONFIGURE = TVHEADEND_LIBAV_BUILD=$(LIBAVDIR)/ffmpeg \
PKG_CONFIG=$(ROOTDIR)/support/pkg-config.ffmpeg ./configure

FFMPEG = ffmpeg-2.8
FFMPEG_TB = $(FFMPEG).tar.bz2
Expand Down Expand Up @@ -313,7 +314,7 @@ $(LIBAVDIR)/$(FFMPEG)/.tvh_build: \
--enable-gpl \
--extra-cflags="$(ECFLAGS)" \
--extra-libs="$(ELIBS)" \
--pkg-config-flags="--static" \
--pkg-config="$(ROOTDIR)/support/pkg-config.ffmpeg" \
$(foreach extlib,$(EXTLIBS),--enable-$(extlib)) \
$(foreach component,$(COMPONENTS),--enable-$(component)) \
$(foreach protocol,$(PROTOCOLS),--enable-protocol=$(protocol)) \
Expand Down
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -36,6 +36,8 @@ OPTIONS=(
"libav:auto"
"libffmpeg_static:no"
"libx264_static:yes"
"libx265:no"
"libx265_static:yes"
"inotify:auto"
"epoll:auto"
"uriparser:auto"
Expand All @@ -50,8 +52,6 @@ OPTIONS=(
"tsdebug:no"
"gtimer_check:no"
"libsystemd_daemon:no"
"libx265:no"
"libx265_static:yes"
)

#
Expand Down
60 changes: 60 additions & 0 deletions support/pkg-config.ffmpeg
@@ -0,0 +1,60 @@
#!/bin/bash

if test -z "$TVHEADEND_LIBAV_BUILD"; then
exit 1
fi
if test "$1" = "--version"; then
echo "0.28"
exit 0
fi

cmd=
brk=
while test "$brk" = ""; do
case "$1" in
--exists|--cflags|--libs)
cmd=${1:2}
shift
;;
--print-errors)
shift
;;
*)
brk=t
;;
esac
done

pkg="$1"
if test -z "$pkg"; then
exit 1
fi

case "$pkg" in
x264)
cflags_="-I$TVHEADEND_LIBAV_BUILD/include"
libs_="-L$TVHEADEND_LIBAV_BUILD/lib -lx264"
;;
x265)
cflags_="-I$TVHEADEND_LIBAV_BUILD/include"
libs_="-L$TVHEADEND_LIBAV_BUILD/lib -lx265 -lstdc++"
;;
esac

case "$cmd" in
exists)
if test -z "$cflags_"; then exit 1; fi
exit 0
;;
cflags)
if test -z "$cflags_"; then exit 1; fi
echo $cflags_
exit 0
;;
libs)
if test -z "$libs_"; then exit 1; fi
echo $libs_
exit 0
;;
esac
exit 1

0 comments on commit 484335a

Please sign in to comment.