mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: "Sven Püschel" <s.pueschel@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] libtheora: fix arm-v5te and minimize patches
Date: Fri, 13 Nov 2026 09:38:34 +0100	[thread overview]
Message-ID: <20261113083834.1377672-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20261016203456.579714-1-s.pueschel@pengutronix.de>

Thanks, applied as f155af3475ff63bbad5da603284620e62fbbc0c4.

Michael

[sent from post-receive hook]

On Fri, 13 Nov 2026 09:38:34 +0100, Sven Püschel <s.pueschel@pengutronix.de> wrote:
> With the 1.2.0 update libtheora wasn't able to build on arm-v5te, as
> it'd try to build invalid assembly (probably intended for newer arm
> platforms). Therefore only enable asm when we have arm v7 or newer
> (latter doesn't use ARCH_ARM).
> 
> Also drop the configure.ac patches. They added options to explicitly
> avoid searching for dependencies using pkg-config. As PTXDist nowadays
> already blocks pkg-config checks for libraries (if it's not selected by
> the given rule file), we don't need them anymore.
> When libtheora isn't successful using pkg-config it will fall back to
> use dedicated m4 functions (e.g. XIPH_PATH_OGG). These allow to
> explicitly disable the dependency using --without. Therefore just define
> these flags to avoid implicitly linking against the libraries if PTXDist
> denies the pkg-config check.
> 
> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
> Message-Id: <20261016203456.579714-1-s.pueschel@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/libtheora-1.2.0/0004-lib-arm-add-missing-tarball-files.patch b/patches/libtheora-1.2.0/0001-lib-arm-add-missing-tarball-files.patch
> similarity index 100%
> rename from patches/libtheora-1.2.0/0004-lib-arm-add-missing-tarball-files.patch
> rename to patches/libtheora-1.2.0/0001-lib-arm-add-missing-tarball-files.patch
> diff --git a/patches/libtheora-1.2.0/0001-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch b/patches/libtheora-1.2.0/0001-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> deleted file mode 100644
> index f792f3ca4f0f..000000000000
> --- a/patches/libtheora-1.2.0/0001-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> +++ /dev/null
> @@ -1,69 +0,0 @@
> -From: Robert Schwebel <r.schwebel@pengutronix.de>
> -Date: Wed, 23 Sep 2026 15:39:17 +0200
> -Subject: [PATCH] libtheora: fix configure.ac to work with cross scenario for
> - libvorbis
> -
> -This is https://trac.xiph.org/ticket/1465
> -
> -The current test in configure.ac mixes up two different methods (hand
> -written plus pkg-config). This patch changes the mechanics towards
> -proper pkg-config usage. In return, we get a cleaned up cross scenario
> -with no build-system leakage.
> -
> -This patch fixes the vorbis test.
> -
> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ----
> - configure.ac | 39 ++++++++++++++++++++++-----------------
> - 1 file changed, 22 insertions(+), 17 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 3d2a413a1d18..234acd501685 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -442,23 +442,28 @@ fi
> - 
> - 
> - dnl check for Vorbis
> --HAVE_VORBIS=no
> --
> --dnl first check through pkg-config since it's more flexible
> --
> --if test "x$HAVE_PKG_CONFIG" = "xyes"
> --then
> --  PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0.1, HAVE_VORBIS=yes, HAVE_VORBIS=no)
> --  dnl also set VORBISENC_LIBS since an examples needs it
> --  dnl the old .m4 sets this to a value to use on top of VORBIS_LIBS,
> --  dnl so we do the same here.
> --  VORBISENC_LIBS="-lvorbisenc"
> --  AC_SUBST(VORBISENC_LIBS)
> --fi
> --if test "x$HAVE_VORBIS" = "xno"
> --then
> --  dnl fall back to the old school test
> --  XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
> -+AC_MSG_CHECKING([for vorbis])
> -+AC_ARG_ENABLE(vorbis,
> -+    AS_HELP_STRING([--enable-vorbis], [enable vorbis @<:@default=yes@:>@]),
> -+        [case "$enableval" in
> -+        y | yes) HAVE_VORBIS=yes ;;
> -+        *) HAVE_VORBIS=no ;;
> -+        esac],
> -+    [HAVE_VORBIS=yes])
> -+AC_MSG_RESULT([${HAVE_VORBIS}])
> -+AM_CONDITIONAL(HAVE_VORBIS, [test "$HAVE_VORBIS" = "yes"])
> -+if test "${HAVE_VORBIS}" = "yes"; then
> -+    AC_DEFINE(HAVE_VORBIS, 1, [vorbis])
> -+
> -+    REQUIRES_VORBIS="vorbis >= 1.0.1"
> -+    AC_SUBST(REQUIRES_VORBIS)
> -+    PKG_CHECK_MODULES([VORBIS],
> -+          [${REQUIRES_VORBIS}],
> -+          [],
> -+          [AC_MSG_ERROR([*** ${REQUIRES_VORBIS} not found by pkg-config on your system])]
> -+    )
> -+    AC_SUBST(VORBIS_CFLAGS)
> -+    AC_SUBST(VORBIS_LIBS)
> - fi
> - 
> - dnl check for SDL
> diff --git a/patches/libtheora-1.2.0/0002-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch b/patches/libtheora-1.2.0/0002-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> deleted file mode 100644
> index cccd92dae935..000000000000
> --- a/patches/libtheora-1.2.0/0002-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -From: Robert Schwebel <r.schwebel@pengutronix.de>
> -Date: Wed, 23 Sep 2026 16:36:40 +0200
> -Subject: [PATCH] libtheora: fix configure.ac to work with cross scenario for
> - sdl
> -
> -This is https://trac.xiph.org/ticket/1466
> -
> -The current test in configure.ac mixes up two different methods (hand
> -written plus pkg-config). This patch changes the mechanics towards
> -proper pkg-config usage. In return, we get a cleaned up cross scenario
> -with no build-system leakage.
> -
> -This patch fixes the SDL test.
> -
> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ----
> - configure.ac | 28 ++++++++++++++++++++++------
> - 1 file changed, 22 insertions(+), 6 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 234acd501685..8a4faa7d344f 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -467,12 +467,28 @@ if test "${HAVE_VORBIS}" = "yes"; then
> - fi
> - 
> - dnl check for SDL
> --HAVE_SDL=no
> --if test "x$HAVE_PKG_CONFIG" = "xyes"
> --then
> --  PKG_CHECK_MODULES(SDL, sdl, HAVE_SDL=yes, [
> --    HAVE_SDL=no
> --    AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***])])
> -+AC_MSG_CHECKING([for sdl])
> -+AC_ARG_ENABLE(sdl,
> -+    AS_HELP_STRING([--enable-sdl], [enable SDL @<:@default=yes@:>@]),
> -+        [case "$enableval" in
> -+        y | yes) HAVE_SDL=yes ;;
> -+        *) HAVE_SDL=no ;;
> -+        esac],
> -+    [HAVE_SDL=yes])
> -+AC_MSG_RESULT([${HAVE_SDL}])
> -+AM_CONDITIONAL(HAVE_SDL, [test "$HAVE_SDL" = "yes"])
> -+if test "${HAVE_SDL}" = "yes"; then
> -+    AC_DEFINE(HAVE_SDL, 1, [sdl])
> -+
> -+    REQUIRES_SDL="sdl >= 1.2.13"
> -+    AC_SUBST(REQUIRES_SDL)
> -+    PKG_CHECK_MODULES([SDL],
> -+          [${REQUIRES_SDL}],
> -+          [],
> -+          [AC_MSG_ERROR([*** ${REQUIRES_SDL} not found by pkg-config on your system])]
> -+    )
> -+    AC_SUBST(SDL_CFLAGS)
> -+    AC_SUBST(SDL_LIBS)
> - fi
> - 
> - dnl check for OSS
> diff --git a/patches/libtheora-1.2.0/0003-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch b/patches/libtheora-1.2.0/0003-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> deleted file mode 100644
> index 7097024915b7..000000000000
> --- a/patches/libtheora-1.2.0/0003-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> +++ /dev/null
> @@ -1,82 +0,0 @@
> -From: Robert Schwebel <r.schwebel@pengutronix.de>
> -Date: Wed, 23 Sep 2026 17:03:33 +0200
> -Subject: [PATCH] libtheora: fix configure.ac to work with cross scenario for
> - ogg
> -
> -This is https://trac.xiph.org/ticket/1467
> -
> -The current test in configure.ac mixes up two different methods (hand
> -written plus pkg-config). This patch changes the mechanics towards
> -proper pkg-config usage. In return, we get a cleaned up cross scenario
> -with no build-system leakage.
> -
> -This patch fixes the libogg test.
> -
> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ----
> - configure.ac | 52 ++++++++++++++++++++++------------------------------
> - 1 file changed, 22 insertions(+), 30 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 8a4faa7d344f..b17cafe75b92 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -408,36 +408,28 @@ dnl Checks for support libraries and headers
> - dnl --------------------------------------------------
> - 
> - dnl check for Ogg
> --HAVE_OGG=no
> --
> --dnl first check through pkg-config since it's more flexible
> --
> --dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
> --AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
> --
> --THEORA_LIBOGG_REQ_VERSION=1.3.4
> --AC_SUBST(THEORA_LIBOGG_REQ_VERSION)
> --if test "x$HAVE_PKG_CONFIG" = "xyes"
> --then
> --  PKG_CHECK_MODULES(OGG, ogg >= $THEORA_LIBOGG_REQ_VERSION, HAVE_OGG=yes, HAVE_OGG=no)
> --fi
> --if test "x$HAVE_OGG" = "xno"
> --then
> --  dnl fall back to the old school test
> --  XIPH_PATH_OGG(, AC_MSG_ERROR([
> --    libogg is required to build this package!
> --    please see https://www.xiph.org/ for how to
> --    obtain a copy.
> --  ]))
> --  cflags_save=$CFLAGS
> --  libs_save=$LIBS
> --  CFLAGS="$CFLAGS $OGG_CFLAGS"
> --  LIBS="$LIBS $OGG_LIBS"
> --  AC_CHECK_FUNC(oggpackB_read, , [
> --    AC_MSG_ERROR([newer libogg version ($THEORA_LIBOGG_REQ_VERSION or later) required])
> --  ])
> --  CFLAGS=$cflags_save
> --  LIBS=$libs_save
> -+AC_MSG_CHECKING([for ogg])
> -+AC_ARG_ENABLE(ogg,
> -+    AS_HELP_STRING([--enable-ogg], [enable ogg @<:@default=yes@:>@]),
> -+        [case "$enableval" in
> -+        y | yes) HAVE_OGG=yes ;;
> -+        *) HAVE_OGG=no ;;
> -+        esac],
> -+    [HAVE_OGG=yes])
> -+AC_MSG_RESULT([${HAVE_OGG}])
> -+AM_CONDITIONAL(HAVE_OGG, [test "$HAVE_OGG" = "yes"])
> -+if test "${HAVE_OGG}" = "yes"; then
> -+    AC_DEFINE(HAVE_OGG, 1, [ogg])
> -+
> -+    REQUIRES_OGG="ogg >= 1.3.4"
> -+    AC_SUBST(REQUIRES_OGG)
> -+    PKG_CHECK_MODULES([OGG],
> -+          [${REQUIRES_OGG}],
> -+          [],
> -+          [AC_MSG_ERROR([*** ${REQUIRES_OGG} not found by pkg-config on your system])]
> -+    )
> -+    AC_SUBST(OGG_CFLAGS)
> -+    AC_SUBST(OGG_LIBS)
> - fi
> - 
> - 
> diff --git a/patches/libtheora-1.2.0/autogen.sh b/patches/libtheora-1.2.0/autogen.sh
> deleted file mode 100755
> index e0a6f14ab1b4..000000000000
> --- a/patches/libtheora-1.2.0/autogen.sh
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -#!/bin/sh
> -
> -./autogen.sh --help
> -
> -
> -echo "Generating configuration files for $package, please wait...."
> -
> -echo "  aclocal -I m4"
> -aclocal -I m4 || exit 1
> -echo "  libtoolize --automake --force"
> -libtoolize --automake --force || exit 1
> -echo "  autoheader"
> -autoheader || exit 1
> -echo "  automake --add-missing"
> -automake --add-missing || exit 1
> -echo "  autoconf"
> -autoconf || exit 1
> -
> -
> diff --git a/patches/libtheora-1.2.0/series b/patches/libtheora-1.2.0/series
> index 2864ad964b30..f5168b66c52a 100644
> --- a/patches/libtheora-1.2.0/series
> +++ b/patches/libtheora-1.2.0/series
> @@ -1,7 +1,4 @@
>  # generated by git-ptx-patches
>  #tag:base --start-number 1
> -0001-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> -0002-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> -0003-libtheora-fix-configure.ac-to-work-with-cross-scenar.patch
> -0004-lib-arm-add-missing-tarball-files.patch
> -# da7149603677e486d1c23cca709e10a7  - git-ptx-patches magic
> +0001-lib-arm-add-missing-tarball-files.patch
> +# ba01f306cba847c1727aed15adb5be33  - git-ptx-patches magic
> diff --git a/rules/libtheora.make b/rules/libtheora.make
> index a7031dafa372..5bd3615bef90 100644
> --- a/rules/libtheora.make
> +++ b/rules/libtheora.make
> @@ -38,6 +38,14 @@ LIBTHEORA_CONF_ENV := \
>  	ac_cv_prog_HAVE_BIBTEX=no \
>  	ac_cv_prog_HAVE_TRANSFIG=no
>  
> +# Avoid potential compilation errors for old ARM targets
> +LIBTHEORA_ASM_FLAG := --enable-asm
> +ifdef PTXCONF_ARCH_ARM
> +ifndef PTXCONF_ARCH_ARM_V7
> +LIBTHEORA_ASM_FLAG := --disable-asm
> +endif
> +endif
> +
>  #
>  # autoconf
>  #
> @@ -48,11 +56,10 @@ LIBTHEORA_CONF_OPT	 := \
>  	--disable-spec \
>  	--disable-valgrind-testing \
>  	--disable-gcc-sanitizers \
> -	--enable-asm \
> +	$(LIBTHEORA_ASM_FLAG) \
>  	--enable-asflag-probe \
> -	--enable-ogg \
> -	--$(call ptx/endis, PTXCONF_LIBTHEORA_VORBIS)-vorbis \
> -	--disable-sdl \
> +	--with-ogg \
> +	--$(call ptx/wwo, PTXCONF_LIBTHEORA_VORBIS)-vorbis \
>  	--disable-telemetry \
>  	--disable-mem-constraint \
>  	--$(call ptx/endis, PTXCONF_LIBTHEORA_ENCODING)-encode \



      reply	other threads:[~2026-11-13  8:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 20:34 [ptxdist] [PATCH] " Sven Püschel
2026-11-13  8:38 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261113083834.1377672-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=s.pueschel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox