#==============================================================================
# ---- filesystem macros.
#
-%_usr \${prefix}
+%_usr %{_buildPrefix}/usr
%_usrsrc %{_usr}/src
-%_var \${localstatedir}
+%_var %{_buildPrefix}/var
#==============================================================================
# ---- 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
--program-prefix=%{?_program_prefix} \\\
--prefix=%{_prefix} \\\
--exec-prefix=%{_exec_prefix} \\\
- --bindir=%{_bindir} \\\
+ --bindir=%{nil} \\\
--sbindir=%{_sbindir} \\\
--sysconfdir=%{_sysconfdir} \\\
--datadir=%{_datadir} \\\
#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)
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
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
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'"
tmp_package_spec_path=tmpSpecFile.name
+
if pkgName in ["attr","acl"]:
currentSpecString=currentSpecString.replace('make configure','%configure')
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),
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
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
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))
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
+
+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
--- /dev/null
+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
--- /dev/null
+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
}
DEPENDS += "libxslt-native"
+DEPENDS += "xcb-proto-native"
+
inherit pkgconfig pythonnative
--- /dev/null
+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)
+
--- /dev/null
+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
+