Commit 44058778 authored by Pavel Beketov's avatar Pavel Beketov

Update files

parent 4ae61923
#!/bin/sh -x
. ./config.sh
# build only 32 bit on i586 arch
[ "$(epm print info -a)" = "x86" ] && BUILDARCH=win32
# overrride BUILDARCH
[ "$1" ] && BUILDARCH="$1"
CLANG="$(which ccache 2>/dev/null) clang"
check_clang()
{
# TODO: check we have complete 11 or complete 12
if [ "$(epm print info -e)" = "AstraLinux/orel" ] ; then
epm assure llvm-link llvm-9 || fatal
epm assure clang-9 clang-9 || fatal
#epm assure clang clang || fatal
epm assure /usr/bin/lld-link lld-9 || fatal
epm assure /usr/bin/llvm-dlltool llvm-9 || fatal
# to allow clang build 32 bit
#epm install libgcc-10-dev-i386-cross || fatal
epm install gcc-multilib
elif [ "$(epm print info -p)" = "deb" ] ; then
epm assure llvm-link llvm-11 || fatal
epm assure clang-11 clang-11 || fatal
#epm assure clang clang || fatal
epm assure /usr/bin/lld-link lld-11 || fatal
epm assure /usr/bin/llvm-dlltool llvm-11 || fatal
# to allow clang build 32 bit
epm install libgcc-10-dev-i386-cross || fatal
else
epm assure llvm-link llvm || fatal
epm assure clang || fatal
epm assure /usr/bin/lld-link || fatal
epm assure /usr/bin/llvm-dlltool || fatal
# hack for p9
if ! clang --version | grep "clang version 1[1-9]" || ! lld-link --version | grep "LLD 1[1-9]" ; then
epmqp llvm10 | epme --auto
epmqp llvm7 | epme --auto
epm install llvm11.0 clang11.0 /usr/bin/lld-link /usr/bin/llvm-dlltool || fatal
fi
fi
}
epm assure git
epm assure time
case "$COMPILER" in
clang)
check_clang
export CC=$CLANG
;;
gcc)
;;
*)
fatal "Unknown COMPILER $COMPILER"
esac
case "$CROSSCOMPILER" in
clang)
check_clang
for i in clang clang-11 clang-10 clang-9 ; do
which $i 2>/dev/null >/dev/null || continue
export CROSSCC=$i
break
done
WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --with-mingw"
;;
mingw)
WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --with-mingw"
;;
none|'')
WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --without-mingw"
;;
*)
fatal "Unknown CROSSCOMPILER $CROSSCOMPILER"
esac
epm assure jmake etersoft-build-utils || fatal
get_current_branch()
{
( cd $REPO && git branch | grep '^\*' | sed 's/^..//' | tr -d "\n" )
}
print_build_mark()
{
echo "SOURCEREPO=$(realpath $REPO) BRANCH=$(get_current_branch) WINEVERSION='$(cat $REPO/VERSION)' CC=$COMPILER CROSSCC=$CROSSCOMPILER BUILDARCH=$BUILDARCH PLATFORM=$(epm print info -e)"
}
cd_to_repo()
{
if [ -d "$1" ] ; then
[ -f "$1/.eterbuild" ] || fatal "Нет флага .eterbuild в $1, создано не этим скриптом."
if [ "$(print_build_mark)" != "$(cat "$1/.eterbuild")" ] ; then
echo "Build mark $(print_build_mark) is changed (was $(cat "$1/.eterbuild")), removing old build dirs ..."
rm -rvf "$1"
fi
fi
# create dir if missed or just removed above
if [ ! -d "$1" ] ; then
mkdir -p "$1"
print_build_mark > "$1/.eterbuild"
fi
cd $1 || fatal
}
# need we?
# disable rpath using for executable
# subst "s|^\(LDRPATH_INSTALL =\).*|\1|" Makefile.in
if [ "$BUILDARCH" = "win64" ] || [ "$BUILDARCH" = "both" ] ; then
cd_to_repo $BUILDREPO64
$REPO/configure --enable-win64 ${WINE_BUILD_OPTIONS} || fatal "Return from $(pwd)"
jmake || fatal "Return from $(pwd)"
fi
if [ "$BUILDARCH" != "win64" ] ; then
cd_to_repo $BUILDREPO
# don't search X11 via pkg-config, so it will not help. For Astra I made ln -s /usr/lib32/i386-linux-gnu /usr/lib/i386-linux-gnu
#[ -d /usr/lib32/i386-linux-gnu/pkgconfig ] && export PKG_CONFIG_PATH=/usr/lib32/i386-linux-gnu/pkgconfig
# but default use wine tools from with-wine64 path (checking for the directory containing the Wine tools...)
[ -f "$BUILDREPO64/.eterbuild" ] && WINEOPT="--with-wine64=$BUILDREPO64" || WINEOPT=''
$REPO/configure $WINEOPT ${WINE_BUILD_OPTIONS} || fatal "Return from $(pwd)"
jmake || fatal "Return from $(pwd)"
fi
echo "Done: $(print_build_mark)"
# добавить в ww детект префикса (TODO: в wine?)
fatal()
{
echo "$*" >&2
exit 1
}
get_current_branch()
{
git branch | grep '^\*' | sed 's/^..//' | tr -d "\n"
}
# work repo
REPO=../wine-rebased
BUILDREPO=../wine
BUILDREPO64=${BUILDREPO}64
# gcc, clang
COMPILER=gcc
# mingw, clang, none
CROSSCOMPILER=none
# win32, win64, both
BUILDARCH=both
WINE_BUILD_OPTIONS="--disable-tests --without-gstreamer --without-oss --without-capi --without-hal --with-xattr"
# see rpm-macros-feature too
if [ "$(epm print info -e)" != "ALTLinux/p9" ] && [ "$(epm print info -e)" != "AstraLinux/orel" ] ; then
# Vulkan support
WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --with-vulkan --with-vkd3d --with-faudio"
fi
if [ "$(epm print info -e)" = "AstraLinux/orel" ] ; then
WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --without-sdl"
fi
# https://bugs.etersoft.ru/show_bug.cgi?id=15244
#WINE_BUILD_OPTIONS="$WINE_BUILD_OPTIONS --without-unwind"
# удалённая система, куда копировать код
TARGET=/tmp/WINE/
#!/bin/sh
if [ "$(epm print info -p)" = "deb" ] ; then
PKGLIST='
libfreetype6-dev libxcursor-dev libxi-dev libxxf86vm-dev libxrandr-dev libxfixes-dev libxinerama-dev libxcomposite-dev
libpcap-dev libdbus-1-dev libsane-dev libusb-1.0-0-dev libgphoto2-dev
libpulse-dev libudev-dev libcups2-dev libfontconfig1-dev libkrb5-dev libopenal-dev libldap2-dev
libvulkan-dev
libxrender-dev libgnutls28-dev libpulse-dev
'
# TODO: libsdl2-dev
epmi $(echo $PKGLIST | sed -e 's|-dev|-dev:i386|')
# TODO:
#configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
#configure: libusb-1.0 32-bit development files not found (or too old), USB devices won't be supported.
#configure: libudev 32-bit development files not found, plug and play won't be supported.
#configure: libkrb5 32-bit development files not found (or too old), Kerberos won't be supported.
#configure: libnetapi not found, Samba NetAPI won't be supported.
#configure: libvulkan and libMoltenVK 32-bit development files not found, Vulkan won't be supported.
exit
fi
epm assure gcc || exit
GCCVERSION=$(epm print version for package gcc)
epmi i586-gcc$GCCVERSION i586-glibc-devel i586-flex
epmi i586-libgcrypt-devel i586-libdbus-devel i586-libusb-devel i586-libgphoto2-devel i586-libjxr-devel
epmi i586-libunwind-devel
#epmi i586-libnetapi-devel
epmi i586-libSDL2-devel
epmi i586-libvulkan-devel libvkd3d1 i586-vkd3d-devel i586-libfaudio-devel
PKGLIST='
i586-fontconfig-devel
i586-libfreetype-devel
i586-zlib-devel
i586-libldap-devel
i586-libgnutls-devel
i586-libxslt-devel
i586-libxml2-devel
i586-libjpeg-devel
i586-liblcms2-devel
i586-libpng-devel
i586-libtiff-devel
i586-libgphoto2-devel
i586-libsane-devel
i586-libcups-devel
i586-libalsa-devel
i586-libgsm-devel
i586-libmpg123-devel
i586-libpulseaudio-devel
i586-libopenal-devel
i586-libGLU-devel
i586-libusb-devel
i586-libieee1284-devel
i586-libkrb5-devel
i586-libv4l-devel
i586-libunixODBC-devel
i586-libpcap-devel
i586-libgtk+3-devel
i586-libcairo-devel
i586-libudev-devel
i586-libdbus-devel
i586-libICE-devel
i586-libSM-devel
i586-libxcb-devel
i586-libX11-devel
i586-libXau-devel
i586-libXaw-devel
i586-libXrandr-devel
i586-libXext-devel
i586-libXfixes-devel
i586-libXfont-devel
i586-libXft-devel
i586-libXi-devel
i586-libXmu-devel
i586-libXpm-devel
i586-libXrender-devel
i586-libXres-devel
i586-libXScrnSaver-devel
i586-libXinerama-devel
i586-libXt-devel
i586-libXxf86dga-devel
i586-libXxf86misc-devel
i586-libXcomposite-devel
i586-libXxf86vm-devel
i586-libfontenc-devel
i586-libXdamage-devel
i586-libXvMC-devel
i586-libXcursor-devel
i586-libXevie-devel
i586-libXv-devel
'
epmi $PKGLIST
#!/bin/sh
if [ "$(epm print info -p)" = "deb" ] ; then
epmi build-essential ccache flex bison pkg-config gettext
epmi libfreetype-dev
epmi libxcursor-dev libxi-dev libxxf86vm-dev libxrandr-dev libxfixes-dev libxinerama-dev libxcomposite-dev
epmi libpcap-dev libdbus-1-dev libsane-dev libusb-1.0-0-dev libgphoto2-dev
epmi libpulse-dev libudev-dev libsdl2-dev libcups2-dev libfontconfig1-dev libkrb5-dev libopenal-dev libldap2-dev
epmi libvulkan-dev
# libOSMesa OpenCL
# libnetapi-dev
# libv4l2-dev
epmi libxrender-dev libgnutls28-dev libpulse-dev
exit
fi
epm assure gcc || exit
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