[vlc-commits] contrib: fix pkg_static not working with absolute pathes
Steve Lhomme
git at videolan.org
Tue May 21 09:12:32 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 21 09:11:10 2019 +0200| [038a9fa022d88efa4dfa56627399a1bf78dfc97f] | 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=038a9fa022d88efa4dfa56627399a1bf78dfc97f
---
contrib/bootstrap | 1 +
contrib/src/aom/rules.mak | 2 +-
contrib/src/libdsm/rules.mak | 2 +-
contrib/src/main.mak | 2 ++
contrib/src/speex/rules.mak | 2 +-
contrib/src/speexdsp/rules.mak | 2 +-
contrib/src/vpx/rules.mak | 2 +-
7 files changed, 8 insertions(+), 5 deletions(-)
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/aom/rules.mak b/contrib/src/aom/rules.mak
index 18d29f9478..b87c9cc106 100644
--- a/contrib/src/aom/rules.mak
+++ b/contrib/src/aom/rules.mak
@@ -94,6 +94,6 @@ endif
cd $< && mkdir -p aom_build
cd $</aom_build && LDFLAGS="$(AOM_LDFLAGS)" $(HOSTVARS) $(CMAKE) ../ $(AOM_CONF)
cd $< && $(MAKE) -C aom_build
- $(call pkg_static,"aom_build/aom.pc")
+ $(call pkg_static_built,"aom_build/aom.pc")
cd $</aom_build && $(MAKE) install
touch $@
diff --git a/contrib/src/libdsm/rules.mak b/contrib/src/libdsm/rules.mak
index 7fe73b8d60..c3a4d3332a 100644
--- a/contrib/src/libdsm/rules.mak
+++ b/contrib/src/libdsm/rules.mak
@@ -35,6 +35,6 @@ endif
$(RECONF)
cd $< && $(HOSTVARS_PIC) ./configure --disable-programs $(LIBDSM_CONF)
cd $< && $(MAKE)
- $(call pkg_static,"libdsm.pc")
+ $(call pkg_static_built,"libdsm.pc")
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 10954804d8..7dfd7cda74 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
@@ -361,6 +362,7 @@ UNPACK = $(RM) -R $@ \
UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
pkg_static = (cd $(UNPACK_DIR) && $(SRC)/pkg-static.sh $(1))
+pkg_static_built = (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*))
diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
index 8f4cabef68..34d8f3c7f8 100644
--- a/contrib/src/speex/rules.mak
+++ b/contrib/src/speex/rules.mak
@@ -31,6 +31,6 @@ endif
.speex: speex
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(SPEEX_CONF)
cd $< && $(MAKE)
- $(call pkg_static,"speex.pc")
+ $(call pkg_static_built,"speex.pc")
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/speexdsp/rules.mak b/contrib/src/speexdsp/rules.mak
index 7733d8a027..93c62d05ec 100644
--- a/contrib/src/speexdsp/rules.mak
+++ b/contrib/src/speexdsp/rules.mak
@@ -36,6 +36,6 @@ endif
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(SPEEXDSP_CONF)
cd $< && $(MAKE)
- $(call pkg_static,"speexdsp.pc")
+ $(call pkg_static_built,"speexdsp.pc")
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 7ce09cc2d1..4a373dd9df 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -160,6 +160,6 @@ endif
cd $< && LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS) ./configure --target=$(VPX_TARGET) \
$(VPX_CONF) --prefix=$(PREFIX)
cd $< && $(MAKE)
- $(call pkg_static,"vpx.pc")
+ $(call pkg_static_built,"vpx.pc")
cd $< && $(MAKE) install
touch $@
More information about the vlc-commits
mailing list