diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-09-03 00:21:45 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-09-03 00:21:45 +0000 |
commit | 5e498e96a22616ea2a9f3d8e373ab54369533d03 (patch) | |
tree | 6daef9ed5efb7ede0efd26c8e8dbcdfa9d747933 /games/renpy6 | |
parent | a688a5c0b174985f37c860cf1afe2865412afe53 (diff) | |
download | ports-5e498e96a22616ea2a9f3d8e373ab54369533d03.tar.gz ports-5e498e96a22616ea2a9f3d8e373ab54369533d03.zip |
Notes
Diffstat (limited to 'games/renpy6')
-rw-r--r-- | games/renpy6/Makefile | 28 | ||||
-rw-r--r-- | games/renpy6/distinfo | 3 | ||||
-rw-r--r-- | games/renpy6/files/patch-module_ffdecode.c | 112 | ||||
-rw-r--r-- | games/renpy6/files/patch-renpy_display_render.pyx | 13 | ||||
-rw-r--r-- | games/renpy6/files/patch-renpy_gl_gltexture.pyx | 45 |
5 files changed, 201 insertions, 0 deletions
diff --git a/games/renpy6/Makefile b/games/renpy6/Makefile new file mode 100644 index 000000000000..3a5b1c9c3f95 --- /dev/null +++ b/games/renpy6/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTVERSION= 6.18.3 +PORTREVISION= 7 +PKGNAMESUFFIX= 6 + +CONFLICTS_INSTALL= ${PORTNAME}-[0-9]* + +MASTERDIR= ${.CURDIR}/../renpy +PATCHDIR= ${.CURDIR}/files +DISTINFO_FILE= ${.CURDIR}/distinfo + +PORTSCOUT= limit:^6\.18\.* + +BUILD_DEPENDS= ${PYGAME} +RUN_DEPENDS= ${PYGAME} + +USE_SDL= sdl +PORTDATA= templates + +post-patch: + @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \ + ${WRKSRC}/launcher/game/project.rpy + +post-install: + ${CHMOD} -R u+w ${STAGEDIR}${DATADIR}/templates + +.include "${MASTERDIR}/Makefile" diff --git a/games/renpy6/distinfo b/games/renpy6/distinfo new file mode 100644 index 000000000000..cd60be8989e0 --- /dev/null +++ b/games/renpy6/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1473191823 +SHA256 (renpy-6.18.3-sdk.tar.bz2) = 0b2a45c510b60b07b414592e42590ae5e46f480b08380a257b08c21ca88b7f91 +SIZE (renpy-6.18.3-sdk.tar.bz2) = 46125089 diff --git a/games/renpy6/files/patch-module_ffdecode.c b/games/renpy6/files/patch-module_ffdecode.c new file mode 100644 index 000000000000..814aefb5a19f --- /dev/null +++ b/games/renpy6/files/patch-module_ffdecode.c @@ -0,0 +1,112 @@ +https://github.com/renpy/renpy/commit/2be0638 +https://github.com/renpy/renpy/commit/4aac7ca + +--- module/ffdecode.c.orig 2014-07-06 14:22:40 UTC ++++ module/ffdecode.c +@@ -23,6 +23,7 @@ + #include <math.h> + #include <limits.h> + #include <libavutil/avstring.h> ++#include <libavutil/time.h> + #include <libavformat/avformat.h> + #include <libavcodec/avcodec.h> + #include <libswscale/swscale.h> +@@ -101,8 +102,8 @@ typedef struct VideoState { + compensation */ + + #ifndef HAS_RESAMPLE +- uint8_t audio_buf1[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__ ((aligned (16))) ; +- uint8_t audio_buf2[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__ ((aligned (16))) ; ++ uint8_t audio_buf1[(192000 * 3) / 2] __attribute__ ((aligned (16))) ; ++ uint8_t audio_buf2[(192000 * 3) / 2] __attribute__ ((aligned (16))) ; + #else + uint8_t *audio_buf1; + #endif +@@ -573,7 +574,7 @@ static int video_refresh(void *opaque) + video_display(is); + } + +- av_free(vp->frame); ++ av_frame_free(&vp->frame); + vp->frame = NULL; + + is->first_frame = 0; +@@ -627,13 +628,13 @@ static void alloc_picture(void *opaque, + + pixel = SDL_MapRGBA(surf->format, 1, 2, 3, 4); + if (bytes[0] == 4 && bytes[1] == 1) { +- vp->fmt = PIX_FMT_ARGB; ++ vp->fmt = AV_PIX_FMT_ARGB; + } else if (bytes[0] == 4 && bytes[1] == 3) { +- vp->fmt = PIX_FMT_ABGR; ++ vp->fmt = AV_PIX_FMT_ABGR; + } else if (bytes[0] == 1) { +- vp->fmt = PIX_FMT_RGBA; ++ vp->fmt = AV_PIX_FMT_RGBA; + } else { +- vp->fmt = PIX_FMT_BGRA; ++ vp->fmt = AV_PIX_FMT_BGRA; + } + + pixel = SDL_MapRGBA(surf->format, 0, 0, 0, 255); +@@ -756,7 +757,7 @@ static int video_thread(void *arg) + double pts; + + for(;;) { +- frame = avcodec_alloc_frame(); ++ frame = av_frame_alloc(); + + while (is->paused && !is->videoq.abort_request) { + SDL_Delay(2); +@@ -816,10 +817,10 @@ static int audio_decode_frame(VideoState + int resample_changed, audio_resample; + + if (!is->frame) { +- if (!(is->frame = avcodec_alloc_frame())) ++ if (!(is->frame = av_frame_alloc())) + return AVERROR(ENOMEM); + } else +- avcodec_get_frame_defaults(is->frame); ++ av_frame_unref(is->frame); + + if (flush_complete) + break; +@@ -836,7 +837,7 @@ static int audio_decode_frame(VideoState *is, double * + + if (!got_frame) { + /* stop sending empty packets if the decoder is finished */ +- if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY) ++ if (!pkt_temp->data && dec->codec->capabilities & AV_CODEC_CAP_DELAY) + flush_complete = 1; + continue; + } +@@ -1231,9 +1232,9 @@ static int stream_component_open(VideoSt + /* prepare audio output */ + if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { + if (enc->channels > 0) { +- enc->request_channels = FFMIN(2, enc->channels); ++ enc->request_channel_layout = av_get_default_channel_layout(FFMIN(2, enc->channels)); + } else { +- enc->request_channels = 2; ++ enc->request_channel_layout = av_get_default_channel_layout(2); + } + } + +@@ -1242,7 +1243,7 @@ static int stream_component_open(VideoState *is, int s + enc->debug = debug; + enc->workaround_bugs = workaround_bugs; + enc->idct_algo= idct; +- if(fast) enc->flags2 |= CODEC_FLAG2_FAST; ++ if(fast) enc->flags2 |= AV_CODEC_FLAG2_FAST; + enc->skip_frame= skip_frame; + enc->skip_idct= skip_idct; + enc->skip_loop_filter= skip_loop_filter; +@@ -1633,7 +1634,7 @@ void ffpy_stream_close(VideoState *is) + for(i=0; i<VIDEO_PICTURE_QUEUE_SIZE; i++) { + vp = &is->pictq[i]; + if (vp->frame) { +- av_free(vp->frame); ++ av_frame_free(&vp->frame); + } + } + diff --git a/games/renpy6/files/patch-renpy_display_render.pyx b/games/renpy6/files/patch-renpy_display_render.pyx new file mode 100644 index 000000000000..11dbe8757a77 --- /dev/null +++ b/games/renpy6/files/patch-renpy_display_render.pyx @@ -0,0 +1,13 @@ +https://github.com/renpy/renpy/commit/ba832e5e3d52 + +--- renpy/display/render.pyx.orig 2014-10-03 01:16:12 UTC ++++ renpy/display/render.pyx +@@ -448,7 +448,7 @@ PIXELLATE = 3 + + cdef class Render: + +- def __init__(Render self, float width, float height, draw_func=None, layer_name=None, bint opaque=None): #@DuplicatedSignature ++ def __init__(Render self, float width, float height, draw_func=None, layer_name=None, bint opaque=False): #@DuplicatedSignature + """ + Creates a new render corresponding to the given widget with + the specified width and height. diff --git a/games/renpy6/files/patch-renpy_gl_gltexture.pyx b/games/renpy6/files/patch-renpy_gl_gltexture.pyx new file mode 100644 index 000000000000..cc767f8a6c19 --- /dev/null +++ b/games/renpy6/files/patch-renpy_gl_gltexture.pyx @@ -0,0 +1,45 @@ +https://github.com/renpy/renpy/commit/ecadc55616f3 +https://github.com/renpy/renpy/commit/e680702e87b8 + +--- renpy/gl/gltexture.pyx.orig 2014-10-05 01:47:19 UTC ++++ renpy/gl/gltexture.pyx +@@ -255,7 +255,7 @@ cdef class TextureCore: + # The number of the OpenGL texture this texture object + # represents. + self.generation = 0 +- self.number = -1 ++ self.number = 0 + + # The format of this texture in the GPU (or 0 if not known). + self.format = 0 +@@ -447,7 +447,7 @@ cdef class TextureCore: + + cdef unsigned int texnums[1] + +- if self.number != -1: ++ if self.number != 0: + return 0 + + glGenTextures(1, texnums) +@@ -468,17 +468,19 @@ cdef class TextureCore: + + global total_texture_size + +- if self.number == -1: ++ if self.number == 0: + return + + cdef GLuint texnums[1] + + texnums[0] = self.number + glDeleteTextures(1, texnums) ++ self.number = 0 + +- texture_numbers.remove(self.number) ++ texture_numbers.discard(self.number) + total_texture_size -= self.width * self.height * 4 + ++ + class Texture(TextureCore): + """ + We need to be a real python class, not a C extension, to ensure that |