diff --git a/contrib/build-wine/Dockerfile b/contrib/build-wine/Dockerfile index 1991f0ba5..f9e7c304c 100644 --- a/contrib/build-wine/Dockerfile +++ b/contrib/build-wine/Dockerfile @@ -24,12 +24,12 @@ RUN dpkg --add-architecture i386 && \ make \ mingw-w64 \ mingw-w64-tools \ - win-iconv-mingw-w64-dev \ autotools-dev \ autoconf \ autopoint \ libtool \ gettext \ + sudo \ && \ rm -rf /var/lib/apt/lists/* && \ apt-get autoremove -y && \ diff --git a/contrib/build-wine/apt.preferences b/contrib/build-wine/apt.preferences index d0e270cec..d861cd83d 100644 --- a/contrib/build-wine/apt.preferences +++ b/contrib/build-wine/apt.preferences @@ -1,7 +1,3 @@ Package: * -Pin: release n=bullseye -Pin-Priority: 1001 - -Package: win-iconv-mingw-w64-dev -Pin: release a=unstable +Pin: origin "snapshot.debian.org" Pin-Priority: 1001 diff --git a/contrib/build-wine/apt.sources.list b/contrib/build-wine/apt.sources.list index 5c544e183..9c9c22126 100644 --- a/contrib/build-wine/apt.sources.list +++ b/contrib/build-wine/apt.sources.list @@ -1,3 +1,2 @@ deb https://snapshot.debian.org/archive/debian/20220811T031049Z/ bullseye main non-free contrib deb-src https://snapshot.debian.org/archive/debian/20220811T031049Z/ bullseye main non-free contrib -deb https://snapshot.debian.org/archive/debian/20220811T031049Z/ sid main non-free contrib diff --git a/contrib/build-wine/make_win.sh b/contrib/build-wine/make_win.sh index 18be42a7d..2c6f66daa 100755 --- a/contrib/build-wine/make_win.sh +++ b/contrib/build-wine/make_win.sh @@ -50,6 +50,28 @@ fi if [ -f "$DLL_TARGET_DIR/libzbar-0.dll" ]; then info "libzbar already built, skipping" else + ( + # As debian bullseye doesn't provide win-iconv-mingw-w64-dev, we need to build it: + WIN_ICONV_COMMIT="c9df88a284d448da5434c6ad2737b54a907f888c" + # ^ tag "v0.0.8" + info "Building win-iconv..." + cd "$CACHEDIR" + if [ ! -d win-iconv ]; then + git clone https://github.com/win-iconv/win-iconv.git + fi + cd win-iconv + if ! $(git cat-file -e ${WIN_ICONV_COMMIT}) ; then + info "Could not find requested version $WIN_ICONV_COMMIT in local clone; fetching..." + git fetch --all + fi + git reset --hard + git clean -dfxq + git checkout "${WIN_ICONV_COMMIT}^{commit}" + + CC="${GCC_TRIPLET_HOST}-gcc" make -j4 || fail "Could not build win-iconv" + # FIXME avoid using sudo + sudo make install prefix="/usr/${GCC_TRIPLET_HOST}" || fail "Could not install win-iconv" + ) "$CONTRIB"/make_zbar.sh || fail "Could not build zbar" fi diff --git a/contrib/freeze_containers_distro.sh b/contrib/freeze_containers_distro.sh index 6868a34c2..05fd69ff5 100755 --- a/contrib/freeze_containers_distro.sh +++ b/contrib/freeze_containers_distro.sh @@ -38,8 +38,6 @@ echo "deb-src ${DEBIAN_SNAPSHOT} ${DEBIAN_APPIMAGE_DISTRO} main non-free contrib # build-wine echo "deb ${DEBIAN_SNAPSHOT} ${DEBIAN_WINE_DISTRO} main non-free contrib" >$contrib/build-wine/apt.sources.list echo "deb-src ${DEBIAN_SNAPSHOT} ${DEBIAN_WINE_DISTRO} main non-free contrib" >>$contrib/build-wine/apt.sources.list -# we need win-iconv-mingw-w64-dev which is only in sid/unstable -echo "deb ${DEBIAN_SNAPSHOT} unstable main non-free contrib" >>$contrib/build-wine/apt.sources.list # android echo "deb ${DEBIAN_SNAPSHOT} ${DEBIAN_ANDROID_DISTRO} main non-free contrib" >$contrib/android/apt.sources.list