Modify to be buildable with hal-rootstrap 40/313340/1 accepted/tizen/unified/20240625.163147 accepted/tizen/unified/dev/20240701.073022
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 24 Jun 2024 07:43:19 +0000 (16:43 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 24 Jun 2024 07:43:19 +0000 (16:43 +0900)
To use hal-rootstrap as a only BuildRequires package, with contains
every package that hal backends need, spec file and cmake file are
modified.
Also, hal-rootstrap does not have 'dlog-internal.h'(it should be used
only for internal), symbols from it like SLOGE are replaced by functions
provided by 'dlog.h'.

Change-Id: I078befbec7ddae394bf657631e3ae28571242c18
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
CMakeLists.txt
packaging/hal-backend-sensor-emulator.spec
src/sensor_log.h

index 8a459910282b4e2d3085cdb2bdb29c6d1eafb519..40fcfc41f6bf8f321ef4bcb0268d08fb84ad83cd 100644 (file)
@@ -5,7 +5,7 @@ INCLUDE(GNUInstallDirs)
 SET(LIBRARY_NAME "hal-backend-sensor")
 SET(HAL_LIBDIR ${CMAKE_HAL_LIBDIR_PREFIX})
 SET(HAL_LICENSEDIR ${CMAKE_HAL_LICENSEDIR_PREFIX})
-SET(DEPENDENTS "dlog hal-api-common hal-api-sensor")
+SET(DEPENDENTS "hal-rootstrap")
 
 
 SET(ACCEL "ON")
index 8de52e17219f5e0cdfac4bae60aebec5b9c20980..ce43051b35c4c45ddbaa60ed0a431e39ad627120 100644 (file)
@@ -11,9 +11,7 @@ Source2:    99-sensorhub.rules
 ExcludeArch: %{arm} riscv64
 
 BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(hal-api-common)
-BuildRequires:  pkgconfig(hal-api-sensor)
+BuildRequires:  pkgconfig(hal-rootstrap)
 
 %description
 Sensor HAL backend drivers for emulator targets
index d8db8930b774a3ab53ba133175592c2b5ce7398b..d8c2cde28fa1a69f3d4379f08ab95a552a52cfee 100644 (file)
 
 #define LOG_DUMP(fp, fmt, arg...) do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
 
+#define ALOGD(format, ...) dlog_print(DLOG_DEBUG, LOG_TAG, format, ##__VA_ARGS__)
+#define ALOGE(format, ...) dlog_print(DLOG_ERROR, LOG_TAG, format, ##__VA_ARGS__)
+#define ALOGW(format, ...) dlog_print(DLOG_WARN, LOG_TAG, format, ##__VA_ARGS__)
+#define ALOGI(format, ...) dlog_print(DLOG_INFO, LOG_TAG, format, ##__VA_ARGS__)
+
 #ifdef _DEBUG
-#define DBG SLOGD
+#define DBG ALOGD
 #else
 #define DBG(...) do { } while (0)
 #endif
 
-#define ERR SLOGE
-#define WARN SLOGW
-#define INFO SLOGI
+#define ERR ALOGE
+#define WARN ALOGW
+#define INFO ALOGI
 #define _E ERR
 #define _W WARN
 #define _I INFO