diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-09-07 07:44:58 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-09-07 07:44:58 +0800 |
commit | 935b014e90a6e3ba4c5ea1d181b24a79585ab0ef (patch) | |
tree | 1d1d028d5058a8877a84c18e9b44f54cd35bd968 /devel | |
parent | 762e83725ff5305f5153965a97371e772a3af674 (diff) | |
download | freebsd-ports-gnome-935b014e90a6e3ba4c5ea1d181b24a79585ab0ef.tar.gz freebsd-ports-gnome-935b014e90a6e3ba4c5ea1d181b24a79585ab0ef.tar.zst freebsd-ports-gnome-935b014e90a6e3ba4c5ea1d181b24a79585ab0ef.zip |
devel/renpy: add 6.18 slave for compatibility with games/katawa-shoujo
PKGNAMESUFFIX is based on 6.99.11 being "the latest in a series of
releases that will culminate in Ren'Py 7".
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/renpy/Makefile | 21 | ||||
-rw-r--r-- | devel/renpy6/Makefile | 24 | ||||
-rw-r--r-- | devel/renpy6/distinfo | 3 | ||||
-rw-r--r-- | devel/renpy6/files/patch-module_ffdecode.c | 94 |
5 files changed, 137 insertions, 6 deletions
diff --git a/devel/Makefile b/devel/Makefile index eaefde5c341c..f540fafa47b3 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4783,6 +4783,7 @@ SUBDIR += relx SUBDIR += remake SUBDIR += renpy + SUBDIR += renpy6 SUBDIR += replay SUBDIR += rhtvision SUBDIR += rlog diff --git a/devel/renpy/Makefile b/devel/renpy/Makefile index 37393e13c8c9..ef0ca95a52c7 100644 --- a/devel/renpy/Makefile +++ b/devel/renpy/Makefile @@ -1,9 +1,9 @@ # $FreeBSD$ PORTNAME= renpy -PORTVERSION= 6.99.11 +PORTVERSION?= 6.99.11 DISTVERSIONSUFFIX=-sdk -PORTREVISION= 0 +PORTREVISION?= 0 CATEGORIES= devel games MASTER_SITES= http://www.renpy.org/dl/${PORTVERSION}/ @@ -16,21 +16,25 @@ LICENSE_NAME_DejaVu= Bitstream Vera and Arev fonts license LICENSE_FILE_DejaVu= ${WRKSRC}/renpy/common/DejaVuSans.txt LICENSE_PERMS_DejaVu= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}game_sdl2>0:devel/py-game_sdl2 \ - cython:lang/cython +BUILD_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}game_sdl2>0:devel/py-game_sdl2 +BUILD_DEPENDS+= cython:lang/cython LIB_DEPENDS= libfribidi.so:converters/fribidi \ libpng.so:graphics/png \ libavcodec.so:multimedia/ffmpeg \ libfreetype.so:print/freetype2 -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}game_sdl2>=${PORTVERSION}:devel/py-game_sdl2 +RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}game_sdl2>=${PORTVERSION}:devel/py-game_sdl2 +CONFLICTS_INSTALL?= ${PORTNAME}6-* + +.ifndef PKGNAMESUFFIX # Upstream tends to reroll distfiles before moving under /release/ PORTSCOUT= site:http://www.renpy.org/dl/release/ +.endif USES= python:2.7 shebangfix tar:bz2 USE_GL= glew USE_PYTHON= autoplist distutils -USE_SDL= sdl2 +USE_SDL?= sdl2 EXCLUDE= gen 'module/*.py[co]' 'renpy/*.py[co]' EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,} SHEBANG_FILES= renpy.py launcher/game/tkaskdir.py @@ -66,9 +70,14 @@ LICENSE_FILE_${lic}= ${WRKSRC}/LICENSE.txt LICENSE_PERMS_${lic}= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept . endfor +.if !target(post-patch) post-patch: @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \ ${WRKSRC}/launcher/game/choose_directory.rpy +.endif + +post-patch: common-post-patch +common-post-patch: # Avoid having to add -I/usr/include -L/usr/lib @${REINPLACE_CMD} '/library("z")/d' ${BUILD_WRKSRC}/${PYSETUP} diff --git a/devel/renpy6/Makefile b/devel/renpy6/Makefile new file mode 100644 index 000000000000..3896b1e7ebf5 --- /dev/null +++ b/devel/renpy6/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +PORTVERSION= 6.18.3 +PORTREVISION= 0 +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 + +post-patch: + @${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \ + ${WRKSRC}/launcher/game/project.rpy + +.include "${MASTERDIR}/Makefile" diff --git a/devel/renpy6/distinfo b/devel/renpy6/distinfo new file mode 100644 index 000000000000..cd60be8989e0 --- /dev/null +++ b/devel/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/devel/renpy6/files/patch-module_ffdecode.c b/devel/renpy6/files/patch-module_ffdecode.c new file mode 100644 index 000000000000..f5f1ea01e618 --- /dev/null +++ b/devel/renpy6/files/patch-module_ffdecode.c @@ -0,0 +1,94 @@ +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; +@@ -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); + } + } + +@@ -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); + } + } + |