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

introduce build32on64 and use it

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