[vlc-devel] [PATCH 2/2] More simplifications

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 20 00:14:11 CET 2017


---
 extras/package/macosx/build-package.sh | 37 +++++++++-------------------------
 extras/package/macosx/package.mak      |  2 +-
 2 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/extras/package/macosx/build-package.sh b/extras/package/macosx/build-package.sh
index 155f98cb4a..6ea02500c0 100644
--- a/extras/package/macosx/build-package.sh
+++ b/extras/package/macosx/build-package.sh
@@ -9,31 +9,18 @@
 echo "running build-package.sh in release-makefile mode"
 
 FULL_PRODUCT_NAME="${PRODUCT}"
-TARGET_BUILD_DIR="${build_dir}"
-CONTENTS_FOLDER_PATH="${FULL_PRODUCT_NAME}/Contents/MacOS"
 VLC_BUILD_DIR="${build_dir}"
-VLC_SRC_DIR="${src_dir}"
-ACTION="build"
-RELEASE_MAKEFILE="yes"
-use_archs="no"
-main_build_dir="${VLC_BUILD_DIR}"
-
-lib="lib"
-plugins="plugins"
-share="share"
-include="include"
-target="${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}"
+
+target="${build_dir}/${FULL_PRODUCT_NAME}/Contents/MacOS"
 target_bin="${target}/bin"
-target_lib="${target}/${lib}"            # Should we consider using a different well-known folder like shared resources?
-target_plugins="${target}/${plugins}"    # Should we consider using a different well-known folder like shared resources?
-target_share="${target}/${share}"        # Should we consider using a different well-known folder like shared resources?
+target_lib="${target}/lib"            # Should we consider using a different well-known folder like shared resources?
+target_plugins="${target}/plugins"    # Should we consider using a different well-known folder like shared resources?
 linked_libs=""
 prefix=".libs"
 suffix="dylib"
-num_archs=$(echo `echo $ARCHS | wc -w`)
 
 ##########################
-# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix, destination_name, suffix)
+# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix )
 # @description Installs the specified library into the destination folder, automatically changes the references to dependencies
 # @param src_lib     source library to copy to the destination directory
 # @param dest_dir    destination directory where the src_lib should be copied to
@@ -42,21 +29,15 @@ vlc_install_object() {
     local dest_dir=${2}
     local type=${3}
     local lib_install_prefix=${4}
-    local destination_name=${5}
-    local suffix=${6}
 
     if [ $type = "library" ]; then
         local install_name="@loader_path/lib"
     elif [ $type = "module" ]; then
         local install_name="@loader_path/plugins"
     fi
-    if [ "$destination_name" != "" ]; then
-        local lib_dest="$dest_dir/$destination_name$suffix"
-        local lib_name=`basename $destination_name`
-    else
-        local lib_dest="$dest_dir/`basename $src_lib`$suffix"
-        local lib_name=`basename $src_lib`
-    fi
+
+    local lib_dest="$dest_dir/`basename $src_lib`"
+    local lib_name=`basename $src_lib`
 
     if [ "x$lib_install_prefix" != "x" ]; then
         local lib_install_prefix="$lib_install_prefix"
@@ -139,7 +120,7 @@ chmod +x ${target}/VLC
 # Build the plugins folder
 echo "Building plugins folder..."
 # Figure out what plugins are available to install
-for module in `find ${main_build_dir}/modules -path "*dylib.dSYM*" -prune -o -name "lib*_plugin.dylib" -print | sed -e s:${main_build_dir}/::` ; do
+for module in `find ${VLC_BUILD_DIR}/modules -path "*dylib.dSYM*" -prune -o -name "lib*_plugin.dylib" -print | sed -e s:${VLC_BUILD_DIR}/::` ; do
     # Check to see that the reported module actually exists
     if test -n ${module}; then
         vlc_install `dirname ${module}` `basename ${module}` ${target_plugins} "module"
diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak
index ab341685f7..1d912d7043 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -49,7 +49,7 @@ endif
 		$@/Contents/Resources/$${i}.lproj/ ; \
 	done
 	printf "APPLVLC#" >| $@/Contents/PkgInfo
-	PRODUCT="$@" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/extras/package/macosx/build-package.sh
+	PRODUCT="$@" build_dir=$(top_builddir) sh $(srcdir)/extras/package/macosx/build-package.sh
 	## Generate plugin cache
 	bin/vlc-cache-gen $@/Contents/MacOS/plugins
 	find $@ -type d -exec chmod ugo+rx '{}' \;
-- 
2.11.0



More information about the vlc-devel mailing list