portage-overlay

personal portage ebuild repository
git clone anongit@rnpnr.xyz:portage-overlay.git
Log | Files | Refs | Feed | README

Commit: dc54e2ec8e1a80185e07737bf2e7680a0801df2f
Parent: e9daea95fa0fba507c1dd2da7dbe37c3a429eb50
Author: Randy Palamar
Date:   Fri, 27 Aug 2021 15:56:31 -0600

add game-engines/onscripter

Diffstat:
Agames-engines/onscripter/Manifest | 1+
Agames-engines/onscripter/files/0001-fix-smpeg-header-name.patch | 25+++++++++++++++++++++++++
Agames-engines/onscripter/files/0002-fix-lua-header-name.patch | 25+++++++++++++++++++++++++
Agames-engines/onscripter/files/0003-CMakeLists.patch | 114+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agames-engines/onscripter/onscripter-20200722.ebuild | 42++++++++++++++++++++++++++++++++++++++++++
5 files changed, 207 insertions(+), 0 deletions(-)

diff --git a/games-engines/onscripter/Manifest b/games-engines/onscripter/Manifest @@ -0,0 +1 @@ +DIST onscripter-20200722.tar.gz 253507 BLAKE2B 5dbd734e5ca577e75cb51ef06018f0d6b862f1b13d913dc8e400a0725a22c8cca516e68432527c6c8ef62dc72fdc8985deb0ea63bcbb29386cac855bd8e4a3c0 SHA512 9b41b0ccc242a2ff4277dc204df6f003b2013c473e6890186624ba6e034813a27ac3661499e1e72826701e21f9878aac692139d668d1c90cd6f8205e587de557 diff --git a/games-engines/onscripter/files/0001-fix-smpeg-header-name.patch b/games-engines/onscripter/files/0001-fix-smpeg-header-name.patch @@ -0,0 +1,25 @@ +From 7fe1cfc106438634409edf1c26a29044424297d4 Mon Sep 17 00:00:00 2001 +From: Coelacanthus <coelacanthus@outlook.com> +Date: Thu, 4 Mar 2021 14:09:13 +0800 +Subject: [PATCH 1/2] fix smpeg header name + +--- + ONScripter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ONScripter.h b/ONScripter.h +index ce8b348..5a3c538 100644 +--- a/ONScripter.h ++++ b/ONScripter.h +@@ -32,7 +32,7 @@ + #include <SDL_ttf.h> + #include <SDL_mixer.h> + #if defined(USE_SMPEG) +-#include <smpeg.h> ++#include <smpeg/smpeg.h> + #endif + + #define DEFAULT_VIDEO_SURFACE_FLAG (SDL_SWSURFACE) +-- +2.30.1 + diff --git a/games-engines/onscripter/files/0002-fix-lua-header-name.patch b/games-engines/onscripter/files/0002-fix-lua-header-name.patch @@ -0,0 +1,25 @@ +From 70cb003a7f2d3648f23c22572eb0c117f79ee4de Mon Sep 17 00:00:00 2001 +From: Coelacanthus <coelacanthus@outlook.com> +Date: Thu, 4 Mar 2021 14:18:51 +0800 +Subject: [PATCH 2/2] fix-lua-header-name + +--- + LUAHandler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/LUAHandler.h b/LUAHandler.h +index 53bc602..f197307 100644 +--- a/LUAHandler.h ++++ b/LUAHandler.h +@@ -24,7 +24,7 @@ + #if !defined(__LUA_HANDLER_H__) && defined(USE_LUA) + #define __LUA_HANDLER_H__ + +-#include <lua.hpp> ++#include <lua5.1/lua.hpp> + + class ONScripter; + class ScriptHandler; +-- +2.30.1 + diff --git a/games-engines/onscripter/files/0003-CMakeLists.patch b/games-engines/onscripter/files/0003-CMakeLists.patch @@ -0,0 +1,114 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..a95f3d3 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,108 @@ ++cmake_minimum_required(VERSION 3.19.0 ) ++ ++project(onscripter LANGUAGES C CXX) ++ ++set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) ++ ++set(HEADERS ++ BaseReader.h ++ ButtonLink.h ++ DirectReader.h ++ SarReader.h ++ NsaReader.h ++ ScriptHandler.h ++ ScriptParser.h ++ AnimationInfo.h ++ FontInfo.h ++ DirtyRect.h ++ LUAHandler.h ++ Encoding.h ++) ++ ++set(SOURCES ++ AnimationInfo.cpp ++ conv_shared.cpp ++ DirectReader.cpp ++ DirtyRect.cpp ++ Encoding.cpp ++ FontInfo.cpp ++ LUAHandler.cpp ++ NsaReader.cpp ++ ONScripter_animation.cpp ++ ONScripter_command.cpp ++ ONScripter.cpp ++ ONScripter_effect_breakup.cpp ++ ONScripter_effect_cascade.cpp ++ ONScripter_effect.cpp ++ ONScripter_event.cpp ++ ONScripter_file2.cpp ++ ONScripter_file.cpp ++ ONScripter_image.cpp ++ ONScripter_lut.cpp ++ ONScripter_rmenu.cpp ++ ONScripter_sound.cpp ++ ONScripter_text.cpp ++ resize_image.cpp ++ SarReader.cpp ++ ScriptHandler.cpp ++ ScriptParser_command.cpp ++ ScriptParser.cpp ++ sjis2utf16.cpp ++) ++ ++find_package(SDL REQUIRED) ++find_package(SDL_sound REQUIRED) ++find_package(SDL_mixer REQUIRED) ++find_package(SDL_image REQUIRED) ++find_package(SDL_ttf REQUIRED) ++find_package(Lua51 REQUIRED) ++find_package(BZip2 REQUIRED) ++find_package(Fontconfig REQUIRED) ++find_package(JPEG REQUIRED) ++ ++# Find SMPEG ++find_library(SMPEG_LIBRARY ++ NAMES smpeg SMPEG Smpeg SMpeg ++ PATHS ++ ENV SMPEGDIR ++ ENV SDLSOUNDDIR ++ ENV SDLDIR ++ /opt ++ PATH_SUFFIXES ++ lib ++) ++ ++add_compile_definitions(LINUX USE_SMPEG USE_FONTCONFIG USE_OGG_VORBIS USE_CDROM USE_LUA) ++ ++set(ALL_LIBS ++ SDL::SDL ++ ${SDL_SOUND_LIBRARIES} ++ ${SDL_IMAGE_LIBRARIES} ++ ${SDL_MIXER_LIBRARIES} ++ ${SDL_TTF_LIBRARIES} ++ ${SMPEG_LIBRARY} ++ ${LUA_LIBRARIES} ++ ${BZIP2_LIBRARIES} ++ Fontconfig::Fontconfig ++ ${JPEG_LIBRARIES} ++) ++ ++add_executable(onscripter onscripter_main.cpp ${HEADERS} ${SOURCES}) ++target_link_libraries(onscripter ${ALL_LIBS}) ++install(TARGETS onscripter DESTINATION bin) ++ ++add_executable(sardec sardec.cpp ${HEADERS} ${SOURCES}) ++target_link_libraries(sardec ${ALL_LIBS}) ++install(TARGETS sardec DESTINATION bin) ++ ++add_executable(nsadec nsadec.cpp ${HEADERS} ${SOURCES}) ++target_link_libraries(nsadec ${ALL_LIBS}) ++install(TARGETS nsadec DESTINATION bin) ++ ++add_executable(sarconv sarconv.cpp ${HEADERS} ${SOURCES}) ++target_link_libraries(sarconv ${ALL_LIBS}) ++install(TARGETS sarconv DESTINATION bin) ++ ++add_executable(nsaconv nsaconv.cpp ${HEADERS} ${SOURCES}) ++target_link_libraries(nsaconv ${ALL_LIBS}) ++install(TARGETS nsaconv DESTINATION bin) diff --git a/games-engines/onscripter/onscripter-20200722.ebuild b/games-engines/onscripter/onscripter-20200722.ebuild @@ -0,0 +1,42 @@ +EAPI=7 + +DESCRIPTION="Engine for japanese Visual Novels." +HOMEPAGE="https://onscripter.osdn.jp/onscripter.html" +SRC_URI="https://onscripter.osdn.jp/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +REQUIRED_USE=${LUA_REQUIRED_USE} + +LUA_COMPAT=(lua5-1) + +inherit cmake lua-single + +RDEPEND=" + ${LUA_DEPS} + >=media-libs/libsdl-1.2.6 + >=media-libs/sdl-image-1.2.3 + >=media-libs/sdl-mixer-1.2.5 + >=media-libs/sdl-sound-1.0.3 + >=media-libs/sdl-ttf-2.0.6 + >=media-libs/smpeg-0.4.4 +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/0001-fix-smpeg-header-name.patch + "${FILESDIR}"/0002-fix-lua-header-name.patch + "${FILESDIR}"/0003-CMakeLists.patch +) + +src_configure() { + default + local mycmakeargs=( + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${EPREFIX}${LOCAL_PREFIX}" + ) + cmake_src_configure +}