[asterisk-commits] pjproject bundled: Remove usage of tar's --strip-components... (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 27 15:05:15 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4199 )

Change subject: pjproject_bundled:  Remove usage of tar's --strip-components option
......................................................................


pjproject_bundled:  Remove usage of tar's --strip-components option

Older versions of tar don't support the --strip-components option so
instead of doing 'tar --strip-components=1 -C source', we now just
untar to the tarball's root directory (pjproject-<version>) and
rename that directory to 'source'.

Also fixed an issue where the pjproject source directory is a hard
coded absolute pathname.

ASTERISK-26510 #close
ASTERISK-22480 #close

Change-Id: I9ec92952507a91ff4e4d01e0149e09fd8e8f32b0
---
M third-party/pjproject/Makefile
M third-party/pjproject/patches/0000-remove-third-party.patch
2 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved
  Corey Farrell: Looks good to me, but someone else must approve



diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index aaf69bf..07a6c9c 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -1,6 +1,7 @@
 .PHONY: _all all _install install clean distclean echo_cflags configure
 
 include ../versions.mak
+export PJDIR := $(shell pwd -P)/source
 
 SPECIAL_TARGETS :=
 
@@ -85,9 +86,9 @@
 
 source/.unpacked: $(DOWNLOAD_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2
 	$(ECHO_PREFIX) Unpacking $<
-	- at rm -rf source >/dev/null 2>&1
-	- at mkdir source >/dev/null 2>&1
-	$(CMD_PREFIX) $(TAR) --strip-components=1 -C source -xjf $<
+	- at rm -rf source pjproject-* >/dev/null 2>&1
+	$(CMD_PREFIX) $(TAR) -xjf $<
+	@mv pjproject-$(PJPROJECT_VERSION) source
 	$(ECHO_PREFIX) Applying patches
 	$(CMD_PREFIX) ./apply_patches $(QUIET_CONFIGURE) patches source
 	- at touch source/.unpacked
diff --git a/third-party/pjproject/patches/0000-remove-third-party.patch b/third-party/pjproject/patches/0000-remove-third-party.patch
index 1317751..aca7f01 100644
--- a/third-party/pjproject/patches/0000-remove-third-party.patch
+++ b/third-party/pjproject/patches/0000-remove-third-party.patch
@@ -2,6 +2,11 @@
 index 802211c..006d887 100644
 --- a/build.mak.in
 +++ b/build.mak.in
+@@ -1,4 +1,3 @@
+-export PJDIR := @ac_pjdir@
+ include $(PJDIR)/version.mak
+ export PJ_DIR := $(PJDIR)
+ 
 @@ -9,7 +9,7 @@ export HOST_NAME := unix
  export CC_NAME := gcc
  export TARGET_NAME := @target@

-- 
To view, visit https://gerrit.asterisk.org/4199
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ec92952507a91ff4e4d01e0149e09fd8e8f32b0
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list