]> git.pld-linux.org Git - packages/avahi.git/blob - avahi-missing.patch
- fixed qt3 devel dependency; release 2
[packages/avahi.git] / avahi-missing.patch
1 --- avahi-0.8/service-type-database/build-db.orig       1970-01-01 01:00:00.000000000 +0100
2 +++ avahi-0.8/service-type-database/build-db    2020-02-26 21:30:46.708401608 +0100
3 @@ -0,0 +1,49 @@
4 +#!/usr/bin/env python
5 +# -*-python-*-
6 +# This file is part of avahi.
7 +#
8 +# avahi is free software; you can redistribute it and/or modify it
9 +# under the terms of the GNU Lesser General Public License as
10 +# published by the Free Software Foundation; either version 2 of the
11 +# License, or (at your option) any later version.
12 +#
13 +# avahi is distributed in the hope that it will be useful, but WITHOUT
14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 +# License for more details.
17 +#
18 +# You should have received a copy of the GNU Lesser General Public
19 +# License along with avahi; if not, write to the Free Software
20 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 +# USA.
22 +
23 +try:
24 +    import anydbm as dbm
25 +except ImportError:
26 +    import dbm
27 +
28 +import sys
29 +
30 +if len(sys.argv) > 1:
31 +    infn = sys.argv[1]
32 +else:
33 +    infn = "service-types"
34 +
35 +if len(sys.argv) > 2:
36 +    outfn = sys.argv[2]
37 +else:
38 +    outfn = infn + ".db"
39 +
40 +db = dbm.open(outfn, "n")
41 +
42 +for ln in open(infn, "r"):
43 +    ln = ln.strip(" \r\n\t")
44 +    
45 +    if ln == "" or ln.startswith("#"):
46 +        continue
47 +
48 +    t, n = ln.split(":", 1)
49 +
50 +    db[t.strip()] = n.strip()
51 +
52 +db.close()
This page took 0.077938 seconds and 3 git commands to generate.