summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-04-16 23:47:53 +0530
committerTim-Philipp Müller <tim@centricular.com>2020-10-01 01:30:08 +0100
commit13bd8b51f5b9bfeb254ed4953592468f921063ab (patch)
tree98204b13fae38888eec16201c91e38c00739f60a
parentfa9b94adc15eef068ac97f19d643ff266d320687 (diff)
x264.recipe: Use relative paths in pkgconfig file
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/624>
-rw-r--r--recipes/x264.recipe2
-rw-r--r--recipes/x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch34
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes/x264.recipe b/recipes/x264.recipe
index 8a90740a..b3206668 100644
--- a/recipes/x264.recipe
+++ b/recipes/x264.recipe
@@ -15,6 +15,8 @@ class Recipe(recipe.Recipe):
tarball_dirname= 'x264-snapshot-%(version)s-stable'
tarball_checksum = 'd4d4fb146fbe64efb0f02d149118a0e93f575417011e4ff898a5079d548b9950'
+ patches = ['x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch']
+
files_libs = ['libx264']
files_bins = ['x264']
files_devel = ['lib/pkgconfig/x264.pc', 'include/x264.h',
diff --git a/recipes/x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch b/recipes/x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch
new file mode 100644
index 00000000..dd14b7b6
--- /dev/null
+++ b/recipes/x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch
@@ -0,0 +1,34 @@
+From 696486fbf58eb85a82947caa0af20a72e6579d7f Mon Sep 17 00:00:00 2001
+From: Cerbero Build System <cerbero@gstreamer.freedesktop.org>
+Date: Thu, 16 Apr 2020 22:27:20 +0530
+Subject: [PATCH] configure: Force pkgconfig file to have relative values
+
+We must define everything relative to `${prefix}`, so that
+pkg-config's `--define-prefix` argument works correctly.
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 3cf63e0..d0c4701 100644
+--- a/configure
++++ b/configure
+@@ -1530,13 +1530,13 @@ echo "CLI_LIBX264 = $CLI_LIBX264" >> config.mak
+ cat > x264.pc << EOF
+ prefix=$prefix
+ exec_prefix=$exec_prefix
+-libdir=$libdir
++libdir=\${prefix}/lib
+ includedir=$includedir
+
+ Name: x264
+ Description: H.264 (MPEG4 AVC) encoder library
+ Version: $(grep POINTVER < x264_config.h | sed -e 's/.* "//; s/".*//')
+-Libs: -L$libdir -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
++Libs: -L\${libdir} -lx264 $([ "$shared" = "yes" ] || echo $libpthread $libm $libdl)
+ Libs.private: $([ "$shared" = "yes" ] && echo $libpthread $libm $libdl)
+ Cflags: -I$includedir
+ EOF
+--
+2.26.1.windows.1
+