From 2a288fde96961a036c2e6d635d16ac642cb7c4a8 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Mon, 28 Nov 2016 22:11:16 +0900 Subject: [PATCH] Added so file path for aarch64 and x86_64. Change-Id: Iff2d47f77eb1d966bcd5b7fe67d38fab713e557e Signed-off-by: jinwang.an --- packaging/capi-system-system-settings.spec | 15 +++++++++++++++ src/system_setting_platform.c | 17 +++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packaging/capi-system-system-settings.spec b/packaging/capi-system-system-settings.spec index 3de6801..c525c3e 100755 --- a/packaging/capi-system-system-settings.spec +++ b/packaging/capi-system-system-settings.spec @@ -64,6 +64,21 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE" export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE" %endif + +%ifarch arch64 +export CFLAGS+="$CFLAGS -DSETTING_ARCH_64" +export CXXFLAGS+="$CXXFLAGS -DSETTING_ARCH_64" +export FFLAGS+="$FFLAGS -DSETTING_ARCH_64" +%endif + +%ifarch x86_64 +export CFLAGS+="$CFLAGS -DSETTING_ARCH_64" +export CXXFLAGS+="$CXXFLAGS -DSETTING_ARCH_64" +export FFLAGS+="$FFLAGS -DSETTING_ARCH_64" +%endif + + + MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DCMAKE_LIBDIR=%{_libdir} \ -DCMAKE_INCLUDEDIR=%{_includedir} \ diff --git a/src/system_setting_platform.c b/src/system_setting_platform.c index dec5e84..fd0f945 100644 --- a/src/system_setting_platform.c +++ b/src/system_setting_platform.c @@ -57,6 +57,11 @@ #define SETTING_TIME_SHARE_LOCAL_PATH "/usr/share/locale" #define SETTING_TZONE_SYMLINK_PATH "/opt/etc/localtime" +#ifdef SETTING_ARCH_64 +#define SETTING_UTILS_SO_FILE_PATH "/usr/lib64/libsystem-settings-util.so.0.1.0" +#else +#define SETTING_UTILS_SO_FILE_PATH "/usr/lib/libsystem-settings-util.so.0.1.0" +#endif int _is_file_accessible(const char *path); @@ -316,7 +321,7 @@ static bool dl_is_supported_image_type_load(char *path) bool ret = false; bool (*image_type_check)(char *path); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return false; @@ -344,7 +349,7 @@ static int dl_is_available_font(char *str) int ret = false; int (*check_available_font)(char *font_name); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return false; @@ -371,7 +376,7 @@ static void dl_font_size_set() char *error; void (*set_font_size)(); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return; @@ -398,7 +403,7 @@ static void dl_font_config_set_notification() char *error; void (*set_font_nodification)(); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return; @@ -426,7 +431,7 @@ static bool dl_font_config_set(char *font_name) bool ret = false; bool (*check_font_type)(char *font_name); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return false; @@ -454,7 +459,7 @@ static char *dl_get_font_info(char *str) char *ret = NULL; char *(*get_font_info)(); - handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0", RTLD_LAZY); + handle = dlopen(SETTING_UTILS_SO_FILE_PATH, RTLD_LAZY); if (!handle) { SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0"); return false; -- 2.7.4