Fix ail for post script.
authorRonan Le Martret <ronan@fridu.net>
Tue, 8 Jul 2014 12:15:58 +0000 (14:15 +0200)
committerRonan Le Martret <ronan@fridu.net>
Tue, 8 Jul 2014 15:11:03 +0000 (17:11 +0200)
Change-Id: I16c5f38696449c58d1835fe792c9ca32eef83fe9
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
recipes-tizen/ail/ail-extraconf.inc
recipes-tizen/ail/ail.inc
recipes-tizen/ail/files/remove-dlog-for-native-build.patch [new file with mode: 0644]
recipes-tizen/libslp-db-util/files/remove-dlog-for-native-build.patch [new file with mode: 0644]
recipes-tizen/libslp-db-util/libslp-db-util-extraconf.inc
recipes-tizen/libslp-db-util/libslp-db-util.inc

index 7482814..d9c7f96 100644 (file)
@@ -1 +1,8 @@
 ail_files += "/usr/dbspace"
+
+SRC_URI_append_class-native = " file://remove-dlog-for-native-build.patch"
+
+RDEPENDS_${PN}_remove_class-native = "systemd-native"
+DEPENDS_remove_class-native = "dlog-native"
+
+DEPENDS_class-target += " ail-native"
\ No newline at end of file
index ee16ace..d0ea60a 100644 (file)
@@ -58,6 +58,9 @@ do_compile() {
  LANG=C
  export LANG
  unset DISPLAY
+ CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
+ CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
+ FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
  
  CFLAGS+=" -fpic"
@@ -117,12 +120,12 @@ pkg_postinst_${PN}() {
     vconftool set -t string db/ail/ail_info "0" -f -s system::vconf_inhouse
     vconftool set -t string db/menuscreen/desktop "0" -f -s system::vconf_inhouse
     vconftool set -t string db/menu_widget/language "en_US.utf8" -f -s system::vconf_inhouse
-    chsmack -a User ${D}${prefix}/kdb/db/ail
-    chsmack -a User ${D}${prefix}/kdb/db/ail/ail_info
-    chsmack -a User ${D}${prefix}/kdb/db/menuscreen
-    chsmack -a User ${D}${prefix}/kdb/db/menuscreen/desktop
-    chsmack -a User ${D}${prefix}/kdb/db/menu_widget
-    chsmack -a User ${D}${prefix}/kdb/db/menu_widget/language
+    chsmack -a User $D${prefix}/kdb/db/ail
+    chsmack -a User $D${prefix}/kdb/db/ail/ail_info
+    chsmack -a User $D${prefix}/kdb/db/menuscreen
+    chsmack -a User $D${prefix}/kdb/db/menuscreen/desktop
+    chsmack -a User $D${prefix}/kdb/db/menu_widget
+    chsmack -a User $D${prefix}/kdb/db/menu_widget/language
     CHDBGID="6010"
     update_DAC_for_db_file()
     {
@@ -139,12 +142,12 @@ pkg_postinst_${PN}() {
             fi
     }
     ail_initdb
-    mkdir -p ${D}${prefix}/share/applications
-    mkdir -p ${D}${prefix}/share/applications
-    mkdir -p ${D}${prefix}/dbspace
-    update_DAC_for_db_file ${D}${prefix}/dbspace/.app_info.db
-    update_DAC_for_db_file ${D}${prefix}/dbspace/.app_info.db-journal
-    chsmack -a 'User' ${D}${prefix}/dbspace/.app_info.db*
+    mkdir -p $D${prefix}/share/applications
+    mkdir -p $D${prefix}/share/applications
+    mkdir -p $D${prefix}/dbspace
+    update_DAC_for_db_file $D${prefix}/dbspace/.app_info.db
+    update_DAC_for_db_file $D${prefix}/dbspace/.app_info.db-journal
+    chsmack -a 'User' $D${prefix}/dbspace/.app_info.db*
 
 }
 
@@ -153,7 +156,7 @@ pkg_postrm_${PN}() {
 
     ldconfig
     if [ $1 == 0 ]; then
-    rm -f ${D}${prefix}/dbspace/.app_info.db*
+    rm -f $D${prefix}/dbspace/.app_info.db*
     fi
 
 }
diff --git a/recipes-tizen/ail/files/remove-dlog-for-native-build.patch b/recipes-tizen/ail/files/remove-dlog-for-native-build.patch
new file mode 100644 (file)
index 0000000..5cbf789
--- /dev/null
@@ -0,0 +1,52 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cf9de2c..a03506e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+ INCLUDE(FindPkgConfig)
+-pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf libtzplatform-config)
++pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 db-util xdgmime vconf libtzplatform-config)
+ STRING(REPLACE ";" " " EXTRA_CFLAGS "${LPKGS_CFLAGS}")
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+diff --git a/initdb/CMakeLists.txt b/initdb/CMakeLists.txt
+index 73474d8..040a8cb 100755
+--- a/initdb/CMakeLists.txt
++++ b/initdb/CMakeLists.txt
+@@ -3,7 +3,7 @@
+ SET(INITDB ail_initdb)
+ SET(SRCS src/initdb.c)
+-pkg_check_modules(INITDB_PKGS REQUIRED vconf dlog db-util sqlite3)
++pkg_check_modules(INITDB_PKGS REQUIRED vconf db-util sqlite3)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+diff --git a/src/ail_private.h b/src/ail_private.h
+index efa2f66..867152b 100755
+--- a/src/ail_private.h
++++ b/src/ail_private.h
+@@ -36,7 +36,7 @@
+ #undef LOG_TAG
+ #define LOG_TAG "AIL"
+-#if 1
++#if 0
+ #include <dlog.h>
+ #define _E(fmt, arg...) LOGE("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
+ #define _D(fmt, arg...) LOGD("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
+diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt
+index e898c7e..be1bbfa 100755
+--- a/tool/CMakeLists.txt
++++ b/tool/CMakeLists.txt
+@@ -15,7 +15,7 @@ SET(FILTERSRCS src/ail_filter.c)
+ SET(PKG ail_package)
+ SET(PKGSRCS src/ail_package.c)
+-pkg_check_modules(INITDB_PKGS REQUIRED vconf dlog db-util sqlite3)
++pkg_check_modules(INITDB_PKGS REQUIRED vconf db-util sqlite3)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
diff --git a/recipes-tizen/libslp-db-util/files/remove-dlog-for-native-build.patch b/recipes-tizen/libslp-db-util/files/remove-dlog-for-native-build.patch
new file mode 100644 (file)
index 0000000..5e72552
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eb292f3..b57a806 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,7 +14,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+ INCLUDE(FindPkgConfig)
+ pkg_check_modules(pkgs REQUIRED 
+       sqlite3 
+-      dlog
+       glib-2.0
+       icu-i18n
+ )
+@@ -29,7 +28,7 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+ ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
+-ADD_DEFINITIONS("-DDB_UTIL_USING_PLATFORM_DBG")
++#ADD_DEFINITIONS("-DDB_UTIL_USING_PLATFORM_DBG")
+ ADD_DEFINITIONS("-DDB_UTIL_ENABLE_TRACE")
+ ##ADD_DEFINITIONS("-DDB_UTIL_ENABLE_DEVDEBUG")
+diff --git a/db-util.pc.in b/db-util.pc.in
+index a1df72b..5f7e6f6 100644
+--- a/db-util.pc.in
++++ b/db-util.pc.in
+@@ -8,6 +8,6 @@ includedir=@INCLUDEDIR@
+ Name: db-util
+ Description: DB Utility
+ Version: @VERSION@
+-Requires: sqlite3 dlog glib-2.0 icu-i18n
++Requires: sqlite3  glib-2.0 icu-i18n
+ Libs: -L${libdir} -lSLP-db-util
+ Cflags: -I${includedir}
index e69de29..1830479 100644 (file)
@@ -0,0 +1,3 @@
+SRC_URI_append_class-native = " file://remove-dlog-for-native-build.patch"
+
+DEPENDS_remove_class-native = "dlog-native"
\ No newline at end of file
index a8f8f33..d96d3a2 100644 (file)
@@ -52,6 +52,9 @@ do_compile() {
  LANG=C
  export LANG
  unset DISPLAY
+ CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
+ CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
+ FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
  LD_AS_NEEDED=1; export LD_AS_NEEDED ;