[gnome-build-meta/abderrahim/strip-rules: 2/2] project.conf: use strip-rules from freedesktop-sdk



commit 0881494ba71c4183659a71289e59c9085cfd6d52
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Fri Apr 17 14:34:21 2020 +0100

    project.conf: use strip-rules from freedesktop-sdk
    
    Part of #197, Fixes #217

 elements/core-deps/boost.bst | 11 +++++++++--
 elements/sdk/WebKitGTK.bst   |  6 ++++++
 project.conf                 | 46 ++------------------------------------------
 3 files changed, 17 insertions(+), 46 deletions(-)
---
diff --git a/elements/core-deps/boost.bst b/elements/core-deps/boost.bst
index 112ac5d5..89d46915 100644
--- a/elements/core-deps/boost.bst
+++ b/elements/core-deps/boost.bst
@@ -1,9 +1,16 @@
 kind: manual
+
 sources:
 - kind: tar
   url: downloads.sourceforge.net:boost/boost/1.73.0/boost_1_73_0.tar.bz2
+
 depends:
 - freedesktop-sdk.bst:bootstrap-import.bst
+
+variables:
+  optimize-debug: 'false'
+  local_flags: -fcommon
+
 config:
   configure-commands:
   - ./bootstrap.sh --includedir=%{install-root}%{includedir} --libdir=%{install-root}%{libdir}
@@ -11,9 +18,9 @@ config:
   - ./b2 -q -j${JOBS} --build-dir=_build link=shared stage
   install-commands:
   - ./b2 -q --build-dir=_build link=shared install
+
 environment:
   JOBS: '%{max-jobs}'
+
 environment-nocache:
 - JOBS
-variables:
-  local_flags: -fcommon
\ No newline at end of file
diff --git a/elements/sdk/WebKitGTK.bst b/elements/sdk/WebKitGTK.bst
index cfd29082..91c9f430 100644
--- a/elements/sdk/WebKitGTK.bst
+++ b/elements/sdk/WebKitGTK.bst
@@ -1,4 +1,5 @@
 kind: cmake
+
 sources:
 - kind: tar
   url: webkitgtk_org:webkitgtk-2.29.1.tar.xz
@@ -10,15 +11,18 @@ sources:
   path: files/webkitgtk/toolchain.i686
 - kind: local
   path: files/webkitgtk/toolchain.arm
+
 build-depends:
 - freedesktop-sdk.bst:components/gperf.bst
 - freedesktop-sdk.bst:components/perl.bst
 - freedesktop-sdk.bst:components/ruby.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-cmake.bst
+
 runtime-depends:
 - sdk/gst-libav.bst
 - sdk/gst-plugins-bad.bst
 - sdk/gst-plugins-good.bst
+
 depends:
 - sdk/at-spi2-core.bst
 - sdk/enchant-2.bst
@@ -43,7 +47,9 @@ depends:
 - freedesktop-sdk.bst:components/wayland.bst
 - freedesktop-sdk.bst:components/xorg-lib-xt.bst
 - freedesktop-sdk.bst:bootstrap-import.bst
+
 variables:
+  optimize-debug: 'false'
   webkitgtk_toolchain: ''
   webkitgtk_arch_options: ''
   (?):
diff --git a/project.conf b/project.conf
index 985212b0..042d08d7 100644
--- a/project.conf
+++ b/project.conf
@@ -232,50 +232,8 @@ variables:
   - arch == "arm":
       abi: "gnueabihf"
 
-  # This should eventually done with buildstream includes
-  strip-binaries: |
-    touch source-files
-    find "%{install-root}" -type f \
-      '(' -perm -111 -o -name '*.so*' \
-          -o -name '*.cmxs' -o -name '*.node' ')' \
-          -print0 | while read -r -d $'\0' file; do
-      read -n4 hdr <"${file}" || continue # check for elf header
-      if [ "$hdr" != "$(printf \\x7fELF)" ]; then
-        continue
-      fi
-      if objdump -j .gnu_debuglink -s "${file}" &>/dev/null; then
-        continue
-      fi
-      case "${file}" in
-        "%{install-root}%{debugdir}/"*)
-          continue
-          ;;
-        *)
-          ;;
-      esac
-      realpath="$(realpath -s --relative-to="%{install-root}" "${file}")"
-      debugfile="%{install-root}%{debugdir}/${realpath}.debug"
-      mkdir -p "$(dirname "$debugfile")"
-      debugedit -i --list-file=source-files.part --base-dir="%{build-root}" 
--dest-dir="%{debugdir}/source/%{element-name}" "${file}"
-      cat source-files.part >>source-files
-      objcopy %{objcopy-extract-args} "${file}" "$debugfile"
-      chmod 644 "$debugfile"
-      mode="$(stat -c 0%a "${file}")"
-      [ -w "${file}" ] || chmod +w "${file}"
-      strip %{strip-args} "${file}"
-      objcopy %{objcopy-link-args} "$debugfile" "${file}"
-      chmod "${mode}" "${file}"
-    done
-    sort -zu  <source-files | while read -r -d $'\0' source; do
-      dst="%{install-root}%{debugdir}/source/%{element-name}/${source}"
-      src="%{build-root}/${source}"
-      if [ -d "${src}" ]; then
-        install -m0755 -d "${dst}"
-        continue
-      fi
-      [ -f "${src}" ] || continue
-      install -m0644 -D "${src}" "${dst}"
-    done
+  (@):
+  - freedesktop-sdk.bst:include/strip.yml
 
 plugins:
 - origin: pip


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]