new games/onscripter-en

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

new games/onscripter-en

Nam Nguyen
Please find attached a new port for games/onscripter-en.

onscripter-en is an English branch of onscripter to play NScripter and
ONScripter games. These are typically visual novels.

Upstream[1] has been down since 2018.

There were two distfiles available: fullsrc (which bundled dependencies
like sdl-ttf 2.0.8) and src (without any bundled dependencies).
In [0] these are, respectively:
- Source code with dependencies (tar.bz2, 5.60MB)
- Source code (tar.bz2, 956KB)

My goal was to use src and link against devel/sdl-ttf 2.0.11, but 2.0.11
had a regression where fonts would not render at all. 2.0.10 did work.

I backported a fix[2] for devel/sdl-ttf 2.0.11, which is required for
onscripter-en and resolves the problem.

This port:
- hosts the src distfile[0] on my website. This is 20110628, the latest
  version found under releases. (20110930 is nowhere to be found
  according to the comments section.)
- moves from gcc to clang
- two patches for handling clang warnings (assigning field to itself and
  bitwise AND)
- patch for renaming voidp --> void*
- removes -O3 and -fomit-frame-pointer so that debugging can be done
  with DEBUG=-g CXXFLAGS=-g. fomit-frame-pointer made debugging hard.
- sed in pre-configure to modify Makefile.onscripter and
  configure. onscripter-en uses a homegrown configure and
  Makefile.onscripter which generate Makefile. It tries to get -I and -L
  flags in the right places.
- the only remaining clang warning seems harmless: "warning: illegal
  character encoding"
- README contains upstream's FAQs and control README. Because upstream
  is no longer active, it is important to make it more accessible here.
- includes tools to work with extracting archives and working with plaintext
  script files.

Testing
=======

Install the backported fix[2] for devel/sdl-ttf 2.0.11.

There is a test directory which can be used to run basic tests on
onscripter-en. This can be used to test the runtime.

$ doas pkg_add ja-sazanami-ttf
$ doas -u _pbuild cp /usr/local/share/fonts/sazanami/sazanami-gothic.ttf $(make show=WRKSRC)/test/default.ttf
$ onscripter-en -r $(make show=WRKSRC)/test

I successfully tested several hours of a visual novel game with
this.

I would like to credit chaoskaiser72 for testing earlier versions of
this OpenBSD port, requesting that I port this to OpenBSD, giving
feedback and answering questions I had regarding
onscripter-en. chaoskaiser72 maintains an onscripter-en resource
page[3], mirroring a lot of the resources that used to be upstream,
including the NScripter Command Reference.

Feedback and tests are welcome.

Sources:
[0] https://web.archive.org/web/20181006182632/http://unclemion.com/onscripter/releases
[1] https://web.archive.org/web/20180928193924/http://unclemion.com/onscripter
[2] https://marc.info/?l=openbsd-ports&m=159593692105005&w=2
[3] https://kaisernet.neocities.org/onscripter/


onscripter-en.tar.gz (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: new games/onscripter-en

Brian Callahan-6
Hi Nam --

On Friday, July 31, 2020 7:49 PM, Nam Nguyen <[hidden email]> wrote:

> Please find attached a new port for games/onscripter-en.
>
> onscripter-en is an English branch of onscripter to play NScripter and
> ONScripter games. These are typically visual novels.
>

Thanks for the port. I don't have any games to test, but I did a build
test and have some thoughts:

* You have that 20110628 number in both DISTNAME and PKGNAME, so it
  should be spun out into its own variable (usually V).
* Is there any hope for the original web page to return? If not, I
  think it makes more sense to either use the kaisernet site or a
  snapshot from the wayback machine (like you do in pkg/README) for
  the HOMEPAGE.
* For CONFIGURE_ENV, you want CC="${CC}" and CXX="${CXX}".
* Looking through the pkg/README, it seems like font/ja-sazanami-ttf
  is effectively required. What do you think about adding it as an
  RDEP?
* Running `make configure` it looks like there are x86(_64) specific
  routines but they are not picked up because there is no test for
  a platform named amd64. Something like the below will pick up amd64
  and use the x86 specific graphics routines.

~Brian

$OpenBSD$

amd64 should also match x86_64.

Index: configure
--- configure.orig
+++ configure
@@ -291,7 +291,7 @@ esac
 $echo_n "         cpu type...      ${nobr}"
 ARCH=
 case "$PLATFORM" in
-*86_64*)   echo "x86_64";   ARCH=x86_64;;
+*amd64*|*86_64*)   echo "x86_64";   ARCH=x86_64;;
 *86*)      ARCH=`expr "x$PLATFORM" : 'x\(.*86\).*'`; \
            echo "$ARCH";;
 *powerpc*) echo "PowerPC";  ARCH=ppc;;

