anchor.diff:      .. && \
     make -j$(nproc) install
   
  +FROM download AS opencoreamr_download
   # bump: opencoreamr /OPENCOREAMR_VERSION=([\d.]+)/ fetch:https://sourceforge.net/projects/opencore-amr/files/opencore-amr/|/opencore-amr-([\d.]+).tar.gz/
   # bump: opencoreamr after ./hashupdate Dockerfile OPENCOREAMR $LATEST
   # bump: opencoreamr link "ChangeLog" https://sourceforge.net/p/opencore-amr/code/ci/master/tree/ChangeLog
  
positive.code: RUN \
    wget $WGET_OPTS -O libxvid.tar.gz "$XVID_URL" && \
    echo "$XVID_SHA256  libxvid.tar.gz" | sha256sum --status -c - && \
    tar xf libxvid.tar.gz && \
    cd xvidcore/build/generic && \
    CFLAGS="$CFLAGS -fstrength-reduce -ffast-math" ./configure && \
    make -j$(nproc) && make install
  
  # bump: zimg /ZIMG_VERSION=([\d.]+)/ https://github.com/sekrit-twc/zimg.git|*
  # bump: zimg after ./hashupdate Dockerfile ZIMG $LATEST
  # bump: zimg link "ChangeLog" https://github.com/sekrit-twc/zimg/blob/master/ChangeLog
  
negative.code: RUN \
    wget $WGET_OPTS -O libtheora.tar.bz2 "$THEORA_URL" && \
    echo "$THEORA_SHA256  libtheora.tar.bz2" | sha256sum --status -c - && \
    mkdir theora && \
    tar xf libtheora.tar.bz2 -C theora --strip-components=1
  
  FROM builder AS theora
  COPY --link --from=theora_download /tmp/theora/ /tmp/theora/
  COPY --link --from=ogg /usr/local/lib/pkgconfig/ogg.pc /usr/local/lib/pkgconfig/ogg.pc
  COPY --link --from=ogg /usr/local/lib/libogg.a /usr/local/lib/libogg.a
  COPY --link --from=ogg /usr/local/include/ogg/ /usr/local/include/ogg/
  RUN \
    # --build=$(arch)-unknown-linux-gnu helps with guessing the correct build. For some reason,
    # build script can't guess the build type in arm64 (hardware and emulated) environment.
    cd theora && \
    ./configure --build=$(arch)-unknown-linux-gnu --disable-examples --disable-oggtest --disable-shared --enable-static && \
    make -j$(nproc) install
  
  FROM download AS twolame_download
  # bump: twolame /TWOLAME_VERSION=([\d.]+)/ https://github.com/njh/twolame.git|*
  # bump: twolame after ./hashupdate Dockerfile TWOLAME $LATEST
  # bump: twolame link "Source diff $CURRENT..$LATEST" https://github.com/njh/twolame/compare/v$CURRENT..v$LATEST
  