Commit 4a210d29 authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-16.0' into v1-pie

parents beed4824 ea15be6e
...@@ -279,6 +279,10 @@ function write_product_copy_files() { ...@@ -279,6 +279,10 @@ function write_product_copy_files() {
local OUTTARGET=$(truncate_file $TARGET) local OUTTARGET=$(truncate_file $TARGET)
printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_VENDOR)/%s%s\n' \ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_VENDOR)/%s%s\n' \
"$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
elif prefix_match_file "product/" $TARGET ; then
local OUTTARGET=$(truncate_file $TARGET)
printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_PRODUCT)/%s%s\n' \
"$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
else else
printf ' %s/proprietary/%s:system/%s%s\n' \ printf ' %s/proprietary/%s:system/%s%s\n' \
"$OUTDIR" "$TARGET" "$TARGET" "$LINEEND" >> "$PRODUCTMK" "$OUTDIR" "$TARGET" "$TARGET" "$LINEEND" >> "$PRODUCTMK"
...@@ -295,7 +299,7 @@ function write_product_copy_files() { ...@@ -295,7 +299,7 @@ function write_product_copy_files() {
# write_packages: # write_packages:
# #
# $1: The LOCAL_MODULE_CLASS for the given module list # $1: The LOCAL_MODULE_CLASS for the given module list
# $2: "true" if this package is part of the vendor/ path # $2: /product or /vendor partition
# $3: type-specific extra flags # $3: type-specific extra flags
# $4: Name of the array holding the target list # $4: Name of the array holding the target list
# #
...@@ -306,7 +310,7 @@ function write_product_copy_files() { ...@@ -306,7 +310,7 @@ function write_product_copy_files() {
function write_packages() { function write_packages() {
local CLASS="$1" local CLASS="$1"
local VENDOR_PKG="$2" local PARTITION="$2"
local EXTRA="$3" local EXTRA="$3"
# Yes, this is a horrible hack - we create a new array using indirection # Yes, this is a horrible hack - we create a new array using indirection
...@@ -333,8 +337,10 @@ function write_packages() { ...@@ -333,8 +337,10 @@ function write_packages() {
PACKAGE_LIST+=("$PKGNAME") PACKAGE_LIST+=("$PKGNAME")
SRC="proprietary" SRC="proprietary"
if [ "$VENDOR_PKG" = "true" ]; then if [ "$PARTITION" = "vendor" ]; then
SRC+="/vendor" SRC+="/vendor"
elif [ "$PARTITION" = "product" ]; then
SRC+="/product"
fi fi
printf 'include $(CLEAR_VARS)\n' printf 'include $(CLEAR_VARS)\n'
...@@ -412,8 +418,10 @@ function write_packages() { ...@@ -412,8 +418,10 @@ function write_packages() {
if [ "$EXTRA" = "priv-app" ]; then if [ "$EXTRA" = "priv-app" ]; then
printf 'LOCAL_PRIVILEGED_MODULE := true\n' printf 'LOCAL_PRIVILEGED_MODULE := true\n'
fi fi
if [ "$VENDOR_PKG" = "true" ]; then if [ "$PARTITION" = "vendor" ]; then
printf 'LOCAL_VENDOR_MODULE := true\n' printf 'LOCAL_VENDOR_MODULE := true\n'
elif [ "$PARTITION" = "product" ]; then
printf 'LOCAL_PRODUCT_MODULE := true\n'
fi fi
printf 'include $(BUILD_PREBUILT)\n\n' printf 'include $(BUILD_PREBUILT)\n\n'
done done
...@@ -445,13 +453,13 @@ function write_product_packages() { ...@@ -445,13 +453,13 @@ function write_product_packages() {
local LIB64=( $(comm -23 <(printf '%s\n' "${T_LIB64[@]}") <(printf '%s\n' "${MULTILIBS[@]}")) ) local LIB64=( $(comm -23 <(printf '%s\n' "${T_LIB64[@]}") <(printf '%s\n' "${MULTILIBS[@]}")) )
if [ "${#MULTILIBS[@]}" -gt "0" ]; then if [ "${#MULTILIBS[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "false" "both" "MULTILIBS" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "" "both" "MULTILIBS" >> "$ANDROIDMK"
fi fi
if [ "${#LIB32[@]}" -gt "0" ]; then if [ "${#LIB32[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "false" "32" "LIB32" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "" "32" "LIB32" >> "$ANDROIDMK"
fi fi
if [ "${#LIB64[@]}" -gt "0" ]; then if [ "${#LIB64[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "false" "64" "LIB64" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "" "64" "LIB64" >> "$ANDROIDMK"
fi fi
local T_V_LIB32=( $(prefix_match "vendor/lib/") ) local T_V_LIB32=( $(prefix_match "vendor/lib/") )
...@@ -461,65 +469,101 @@ function write_product_packages() { ...@@ -461,65 +469,101 @@ function write_product_packages() {
local V_LIB64=( $(comm -23 <(printf '%s\n' "${T_V_LIB64[@]}") <(printf '%s\n' "${V_MULTILIBS[@]}")) ) local V_LIB64=( $(comm -23 <(printf '%s\n' "${T_V_LIB64[@]}") <(printf '%s\n' "${V_MULTILIBS[@]}")) )
if [ "${#V_MULTILIBS[@]}" -gt "0" ]; then if [ "${#V_MULTILIBS[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "true" "both" "V_MULTILIBS" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "vendor" "both" "V_MULTILIBS" >> "$ANDROIDMK"
fi fi
if [ "${#V_LIB32[@]}" -gt "0" ]; then if [ "${#V_LIB32[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "true" "32" "V_LIB32" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "vendor" "32" "V_LIB32" >> "$ANDROIDMK"
fi fi
if [ "${#V_LIB64[@]}" -gt "0" ]; then if [ "${#V_LIB64[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "true" "64" "V_LIB64" >> "$ANDROIDMK" write_packages "SHARED_LIBRARIES" "vendor" "64" "V_LIB64" >> "$ANDROIDMK"
fi
local T_P_LIB32=( $(prefix_match "product/lib/") )
local T_P_LIB64=( $(prefix_match "product/lib64/") )
local P_MULTILIBS=( $(comm -12 <(printf '%s\n' "${T_P_LIB32[@]}") <(printf '%s\n' "${T_P_LIB64[@]}")) )
local P_LIB32=( $(comm -23 <(printf '%s\n' "${T_P_LIB32[@]}") <(printf '%s\n' "${P_MULTILIBS[@]}")) )
local P_LIB64=( $(comm -23 <(printf '%s\n' "${T_P_LIB64[@]}") <(printf '%s\n' "${P_MULTILIBS[@]}")) )
if [ "${#P_MULTILIBS[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "product" "both" "P_MULTILIBS" >> "$ANDROIDMK"
fi
if [ "${#P_LIB32[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "product" "32" "P_LIB32" >> "$ANDROIDMK"
fi
if [ "${#P_LIB64[@]}" -gt "0" ]; then
write_packages "SHARED_LIBRARIES" "product" "64" "P_LIB64" >> "$ANDROIDMK"
fi fi
# Apps # Apps
local APPS=( $(prefix_match "app/") ) local APPS=( $(prefix_match "app/") )
if [ "${#APPS[@]}" -gt "0" ]; then if [ "${#APPS[@]}" -gt "0" ]; then
write_packages "APPS" "false" "" "APPS" >> "$ANDROIDMK" write_packages "APPS" "" "" "APPS" >> "$ANDROIDMK"
fi fi
local PRIV_APPS=( $(prefix_match "priv-app/") ) local PRIV_APPS=( $(prefix_match "priv-app/") )
if [ "${#PRIV_APPS[@]}" -gt "0" ]; then if [ "${#PRIV_APPS[@]}" -gt "0" ]; then
write_packages "APPS" "false" "priv-app" "PRIV_APPS" >> "$ANDROIDMK" write_packages "APPS" "" "priv-app" "PRIV_APPS" >> "$ANDROIDMK"
fi fi
local V_APPS=( $(prefix_match "vendor/app/") ) local V_APPS=( $(prefix_match "vendor/app/") )
if [ "${#V_APPS[@]}" -gt "0" ]; then if [ "${#V_APPS[@]}" -gt "0" ]; then
write_packages "APPS" "true" "" "V_APPS" >> "$ANDROIDMK" write_packages "APPS" "vendor" "" "V_APPS" >> "$ANDROIDMK"
fi fi
local V_PRIV_APPS=( $(prefix_match "vendor/priv-app/") ) local V_PRIV_APPS=( $(prefix_match "vendor/priv-app/") )
if [ "${#V_PRIV_APPS[@]}" -gt "0" ]; then if [ "${#V_PRIV_APPS[@]}" -gt "0" ]; then
write_packages "APPS" "true" "priv-app" "V_PRIV_APPS" >> "$ANDROIDMK" write_packages "APPS" "vendor" "priv-app" "V_PRIV_APPS" >> "$ANDROIDMK"
fi
local P_APPS=( $(prefix_match "product/app/") )
if [ "${#P_APPS[@]}" -gt "0" ]; then
write_packages "APPS" "product" "" "P_APPS" >> "$ANDROIDMK"
fi
local P_PRIV_APPS=( $(prefix_match "product/priv-app/") )
if [ "${#P_PRIV_APPS[@]}" -gt "0" ]; then
write_packages "APPS" "product" "priv-app" "P_PRIV_APPS" >> "$ANDROIDMK"
fi fi
# Framework # Framework
local FRAMEWORK=( $(prefix_match "framework/") ) local FRAMEWORK=( $(prefix_match "framework/") )
if [ "${#FRAMEWORK[@]}" -gt "0" ]; then if [ "${#FRAMEWORK[@]}" -gt "0" ]; then
write_packages "JAVA_LIBRARIES" "false" "" "FRAMEWORK" >> "$ANDROIDMK" write_packages "JAVA_LIBRARIES" "" "" "FRAMEWORK" >> "$ANDROIDMK"
fi fi
local V_FRAMEWORK=( $(prefix_match "vendor/framework/") ) local V_FRAMEWORK=( $(prefix_match "vendor/framework/") )
if [ "${#V_FRAMEWORK[@]}" -gt "0" ]; then if [ "${#V_FRAMEWORK[@]}" -gt "0" ]; then
write_packages "JAVA_LIBRARIES" "true" "" "V_FRAMEWORK" >> "$ANDROIDMK" write_packages "JAVA_LIBRARIES" "vendor" "" "V_FRAMEWORK" >> "$ANDROIDMK"
fi
local P_FRAMEWORK=( $(prefix_match "product/framework/") )
if [ "${#P_FRAMEWORK[@]}" -gt "0" ]; then
write_packages "JAVA_LIBRARIES" "product" "" "P_FRAMEWORK" >> "$ANDROIDMK"
fi fi
# Etc # Etc
local ETC=( $(prefix_match "etc/") ) local ETC=( $(prefix_match "etc/") )
if [ "${#ETC[@]}" -gt "0" ]; then if [ "${#ETC[@]}" -gt "0" ]; then
write_packages "ETC" "false" "" "ETC" >> "$ANDROIDMK" write_packages "ETC" "" "" "ETC" >> "$ANDROIDMK"
fi fi
local V_ETC=( $(prefix_match "vendor/etc/") ) local V_ETC=( $(prefix_match "vendor/etc/") )
if [ "${#V_ETC[@]}" -gt "0" ]; then if [ "${#V_ETC[@]}" -gt "0" ]; then
write_packages "ETC" "true" "" "V_ETC" >> "$ANDROIDMK" write_packages "ETC" "vendor" "" "V_ETC" >> "$ANDROIDMK"
fi
local P_ETC=( $(prefix_match "product/etc/") )
if [ "${#P_ETC[@]}" -gt "0" ]; then
write_packages "ETC" "product" "" "P_ETC" >> "$ANDROIDMK"
fi fi
# Executables # Executables
local BIN=( $(prefix_match "bin/") ) local BIN=( $(prefix_match "bin/") )
if [ "${#BIN[@]}" -gt "0" ]; then if [ "${#BIN[@]}" -gt "0" ]; then
write_packages "EXECUTABLES" "false" "" "BIN" >> "$ANDROIDMK" write_packages "EXECUTABLES" "" "" "BIN" >> "$ANDROIDMK"
fi fi
local V_BIN=( $(prefix_match "vendor/bin/") ) local V_BIN=( $(prefix_match "vendor/bin/") )
if [ "${#V_BIN[@]}" -gt "0" ]; then if [ "${#V_BIN[@]}" -gt "0" ]; then
write_packages "EXECUTABLES" "true" "" "V_BIN" >> "$ANDROIDMK" write_packages "EXECUTABLES" "vendor" "" "V_BIN" >> "$ANDROIDMK"
fi
local P_BIN=( $(prefix_match "product/bin/") )
if [ "${#P_BIN[@]}" -gt "0" ]; then
write_packages "EXECUTABLES" "product" "" "P_BIN" >> "$ANDROIDMK"
fi fi
local SBIN=( $(prefix_match "sbin/") ) local SBIN=( $(prefix_match "sbin/") )
if [ "${#SBIN[@]}" -gt "0" ]; then if [ "${#SBIN[@]}" -gt "0" ]; then
write_packages "EXECUTABLES" "false" "sbin" "SBIN" >> "$ANDROIDMK" write_packages "EXECUTABLES" "" "sbin" "SBIN" >> "$ANDROIDMK"
fi fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment