- solve libX11 libxcb libxml2-native libxtst-native.
authorRonan Le Martret <ronan@fridu.net>
Sun, 14 Apr 2013 13:48:40 +0000 (15:48 +0200)
committerRonan Le Martret <ronan@fridu.net>
Sun, 14 Apr 2013 13:48:40 +0000 (15:48 +0200)
13 files changed:
Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/macros
Tizen_TZ_package/TizenGroup-IVI-Wayland/rpm_tizen_macro/lib/tizen/macros
Tizen_TZ_package/spec2yocto.py
meta-tizen-ivi/classes/tizenBuildUtils.bbclass
meta-tizen-ivi/recipes-tizen/libX11/libX11-extraconf.inc [deleted file]
meta-tizen-ivi/recipes-tizen/libX11/libX11-native-extraconf.inc [deleted file]
meta-tizen-ivi/recipes-tizen/libX11/libX11-oe-extraconf.inc [deleted file]
meta-tizen-ivi/recipes-tizen/libx11/libx11-extraconf.inc
meta-tizen-ivi/recipes-tizen/libx11/libx11/keysymdef_include.patch [new file with mode: 0644]
meta-tizen-ivi/recipes-tizen/libx11/libx11/libX11.spec.patch [new file with mode: 0644]
meta-tizen-ivi/recipes-tizen/libxcb/libxcb-extraconf.inc
meta-tizen-ivi/recipes-tizen/libxcb/libxcb/xcbincludedir.patch [new file with mode: 0644]
meta-tizen-ivi/recipes-tizen/libxml2/libxml2-native_git.bb [new file with mode: 0644]

index 4c6159b..8585ed8 100644 (file)
@@ -24,9 +24,9 @@
 #==============================================================================
 # ---- filesystem macros.
 #
-%_usr                  \${prefix}
+%_usr                  %{_buildPrefix}/usr
 %_usrsrc               %{_usr}/src
-%_var                  \${localstatedir}
+%_var                  %{_buildPrefix}/var
 
 
 #==============================================================================
@@ -852,13 +852,14 @@ print (t)\
 # ---- configure macros.
 #      Macro(s) slavishly copied from autoconf's config.status.
 #
-%_prefix               /usr
+%_buildPrefix          %{nil}
+%_prefix               %{_buildPrefix}/usr
 %_exec_prefix          %{_prefix}
 %_bindir               %{_exec_prefix}/bin
 %_sbindir              %{_exec_prefix}/sbin
 %_libexecdir           %{_exec_prefix}/libexec
 %_datadir              %{_prefix}/share
-%_sysconfdir           /etc
+%_sysconfdir           %{_buildPrefix}/etc
 %_sharedstatedir       %{_prefix}/com
 %_localstatedir                %{_prefix}/var
 %_lib                  lib
index 9b507ac..ab6b7ca 100644 (file)
@@ -70,7 +70,7 @@
        --program-prefix=%{?_program_prefix} \\\
        --prefix=%{_prefix} \\\
        --exec-prefix=%{_exec_prefix} \\\
-       --bindir=%{_bindir} \\\
+       --bindir=%{nil} \\\
        --sbindir=%{_sbindir} \\\
        --sysconfdir=%{_sysconfdir} \\\
        --datadir=%{_datadir} \\\
index 60dcbca..9a48d06 100755 (executable)
@@ -87,7 +87,6 @@ class SubprocessCrt(object):
         
         #need Python 2.7.3 to do shlex.split(command) 
         splittedCommand = shlex.split(str(command))
