--- kawari8-8.2.8.orig/debian/README.source +++ kawari8-8.2.8/debian/README.source @@ -0,0 +1,43 @@ +kawari8 for Debian +------------------------ + += extract upstream zip = + +The sources are downloaded from http://kawari.sourceforge.net/ +The upstream source package is in zip format. +The zip file is packaged into the tarball directly. +In order to extract the source, please run 'debian/rules pre-build' + + += cdbs simple-patchsys introduction = + +This package uses cdbs-simple-patchsys to manage all modifications to the +upstream source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + debian/rules patch + +To unapply all the patches, run: + + debian/rules unpatch + +To add a new set of changes, or to edit an existing patch, +first run debian/rules unpatch, and then run: + + cdbs-edit-patch + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, cdbs-edit-patch will first create a temporary working +source tree and apply all patches up to the new patch in lexicographic order. +And you can modify every files in the temporary source tree. +After editing the files, run: + + exit 0 + +to save the results as a patch. +To abort the process, exit with a nonzero exit value: + + exit 1 --- kawari8-8.2.8.orig/debian/changelog +++ kawari8-8.2.8/debian/changelog @@ -0,0 +1,128 @@ +kawari8 (8.2.8-10) unstable; urgency=low + + * Fix FTBFS with python3.8 (Closes: #953548) + + -- Ying-Chun Liu (PaulLiu) Thu, 12 Mar 2020 02:09:52 +0800 + +kawari8 (8.2.8-9) unstable; urgency=low + + * debian/patches/012_python3.patch: Transit to python3 (Closes: #936781) + * Update debian/copyright + * Bump Standards-Version to 4.4.0 + + -- Ying-Chun Liu (PaulLiu) Sun, 01 Sep 2019 15:18:27 +0800 + +kawari8 (8.2.8-8) unstable; urgency=low + + * Don't use stlport4.6. (Closes: #710000) + * Update 009_kawari8-64bit-fix.patch to fix 64-bit crash (Closes: #702238) + * Bump debhelper version to 9 + * Bump Standards-Version to 3.9.3 + + -- Ying-Chun Liu (PaulLiu) Wed, 29 May 2013 15:29:19 +0800 + +kawari8 (8.2.8-7) unstable; urgency=low + + * Fix segfaults on 64bit arch (Closes: #693893) + - Add patch 009_kawari8-64bit-fix.patch + - Thanks to Shyouzou Sugitani + + -- Ying-Chun Liu (PaulLiu) Sat, 24 Nov 2012 10:50:41 +0800 + +kawari8 (8.2.8-6.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "ftbfs with GCC-4.7": add patch 008_fix_gcc4.7_FTBFS.patch (this-> + qualifier). + Closes: #667219 + + -- gregor herrmann Sun, 06 May 2012 16:28:01 +0200 + +kawari8 (8.2.8-6) unstable; urgency=low + + * debian/patches/007_fix_gcc4.5_FTBFS.patch: Fix FTBFS with gcc-4.5 + (Closes: #615675) + + -- Ying-Chun Liu (PaulLiu) Wed, 16 Mar 2011 03:09:23 +0800 + +kawari8 (8.2.8-5) unstable; urgency=low + + * debian/patches/006_fix_crash_on_dlclose.patch: + - Fix segfault on dlclose() in load_library(). (Closes: #602611) + - Thanks to Shyouzou Sugitani + * Bump Standards-Version to 3.9.1 - Nothing need to be changed. + + -- Ying-Chun Liu (PaulLiu) Tue, 09 Nov 2010 01:33:18 +0800 + +kawari8 (8.2.8-4) unstable; urgency=low + + * Only use STLport4.6 on i386 architecture. + * debian/patches/005_add_missing_includes.patch: + - Add missing includes to fix FTBFS + + -- Ying-Chun Liu (PaulLiu) Wed, 10 Feb 2010 21:30:07 +0800 + +kawari8 (8.2.8-3) unstable; urgency=low + + * debian/control: + - Since stlport5.2 and stlport5.1 is going to be removed in Debian, we + change Build-Depends back to stlport4.6 + - Change Maintainer field to my Debian account + - Bump Standards-Version to 3.8.4: Nothing needs to be changed + - Bump Build-Depends on debhelper 5 to 7 + * Move README.Debian-source to README.source. Add more information. + * debian/compat: change compat from 5 to 7 + * debian/copyright: Use machine readable format + + -- Ying-Chun Liu (PaulLiu) Wed, 10 Feb 2010 07:05:59 +0800 + +kawari8 (8.2.8-2) unstable; urgency=low + + * Build depends on stlport5.2. (Closes: #521751) + * Bump Standards-Version to 3.8.1 - Nothing need to be changed. + + -- Ying-Chun Liu (PaulLiu) Fri, 01 May 2009 13:59:07 +0800 + +kawari8 (8.2.8-1) unstable; urgency=low + + * New upstream release + * Refine debian/copyright + * Set doc-book sections to Games/Toys + * Use python-config to build against current python version + + -- Ying-Chun Liu (PaulLiu) Sun, 20 Apr 2008 23:35:17 +0800 + +kawari8 (8.2.7-1) unstable; urgency=low + + * New upstream release + + Remove 002_kawari_log.cpp.patch which has been merged into the upstream + + Refresh 001_gcc.mak.patch for new upstream version + * Fix kawari_encode.sgml for lintian warning: manpage-has-bad-whatis-entry + * Build-depending on stlport5.1 >= 5.1.5 to fix FTBFS on arm,mips(el) + * Bump standard versions to 3.7.3 + + Use Homepage field instead of pseudo-field in long description + * Add optional get-orig-source rule in debian/rules + * Fix manpage-has-errors-from-man in kawari_encode.sgml + * Add UPSTREAM_VERSION and ZIP_VERSION variable for ease maintenance. + * Use wildcards in .install and .docs file. Thanks to Thomas Girard. + + -- Ying-Chun Liu (PaulLiu) Sat, 23 Feb 2008 22:55:18 +0800 + +kawari8 (8.2.4-3) unstable; urgency=low + + * Link against libstlport5.1 (Closes: 448252) + + -- Ying-Chun Liu (PaulLiu) Sun, 28 Oct 2007 16:37:02 +0800 + +kawari8 (8.2.4-2) unstable; urgency=low + + * Improve package description (Closes: 421155) + * Handling DEB_BUILD_OPTIONS=nostrip (Closes: 437247) + + -- Ying-Chun Liu (PaulLiu) Thu, 16 Aug 2007 00:45:10 +0800 + +kawari8 (8.2.4-1) unstable; urgency=low + + * Initial Release (Closes: #411612) + + -- Ying-Chun Liu (PaulLiu) Sun, 17 Sep 2006 21:03:52 +0800 --- kawari8-8.2.8.orig/debian/clean +++ kawari8-8.2.8/debian/clean @@ -0,0 +1,3 @@ +*.zip.cdbs-config_list +kosui.6 +kawari_encode.6 --- kawari8-8.2.8.orig/debian/compat +++ kawari8-8.2.8/debian/compat @@ -0,0 +1 @@ +9 --- kawari8-8.2.8.orig/debian/control +++ kawari8-8.2.8/debian/control @@ -0,0 +1,29 @@ +Source: kawari8 +Section: games +Priority: optional +Maintainer: Ying-Chun Liu (PaulLiu) +Build-Depends: cdbs (>= 0.4.48), + debhelper (>= 9), + docbook-to-man, + python3-dev (>= 3.8), + unzip +Standards-Version: 4.4.0 +Homepage: http://kawari.sourceforge.net/ + +Package: kawari8 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +XB-Python-Version: current +Suggests: ninix-aya +Description: Pseudo AI Shiori module used to create ghosts for Ukagaka + Kawari is a conversation generating script language. It is usually used to + develop ghosts for Ukagaka platform. + . + Ukagaka, also known as Nanika, is a platform on which provides mascot + characters for the user's desktop. These mascot characters can say something + which is programmatically generated. Conversations can be generated by + programs which follows the Shiori standard. And the conversation-generating + script we called it "ghost" which means the spirit of the mascot character. + . + This package also install the kawari8 plug-in for ninix-aya in order to + perform ghosts based on kawari8. --- kawari8-8.2.8.orig/debian/copyright +++ kawari8-8.2.8/debian/copyright @@ -0,0 +1,74 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=173 +Upstream-Name: kawari8 +Upstream-Contact: KAWARI Development Team + Meister(original works) (NAKAUE, T) + Nie (MATSUMURA Namihiko) + Nise-Meister + Sato (S.Sato) + Shino (T.SHINOHARA) + Suikyo (Kouji.U (Sky)) +Source: http://kawari.sourceforge.net/ + +Files: * +Copyright: 2001-2008, KAWARI Development Team +License: BSD-2-clause + +Files: kawari-*/build/src/misc/mt19937ar.[cpp|h] +Copyright: 1997-2002, Makoto Matsumoto and Takuji Nishimura +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/* +Copyright: 2003, CN Wang + 2006, Ying-Chun Liu (PaulLiu) +License: BSD-2-clause + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + as the first lines of this file unmodified. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. --- kawari8-8.2.8.orig/debian/kawari8.dirs +++ kawari8-8.2.8/debian/kawari8.dirs @@ -0,0 +1,4 @@ +usr/games +usr/lib/games/kawari8 +usr/lib/games/ninix-aya +usr/share/man/man6 --- kawari8-8.2.8.orig/debian/kawari8.doc-base +++ kawari8-8.2.8/debian/kawari8.doc-base @@ -0,0 +1,10 @@ +Document: kawari8 +Title: Kawari 8 Manual +Author: KAWARI Development Team http://kawari.sourceforge.net/ +Abstract: This manual is written in Japanese. It describes what kawari is + and how it can be used to make a ghost. +Section: Games/Toys + +Format: HTML +Index: /usr/share/doc/kawari8/html/index.html +Files: /usr/share/doc/kawari8/html/*.html --- kawari8-8.2.8.orig/debian/kawari8.docs +++ kawari8-8.2.8/debian/kawari8.docs @@ -0,0 +1,2 @@ +build-tree/kawari-*/document +build-tree/kawari-*/readme.1st --- kawari8-8.2.8.orig/debian/kawari8.install +++ kawari8-8.2.8/debian/kawari8.install @@ -0,0 +1,5 @@ +build-tree/kawari-*/build/mach/linux/kawari_decode2 /usr/games +build-tree/kawari-*/build/mach/linux/kawari_encode /usr/games +build-tree/kawari-*/build/mach/linux/kawari_encode2 /usr/games +build-tree/kawari-*/build/mach/linux/kosui /usr/games +build-tree/kawari-*/build/mach/linux/libshiori.so /usr/lib/games/kawari8 --- kawari8-8.2.8.orig/debian/kawari8.links +++ kawari8-8.2.8/debian/kawari8.links @@ -0,0 +1,3 @@ +usr/lib/games/kawari8/libshiori.so usr/lib/games/ninix-aya/_kawari8.so +usr/share/man/man6/kawari_encode.6.gz usr/share/man/man6/kawari_decode2.6.gz +usr/share/man/man6/kawari_encode.6.gz usr/share/man/man6/kawari_encode2.6.gz --- kawari8-8.2.8.orig/debian/kawari8.manpages +++ kawari8-8.2.8/debian/kawari8.manpages @@ -0,0 +1,2 @@ +kawari_encode.6 +kosui.6 --- kawari8-8.2.8.orig/debian/kawari_encode.sgml +++ kawari8-8.2.8/debian/kawari_encode.sgml @@ -0,0 +1,148 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Ying-Chun"> + Liu"> + + Sep 12, 2006"> + + 6"> + grandpaul@gmail.com"> + + KAWARI8"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + kawari_encode, kawari_encode2, kawari_decode2 + + &dhpackage; 8.0 encoder/decoder + + + + kawari_encode + + file + + + kawari_encode2 + + file + + + kawari_decode2 + + file + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; command. + + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation written in HTML format. For detailed + descriptions, see doc-base. + + + &dhpackage;_encode encodes kawari scripts to + an encoded file. So the users for the scripts cannot easily read the + content. It can be used to protect the content of Kawari scripts. + It takes several text files as inputs and converts them to + .kaw files + separately. + + + &dhpackage;_encode2 is an advanced + &dhpackage;_encode. It is able to assign + a symmetric key like some encrypting systems. The key affects + the encoding system. Users need the key to decode them. + + + &dhpackage;_decode2 is a decoder of the + .kaw files. It takes several + .kaw files and convert them back to + .txt files. If the kaw files is + encoded by + &dhpackage;_encode2, the key must be provided + correctly for decoding. + + + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). + This manual page is in public domain and is freely reproduced, + distributed, + transmitted, used, modified, built upon, or otherwise + exploited by anyone for any purpose, commercial or non-commercial, + and + in any way, including by methods that have not yet been invented or + conceived. + + + +
+ + --- kawari8-8.2.8.orig/debian/kosui.sgml +++ kawari8-8.2.8/debian/kosui.sgml @@ -0,0 +1,156 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Ying-Chun"> + Liu"> + + Sep 12, 2006"> + + 6"> + grandpaul@gmail.com"> + + KAWARI8"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2006 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + Kawari 8.0 interpreter + + + + &dhpackage; + + + + + + rcfile + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; command. + + + This manual page was written for the &debian; distribution + because the original program does not have a manual page. + Instead, it has documentation written in HTML format. For detailed + descriptions, see doc-base. + + + &dhpackage; is a Kawari interpreter. It can + be used for debugging Kawari scripts. + + + + OPTIONS + + A summary of + options is included below. For a complete description, see the + doc-base files. + + + + + + + + Notify the event to the ghost in debug mode + + + + + + + Do not load kawarirc.kis + + + + + + SEE ALSO + + kawari_encode (6), kawari_encode2 (6), kawari_decode (6) + + The programs are documented fully by Kawari Manual + available via the + doc-book system. + + + AUTHOR + + This manual page was written by &dhusername; <&dhemail;> for + the &debian; system (but may be used by others). + This manual page is in public domain and is freely reproduced, + distributed, + transmitted, used, modified, built upon, or otherwise + exploited by anyone for any purpose, commercial or non-commercial, + and + in any way, including by methods that have not yet been invented or + conceived. + + + +
+ + --- kawari8-8.2.8.orig/debian/patches/001_gcc.mak.patch +++ kawari8-8.2.8/debian/patches/001_gcc.mak.patch @@ -0,0 +1,172 @@ +--- src/gcc.mak 2008-02-10 20:20:18.770634949 +0800 ++++ src/gcc.mak 2008-02-10 20:28:45.245251861 +0800 +@@ -8,52 +8,52 @@ + #========================================================================== + + ## choose your target: cygwin, mingw, linux, freebsd, darwin +-MACH_TYPE = mingw ++MACH_TYPE = linux + + ## output name + SHIORI = shiori + + ## if you have 'upx' and want to use it + # UPX = upx +-UPX = upx ++UPX = touch + + ## if you want to use STLport, set STLport=yes +-# STLport = yes ++STLport ?= no + + ## if you want to use native SAORI, set SAORI_NATIVE=yes (default) + SAORI_NATIVE = yes + + ## if you want to use Python SAORI, set SAORI_PYTHON=yes +-# SAORI_PYTHON = yes ++SAORI_PYTHON = yes + + ## if you want to use Java SAORI, set SAORI_JAVA=yes +-# SAORI_JAVA = yes ++SAORI_JAVA = no + + ## if you want to make a Python SHIORI, set SHIORI_PYTHON=yes +-# SHIORI_PYTHON = yes ++SHIORI_PYTHON = yes + + ## Global options +-CFLAGS = -O1 -I. -DNDEBUG -Wall -fomit-frame-pointer +-LDFLAGS = -s ++MYCFLAGS = -O1 -I. -DNDEBUG -fPIC -fno-strict-aliasing -Wall -fomit-frame-pointer $(CFLAGS) ++MYLDFLAGS = $(LDFLAGS) + + #========================================================================== + # Directories + #========================================================================== + + ## STLport specific options +-CFLAGS_STLP = -I/MinGW/include/stlport +-LDFLAGS_STLP = +-LIBS_STLP = -lstlport_r50_static ++CFLAGS_STLP = -I/usr/include/stlport -pthread -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ++LDFLAGS_STLP = -pthread -lstlport -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ++LIBS_STLP = -pthread -lstlport + + ## Python specific options. These are only for Win32. +-# CFLAGS_PYTHON = -I/python23/include +-# LDFLAGS_PYTHON = -L/python23/lib +-# LIBS_PYTHON = -lpython23 ++CFLAGS_PYTHON = $(shell python3-config --cflags) ++LDFLAGS_PYTHON = $(shell python3-config --ldflags --embed) ++LIBS_PYTHON = $(shell python3-config --libs --embed) + + ## Java specific options +-JAVA_HOME = /usr/java/j2sdk +-CFLAGS_JAVA = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 +-LDFLAGS_JAVA = ++JAVA_HOME = /usr/lib/jvm/default-java ++CFLAGS_JAVA = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux ++LDFLAGS_JAVA = -L$(JAVA_HOME)/lib -ljava -Xlinker -rpath -Xlinker $(JAVA_HOME)/lib + + #========================================================================== + # Do not modify below +@@ -68,21 +68,22 @@ + DYNIMPLIB = ../mach/$(MACH_TYPE)/$(SHIORI)$(LIBEXT_$(MACH_TYPE)) + + ifeq ($(STLport),yes) +- CFLAGS := $(CFLAGS_STLP) -DHAVE_SSTREAM $(CFLAGS) +- LDFLAGS := $(LDFLAGS) $(LDFLAGS_STLP) ++ MYCFLAGS := $(CFLAGS_STLP) -DHAVE_SSTREAM $(MYCFLAGS) ++ MYLDFLAGS := $(MYLDFLAGS) $(LDFLAGS_STLP) + LIBS := $(LIBS) $(LIBS_STLP) + endif + + ifeq ($(SAORI_NATIVE),yes) +- CFLAGS := -DENABLE_SAORI_NATIVE $(CFLAGS) ++ MYCFLAGS := -DENABLE_SAORI_NATIVE $(MYCFLAGS) + CORESRC := $(CORESRC) $(CORESRC_NATIVE) + endif + + ifeq ($(SAORI_JAVA),yes) + CORESRC := $(CORESRC) $(CORESRC_JAVA) +- CFLAGS := $(CFLAGS) $(CFLAGS_JAVA) -DENABLE_SAORI_JAVA ++ MYCFLAGS := $(MYCFLAGS) $(CFLAGS_JAVA) -DENABLE_SAORI_JAVA ++ MYLDFLAGS := $(MYLDFLAGS) $(LDFLAGS_JAVA) + ifeq ($(MACH_TYPE),mingw) +- LDFLAGS := $(LDFLAGS) -L$(MACH) ++ MYLDFLAGS := $(MYLDFLAGS) -L$(MACH) + LIBS := $(LIBS) -ljvm + DEPLIB := $(MACH)/libjvm.dll.a + endif +@@ -91,7 +92,7 @@ + ifeq ($(SAORI_PYTHON),yes) + _LINK_PYTHON_ = 1 + CORESRC := $(CORESRC) $(CORESRC_PYTHON) +- CFLAGS := -DENABLE_SAORI_PYTHON $(CFLAGS) ++ MYCFLAGS := -DENABLE_SAORI_PYTHON $(MYCFLAGS) + endif + + ifeq ($(SHIORI_PYTHON),yes) +@@ -100,11 +101,14 @@ + endif + + ifdef _LINK_PYTHON_ +- PYTHON_VER = $(shell python -c "import sys; print sys.version[:3]") ++ PYTHON_VER = $(shell python3 -c "import sys; print (sys.version[:3])") + ifndef CFLAGS_PYTHON +- CFLAGS_PYTHON = -I$(shell python -c "import sys; print sys.prefix+'/include/python'+sys.version[:3]") +- CFLAGS := $(CFLAGS_PYTHON) $(CFLAGS) ++ CFLAGS_PYTHON = -I$(shell python3 -c "import sys; print (sys.prefix+'/include/python'+sys.version[:3])") ++ MYCFLAGS := $(CFLAGS_PYTHON) $(MYCFLAGS) + LIBS := $(LIBS) -lpython$(PYTHON_VER) ++ else ++ MYCFLAGS := $(CFLAGS_PYTHON) $(MYCFLAGS) ++ LIBS := $(LIBS) $(LIBS_PYTHON) + endif + endif + +@@ -115,8 +119,8 @@ + KOSUISRC := $(KOSUISRC) $(KOSUISRC_$(MACH_TYPE)) + + # flags +-CFLAGS := $(CFLAGS_$(MACH_TYPE)) $(CFLAGS) +-LDFLAGS := $(LDFLAGS_$(MACH_TYPE)) $(LDFLAGS) ++MYCFLAGS := $(CFLAGS_$(MACH_TYPE)) $(MYCFLAGS) ++MYLDFLAGS := $(LDFLAGS_$(MACH_TYPE)) $(MYLDFLAGS) + LIBS := $(LIBS) $(LIBS_$(MACH_TYPE)) + DYNLIBDEF := shiori_$(MACH_TYPE).def + +@@ -148,19 +152,19 @@ + all : $(ALLTARGET) upx + + $(MACH)/$(DYNLIBPREFIX)$(SHIORI)$(DYNLIBEXT) : $(SHIOOBJ) $(COREOBJ) $(DEPLIB) +- $(CXX) -o$@ $(SHARED_$(MACH_TYPE)) $(LDFLAGS) $(SHIOOBJ) $(COREOBJ) $(LIBS) ++ $(CXX) -o$@ $(SHARED_$(MACH_TYPE)) $(MYLDFLAGS) $(SHIOOBJ) $(COREOBJ) $(LIBS) + + $(MACH)/kosui$(EXEEXT) : $(KOSUIOBJ) $(COREOBJ) $(DEPLIB) +- $(CXX) -o$@ $(LDFLAGS) $(KOSUIOBJ) $(COREOBJ) $(LIBS) ++ $(CXX) -o$@ $(MYLDFLAGS) $(KOSUIOBJ) $(COREOBJ) $(LIBS) + + $(MACH)/kawari_encode$(EXEEXT) : tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) +- $(CXX) -o$@ tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ++ $(CXX) -o$@ tool/kawari_encode$(OBJEXT) $(CRYPTOBJ) $(MYLDFLAGS) + + $(MACH)/kawari_encode2$(EXEEXT) : tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) +- $(CXX) -o$@ tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ++ $(CXX) -o$@ tool/kawari_encode2$(OBJEXT) $(CRYPTOBJ) $(MYLDFLAGS) + + $(MACH)/kawari_decode2$(EXEEXT) : tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) +- $(CXX) -o$@ tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) $(LDFLAGS) ++ $(CXX) -o$@ tool/kawari_decode2$(OBJEXT) $(CRYPTOBJ) $(MYLDFLAGS) + + $(MACH)/libjvm.dll.a : win32jvm.def + dlltool --def win32jvm.def -l $@ --dllname jvm.dll -k -C -a +@@ -168,7 +172,7 @@ + .SUFFIXES : .cpp .h .a .def + + %.o : %.cpp +- $(CXX) $(CFLAGS) -o$@ -c $< ++ $(CXX) $(MYCFLAGS) -o$@ -c $< + + clean : + -rm $(COREOBJ) $(SHIOOBJ) $(KOSUIOBJ) $(TOOLOBJ) $(TEMPORARY_FILES) --- kawari8-8.2.8.orig/debian/patches/003_saori_java.cpp.patch +++ kawari8-8.2.8/debian/patches/003_saori_java.cpp.patch @@ -0,0 +1,12 @@ +--- src/saori/saori_java.cpp 2005-06-15 05:53:20.000000000 +0800 ++++ src/saori/saori_java.cpp 2006-09-15 15:57:27.000000000 +0800 +@@ -18,6 +18,9 @@ + #include + // DEBUG + #include ++#ifndef TRUE ++#define TRUE 1 ++#endif + //--------------------------------------------------------------------------- + using namespace std; + using namespace saori; --- kawari8-8.2.8.orig/debian/patches/005_add_missing_includes.patch +++ kawari8-8.2.8/debian/patches/005_add_missing_includes.patch @@ -0,0 +1,45 @@ +diff -u -r src/libkawari/kawari_dict.cpp src/libkawari/kawari_dict.cpp +--- src/libkawari/kawari_dict.cpp 2010-02-10 20:18:12.877267821 +0800 ++++ src/libkawari/kawari_dict.cpp 2010-02-10 20:24:10.653266078 +0800 +@@ -32,6 +32,7 @@ + using namespace kawari_log; + //--------------------------------------------------------------------------- + #include ++#include + using namespace std; + //--------------------------------------------------------------------------- + // 範囲外のインデックス +diff -u -r src/libkawari/kawari_ns.cpp src/libkawari/kawari_ns.cpp +--- src/libkawari/kawari_ns.cpp 2010-02-10 20:18:12.873571489 +0800 ++++ src/libkawari/kawari_ns.cpp 2010-02-10 20:24:10.637265046 +0800 +@@ -18,6 +18,7 @@ + #include "misc/misc.h" + using namespace kawari_log; + //--------------------------------------------------------------------------- ++#include + using namespace std; + //--------------------------------------------------------------------------- + // 範囲外のインデックス +diff -u -r src/shiori/kawari_shiori.cpp src/shiori/kawari_shiori.cpp +--- src/shiori/kawari_shiori.cpp 2010-02-10 20:18:12.881266024 +0800 ++++ src/shiori/kawari_shiori.cpp 2010-02-10 20:24:10.669263700 +0800 +@@ -75,6 +75,7 @@ + #include + #include + #include ++#include + using namespace std; + //--------------------------------------------------------------------------- + #include "shiori/kawari_shiori.h" +diff -u -r src/shiori/shiori.cpp src/shiori/shiori.cpp +--- src/shiori/shiori.cpp 2010-02-10 20:18:12.881266024 +0800 ++++ src/shiori/shiori.cpp 2010-02-10 20:24:10.669263700 +0800 +@@ -24,6 +24,8 @@ + #include "include/shiori.h" + //--------------------------------------------------------------------------- + #include ++#include ++#include + using namespace std; + //--------------------------------------------------------------------------- + namespace { --- kawari8-8.2.8.orig/debian/patches/006_fix_crash_on_dlclose.patch +++ kawari8-8.2.8/debian/patches/006_fix_crash_on_dlclose.patch @@ -0,0 +1,12 @@ +--- src/saori/saori_native.cpp 2010-11-09 00:15:10.837407630 +0800 ++++ src/saori/saori_native.cpp 2010-11-09 00:15:28.813738444 +0800 +@@ -129,8 +129,8 @@ + if (sym_load != NULL && sym_unload != NULL && sym_request != NULL) { + do_fallback = false; + } ++ ::dlclose(handle); + } +- ::dlclose(handle); + } + + if (do_fallback) { --- kawari8-8.2.8.orig/debian/patches/007_fix_gcc4.5_FTBFS.patch +++ kawari8-8.2.8/debian/patches/007_fix_gcc4.5_FTBFS.patch @@ -0,0 +1,24 @@ +--- src/misc/mmap.h 2005-06-22 07:51:44.000000000 +0800 ++++ src/misc/mmap.h 2011-03-16 03:00:46.732698292 +0800 +@@ -11,6 +11,7 @@ + //--------------------------------------------------------------------------- + #include + #include ++#include + //--------------------------------------------------------------------------- + #ifndef FORCE_TYPENAME + # undef typename +@@ -24,11 +25,11 @@ + { + // iterator it=lower_bound(key); + // std::multimap::iterator it; +- typename std::multimap::iterator it=lower_bound(key); ++ typename std::multimap::iterator it=std::multimap::lower_bound(key); + // 2001/12/16 suikyo@yk.rim.or.jp : imortal entry bug + // if(it==end()) it=insert(pair(key,DataType())); + // if(it==upper_bound(key)) it=insert(pair(key,DataType())); +- if(it==upper_bound(key)) it=insert(typename TMMap::value_type(key,DataType())); ++ if(it==std::multimap::upper_bound(key)) it=insert(typename TMMap::value_type(key,DataType())); + return((*it).second); + } + /* --- kawari8-8.2.8.orig/debian/patches/008_fix_gcc4.7_FTBFS.patch +++ kawari8-8.2.8/debian/patches/008_fix_gcc4.7_FTBFS.patch @@ -0,0 +1,20 @@ +--- src/misc/mmap.h ++++ src/misc/mmap.h +@@ -28,7 +28,7 @@ + // 2001/12/16 suikyo@yk.rim.or.jp : imortal entry bug + // if(it==end()) it=insert(pair(key,DataType())); + // if(it==upper_bound(key)) it=insert(pair(key,DataType())); +- if(it==std::multimap::upper_bound(key)) it=insert(typename TMMap::value_type(key,DataType())); ++ if(it==std::multimap::upper_bound(key)) it=this->insert(typename TMMap::value_type(key,DataType())); + return((*it).second); + } + /* +@@ -43,7 +43,7 @@ + void Add(const KeyType& key,const DataType& data) + { + // insert(pair(key,data)); +- insert(typename TMMap::value_type(key,data)); ++ this->insert(typename TMMap::value_type(key,data)); + } + + }; --- kawari8-8.2.8.orig/debian/patches/009_kawari8-64bit-fix.patch +++ kawari8-8.2.8/debian/patches/009_kawari8-64bit-fix.patch @@ -0,0 +1,214 @@ +diff -ur ../dist/src/kis/kis_file.cpp ./src/kis/kis_file.cpp +--- src/kis/kis_file.cpp 2008-03-30 23:24:40.000000000 +0900 ++++ src/kis/kis_file.cpp 2012-12-07 23:55:43.000000000 +0900 +@@ -228,7 +228,7 @@ + string dirname=PathToBaseDir(CanonicalPath(Engine->GetDataPath(), args[1])); + string filename=PathToFileName(CanonicalPath(Engine->GetDataPath(), args[1])); + +- unsigned int pos=ctow(dirname).rfind(FILE_SEPARATOR); ++ string::size_type pos=ctow(dirname).rfind(FILE_SEPARATOR); + if(pos==string::npos) { + // フルパスなのにdirnameにFILE_SEPARATORがない場合、推定でルート + // FILE_SEPARATORを追加しカレントディレクトリとの誤認を防ぐ +diff -ur ../dist/src/kis/kis_saori.cpp ./src/kis/kis_saori.cpp +--- src/kis/kis_saori.cpp 2003-01-23 08:21:34.000000000 +0900 ++++ src/kis/kis_saori.cpp 2012-12-07 23:01:51.000000000 +0900 +@@ -87,9 +87,9 @@ + + // ステータスラインの分解 + const string &statusline=response.GetStartline(); +- unsigned int pos=statusline.find(' '); ++ string::size_type pos=statusline.find(' '); + if (pos==string::npos) return false; +- unsigned int npos=statusline.find(' ', pos+1); ++ string::size_type npos=statusline.find(' ', pos+1); + string statuscode=statusline.substr(pos+1, npos-pos-1); + + if (!(statuscode[0]=='2')) return false; +diff -ur ../dist/src/kis/kis_split.cpp ./src/kis/kis_split.cpp +--- src/kis/kis_split.cpp 2005-06-22 06:38:14.000000000 +0900 ++++ src/kis/kis_split.cpp 2012-12-07 23:55:43.000000000 +0900 +@@ -60,7 +60,7 @@ + if (!HasNext()) + return ""; + +- unsigned int idx; // 注目中のポインタ ++ string::size_type idx; // 注目中のポインタ + string ret; + if(cs.length()==0){ + // 区切り文字無し +diff -ur ../dist/src/kis/kis_string.cpp ./src/kis/kis_string.cpp +--- src/kis/kis_string.cpp 2008-01-27 18:45:46.000000000 +0900 ++++ src/kis/kis_string.cpp 2012-12-07 23:04:19.000000000 +0900 +@@ -83,7 +83,7 @@ + idx=normalizeIndex(idx, target.length()); + if(idx<0) return -1; + } +- unsigned int pos=(f)? ++ wstring::size_type pos=(f)? + target.find(pattern, idx):target.rfind(pattern, idx); + if (pos!=string::npos){ + return static_cast(pos); +@@ -209,7 +209,7 @@ + int tmp=(args.size()>4)? + normalizeIndex(atoi(args[4].c_str()), target.length()):0; + if(tmp<0) return (args[1]); +- unsigned int pos=tmp; ++ string::size_type pos=tmp; + if(!target.length()) return args[1]; + if((!pattern.length())&&(!subst.length())) return args[1]; + // int stride=max(subst.length(), 1); +@@ -245,12 +245,12 @@ + wstring search=ctow(args[2]); + wstring replace=ctow(args[3]); + +- unsigned int pos=0; +- unsigned int replen=replace.length(); ++ wstring::size_type pos=0; ++ wstring::size_type replen=replace.length(); + while (pos(p, parentlink, 0, 3)==0){ +- unsigned int pos=bp.rfind(SEPARATOR); ++ wstring::size_type pos=bp.rfind(SEPARATOR); + if (pos==string::npos){ + bp=ctow(""); + }else{ +@@ -125,7 +125,7 @@ + //--------------------------------------------------------------------------- + string PathToFileName(const string &p){ + const wstring path=ctow(p); +- unsigned int pos=path.rfind(SEPARATOR); ++ wstring::size_type pos=path.rfind(SEPARATOR); + if (pos==string::npos) + return p; + else +@@ -134,7 +134,7 @@ + //--------------------------------------------------------------------------- + string PathToBaseDir(const string &p){ + const wstring path=ctow(p); +- unsigned int pos=path.rfind(SEPARATOR); ++ wstring::size_type pos=path.rfind(SEPARATOR); + if (pos==string::npos) + return (""); + else +diff -ur ../dist/src/misc/phttp.cpp ./src/misc/phttp.cpp +--- src/misc/phttp.cpp 2003-01-23 08:22:52.000000000 +0900 ++++ src/misc/phttp.cpp 2012-12-07 23:05:05.000000000 +0900 +@@ -50,7 +50,7 @@ + if(buff[buff.size()-1]=='\x0d') buff.erase(buff.size()-1); // 0x0dを取り除く + if(buff.size()==0) break; + +- unsigned int pos=buff.find(':'); ++ string::size_type pos=buff.find(':'); + string key=buff.substr(0,pos); + + pos++; +diff -ur ../dist/src/saori/saori_java.cpp ./src/saori/saori_java.cpp +--- src/saori/saori_java.cpp 2005-06-15 06:53:20.000000000 +0900 ++++ src/saori/saori_java.cpp 2012-12-07 23:55:43.000000000 +0900 +@@ -201,7 +201,7 @@ + jobject obj_saori=(jobject)handle; + + string basepath; +- unsigned int pos=path.find_last_of(FILE_SEPARATOR); ++ string::size_type pos=path.find_last_of(FILE_SEPARATOR); + if (pos==string::npos){ + basepath=path+FILE_SEPARATOR; + }else{ +diff -ur ../dist/src/saori/saori_native.cpp ./src/saori/saori_native.cpp +--- src/saori/saori_native.cpp 2004-08-29 13:41:28.000000000 +0900 ++++ src/saori/saori_native.cpp 2012-12-07 23:14:38.000000000 +0900 +@@ -217,7 +217,7 @@ + if (!func_load) return TRUE; + + string basepath; +- unsigned int pos=path.find_last_of(FILE_SEPARATOR); ++ string::size_type pos=basepath.find_last_of(FILE_SEPARATOR); + if (pos==string::npos){ + basepath=path+FILE_SEPARATOR; + }else{ +diff -ur ../dist/src/saori/saori_python.cpp ./src/saori/saori_python.cpp +--- src/saori/saori_python.cpp 2004-09-05 03:58:52.000000000 +0900 ++++ src/saori/saori_python.cpp 2012-12-07 23:55:43.000000000 +0900 +@@ -72,7 +72,7 @@ + // SAORI/1.0 Load + bool TModulePython::Load(void){ + string basepath; +- unsigned int pos=path.find_last_of(FILE_SEPARATOR); ++ string::size_type pos=path.find_last_of(FILE_SEPARATOR); + if (pos==string::npos){ + basepath=path+FILE_SEPARATOR; + }else{ +diff -ur ../dist/src/shiori/py_shiori.cpp ./src/shiori/py_shiori.cpp +--- src/shiori/py_shiori.cpp 2005-06-07 21:08:54.000000000 +0900 ++++ src/shiori/py_shiori.cpp 2013-03-31 22:56:36.000000000 +0900 +@@ -51,7 +51,7 @@ + Py_INCREF(Py_True); + return Py_True; + #else +- return Py_BuildValue("d", shiori_handle); ++ return Py_BuildValue("I", shiori_handle); + #endif + } + +@@ -62,7 +62,7 @@ + #else + unsigned int shiori_handle = 0; + +- if(!PyArg_ParseTuple(args, "d", &shiori_handle)) ++ if(!PyArg_ParseTuple(args, "I", &shiori_handle)) + #endif + return NULL; + +@@ -99,7 +99,7 @@ + #else + unsigned int shiori_handle = 0; + +- if(!PyArg_ParseTuple(args, "ds", &shiori_handle, &requeststr)) ++ if(!PyArg_ParseTuple(args, "Is", &shiori_handle, &requeststr)) + #endif + return NULL; + +diff -ur ../dist/src/tool/kosui.cpp ./src/tool/kosui.cpp +--- src/tool/kosui.cpp 2008-01-23 01:16:36.000000000 +0900 ++++ src/tool/kosui.cpp 2012-12-07 23:55:43.000000000 +0900 +@@ -108,7 +108,7 @@ + }else{ + inifile=param; + wstring wini=ctow(inifile); +- unsigned int pos=wini.rfind((wchar_t)'/'); ++ wstring::size_type pos=wini.rfind((wchar_t)'/'); + if(pos==string::npos) pos=wini.rfind((wchar_t)'\\'); + if(pos!=string::npos) + datapath=CanonicalPath(wtoc(wini.substr(0,pos+1))); --- kawari8-8.2.8.orig/debian/patches/012_python3.patch +++ kawari8-8.2.8/debian/patches/012_python3.patch @@ -0,0 +1,32 @@ +--- src/shiori/py_shiori.cpp 2019-09-01 14:42:12.012043127 +0800 ++++ src/shiori/py_shiori.cpp 2019-09-01 14:44:09.302045522 +0800 +@@ -117,10 +117,29 @@ + {"setcallback", wrap_setcallback, METH_VARARGS}, + {NULL, NULL} + }; ++ ++#if PY_MAJOR_VERSION >= 3 ++static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "_kawari8", ++ NULL, ++ -1, ++ functions, ++ NULL, ++ NULL, ++ NULL, ++ NULL ++}; ++#endif ++ + //--------------------------------------------------------------------------- + // exported function + void init_kawari8() + { ++#if PY_MAJOR_VERSION >= 3 ++ PyModule_Create(&moduledef); ++#else + Py_InitModule("_kawari8", functions); ++#endif + } + //--------------------------------------------------------------------------- --- kawari8-8.2.8.orig/debian/rules +++ kawari8-8.2.8/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# This file is public domain. + +UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-.*/\1/p') +ZIP_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -e 's/\.//g') +DEB_TAR_SRCDIR := kawari-$(ZIP_VERSION)/build/src +DEB_AUTO_CLEANUP_RCS := yes + +include /usr/share/cdbs/1/rules/tarball.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk + +DEB_MAKE_MAKEFILE := gcc.mak +DEB_MAKE_CLEAN_TARGET := + +build/kawari8:: + docbook-to-man debian/kosui.sgml > kosui.6 + docbook-to-man debian/kawari_encode.sgml > kawari_encode.6 + +binary-install/kawari8:: + mv debian/kawari8/usr/share/doc/kawari8/document \ + debian/kawari8/usr/share/doc/kawari8/html + +cleanbuilddir/kawari8:: + $(RM) debian/stamp-patch-*.patch + +get-orig-source:: + mkdir $(CURDIR)/kawari8-$(UPSTREAM_VERSION).orig + cd $(CURDIR)/kawari8-$(UPSTREAM_VERSION).orig && wget -c \ + http://jaist.dl.sourceforge.net/sourceforge/kawari/kawari-$(ZIP_VERSION).zip + tar -czvf kawari8_$(UPSTREAM_VERSION).orig.tar.gz kawari8-$(UPSTREAM_VERSION).orig + rm -rf $(CURDIR)/kawari8-$(UPSTREAM_VERSION).orig --- kawari8-8.2.8.orig/debian/source/format +++ kawari8-8.2.8/debian/source/format @@ -0,0 +1 @@ +1.0 --- kawari8-8.2.8.orig/debian/watch +++ kawari8-8.2.8/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/kawari/ kawari-(.)(.)(.)\.zip