]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure/Makefile.ffmpeg: fix the libx265 static build
authorJaroslav Kysela <perex@perex.cz>
Fri, 25 Sep 2015 13:42:01 +0000 (15:42 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 25 Sep 2015 13:42:01 +0000 (15:42 +0200)
.doozer.json
Makefile.ffmpeg
configure
support/pkg-config.ffmpeg [new file with mode: 0755]

index 4abc9497d09ec4b905e390397ee0decbd493b779..ec69d8ab64d5bd023c812c06a5bb63b3203f5068 100644 (file)
@@ -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}"
       ]
     },
@@ -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}"
       ]
     }
index 7e0effe16d8eb338aff0986cb99e19d9e6159d59..5cfa6efe4090137086caaf18ca33da4a71090b1b 100644 (file)
@@ -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
@@ -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)) \
index 5af8446b11066df49bf9010da69f016370b2d796..18ccc66d129015e5c6d138214b293eedfbd4ca8a 100755 (executable)
--- a/configure
+++ b/configure
@@ -36,6 +36,8 @@ OPTIONS=(
   "libav:auto"
   "libffmpeg_static:no"
   "libx264_static:yes"
+  "libx265:no"
+  "libx265_static:yes"
   "inotify:auto"
   "epoll:auto"
   "uriparser:auto"
@@ -50,8 +52,6 @@ OPTIONS=(
   "tsdebug:no"
   "gtimer_check:no"
   "libsystemd_daemon:no"
-  "libx265:no"
-  "libx265_static:yes"
 )
 
 #
diff --git a/support/pkg-config.ffmpeg b/support/pkg-config.ffmpeg
new file mode 100755 (executable)
index 0000000..f3aaf7a
--- /dev/null
@@ -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