-        
         p = subprocess.Popen(splittedCommand,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
@@ -117,6 +116,10 @@ class SubprocessCrt(object):
                     output = fd.read()
                     if f_stdout == fd:
                         outPutRes += output
+                    else:
+                       if debug_run and (len(output) >0):
+                            print "ERROR ****",output,len(output)
+                       
                     for line in output.split("\n"):
                         if not line == b"" or not output.endswith("\n"):
                             outputs[fd]["EOF"] = False
@@ -220,11 +223,18 @@ class specParser:
         command="rpmspec "
         macroPath=""
         
-           
+        
         if (self.__packagePN is not None) and (self.__packagePN.endswith("-native")):
-           command += " --define='buildroot ${D}${STAGING_DIR}/${HOST_SYS}' "
-           currentCpu=self.__cpuNative
-       else:
+            #command += " --define='buildroot ${D}${STAGING_DIR}/${HOST_SYS}' "
+            command += " --define='buildroot ${D}' "
+            currentCpu=self.__cpuNative
+            
+            command += " --define='__cc gcc' "
+            
+            base_prefix=os.getenv("base_prefix")
+            if (base_prefix != "") and (base_prefix is not None):
+                command += " --define='_buildPrefix %s' " % base_prefix
+        else:
             command += " --define='buildroot ${D}' "
             currentCpu=self.__cpu
             
@@ -269,9 +279,10 @@ class specParser:
         if pkgName in [ "cantarell-fonts","monotype-fonts","libkate","google-droid-fonts","texinfo"]:
             command += " --define='_bindir /usr/bin'"
             
-        if pkgName in [ "libkate","libxml2"]:
+        if pkgName in [ "libkate"]:
             command += " --define='_libdir /usr/lib'"
             
+            
         if pkgName in [ "gcc"]:
             command += " --define='_prefix /usr'"
             
@@ -326,6 +337,7 @@ class specParser:
                 tmp_package_spec_path=tmpSpecFile.name
                 
                 
+                
                  
         if pkgName in ["attr","acl"]:
             currentSpecString=currentSpecString.replace('make configure','%configure')
@@ -339,10 +351,37 @@ class specParser:
                 tmpSpecFile.write(currentSpecString)
                 tmp_package_spec_path=tmpSpecFile.name
                 
-        if pkgName in ["db4","db4-native"]:
+            
+        if self.__packagePN in ["libxslt","libxslt-native"]:
+            currentSpecString=currentSpecString.replace('./configure','%configure')
+      
+            with tempfile.NamedTemporaryFile(mode='w',
+                            suffix='tmp',
+                            prefix=os.path.basename(tmp_package_spec_path),
+                            delete=False) as  tmpSpecFile:
+                tmpSpecFile.write(currentSpecString)
+                tmp_package_spec_path=tmpSpecFile.name
+            
+        if self.__packagePN in ["fdupes","fdupes-native"]:
+            currentSpecString=currentSpecString.replace('/usr/bin','%{_bindir}')
+            currentSpecString=currentSpecString.replace('/usr/share','%_datadir}')
+            currentSpecString=currentSpecString.replace('/etc','%{_sysconfdir}')
+
+                        
+            with tempfile.NamedTemporaryFile(mode='w',
+                            suffix='tmp',
+                            prefix=os.path.basename(tmp_package_spec_path),
+                            delete=False) as  tmpSpecFile:
+                tmpSpecFile.write(currentSpecString)
+                tmp_package_spec_path=tmpSpecFile.name
+                
+        if self.__packagePN in ["db4","db4-native"]:
             currentSpecString=currentSpecString.replace('find . -name tags','find . -name tags -o -prune -path \'.git/*\'')
             currentSpecString=currentSpecString.replace('/bin/sh libtool','${HOST_SYS}-libtool --tag=CC')
-
+                        
+            if self.__packagePN in ["db4-native"]:
+                command += " --define='_lib ${D}lib'"
+            
             with tempfile.NamedTemporaryFile(mode='w',
                             suffix='tmp',
                             prefix=os.path.basename(tmp_package_spec_path),
@@ -484,6 +523,7 @@ class specParser:
             os.mkdir(os.path.join("/tmp","parsed_spec"))
             
         self.__parsedSpecFile= specParser.msubprocess.execSubprocess(command)
+        
         if self.__parsedSpecFile == 1:
             print >> sys.stderr,"parse error for spec file %s" % (tmp_package_spec_path)
             self.__parsedSpecFile=None
@@ -758,7 +798,7 @@ class specParser:
                 
                 for line in self.__spectDico[k][1:]:
                     if not line.startswith("%") and not line == "":
-                       line=line.replace("//","/")
+                        line=line.replace("//","/")
                         res[ packageName ].append(line)
                     else:
                         pass
@@ -1090,8 +1130,8 @@ class metaSpec:
                         f.write("# the PROVIDES rules is ignore \"%s %s %s\"\n" % (pkg,p[1],p[2]))
                         
                     if (pkg == "mktemp" and self.__package_name=="tizen-coreutils"):
-                     continue
-                     
+                        continue
+              
                     f.write("PROVIDES += \"%s\"\n" % (pkg))
                     f.write("RPROVIDES_%s += \"%s\"\n" % (kp,pkg))
                     
index 989c17a..1b6947e 100644 (file)
@@ -85,7 +85,7 @@ do_install_prepend () {
  if [[ ${PN} =~ "-native" ]];
  then
      echo export STAGING_DIR=${STAGING_DIR}  >> ${S}/../temp/Bash_install
-     echo export RPM_BUILD_ROOT=${D}${STAGING_DIR}/${HOST_SYS}  >> ${S}/../temp/Bash_install
+     echo export RPM_BUILD_ROOT=${D}  >> ${S}/../temp/Bash_install
  else
      echo export RPM_BUILD_ROOT=${D}  >> ${S}/../temp/Bash_install
  fi
diff --git a/meta-tizen-ivi/recipes-tizen/libX11/libX11-extraconf.inc b/meta-tizen-ivi/recipes-tizen/libX11/libX11-extraconf.inc
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/meta-tizen-ivi/recipes-tizen/libX11/libX11-native-extraconf.inc b/meta-tizen-ivi/recipes-tizen/libX11/libX11-native-extraconf.inc
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/meta-tizen-ivi/recipes-tizen/libX11/libX11-oe-extraconf.inc b/meta-tizen-ivi/recipes-tizen/libX11/libX11-oe-extraconf.inc
deleted file mode 100644 (file)
index e69de29..0000000
index e69de29..a759226 100644 (file)
@@ -0,0 +1,19 @@
+
+DEPENDS += "xorg-x11-proto-core-native"
+
+EXTRA_AUTORECONF += "-v --install --force"
+
+EXTRA_OECONF = "--enable-malloc0returnsnull \
+                --disable-specs --with-groff=no --with-ps2pdf=no --with-fop=no --without-xmlto"
+                
+EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/ --disable-xf86bigfont"
+
+SRC_URI += "file://keysymdef_include.patch \
+            file://libX11.spec.patch \
+            "
+  
+do_patch () {
+ echo RLM begining of python do_patch
+ cat ${WORKDIR}/keysymdef_include.patch | patch -s -p1 --fuzz=2
+ cat ${WORKDIR}/libX11.spec.patch | patch -s -p1 --fuzz=2
+}
\ No newline at end of file
diff --git a/meta-tizen-ivi/recipes-tizen/libx11/libx11/keysymdef_include.patch b/meta-tizen-ivi/recipes-tizen/libx11/libx11/keysymdef_include.patch
new file mode 100644 (file)
index 0000000..8c50bb7
--- /dev/null
@@ -0,0 +1,42 @@
+From d45b3fc19fbe95c41afc4e51d768df6d42332010 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 12 Sep 2012 13:39:40 +0000
+Subject: Allow overriding location of keysymdef.h
+
+Currently keysymdef.h is found by using the includedir of xproto.  This doesn't
+work when cross-compiling with a sysroot as that ends up being /usr/include/X11,
+not a path into the cross-build environment.
+
+So, add an option to allow explicitly specifying the location of keysymdef.h,
+and verify that the specified or found path exists.
+
+(original patch by Martin Jansa <martin.jansa@gmail.com>, revised by myself)
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+---
+diff --git a/configure.ac b/configure.ac
+index 48a0c8a..a45f9d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -306,7 +306,15 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
+ # Find keysymdef.h
+ #
+ AC_MSG_CHECKING([keysym definitions])
+-KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
++AC_ARG_WITH([keysymdefdir],
++        [AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])],
++        [KEYSYMDEFDIR=$withval],
++        [KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11])
++
++if test ! -d "$KEYSYMDEFDIR"; then
++      AC_MSG_ERROR([$KEYSYMDEFDIR doesn't exist or isn't a directory])
++fi
++
+ FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
+ for i in $FILES; do
+     if test -f "$KEYSYMDEFDIR/$i"; then
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/meta-tizen-ivi/recipes-tizen/libx11/libx11/libX11.spec.patch b/meta-tizen-ivi/recipes-tizen/libx11/libx11/libX11.spec.patch
new file mode 100644 (file)
index 0000000..14951a9
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/packaging/libX11.spec b/packaging/libX11.spec
+index ddcd6f4..4d05ff1 100644
+--- a/packaging/libX11.spec
++++ b/packaging/libX11.spec
+@@ -51,7 +51,7 @@ X.Org X11 libX11 development package
+ %build
+ # sodding libtool
+-autoreconf -v --install --force
++#autoreconf -v --install --force
+ %reconfigure --disable-static \
+            --enable-specs \
+            --enable-man-pages=3 \
+@@ -59,7 +59,7 @@ autoreconf -v --install --force
+            CFLAGS="${CFLAGS} " \
+            LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+-make %{?jobs:-j%jobs}
++%__make %{?jobs:-j%jobs}
+ %install
+ rm -rf $RPM_BUILD_ROOT
index 0e79218..017ccb4 100644 (file)
@@ -8,6 +8,8 @@ do_patch () {
 }
 
 DEPENDS += "libxslt-native"
+DEPENDS += "xcb-proto-native"
+
 
 inherit  pkgconfig pythonnative
 
diff --git a/meta-tizen-ivi/recipes-tizen/libxcb/libxcb/xcbincludedir.patch b/meta-tizen-ivi/recipes-tizen/libxcb/libxcb/xcbincludedir.patch
new file mode 100644 (file)
index 0000000..d858a63
--- /dev/null
@@ -0,0 +1,13 @@
+Upstream-Status: Inappropriate [configuration]
+
+--- libxcb-1.0.orig/configure.ac       2006-11-23 15:33:01.000000000 +0000
++++ libxcb-1.0/configure.ac    2008-09-10 20:29:12.000000000 +0100
+@@ -50,7 +50,7 @@
+ # Find the xcb-proto protocol descriptions
+ AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
+-XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
++XCBPROTO_XCBINCLUDEDIR=$PKG_CONFIG_SYSROOT_DIR/`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
+ AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
+ AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
diff --git a/meta-tizen-ivi/recipes-tizen/libxml2/libxml2-native_git.bb b/meta-tizen-ivi/recipes-tizen/libxml2/libxml2-native_git.bb
new file mode 100644 (file)
index 0000000..b6a05c4
--- /dev/null
@@ -0,0 +1,13 @@
+require libxml2.inc
+
+PRIORITY = "9"
+
+inherit native
+
+S = "${WORKDIR}/git"
+
+LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI += "git://review.tizen.org/external/libxml2;protocol=ssh;tag=tizen_2.0"
+require libxml2-native-extraconf.inc
+