SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,46 @@
From ffc23c3b3d49d265997b6bb5d55d9463080c1cc8 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@freedesktop.org>
Date: Mon, 10 Feb 2020 15:20:38 +0100
Subject: [PATCH] tools: Fix the build with Python 3
Index: tools/glib-interfaces-gen.py
--- tools/glib-interfaces-gen.py.orig
+++ tools/glib-interfaces-gen.py
@@ -3,7 +3,7 @@
from sys import argv, stdout, stderr
import xml.dom.minidom
-from libtpcodegen import file_set_contents
+from libtpcodegen import file_set_contents, u
from libglibcodegen import NS_TP, get_docstring, \
get_descendant_text, get_by_path
@@ -24,22 +24,22 @@ class Generator(object):
self.spec = get_by_path(dom, "spec")[0]
def h(self, code):
- self.decls.append(code.encode('utf-8'))
+ self.decls.append(code)
def c(self, code):
- self.impls.append(code.encode('utf-8'))
+ self.impls.append(code)
def d(self, code):
- self.docs.append(code.encode('utf-8'))
+ self.docs.append(code)
def __call__(self):
for f in self.h, self.c:
self.do_header(f)
self.do_body()
- file_set_contents(self.implfile, ''.join(self.impls))
- file_set_contents(self.declfile, ''.join(self.decls))
- file_set_contents(self.docfile, ''.join(self.docs))
+ file_set_contents(self.implfile, u('').join(self.impls).encode('utf-8'))
+ file_set_contents(self.declfile, u('').join(self.decls).encode('utf-8'))
+ file_set_contents(self.docfile, u('').join(self.docs).encode('utf-8'))
# Header
def do_header(self, f):