pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/xclannad xclannad: Import xclannad-0.07hc as gam...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4ee2d45a5074
branches: trunk
changeset: 407256:4ee2d45a5074
user: tsutsui <tsutsui%pkgsrc.org@localhost>
date: Fri Jan 03 02:35:51 2020 +0000
description:
xclannad: Import xclannad-0.07hc as games/xclannad
Xclannad, developed by Jagarl, is an interpretor for RealLive engine games.
diffstat:
games/xclannad/DESCR | 1 +
games/xclannad/Makefile | 44 +++++
games/xclannad/PLIST | 3 +
games/xclannad/distinfo | 20 ++
games/xclannad/patches/patch-Makefile.in | 32 ++++
games/xclannad/patches/patch-font_font__peer__ft2.cc | 21 ++
games/xclannad/patches/patch-font_text__stream.cc | 31 ++++
games/xclannad/patches/patch-music2_music.cc | 15 +
games/xclannad/patches/patch-scn2k_scn2k__cmd.cc | 78 ++++++++++
games/xclannad/patches/patch-scn2k_scn2k__grp.cc | 53 ++++++
games/xclannad/patches/patch-scn2k_scn2k__text.cc | 52 ++++++
games/xclannad/patches/patch-system_file.cc | 137 ++++++++++++++++++
games/xclannad/patches/patch-system_file.h | 36 ++++
games/xclannad/patches/patch-system_system__config.cc | 23 +++
games/xclannad/patches/patch-window_SDL__rotozoom.cc | 33 ++++
games/xclannad/patches/patch-window_button.cc | 43 +++++
games/xclannad/patches/patch-window_picture.cc | 29 +++
games/xclannad/patches/patch-xlovesys.cc | 15 +
18 files changed, 666 insertions(+), 0 deletions(-)
diffs (truncated from 738 to 300 lines):
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/DESCR Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,1 @@
+Xclannad, developed by Jagarl, is an interpretor for RealLive engine games.
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/Makefile Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+#
+
+DISTNAME= xclannad-7hc
+PKGNAME= xclannad-0.07hc
+CATEGORIES= games
+#MASTER_SITES= http://www.creator.club.ne.jp/~jagarl/
+MASTER_SITES= http://teokurebsd.org/netbsd/packages/distfiles/xclannad/
+
+MAINTAINER= tsutsui%NetBSD.org@localhost
+HOMEPAGE= https://web.archive.org/web/20100331135549/http://www.creator.club.ne.jp/~jagarl/xclannad.html
+COMMENT= Interpretor to execute REALLIVE games for Microsoft Windows
+LICENSE= modified-bsd AND gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/xclannad-0.07h
+GNU_CONFIGURE= yes
+USE_LANGUAGES= c c++03
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+CONFIGURE_ARGS+= --with-audiodev=/dev/audio
+.endif
+
+SUBST_CLASSES+= path
+SUBST_MESSAGE.path= Fixing hardcoded paths.
+SUBST_STAGE.path= pre-configure
+SUBST_FILES.path= configure font/font_peer_ft2.cc
+SUBST_SED.path= -e 's|/usr/local/|${PREFIX}/|g'
+SUBST_SED.path+= -e 's|/usr/pkg/|${PREFIX}/|g'
+SUBST_SED.path+= -e 's|/usr/X11R6/|${X11BASE}/|g'
+SUBST_SED.path+= -e 's|/usr/X11R7/|${X11BASE}/|g'
+
+.include "../../devel/zlib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gtk2+= gtk2+>=2.6.0
+.include "../../audio/SDL_mixer/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../multimedia/smpeg/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/PLIST Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+bin/nwatowav
+bin/xclannad
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/distinfo Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+SHA1 (xclannad-7hc.tar.gz) = fbe63701a47a1bc90aca8ab8d0b41ca3b5c9d114
+RMD160 (xclannad-7hc.tar.gz) = a7bea485587c59d7797aa1bde01f0eb963122d02
+SHA512 (xclannad-7hc.tar.gz) = 5d14c1ca6932d0a013e36c2af51d0d4de2cb73e4c438ccf2bebf03f223a62649203726cc552f975e3177ea614f79c1d2d0d36220116289f0bb8f65a74997ac27
+Size (xclannad-7hc.tar.gz) = 534245 bytes
+SHA1 (patch-Makefile.in) = 3586afaf131737ded3ac1b64bfa56b3c357f3269
+SHA1 (patch-font_font__peer__ft2.cc) = cb40078c701d1bf6c5113d21890ed8d9fbb18b62
+SHA1 (patch-font_text__stream.cc) = 27b2812c199f69f4d58cc9324c9aa56b713b5abe
+SHA1 (patch-music2_music.cc) = fe8c90d9901a86dc6c799a1482ffe8ca7ca53c98
+SHA1 (patch-scn2k_scn2k__cmd.cc) = cd13290660eab7748998e46782e751748f8d4685
+SHA1 (patch-scn2k_scn2k__grp.cc) = cf0c7efa5fcac698873665b9b51f98b62344fb1d
+SHA1 (patch-scn2k_scn2k__text.cc) = aef8170b267a5a2b3f9ddbe9246fbdab8d0856cb
+SHA1 (patch-system_file.cc) = dd68b7bd6ec97961e1e367bbbb505ee3e6f0347e
+SHA1 (patch-system_file.h) = f5a759c4716b8ecdb84672de017cb92dbe36e058
+SHA1 (patch-system_system__config.cc) = 28707a1e9f489f655db18595cead0aa908175b53
+SHA1 (patch-window_SDL__rotozoom.cc) = 7f21616ba4889df0b70fa11c57eb378c3a3ac369
+SHA1 (patch-window_button.cc) = 301d30641ee6342803e2d5307118d25b31d165cc
+SHA1 (patch-window_picture.cc) = dacce976d13167f18a5a3186840f6625277c3bfc
+SHA1 (patch-xlovesys.cc) = 88e227d3ad0ca49de6c4a373cda5c31fb9fcc8ce
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-Makefile.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-Makefile.in Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-Makefile.in,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+- handle ${DESTDIR} properly
+- install nwatowav
+
+--- Makefile.in.orig 2008-01-06 05:17:13.000000000 +0000
++++ Makefile.in
+@@ -1,3 +1,6 @@
++PREFIX=@prefix@
++BINDIR=$(PREFIX)/bin
++
+ @SET_MAKE@
+ CC = @CC@
+ CXX = @CXX@
+@@ -12,14 +15,14 @@ SRCS = xlovesys.cc
+
+ OBJS = ${SRCS:.cc=.o}
+
+-all: xclannad
++all: xclannad music2/nwatowav
+
+ xclannad: xlovesys.o system/libsystem.a scn2k/libscn2k.a window/libwindow.a font/libfont.a music2/libmusic.a
+ $(LD) -o xclannad xlovesys.o system/libsystem.a scn2k/libscn2k.a window/libwindow.a font/libfont.a music2/libmusic.a $(LDFLAGS)
+
+ install: xclannad music2/nwatowav
+- mkdir -p /usr/local/bin
+- cp xclannad music2/nwatowav /usr/local/bin
++ mkdir -p ${DESTDIR}$(BINDIR)
++ cp xclannad music2/nwatowav ${DESTDIR}$(BINDIR)
+
+ clean:
+ rm -f xclannad xlovesys ${OBJS} *.bak
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-font_font__peer__ft2.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-font_font__peer__ft2.cc Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-font_font__peer__ft2.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+Add and fix default font paths.
+
+--- font/font_peer_ft2.cc.orig 2008-08-31 09:54:15.000000000 +0000
++++ font/font_peer_ft2.cc
+@@ -52,12 +52,13 @@ static FontLibrary *library = NULL;
+ static char *default_paths[] = {
+ ".",
+ "/",
+- "/usr/X11R6/lib/X11/fonts/TrueType",
++ "/usr/X11R7/lib/X11/fonts/TTF",
+ "/usr/local/share/fonts/TrueType",
+ "/usr/local/share/fonts/truetype",
+ "/usr/share/fonts/TrueType",
+ "/usr/share/fonts/truetype",
+ "/usr/share/fonts/tt",
++ "/usr/pkg/share/fonts/X11/TTF",
+ NULL
+ };
+
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-font_text__stream.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-font_text__stream.cc Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-font_text__stream.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+- don't assume signed char for arm and powerpc
+
+--- font/text_stream.cc.orig 2008-08-31 15:11:10.000000000 +0000
++++ font/text_stream.cc
+@@ -89,10 +89,10 @@ void TextStream::Clear(void) {
+ void TextStream::Add(const char* str) {
+ TextElem elem;
+ for (; *str; str++) {
+- if (*str >= 0x20) {
++ if (*str >= 0x20 && (*str & 0x80) == 0) {
+ elem.type = TextElem::glyph;
+ elem.impl.Glyph.code = *str;
+- } else if (*str < 0 && str[1] != 0) {
++ } else if ((*str & 0x80) != 0 && str[1] != 0) {
+ elem.type = TextElem::glyph;
+ elem.impl.Glyph.code = ((int(*(unsigned char*)str))<<8) | int(*(unsigned char*)(str+1));
+ if (kanji_type == sjis) elem.impl.Glyph.code = codeconv_sjis_to_euc(elem.impl.Glyph.code);
+@@ -222,9 +222,9 @@ void TextStream::Load(const std::string&
+ s++;
+ }
+ } else {
+- if (*s < 0) { // kanji-code
++ if ((*s & 0x80) != 0) { // kanji-code
+ if (s[1] == 0) break;
+- if (s[1] >= 0 && s[1] < 0x40) break; // not EUC nor SJIS
++ if ((s[1] & 0x80) == 0 && s[1] < 0x40) break; // not EUC nor SJIS
+ e.type = TextElem::glyph;
+ e.impl.Glyph.code = codeconv_sjis_to_euc(int(*(unsigned char*)(s))*0x100 + int(*(unsigned char*)(s+1)));
+ s += 2;
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-music2_music.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-music2_music.cc Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-music2_music.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+- avoid duplicated definition
+
+--- music2/music.cc.orig 2008-08-31 14:51:04.000000000 +0000
++++ music2/music.cc
+@@ -43,7 +43,7 @@
+
+ using namespace std;
+
+-#define MUSIC_VOLUME 0.2
++//#define MUSIC_VOLUME 0.2
+ #define MUSIC_VOLUME 1
+
+ int pcm_enable = 0;
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-scn2k_scn2k__cmd.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-scn2k_scn2k__cmd.cc Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,78 @@
+$NetBSD: patch-scn2k_scn2k__cmd.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+- don't assume signed char for arm and powerpc
+- fix wrong casts
+
+--- scn2k/scn2k_cmd.cc.orig 2008-08-31 09:52:12.000000000 +0000
++++ scn2k/scn2k_cmd.cc
+@@ -372,8 +372,8 @@ bool Flags::Exec(Cmd& cmd) {
+ string s = cmd.Str(cmd.args[1]);
+ const char* sc = s.c_str();
+ int len = cmd.args[2].value;
+- int i;for (i=0; i<sc[i]!=0 && len != 0; i++, len--) {
+- if (sc[i]<0 && sc[i+1]!=0) i++;
++ int i;for (i=0; i<(signed char)sc[i]!=0 && len != 0; i++, len--) {
++ if ((sc[i] & 0x80) != 0 && sc[i+1]!=0) i++;
+ }
+ s.erase(i); // Á´³Ñ¤Ç len ʸ»ú¤Þ¤ÇÀÚ¤êµÍ¤á¤ë
+ SetStr(arg1, s);
+@@ -434,7 +434,7 @@ bool Flags::Exec(Cmd& cmd) {
+ int i;
+ int offset_top = 0;
+ for (i=0; i<offset && s[offset_top] != 0; i++) {
+- if (s[offset_top] < 0 && s[offset_top+1] != 0) offset_top += 2;
++ if ((s[offset_top] & 0x80) != 0 && s[offset_top+1] != 0) offset_top += 2;
+ else offset_top += 1;
+ }
+ if (s[offset_top] == 0) {
+@@ -445,7 +445,7 @@ bool Flags::Exec(Cmd& cmd) {
+ int slen = cmd.args[3].value;
+ int offset_end = offset_top;
+ for (i=0; i<slen && s[offset_end] != 0; i++) {
+- if (s[offset_end] < 0 && s[offset_end]+1 != 0) offset_end += 2;
++ if ((s[offset_end] & 0x80) != 0 && s[offset_end]+1 != 0) offset_end += 2;
+ else offset_end += 1;
+ }
+ string result(s, offset_top, offset_end-offset_top);
+@@ -456,7 +456,7 @@ bool Flags::Exec(Cmd& cmd) {
+ case 7: {// strlen w/ kanji
+ const char* s = cmd.Str(cmd.args[0]); int i;
+ for (i=0; *s != 0; i++) {
+- if (*s < 0 && s[1] != 0) s += 2;
++ if ((*s & 0x80) != 0 && s[1] != 0) s += 2;
+ else s++;
+ }
+ SetSys(i);
+@@ -682,8 +682,8 @@ int Cmd::GetLeftToken(const char*& d, Va
+ d += 2;
+ var_flag = false;
+ }
+- if (d[0] == 0x24 && ((unsigned const char*)d)[1] == 0xff) {
+- // if ( (d[0] == 0x30 || d[0] == 0x31) && d[1] == 0x24 && ((unsigned const char*)d)[2] == 0xff) /* @@@ not supported; selection Æâ¤Ç¡¢0x30|0x31 ¤¬Éտ魯¤ë¤³¤È¤¬¤¢¤ë */
++ if (d[0] == 0x24 && (unsigned char)d[1] == 0xff) {
++ // if ( (d[0] == 0x30 || d[0] == 0x31) && d[1] == 0x24 && (unsigned const char)d[2] == 0xff) /* @@@ not supported; selection Æâ¤Ç¡¢0x30|0x31 ¤¬Éտ魯¤ë¤³¤È¤¬¤¢¤ë */
+ // numerical atom
+ d += 6;
+ value = read_little_endian_int(d-4);
+@@ -1001,7 +1001,7 @@ dprintf("enum.<");
+ int count = GetArgs(d);
+ args[pt] = VarInfo(count);
+ dprintf(">");
+- } else if (*d == 0x61 && (d[1] >= 0x00 && d[1] <= 0x04) && d[2] == 0x28 ) {
++ } else if (*d == 0x61 && ((d[1] & 0x80) == 0 && d[1] <= 0x04) && d[2] == 0x28 ) {
+ /* »È¤ï¤ì¤ë¥³¥Þ¥ó¥É¤Ï 01-21:004b, 01-28:0064 ¤Î¤¤¤º¤ì¤«¡ÊR,C,PB,LO)
+ ** ¤½¤ì¤é¤Î¥³¥Þ¥ó¥É¤Ï
+ ** arg1: ²èÁü¥Õ¥¡¥¤¥ë̾
+@@ -1714,10 +1714,10 @@ int main(int argc, char** argv) {
+ Cmd cmd(flags, system_version); cmd.ClearError();
+
+ /* end? */
+- if (*dcur == -1) {
++ if ((unsigned char)*dcur == 0xff) {
+ /* 0xff x 32byte + 0x00 : end sign */
+ int i; for (i=0; i<0x20; i++)
+- if (dcur[i] != -1) break;
++ if ((unsigned char)dcur[i] != 0xff) break;
+ if (i == 0x20 && dcur[i] == 0) break;
+ }
+ dprintf("%d : ",dcur-dstart);
diff -r dd35176d11a2 -r 4ee2d45a5074 games/xclannad/patches/patch-scn2k_scn2k__grp.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-scn2k_scn2k__grp.cc Fri Jan 03 02:35:51 2020 +0000
@@ -0,0 +1,53 @@
+$NetBSD: patch-scn2k_scn2k__grp.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+
+- don't assume signed char for arm and powerpc
+- avoid use of double and use long long instead
+- use string::npos properly
+
+--- scn2k/scn2k_grp.cc.orig 2009-08-22 15:41:41.000000000 +0000
++++ scn2k/scn2k_grp.cc
+@@ -440,7 +440,7 @@ void GrpObj::ZoomRotate(void) {
+ static char* wstrchr(const char* s, unsigned int chr) {
+ int ws, wc;
+ while(*s != 0) {
+- if (*s < 0 && s[1] != 0) {
++ if ((*s & 0x80) != 0 && s[1] != 0) {
+ wc = int((unsigned char)(s[0]))*0x100 + int((unsigned char)(s[1]));
Home |
Main Index |
Thread Index |
Old Index