diff options
author | John Marino <marino@FreeBSD.org> | 2014-08-21 09:56:28 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-08-21 09:56:28 +0000 |
commit | af6cfd5b0b0ebd0945dc2e44ea3e21123e17190b (patch) | |
tree | c9497f1554d5d448db6b4cafdc9d6c101f2b9ca6 | |
parent | bfb51f7f52f7fa58ab79c490811242cfb68ee06e (diff) |
Stage games/pykawari and unbreak on FreeBSD 10+
PR: 192797
Submitted by: Ports Fury
Notes
Notes:
svn path=/head/; revision=365541
-rw-r--r-- | games/pykawari/Makefile | 50 | ||||
-rw-r--r-- | games/pykawari/files/patch-build__src__libkawari__kawari_dict.cpp | 10 | ||||
-rw-r--r-- | games/pykawari/files/patch-build__src__libkawari__kawari_ns.cpp | 10 | ||||
-rw-r--r-- | games/pykawari/files/patch-build__src__misc__mmap.h | 11 | ||||
-rw-r--r-- | games/pykawari/files/patch-build__src__shiori__kawari_shiori.cpp | 10 | ||||
-rw-r--r-- | games/pykawari/files/patch-build__src__shiori__shiori.cpp | 10 | ||||
-rw-r--r-- | games/pykawari/files/patch-build_src_gcc.mak | 10 | ||||
-rw-r--r-- | games/pykawari/pkg-plist | 90 |
8 files changed, 124 insertions, 77 deletions
diff --git a/games/pykawari/Makefile b/games/pykawari/Makefile index f0df16ee7c57..4ac1054ba2f4 100644 --- a/games/pykawari/Makefile +++ b/games/pykawari/Makefile @@ -3,7 +3,7 @@ PORTNAME= pykawari PORTVERSION= 8.2.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= games MASTER_SITES= SF/kawari/kawari/${PORTVERSION} DISTNAME= kawari-${PORTVERSION:S/.//g} @@ -11,38 +11,36 @@ DISTNAME= kawari-${PORTVERSION:S/.//g} MAINTAINER= ports@FreeBSD.org COMMENT= Real kawari8 module for ninix-aya -RUN_DEPENDS= ninix:${PORTSDIR}/games/ninix-aya - -EXTRACT_BEFORE_ARGS= # empty -EXTRACT_AFTER_ARGS= # empty +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/license.txt -PLIST_SUB= LOCALBASE=${LOCALBASE} +RUN_DEPENDS= ninix:${PORTSDIR}/games/ninix-aya -USES= gmake zip -USE_PYTHON= yes +BUILD_WRKSRC= ${WRKSRC}/build/src -WRKSRC= ${WRKDIR}/kawari-${PORTVERSION:S/.//g} -CFLAGS+= ${PTHREAD_CFLAGS} -fPIC +USES= gmake python zip +MAKEFILE= gcc.mak +MAKE_ARGS= CXX="${CXX}" CFLAGS="${CXXFLAGS}" \ + PYTHONBASE="${PYTHONBASE}" PYTHON_VERSION="${PYTHON_VERSION}" -NO_STAGE= yes -.include <bsd.port.pre.mk> +CFLAGS+= -I. -DNDEBUG -I${PYTHON_INCLUDEDIR} -fPIC -.if ${ARCH} == "amd64" || ${ARCH} == "ia64" -CFLAGS+= -fPIC -.endif +DATADIR= ${PREFIX}/share/kawari post-patch: @${REINPLACE_CMD} -e 's|shell python|shell ${PYTHON_CMD}|' \ - ${WRKSRC}/build/src/gcc.mak - -do-build: - (cd ${WRKSRC}/build/src; CFLAGS="${CFLAGS}" ${MAKE_CMD} -f gcc.mak PYTHONBASE=${PYTHONBASE} PYTHON_VERSION=${PYTHON_VERSION} PTHREAD_LIBS=${PTHREAD_LIBS} CXX=${CXX}) + ${BUILD_WRKSRC}/gcc.mak do-install: - ${MKDIR} ${PREFIX}/share/kawari - (cd ${WRKSRC}; ${TAR} -cf - document license.txt readme.1st build/BUILD.TXT) | ${TAR} -xvpf - -C ${PREFIX}/share/kawari - ${LN} -f ${WRKSRC}/build/mach/freebsd/libshiori.so ${WRKSRC}/build/mach/freebsd/_kawari8.so - ${MKDIR} ${PREFIX}/libexec/ninix - ${INSTALL_PROGRAM} ${WRKSRC}/build/mach/freebsd/_kawari8.so ${PREFIX}/libexec/ninix - -.include <bsd.port.post.mk> + @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/ninix \ + ${STAGEDIR}${DATADIR}/build + (cd ${WRKSRC}/build/mach/freebsd && ${INSTALL_LIB} libshiori.so \ + ${STAGEDIR}${PREFIX}/libexec/ninix/_kawari8.so) + (cd ${WRKSRC} && ${COPYTREE_SHARE} document \ + ${STAGEDIR}${DATADIR}) + (cd ${WRKSRC} && ${INSTALL_DATA} license.txt readme.1st \ + ${STAGEDIR}${DATADIR}) + (cd ${WRKSRC}/build && ${INSTALL_DATA} BUILD.TXT \ + ${STAGEDIR}${DATADIR}/build) + +.include <bsd.port.mk> diff --git a/games/pykawari/files/patch-build__src__libkawari__kawari_dict.cpp b/games/pykawari/files/patch-build__src__libkawari__kawari_dict.cpp new file mode 100644 index 000000000000..6ac2a457525c --- /dev/null +++ b/games/pykawari/files/patch-build__src__libkawari__kawari_dict.cpp @@ -0,0 +1,10 @@ +--- build/src/libkawari/kawari_dict.cpp.orig ++++ build/src/libkawari/kawari_dict.cpp +@@ -32,6 +32,7 @@ + using namespace kawari_log; + //--------------------------------------------------------------------------- + #include <iostream> ++#include <climits> + using namespace std; + //--------------------------------------------------------------------------- + // 範囲外のインデックス diff --git a/games/pykawari/files/patch-build__src__libkawari__kawari_ns.cpp b/games/pykawari/files/patch-build__src__libkawari__kawari_ns.cpp new file mode 100644 index 000000000000..302edabae328 --- /dev/null +++ b/games/pykawari/files/patch-build__src__libkawari__kawari_ns.cpp @@ -0,0 +1,10 @@ +--- build/src/libkawari/kawari_ns.cpp.orig ++++ build/src/libkawari/kawari_ns.cpp +@@ -18,6 +18,7 @@ + #include "misc/misc.h" + using namespace kawari_log; + //--------------------------------------------------------------------------- ++#include <climits> + using namespace std; + //--------------------------------------------------------------------------- + // 範囲外のインデックス diff --git a/games/pykawari/files/patch-build__src__misc__mmap.h b/games/pykawari/files/patch-build__src__misc__mmap.h index 079d4ed9d403..bf3384f3f1c4 100644 --- a/games/pykawari/files/patch-build__src__misc__mmap.h +++ b/games/pykawari/files/patch-build__src__misc__mmap.h @@ -10,7 +10,16 @@ // if(it==end()) it=insert(pair<KeyType,DataType>(key,DataType())); // if(it==upper_bound(key)) it=insert(pair<const KeyType,DataType>(key,DataType())); - if(it==upper_bound(key)) it=insert(typename TMMap<KeyType,DataType>::value_type(key,DataType())); -+ if(it==std::multimap<KeyType, DataType>::upper_bound(key)) it=insert(typename TMMap<KeyType,DataType>::value_type(key,DataType())); ++ if(it==std::multimap<KeyType, DataType>::upper_bound(key)) it=this->insert(typename TMMap<KeyType,DataType>::value_type(key,DataType())); return((*it).second); } /* +@@ -43,7 +43,7 @@ + void Add(const KeyType& key,const DataType& data) + { + // insert(pair<const KeyType,DataType>(key,data)); +- insert(typename TMMap::value_type(key,data)); ++ this->insert(typename TMMap::value_type(key,data)); + } + + }; diff --git a/games/pykawari/files/patch-build__src__shiori__kawari_shiori.cpp b/games/pykawari/files/patch-build__src__shiori__kawari_shiori.cpp new file mode 100644 index 000000000000..41f187ee7d73 --- /dev/null +++ b/games/pykawari/files/patch-build__src__shiori__kawari_shiori.cpp @@ -0,0 +1,10 @@ +--- build/src/shiori/kawari_shiori.cpp.orig ++++ build/src/shiori/kawari_shiori.cpp +@@ -75,6 +75,7 @@ + #include <cstdlib> + #include <ctime> + #include <cctype> ++#include <cstring> + using namespace std; + //--------------------------------------------------------------------------- + #include "shiori/kawari_shiori.h" diff --git a/games/pykawari/files/patch-build__src__shiori__shiori.cpp b/games/pykawari/files/patch-build__src__shiori__shiori.cpp new file mode 100644 index 000000000000..5ee7a48351f1 --- /dev/null +++ b/games/pykawari/files/patch-build__src__shiori__shiori.cpp @@ -0,0 +1,10 @@ +--- build/src/shiori/shiori.cpp.orig ++++ build/src/shiori/shiori.cpp +@@ -24,6 +24,7 @@ + #include "include/shiori.h" + //--------------------------------------------------------------------------- + #include <string> ++#include <cstring> + using namespace std; + //--------------------------------------------------------------------------- + namespace { diff --git a/games/pykawari/files/patch-build_src_gcc.mak b/games/pykawari/files/patch-build_src_gcc.mak index c618ee0451c3..83f3840cdc13 100644 --- a/games/pykawari/files/patch-build_src_gcc.mak +++ b/games/pykawari/files/patch-build_src_gcc.mak @@ -35,7 +35,7 @@ -CFLAGS = -O1 -I. -DNDEBUG -Wall -fomit-frame-pointer -LDFLAGS = -s +CFLAGS += -Os -I. -DNDEBUG -Wall -fomit-frame-pointer -+LDFLAGS += -s ++# LDFLAGS += -s #========================================================================== # Directories @@ -70,19 +70,19 @@ $(MACH)/kosui$(EXEEXT) : $(KOSUIOBJ) $(COREOBJ) $(DEPLIB) - $(CXX) -o$@ $(LDFLAGS) $(KOSUIOBJ) $(COREOBJ) $(LIBS) -+ $(CXX) -o$@ $(LDFLAGS) $(KOSUIOBJ) $(COREOBJ) $(LIBS) ${PTHREAD_LIBS} -lutil ++ $(CXX) -o$@ $(LDFLAGS) $(KOSUIOBJ) $(COREOBJ) $(LIBS) -pthread -lutil $(MACH)/kawari_encode$(EXEEXT) : tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) - $(CXX) -o$@ tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -+ $(CXX) -o$@ tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ${PTHREAD_LIBS} -lutil ++ $(CXX) -o$@ tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -pthread -lutil $(MACH)/kawari_encode2$(EXEEXT) : tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) - $(CXX) -o$@ tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -+ $(CXX) -o$@ tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ${PTHREAD_LIBS} -lutil ++ $(CXX) -o$@ tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -pthread -lutil $(MACH)/kawari_decode2$(EXEEXT) : tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) - $(CXX) -o$@ tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -+ $(CXX) -o$@ tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ${PTHREAD_LIBS} -lutil ++ $(CXX) -o$@ tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) -pthread -lutil $(MACH)/libjvm.dll.a : win32jvm.def dlltool --def win32jvm.def -l $@ --dllname jvm.dll -k -C -a diff --git a/games/pykawari/pkg-plist b/games/pykawari/pkg-plist index f3ce125c4ee5..a93debd13864 100644 --- a/games/pykawari/pkg-plist +++ b/games/pykawari/pkg-plist @@ -1,46 +1,46 @@ libexec/ninix/_kawari8.so -share/kawari/document/banners/kawalinks.png -share/kawari/document/banners/kawari.png -share/kawari/document/banners/kawaribts.png -share/kawari/document/banners/kawariplus.png -share/kawari/document/banners/kawarisf.png -share/kawari/document/banners/kawari_bbs.png -share/kawari/document/banners/kawari_logo.png -share/kawari/document/banners/kpcg_banner.png -share/kawari/document/banners/fake-kawaribts.png -share/kawari/document/banners/fake-kawalinks.png -share/kawari/document/images/logo.png -share/kawari/document/images/logo2.png -share/kawari/document/images/ver_731.png -share/kawari/document/images/ver_790.png -share/kawari/document/images/ver_800.png -share/kawari/document/images/ver_810.png -share/kawari/document/images/ver_820.png -share/kawari/document/index.html -share/kawari/document/kawari.css -share/kawari/document/kis_reference.html -share/kawari/document/kiu_specbnf.txt -share/kawari/document/kosui.html -share/kawari/document/license.html -share/kawari/document/programming.html -share/kawari/document/programming_1.html -share/kawari/document/programming_2.html -share/kawari/document/programming_3.html -share/kawari/document/programming_4.html -share/kawari/document/programming_5.html -share/kawari/document/start.html -share/kawari/document/story.html -share/kawari/document/tips.html -share/kawari/document/users.html -share/kawari/document/convert.html -share/kawari/document/errormes.html -share/kawari/document/source.html -share/kawari/document/changelog.txt -share/kawari/license.txt -share/kawari/readme.1st -share/kawari/build/BUILD.TXT -@dirrm share/kawari/document/banners -@dirrm share/kawari/document/images -@dirrm share/kawari/document -@dirrm share/kawari/build -@dirrm share/kawari +%%DATADIR%%/build/BUILD.TXT +%%DATADIR%%/document/banners/kawalinks.png +%%DATADIR%%/document/banners/kawari.png +%%DATADIR%%/document/banners/kawaribts.png +%%DATADIR%%/document/banners/kawariplus.png +%%DATADIR%%/document/banners/kawarisf.png +%%DATADIR%%/document/banners/kawari_bbs.png +%%DATADIR%%/document/banners/kawari_logo.png +%%DATADIR%%/document/banners/kpcg_banner.png +%%DATADIR%%/document/banners/fake-kawaribts.png +%%DATADIR%%/document/banners/fake-kawalinks.png +%%DATADIR%%/document/images/logo.png +%%DATADIR%%/document/images/logo2.png +%%DATADIR%%/document/images/ver_731.png +%%DATADIR%%/document/images/ver_790.png +%%DATADIR%%/document/images/ver_800.png +%%DATADIR%%/document/images/ver_810.png +%%DATADIR%%/document/images/ver_820.png +%%DATADIR%%/document/index.html +%%DATADIR%%/document/kawari.css +%%DATADIR%%/document/kis_reference.html +%%DATADIR%%/document/kiu_specbnf.txt +%%DATADIR%%/document/kosui.html +%%DATADIR%%/document/license.html +%%DATADIR%%/document/programming.html +%%DATADIR%%/document/programming_1.html +%%DATADIR%%/document/programming_2.html +%%DATADIR%%/document/programming_3.html +%%DATADIR%%/document/programming_4.html +%%DATADIR%%/document/programming_5.html +%%DATADIR%%/document/start.html +%%DATADIR%%/document/story.html +%%DATADIR%%/document/tips.html +%%DATADIR%%/document/users.html +%%DATADIR%%/document/convert.html +%%DATADIR%%/document/errormes.html +%%DATADIR%%/document/source.html +%%DATADIR%%/document/changelog.txt +%%DATADIR%%/license.txt +%%DATADIR%%/readme.1st +@dirrm %%DATADIR%%/document/images +@dirrm %%DATADIR%%/document/banners +@dirrm %%DATADIR%%/document +@dirrm %%DATADIR%%/build +@dirrm %%DATADIR%% |