void-packages/srcpkgs/ufoai/patches/kill-pangox.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

39 lines
1.2 KiB
Diff

--- a/src/tools/radiant/libs/gtkutil/glfont.cpp 2020-10-10 12:51:38.707431160 +0700
+++ b/src/tools/radiant/libs/gtkutil/glfont.cpp 2020-10-10 12:51:59.843621038 +0700
@@ -26,35 +26,7 @@
GLFont glfont_create (const std::string& font_string)
{
- GLuint font_list_base = glGenLists(256);
- gint font_height = 0;
-
- PangoFontDescription* font_desc = pango_font_description_from_string(font_string.c_str());
-
- PangoFont* font = gdk_gl_font_use_pango_font(font_desc, 0, 256, font_list_base);
-
- if (font != 0) {
- PangoFontMetrics* font_metrics = pango_font_get_metrics(font, 0);
-
- font_height = pango_font_metrics_get_ascent(font_metrics) + pango_font_metrics_get_descent(font_metrics);
- font_height = PANGO_PIXELS(font_height);
-
- pango_font_metrics_unref(font_metrics);
- } else {
- globalErrorStream() << "Failed to initialize font " << font_string << "\n";
- pango_font_description_free(font_desc);
- return GLFont(-1, -1);
- }
-
- pango_font_description_free(font_desc);
-
- // fix for pango/gtkglext metrix bug
- if (font_height > 16)
- font_height = 16;
-
- globalOutputStream() << "Use font " << font_string << "\n";
-
- return GLFont(font_list_base, font_height);
+ return GLFont(-1, -1);
}
void glfont_release (GLFont& font)