Replace *.dpatch to *.patch to make gbs build succeed
[platform/core/base/gconf-dbus.git] / packaging / 01_removePopt.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 01_removePopt.dpatch by Youngjae Shin <yj99.shin@samsung.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: remove popt library dependency
6
7 @DPATCH@
8
9 diff -urN gconf-dbus-2.16.0.orig/configure ../gconf-dbus-2.16.0/configure
10 --- gconf-dbus-2.16.0.orig/configure    2008-09-11 20:53:36.000000000 +0900
11 +++ ../gconf-dbus-2.16.0/configure      2009-12-11 11:36:32.000000000 +0900
12 @@ -21200,169 +21200,6 @@
13  #ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
14  #AC_SUBST(ORBIT_IDL)
15  
16 -if test "${ac_cv_header_popt_h+set}" = set; then
17 -  { echo "$as_me:$LINENO: checking for popt.h" >&5
18 -echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; }
19 -if test "${ac_cv_header_popt_h+set}" = set; then
20 -  echo $ECHO_N "(cached) $ECHO_C" >&6
21 -fi
22 -{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5
23 -echo "${ECHO_T}$ac_cv_header_popt_h" >&6; }
24 -else
25 -  # Is the header compilable?
26 -{ echo "$as_me:$LINENO: checking popt.h usability" >&5
27 -echo $ECHO_N "checking popt.h usability... $ECHO_C" >&6; }
28 -cat >conftest.$ac_ext <<_ACEOF
29 -/* confdefs.h.  */
30 -_ACEOF
31 -cat confdefs.h >>conftest.$ac_ext
32 -cat >>conftest.$ac_ext <<_ACEOF
33 -/* end confdefs.h.  */
34 -$ac_includes_default
35 -#include <popt.h>
36 -_ACEOF
37 -rm -f conftest.$ac_objext
38 -if { (ac_try="$ac_compile"
39 -case "(($ac_try" in
40 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
41 -  *) ac_try_echo=$ac_try;;
42 -esac
43 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
44 -  (eval "$ac_compile") 2>conftest.er1
45 -  ac_status=$?
46 -  grep -v '^ *+' conftest.er1 >conftest.err
47 -  rm -f conftest.er1
48 -  cat conftest.err >&5
49 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50 -  (exit $ac_status); } &&
51 -        { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
52 -  { (case "(($ac_try" in
53 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
54 -  *) ac_try_echo=$ac_try;;
55 -esac
56 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
57 -  (eval "$ac_try") 2>&5
58 -  ac_status=$?
59 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
60 -  (exit $ac_status); }; } &&
61 -        { ac_try='test -s conftest.$ac_objext'
62 -  { (case "(($ac_try" in
63 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
64 -  *) ac_try_echo=$ac_try;;
65 -esac
66 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
67 -  (eval "$ac_try") 2>&5
68 -  ac_status=$?
69 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
70 -  (exit $ac_status); }; }; then
71 -  ac_header_compiler=yes
72 -else
73 -  echo "$as_me: failed program was:" >&5
74 -sed 's/^/| /' conftest.$ac_ext >&5
75 -
76 -       ac_header_compiler=no
77 -fi
78 -
79 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
80 -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
81 -echo "${ECHO_T}$ac_header_compiler" >&6; }
82 -
83 -# Is the header present?
84 -{ echo "$as_me:$LINENO: checking popt.h presence" >&5
85 -echo $ECHO_N "checking popt.h presence... $ECHO_C" >&6; }
86 -cat >conftest.$ac_ext <<_ACEOF
87 -/* confdefs.h.  */
88 -_ACEOF
89 -cat confdefs.h >>conftest.$ac_ext
90 -cat >>conftest.$ac_ext <<_ACEOF
91 -/* end confdefs.h.  */
92 -#include <popt.h>
93 -_ACEOF
94 -if { (ac_try="$ac_cpp conftest.$ac_ext"
95 -case "(($ac_try" in
96 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
97 -  *) ac_try_echo=$ac_try;;
98 -esac
99 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
100 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
101 -  ac_status=$?
102 -  grep -v '^ *+' conftest.er1 >conftest.err
103 -  rm -f conftest.er1
104 -  cat conftest.err >&5
105 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
106 -  (exit $ac_status); } >/dev/null; then
107 -  if test -s conftest.err; then
108 -    ac_cpp_err=$ac_c_preproc_warn_flag
109 -    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
110 -  else
111 -    ac_cpp_err=
112 -  fi
113 -else
114 -  ac_cpp_err=yes
115 -fi
116 -if test -z "$ac_cpp_err"; then
117 -  ac_header_preproc=yes
118 -else
119 -  echo "$as_me: failed program was:" >&5
120 -sed 's/^/| /' conftest.$ac_ext >&5
121 -
122 -  ac_header_preproc=no
123 -fi
124 -
125 -rm -f conftest.err conftest.$ac_ext
126 -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
127 -echo "${ECHO_T}$ac_header_preproc" >&6; }
128 -
129 -# So?  What about this header?
130 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
131 -  yes:no: )
132 -    { echo "$as_me:$LINENO: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&5
133 -echo "$as_me: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
134 -    { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the compiler's result" >&5
135 -echo "$as_me: WARNING: popt.h: proceeding with the compiler's result" >&2;}
136 -    ac_header_preproc=yes
137 -    ;;
138 -  no:yes:* )
139 -    { echo "$as_me:$LINENO: WARNING: popt.h: present but cannot be compiled" >&5
140 -echo "$as_me: WARNING: popt.h: present but cannot be compiled" >&2;}
141 -    { echo "$as_me:$LINENO: WARNING: popt.h:     check for missing prerequisite headers?" >&5
142 -echo "$as_me: WARNING: popt.h:     check for missing prerequisite headers?" >&2;}
143 -    { echo "$as_me:$LINENO: WARNING: popt.h: see the Autoconf documentation" >&5
144 -echo "$as_me: WARNING: popt.h: see the Autoconf documentation" >&2;}
145 -    { echo "$as_me:$LINENO: WARNING: popt.h:     section \"Present But Cannot Be Compiled\"" >&5
146 -echo "$as_me: WARNING: popt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
147 -    { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the preprocessor's result" >&5
148 -echo "$as_me: WARNING: popt.h: proceeding with the preprocessor's result" >&2;}
149 -    { echo "$as_me:$LINENO: WARNING: popt.h: in the future, the compiler will take precedence" >&5
150 -echo "$as_me: WARNING: popt.h: in the future, the compiler will take precedence" >&2;}
151 -
152 -    ;;
153 -esac
154 -{ echo "$as_me:$LINENO: checking for popt.h" >&5
155 -echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; }
156 -if test "${ac_cv_header_popt_h+set}" = set; then
157 -  echo $ECHO_N "(cached) $ECHO_C" >&6
158 -else
159 -  ac_cv_header_popt_h=$ac_header_preproc
160 -fi
161 -{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5
162 -echo "${ECHO_T}$ac_cv_header_popt_h" >&6; }
163 -
164 -fi
165 -if test $ac_cv_header_popt_h = yes; then
166 -  :
167 -else
168 -  { { echo "$as_me:$LINENO: error:
169 -*** Couldn't find popt. Please download and install from
170 -*** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again." >&5
171 -echo "$as_me: error:
172 -*** Couldn't find popt. Please download and install from
173 -*** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again." >&2;}
174 -   { (exit 1); exit 1; }; }
175 -fi
176 -
177 -
178 -
179  if test "${ac_cv_header_pthread_h+set}" = set; then
180    { echo "$as_me:$LINENO: checking for pthread.h" >&5
181  echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
182 diff -urN gconf-dbus-2.16.0.orig/configure.in ../gconf-dbus-2.16.0/configure.in
183 --- gconf-dbus-2.16.0.orig/configure.in 2008-09-11 20:50:27.000000000 +0900
184 +++ ../gconf-dbus-2.16.0/configure.in   2009-12-11 11:36:44.000000000 +0900
185 @@ -182,10 +182,6 @@
186  #ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
187  #AC_SUBST(ORBIT_IDL)
188  
189 -AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([[
190 -*** Couldn't find popt. Please download and install from
191 -*** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again.]]))
192 -
193  AC_CHECK_HEADER(pthread.h, have_pthreads=yes)
194  AM_CONDITIONAL(PTHREADS, test -n "$have_pthreads")
195  
196 diff -urN gconf-dbus-2.16.0.orig/gconf/gconf-dbus.c ../gconf-dbus-2.16.0/gconf/gconf-dbus.c
197 --- gconf-dbus-2.16.0.orig/gconf/gconf-dbus.c   2008-01-28 18:04:42.000000000 +0900
198 +++ ../gconf-dbus-2.16.0/gconf/gconf-dbus.c     2009-12-11 10:35:13.000000000 +0900
199 @@ -22,7 +22,7 @@
200  
201  #include <config.h>
202  
203 -#include <popt.h>
204 +//#include <popt.h>
205  #include "gconf.h"
206  #include "gconf-dbus-utils.h"
207  #include "gconf-internals.h"
208 diff -urN gconf-dbus-2.16.0.orig/gconf/gconf.c ../gconf-dbus-2.16.0/gconf/gconf.c
209 --- gconf-dbus-2.16.0.orig/gconf/gconf.c        2007-05-15 22:55:22.000000000 +0900
210 +++ ../gconf-dbus-2.16.0/gconf/gconf.c  2009-12-11 11:21:45.000000000 +0900
211 @@ -17,7 +17,7 @@
212   * Boston, MA 02111-1307, USA.
213   */
214  
215 -#include <popt.h>
216 +//#include <popt.h>
217  /*#include "GConfX.h"*/
218  #include "gconf.h"
219  #include "gconf-internals.h"
220 @@ -2547,11 +2547,11 @@
221  
222  /* All deprecated */
223  const char gconf_version[] = VERSION;
224 -
225 +/*
226  struct poptOption gconf_options[] = {
227    {NULL}
228  };
229 -
230 +*/
231  /* Also deprecated */
232  gboolean     
233  gconf_init (int argc, char **argv, GError** err)