Reply | Threaded
Open this post in threaded view
|

Re: new games/onscripter-en

Nam Nguyen

Brian Callahan writes:

> Hi Nam --
>
> On Friday, July 31, 2020 7:49 PM, Nam Nguyen <[hidden email]> wrote:
>
>> Please find attached a new port for games/onscripter-en.
>>
>> onscripter-en is an English branch of onscripter to play NScripter and
>> ONScripter games. These are typically visual novels.
>>
>
> Thanks for the port. I don't have any games to test, but I did a build
> test and have some thoughts:
Thank you. I attached an updated port incorporating your feedback.

>
> * You have that 20110628 number in both DISTNAME and PKGNAME, so it
>   should be spun out into its own variable (usually V).

+ added V

> * Is there any hope for the original web page to return? If not, I
>   think it makes more sense to either use the kaisernet site or a
>   snapshot from the wayback machine (like you do in pkg/README) for
>   the HOMEPAGE.

It seems unlikely to return. "It was abandoned in 2011, and Mion's site
went offline in late 2018, resulting in many resources becoming hard to
find."[0]

+ HOMEPAGE changed to
  https://web.archive.org/web/http://unclemion.com/onscripter/
+ While here, MASTER_SITES changed to chaoskaiser72's mirror
  https://kaisernet.neocities.org/onscripter/releases/

> * For CONFIGURE_ENV, you want CC="${CC}" and CXX="${CXX}".

+ added CC and CXX

> * Looking through the pkg/README, it seems like font/ja-sazanami-ttf
>   is effectively required. What do you think about adding it as an
>   RDEP?

This sounds good. The game I was testing won't render certain glyphs
like ellipsis with this font. It is still a good default font. "Sazanami
Gothic is the standard-use font for most releases."[0]

+ Added font/ja-sazanami-ttf to RUN_DEPENDS.
- Removed pkg_add from README.

> * Running `make configure` it looks like there are x86(_64) specific
>   routines but they are not picked up because there is no test for
>   a platform named amd64. Something like the below will pick up amd64
>   and use the x86 specific graphics routines.

+ While here, I added platform detection for amd64, i386 and macppc.

I have only tested on amd64. With this, runtime now prints:
System info: Intel CPU, with functions: MMX SSE SSE2

[0] https://kaisernet.neocities.org/onscripter/

>
> ~Brian
>
> $OpenBSD$
>
> amd64 should also match x86_64.
>
> Index: configure
> --- configure.orig
> +++ configure
> @@ -291,7 +291,7 @@ esac
>  $echo_n "         cpu type...      ${nobr}"
>  ARCH=
>  case "$PLATFORM" in
> -*86_64*)   echo "x86_64";   ARCH=x86_64;;
> +*amd64*|*86_64*)   echo "x86_64";   ARCH=x86_64;;
>  *86*)      ARCH=`expr "x$PLATFORM" : 'x\(.*86\).*'`; \
>             echo "$ARCH";;
>  *powerpc*) echo "PowerPC";  ARCH=ppc;;


onscripter-en.tar.gz (6K) Download Attachment