SUMMARY="NScripter-like interpreter with proportional font and Unicode support"
DESCRIPTION="A port of poular japanese Visual Novells engine with Unicode support"

HOMEPAGE="http://unclemion.com/onscripter/"
SOURCE_URI="https://unclemion.com/dev/attachments/download/48/ponscripter-20111009-src.tar.bz2"
CHECKSUM_SHA256="592a7cea2b89646c145eee095a66ef1c2b8a64c3d169b6b2b46da0829618ed3e"
SOURCE_DIR="ponscripter-20111009-src"

LICENSE="GNU GPL v2"
COPYRIGHT="
2001-2011, Ogapee
2007-2011, Mion Sonozaki
"
REVISION="4"
#
# This package can not be build with gcc2
#
ARCHITECTURES="x86 ?x86_gcc2"
SECONDARY_ARCHITECTURES="x86 ?x86_gcc2"

PATCHES="ponscripter_x86-20111009.patchset"

PROVIDES="
	ponscripter${secondaryArchSuffix} = $portVersion
	cmd:ponscr
	"
REQUIRES="
	haiku${secondaryArchSuffix}
	libsdl${secondaryArchSuffix} >= 1.2.14
	sdl_image${secondaryArchSuffix} >= 1.2.10
	sdl_ttf${secondaryArchSuffix} >= 1.2
	sdl_mixer${secondaryArchSuffix} >= 1.2
	smpeg${secondaryArchSuffix} >= 0.4.5	
	bzip2${secondaryArchSuffix}
	freetype${secondaryArchSuffix}
	libpng${secondaryArchSuffix}
	jpeg${secondaryArchSuffix}
	libogg${secondaryArchSuffix}
	libvorbis${secondaryArchSuffix}
	zlib${secondaryArchSuffix}
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
"

BUILD_REQUIRES="
	cmd:make
	cmd:awk
	cmd:gcc${secondaryArchSuffix}
	libsdl${secondaryArchSuffix}_devel >= 1.2.14
	sdl_image${secondaryArchSuffix}_devel >= 1.2.10
	sdl_ttf${secondaryArchSuffix}_devel >= 1.2
	sdl_mixer${secondaryArchSuffix}_devel >= 1.2
	smpeg${secondaryArchSuffix}_devel >= 0.4.5
	bzip2${secondaryArchSuffix}_devel
	freetype${secondaryArchSuffix}_devel
	pkgconfig${secondaryArchSuffix}
	libpng${secondaryArchSuffix}_devel
	jpeg${secondaryArchSuffix}_devel
	libogg${secondaryArchSuffix}_devel
	libvorbis${secondaryArchSuffix}_devel
	zlib${secondaryArchSuffix}_devel
"

BUILD()
{	

	 runConfigure ./configure --no-werror 
	
	#CFLAGS="-Wno-unused-but-set-variable"
	make
}

INSTALL()
{
    make install-bin 
}
