On Tue, Feb 20, 2024 at 11:33:52AM +0100, Roland Hieber wrote:
> The gnosis library is extracted and moved around by the objdictgen
> Makefile. Extract it early and do the same moving-around in the extract
> stage so we can patch it in PTXdist.
> 
> Not all of the Python code was ported, only enough to make the build
> work, which calls objdictgen.py to generate the C code for the examples.
> The examples are fairly extensive, so this should work for most
> user-supplied XML schema definitions. Of gnosis, only the XML pickle
> modules and the introspection module was ported since those are the only
> modules used by objdictgen. The test cases were mostly ignored, and some
> of them that test Python-specific class internals also don't apply any
> more since Python 3 refactored the whole type system. Also no care was
> taken to stay compatible with Python 1 (duh!) or Python 2.
> 
> Upstream is apparently still dead, judging from the Mercurial repo (last
> commit in 2019), the messages in the SourceForge mailing list archive
> (last message in 2020, none by the authors), and the issue tracker (last
> in 2020, none by the authors). gnosis is a whole different can of worms
> which doesn't even have a publicly available repository or contact
> information. So no attempt was made to send the changes upstream.
> 
> Remove a comment which referenced the old repository URL, which no
> longer exists.
> 
> Signed-off-by: Roland Hieber <r...@pengutronix.de>
> ---
[...]
> diff --git a/rules/canfestival.in b/rules/canfestival.in
> index 3c455569e455..217c3e872ec5 100644
> --- a/rules/canfestival.in
> +++ b/rules/canfestival.in
> @@ -4,7 +4,7 @@
>  
>  config CANFESTIVAL
>       tristate
> -     select HOST_SYSTEM_PYTHON
> +     select HOST_SYSTEM_PYTHON3
>       prompt "canfestival"
>       help
>         CanFestival is an OpenSource CANOpen framework, licensed with GPLv2 
> and
> @@ -13,4 +13,4 @@ config CANFESTIVAL
>         http://www.canfestival.org/
>  
>         STAGING: remove in PTXdist 2024.12.0
> -       Upstream is dead and needs Python 2 to build, which is also dead.
> +       Upstream is dead.

You need to remove the package from staging.

> diff --git a/rules/canfestival.make b/rules/canfestival.make
> index 91d1d973ae60..09bb0b067d82 100644
> --- a/rules/canfestival.make
> +++ b/rules/canfestival.make
> @@ -17,7 +17,6 @@ endif
>  #
>  # Paths and names
>  #
> -# Taken from https://hg.beremiz.org/CanFestival-3/rev/8bfe0ac00cdb
>  CANFESTIVAL_VERSION  := 3+hg20180126.794
>  CANFESTIVAL_MD5              := c97bca1c4a81a17b1a75a1f8d068b2b3 
> 00042e5396db4403b3feb43acc2aa1e5
>  CANFESTIVAL          := canfestival-$(CANFESTIVAL_VERSION)
> @@ -30,6 +29,24 @@ CANFESTIVAL_LICENSE_FILES  := \
>       file://LICENCE;md5=085e7fb76fb3fa8ba9e9ed0ce95a43f9 \
>       
> file://COPYING;startline=17;endline=25;md5=2964e968dd34832b27b656f9a0ca2dbf
>  
> +CANFESTIVAL_GNOSIS_SOURCE    := 
> $(CANFESTIVAL_DIR)/objdictgen/Gnosis_Utils-current.tar.gz
> +CANFESTIVAL_GNOSIS_DIR       := $(CANFESTIVAL_DIR)/objdictgen/gnosis-tar-gz

I think this should work:

CANFESTIVAL_GNOSIS_DIR          := $(CANFESTIVAL_DIR)/objdictgen/gnosis
CANFESTIVAL_GNOSIS_STRIP_LEVEL  := 2

> +
> +# 
> ----------------------------------------------------------------------------
> +# Extract
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/canfestival.extract:
> +     @$(call targetinfo)
> +     @$(call clean, $(CANFESTIVAL_DIR))
> +     @$(call extract, CANFESTIVAL)
> +     @# this is what objdictgen/Makfile does, but we want to patch gnosis
> +     @$(call extract, CANFESTIVAL_GNOSIS)

> +     @mv $(CANFESTIVAL_DIR)/objdictgen/gnosis-tar-gz/gnosis \
> +             $(CANFESTIVAL_DIR)/objdictgen/gnosis

...and remove this.

It depends a bit what's in the tarball next to gnosis.

Michael

> +     @$(call patchin, CANFESTIVAL)
> +     @$(call touch)
> +
>  # 
> ----------------------------------------------------------------------------
>  # Prepare
>  # 
> ----------------------------------------------------------------------------
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to