[vlc-commits] contrib: fix pkg_static not working with absolute pathes
Steve Lhomme
git at videolan.org
Tue May 21 14:14:50 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 21 09:11:10 2019 +0200| [c17e4583be3080ec108aee4510c01cdb99c89c21] | committer: Steve Lhomme
contrib: fix pkg_static not working with absolute pathes
The SRC folder being relative to top contrib directory when the build starts,
if we move to other directories we need to compensate for this change.
TOPSRC_BUILT is introduced to match the contrib dir from a contrib target
folder. It will work for relative pathes and absolute pathes (where it will be
the same a TOPSRC).
pkg_static_built should be used when patching pkg-config files during the build
phase.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c17e4583be3080ec108aee4510c01cdb99c89c21
---
contrib/bootstrap | 1 +
contrib/src/main.mak | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index d7f92c30e3..cf9fd1d85d 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -382,6 +382,7 @@ esac
# Results output
#
echo TOPSRC = .. >> Makefile
+echo TOPSRC_BUILT = .. >> Makefile
echo TOPDST = . >> Makefile
echo include $\(TOPSRC\)/src/main.mak >> Makefile
echo "Bootstrap completed."
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 10954804d8..714d5d55ac 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -6,6 +6,7 @@
all: install
SRC := $(TOPSRC)/src
+SRC_BUILT := $(TOPSRC_BUILT)/src
TARBALLS := $(TOPSRC)/tarballs
VLC_TOOLS ?= $(TOPSRC)/../extras/tools/build
@@ -360,7 +361,7 @@ UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.zip,$^), && unzip $(f))
UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
-pkg_static = (cd $(UNPACK_DIR) && $(SRC)/pkg-static.sh $(1))
+pkg_static = (cd $(UNPACK_DIR) && $(SRC_BUILT)/pkg-static.sh $(1))
MOVE = mv $(UNPACK_DIR) $@ && touch $@
AUTOMAKE_DATA_DIRS=$(foreach n,$(foreach n,$(subst :, ,$(shell echo $$PATH)),$(abspath $(n)/../share)),$(wildcard $(n)/automake*))
More information about the vlc-commits
mailing list