Commit 3b8653ad authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce build32on64 and use it

parent 70ecd238
......@@ -80,11 +80,13 @@ else
# see install in Korinf, need concatenate
BUILDREQ="$BUILDREQ make gcc\n$FIXPATCHFUZZ"
if [ "$BUILDARCH" = "x86_64" ] && rhas "$BUILDNAME" wine ; then
if build32on64 ; then
[ "$DISTRNAME" = "Debian" ] && BUILDREQ="$BUILDREQ ia32-libs" && ADDREQUIRES="$ADDREQUIRES ia32-libs"
[ "$DISTRNAME" = "Ubuntu" ] && ! version_more_version $DISTRVERSION 12.04 ] && BUILDREQ="$BUILDREQ ia32-libs" && ADDREQUIRES="$ADDREQUIRES ia32-libs"
[ "$DISTRNAME" = "CentOS" ] && version_more_version $DISTRVERSION 6 ] && BUILDREQ="$BUILDREQ glibc-devel.i686"
[ "$DISTRNAME" = "Scientific" ] && version_more_version $DISTRVERSION 6 ] && BUILDREQ="$BUILDREQ glibc-devel.i686"
[ "$DISTRNAME" = "Ubuntu" ] && ! version_more_version $DISTRVERSION 12.04 && BUILDREQ="$BUILDREQ ia32-libs" && ADDREQUIRES="$ADDREQUIRES ia32-libs"
[ "$DISTRNAME" = "CentOS" ] && version_more_version $DISTRVERSION 6 && BUILDREQ="$BUILDREQ glibc-devel.i686"
[ "$DISTRNAME" = "Scientific" ] && version_more_version $DISTRVERSION 6 && BUILDREQ="$BUILDREQ glibc-devel.i686"
[ "$DISTRNAME" = "SLED" ] && version_more_version $DISTRVERSION 11 && BUILDREQ="$BUILDREQ glibc-devel-32bit gcc-32bit"
[ "$DISTRNAME" = "SUSE" ] && version_more_version $DISTRVERSION 11 && BUILDREQ="$BUILDREQ glibc-devel-32bit gcc-32bit"
fi
# Hack for allow repack on x86_64 packages with ExclusiveArch: %{ix586}
......@@ -128,8 +130,7 @@ if [ "$PKGVENDOR" = "freebsd" ] ; then
%__subst 's|readlink -mv|realpath|g' libtool configure ltmain.sh"
fi
# HACK need only for wine on x86_64
if [ "$BUILDARCH" = "x86_64" ] && rhas "$SPECNAME" wine ; then
if build32on64 ; then
test -z "$VERBOSE" || echo "Add remove_optflags -m64"
ADDFIXCOMMAND="$ADDFIXCOMMAND
%remove_optflags -m64"
......
#!/bin/bash
# 2008 Etersoft www.etersoft.ru
# 2008-2015 Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
......@@ -9,6 +9,12 @@ filter_deb_pkgnames()
sed -e "s|^ *\(.*\)-devel *\$|\1-dev|g" | tr "[A-Z]" "[a-z]"
}
build32on64()
{
# FIXME: wine hack, use external replacement package list
[ "$BUILDARCH" = "x86_64" ] && rhas "$BUILDNAME" wine
}
# Hack for improve requires for 32-bit build on 64-bit system
# See rpmbph also
add_32bit_requires()
......@@ -21,8 +27,7 @@ add_32bit_requires()
local GREP="$1"
shift
# Only for build wine on x86_64
if [ "$BUILDARCH" = "x86_64" ] && rhas "$BUILDNAME" wine ; then
if build32on64 ; then
if [ "$DISTRNAME" = "Fedora" ] || [ "$DISTRNAME" = "Scientific" ] || [ "$DISTRNAME" = "CentOS" -a "$DISTRVERSION" != 5 ]; then
# http://www.rpm.org/wiki/PackagerDocs/ArchDependencies
# add (x86-32) to all -devel packages
......@@ -70,7 +75,7 @@ hack_distr_requires()
case "$DISTRNAME" in
"Mandriva")
if [ $BUILDARCH = "x86_64" ] ; then
if [ $BUILDARCH = "x86_64" ] && ! build32on64 ; then
echo "$GREP" | sed -e "s|^lib\([^6]\)|lib64\1|g"
return
fi
......@@ -190,8 +195,7 @@ print_replbased_list()
{
local REPLBASE="$1"
if [ "$BUILDARCH" = "x86_64" ] ; then
# FIXME: wine hack, use external replacement package list
if rhas "$BUILDNAME" wine ; then
if build32on64 ; then
internal_repl_list $REPLBASE .x86_64-i586 | uniq
else
internal_repl_list $REPLBASE .x86_64 | uniq
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment