pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xwax: Now starts.



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Sat Oct 5 14:38:28 2019 +0100
Changeset:	6320c305eaa4f5d6ff6d147092292995b67f59b2

Modified Files:
	xwax/Makefile
	xwax/distinfo
	xwax/patches/patch-interface.c

Log Message:
xwax: Now starts.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6320c305eaa4f5d6ff6d147092292995b67f59b2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 xwax/Makefile                  | 11 ++++++++-
 xwax/distinfo                  |  6 ++++-
 xwax/patches/patch-interface.c | 51 +++++++++++++++++++++++++++++++++---------
 3 files changed, 56 insertions(+), 12 deletions(-)

diffs:
diff --git a/xwax/Makefile b/xwax/Makefile
index 6cabc4d6fa..725a6e751b 100644
--- a/xwax/Makefile
+++ b/xwax/Makefile
@@ -9,7 +9,9 @@ HOMEPAGE=	https://xwax.org/
 COMMENT=	Vinyl emulation software
 LICENSE=	gnu-gpl-v2
 
-USE_TOOLS+=	bash:run gmake
+USE_TOOLS+=	bash:run gsed:run gmake
+
+DEPENDS+=	dejavu-ttf-[0-9]*:../../fonts/dejavu-ttf
 
 MAKE_FLAGS+=	EXECDIR=${PREFIX}/libexec
 
@@ -20,6 +22,13 @@ MAKE_FLAGS+=	OSS=1
 
 REPLACE_BASH+=	scan
 
+SUBST_CLASSES+=		prefix
+SUBST_STAGE.prefix=	pre-configure
+SUBST_MESSAGE.prefix=	Setting path to PREFIX in source files.
+SUBST_FILES.prefix+=	import
+SUBST_FILES.prefix+=	interface.c
+SUBST_VARS.prefix+=	PREFIX
+
 INSTALLATION_DIRS+=	bin libexec
 INSTALLATION_DIRS+=	${PKGMANDIR}/man1
 INSTALLATION_DIRS+=	share/doc/xwax
diff --git a/xwax/distinfo b/xwax/distinfo
index ee267917c7..021a7694fc 100644
--- a/xwax/distinfo
+++ b/xwax/distinfo
@@ -5,7 +5,11 @@ RMD160 (xwax-1.7.tar.gz) = 88c61bf650413db813119e15d74329e234aafe51
 SHA512 (xwax-1.7.tar.gz) = ab0fcaf32f1fd1d6b38323095524f1932a067a3d04d40e4b043993e360411fed0c4b78bb71662581b438cb1e3005bc21659db4521a6ec704994b2e8e1b7e62d4
 Size (xwax-1.7.tar.gz) = 80745 bytes
 SHA1 (patch-excrate.c) = c88e41838a2ad670db6fa33eaf9187bfeb1c75cd
-SHA1 (patch-interface.c) = cd853a890ff757d0eecd7bfa0ad37923d7793556
+SHA1 (patch-import) = 51b4ddfea7ec63aabc6305ad372a63b8a0b7cc68
+SHA1 (patch-interface.c) = 2eaa398c55a708b90f695743369f82938cc11c2f
 SHA1 (patch-library.c) = 12ffc297d0cb4d1dcfe121106d22059cb14950f3
 SHA1 (patch-mktimecode.c) = 1fff7867368791b13cc4ad1181c6091f423ecb95
+SHA1 (patch-realtime.c) = 19ac29cc095a13e29d1d6c69731204533a7f8723
+SHA1 (patch-scan) = dff0c31ce13c3f88b924c6f74e8ab28232f01a24
 SHA1 (patch-track.c) = f85e5aea96fb5471140d11a22e876cea8dc041dc
+SHA1 (patch-xwax.c) = 580b50312f4e6282e2e1c4f91c2e4db29189fbf3
diff --git a/xwax/patches/patch-interface.c b/xwax/patches/patch-interface.c
index 585d2a00e9..86b255dde6 100644
--- a/xwax/patches/patch-interface.c
+++ b/xwax/patches/patch-interface.c
@@ -1,22 +1,53 @@
 $NetBSD$
 
-Avoid strdupa.
+Avoid broken locale code.
 
 --- interface.c.orig	2018-01-19 20:40:49.000000000 +0000
 +++ interface.c
-@@ -426,10 +426,9 @@ static int do_draw_text(SDL_Surface *sf,
-             if (iconv(utf, NULL, NULL, &out, &fill) == -1)
-                 abort();
+@@ -139,13 +139,7 @@
+ /* List of directories to use as search path for fonts. */
  
--            in = strdupa(buf);
-             len = strlen(in);
+ static const char *font_dirs[] = {
+-    "/usr/X11R6/lib/X11/fonts/TTF",
+-    "/usr/share/fonts/truetype/ttf-dejavu/",
+-    "/usr/share/fonts/ttf-dejavu",
+-    "/usr/share/fonts/dejavu",
+-    "/usr/share/fonts/TTF",
+-    "/usr/share/fonts/truetype/dejavu",
+-    "/usr/share/fonts/truetype/ttf-dejavu",
++    "@PREFIX@/share/fonts/X11/TTF",
+     NULL
+ };
+ 
+@@ -413,27 +407,7 @@ static int do_draw_text(SDL_Surface *sf,
+         src.h = 0;
  
+     } else {
+-        if (!locale) {
+             rendered = TTF_RenderText_Shaded(font, buf, fg, bg);
+-        } else {
+-            char ubuf[256], /* fixed buffer is reasonable for rendering */
+-                *in, *out;
+-            size_t len, fill;
+-
+-            out = ubuf;
+-            fill = sizeof(ubuf) - 1; /* always leave space for \0 */
+-
+-            if (iconv(utf, NULL, NULL, &out, &fill) == -1)
+-                abort();
+-
+-            in = strdupa(buf);
+-            len = strlen(in);
+-
 -            (void)iconv(utf, &in, &len, &out, &fill);
-+            (void)iconv(utf, &buf, &len, &out, &fill);
-             *out = '\0';
+-            *out = '\0';
+-
+-            rendered = TTF_RenderUTF8_Shaded(font, ubuf, fg, bg);
+-        }
  
-             rendered = TTF_RenderUTF8_Shaded(font, ubuf, fg, bg);
-@@ -1875,7 +1874,7 @@ int interface_start(struct library *lib,
+         src.x = 0;
+         src.y = 0;
+@@ -1875,7 +1849,7 @@ int interface_start(struct library *lib,
      if (load_fonts() == -1)
          return -1;
  


Home | Main Index | Thread Index | Old Index