[vlc-devel] [PATCH 1/2] pkg-rewrite-absolute.py: use OrderedDict for variables
Marvin Scholz
epirat07 at gmail.com
Wed Mar 11 14:21:58 CET 2020
LGTM
On 11 Mar 2020, at 14:20, Alexandre Janniaux wrote:
> Otherwise we can end up with .pc files having variables being used
> before being declared, which is not supported by old pkg-config
> executables. For example, on libplacebo.pc, with the (in)correct
> version
> of python, it was ending up with:
>
> libdir=${prefix}/lib
> prefix=/foo
>
> Refs videolan/vlc-android#1213
> ---
> contrib/src/pkg-rewrite-absolute.py | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/contrib/src/pkg-rewrite-absolute.py
> b/contrib/src/pkg-rewrite-absolute.py
> index 8b7967c93c..4441f3f4eb 100755
> --- a/contrib/src/pkg-rewrite-absolute.py
> +++ b/contrib/src/pkg-rewrite-absolute.py
> @@ -1,13 +1,14 @@
> #!/usr/bin/env python3
> import os, sys, argparse
> +from collections import OrderedDict
>
> class PkgConfigFile():
> """Representation of a pkg-config file (.pc)"""
>
> - pc_variables = {}
> - pc_variables_expanded = {}
> + pc_variables = OrderedDict()
> + pc_variables_expanded = OrderedDict()
>
> - pc_keywords = {}
> + pc_keywords = OrderedDict()
>
> def __init__(self, file):
> for line in file:
> --
> 2.25.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list