From: SangYoun Kwak Date: Wed, 22 May 2024 05:57:49 +0000 (+0900) Subject: Modify script to use .pc specified in the xml X-Git-Tag: accepted/tizen/unified/20240719.080553~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ac658d8a2890a6ed0229ebbcea2e1af59590c9b;p=platform%2Fhal%2Fbackend%2Frootstrap-data-common.git Modify script to use .pc specified in the xml There are some packages that have .pc files which names are not same as its package. In this case, it is not simple to get proper pc file by reading the .xml file. To resolve this problem, pkgconfig section is added to some .xml files and parsing code is added to the script. Change-Id: I69797e1590539431696efad250fba4013301b654 Signed-off-by: SangYoun Kwak --- diff --git a/rs_resource/NativeAPI/libdlog-rs.xml b/rs_resource/NativeAPI/libdlog-rs.xml index c251801..c15e777 100644 --- a/rs_resource/NativeAPI/libdlog-rs.xml +++ b/rs_resource/NativeAPI/libdlog-rs.xml @@ -11,6 +11,11 @@ + + + dlog.pc + + /usr/include/dlog/dlog.h /usr/lib/libdlog.so* diff --git a/rs_resource/OSS/glib2-rs.xml b/rs_resource/OSS/glib2-rs.xml index e93b9b6..92e02a0 100644 --- a/rs_resource/OSS/glib2-rs.xml +++ b/rs_resource/OSS/glib2-rs.xml @@ -20,6 +20,17 @@ + + gio-2.0.pc + gio-unix-2.0.pc + glib-2.0.pc + gmodule-2.0.pc + gmodule-export-2.0.pc + gmodule-no-export-2.0.pc + gobject-2.0.pc + gthread-2.0.pc + + /usr/include/gio-unix-2.0/gio/gdesktopappinfo.h /usr/include/gio-unix-2.0/gio/gfiledescriptorbased.h diff --git a/script/rootstrap_gen_1.0.sh b/script/rootstrap_gen_1.0.sh index 226ed60..e868a74 100755 --- a/script/rootstrap_gen_1.0.sh +++ b/script/rootstrap_gen_1.0.sh @@ -232,17 +232,28 @@ function copy_package_config() log "+ destination dierctory : ${dest_dir}" log "+ xml source file : ${xml_file}" - local pc_fname="$(xmlstarlet sel -t -v '//rootstrap/@name' ${item}).pc" - local src_pc_file_path="${src_dir}/usr/lib/pkgconfig/${pc_fname}" + local pc_fname='' + local src_pc_file_path='' local dest_pc_path="${dest_dir}/usr/lib/pkgconfig" + local pc_fnames=($(xmlstarlet sel -t -v '//rootstrap/pkgconfig/file' ${item})) - if [[ ! -f "${src_pc_file_path}" ]]; then - log "+ no pkgconfig file(${src_pc_file_path})" - return 1 + if [[ -z ${pc_fnames[@]} ]]; then + pc_fnames=("$(xmlstarlet sel -t -v '//rootstrap/@name' ${item}).pc") fi - mkdir -p ${dest_pc_path} - cp -P "${src_pc_file_path}" "${dest_pc_path}/." + for pc_fname in ${pc_fnames[@]}; do + src_pc_file_path="${src_dir}/usr/lib/pkgconfig/${pc_fname}" + + if [[ ! -f "${src_pc_file_path}" ]]; then + log "+ no pkgconfig file(${src_pc_file_path})" + return 1 + fi + + mkdir -p ${dest_pc_path} + cp -P "${src_pc_file_path}" "${dest_pc_path}/." + done + + return 0 } function check_prerequisite()