diff --git a/devel/esdl/Makefile b/devel/esdl/Makefile index 8f35c7d80bce..7ae1c32b2663 100644 --- a/devel/esdl/Makefile +++ b/devel/esdl/Makefile @@ -1,66 +1,66 @@ # New ports collection makefile for: esdl # Date Created: 2 January 2003 # Whom: olgeni@FreeBSD.org # # $FreeBSD$ # PORTNAME= esdl PORTVERSION= 1.0.1 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= devel MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} DISTNAME= ${PORTNAME}-${PORTVERSION}.src DIST_SUBDIR= erlang MAINTAINER= olgeni@FreeBSD.org COMMENT= A library for accessing SDL and OpenGL through Erlang BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USE_DOS2UNIX= Makefile USE_GL= gl glu USE_GMAKE= yes USE_SDL= sdl ALL_TARGET= target PLIST_SUB= VERSION="${PORTVERSION}" MAKE_JOBS_SAFE= yes OPTIONS= SDL_TTF "SDL_ttf support" on \ SDL_IMAGE "SDL_image support" on .include .if !defined(WITHOUT_SDL_TTF) USE_SDL+= ttf PLIST_SUB+= SDL_TTF="" .else PLIST_SUB+= SDL_TTF="@comment " .endif .if !defined(WITHOUT_SDL_IMAGE) USE_SDL+= image PLIST_SUB+= SDL_IMAGE="" .else PLIST_SUB+= SDL_IMAGE="@comment " .endif post-extract: @${FIND} ${WRKSRC} -type f -print0 | ${XARGS} -0 ${CHMOD} go+r post-patch: @${REINPLACE_CMD} -Ee 's|addons|lib|' ${WRKSRC}/Makefile .if !defined(WITHOUT_SDL_TTF) @${REINPLACE_CMD} -e '/ENABLE_SDL_TTF = / s|no|yes|' ${WRKSRC}/Makefile .endif .if !defined(WITHOUT_SDL_IMAGE) @${REINPLACE_CMD} -e '/ENABLE_SDL_IMAGE = / s|no|yes|' ${WRKSRC}/Makefile .endif post-install: @${LN} -sf ${PORTNAME}-${PORTVERSION} ${PREFIX}/lib/erlang/lib/${PORTNAME} .include diff --git a/devel/esdl/files/patch-c__src_esdl__driver.c b/devel/esdl/files/patch-c__src_esdl__driver.c new file mode 100644 index 000000000000..b80d7a86967b --- /dev/null +++ b/devel/esdl/files/patch-c__src_esdl__driver.c @@ -0,0 +1,54 @@ + +$FreeBSD$ + +--- c_src/esdl_driver.c.orig ++++ c_src/esdl_driver.c +@@ -34,11 +34,16 @@ + + #define TEMP_BINARY_SIZE 512 + ++#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 ++typedef int ErlDrvSizeT; ++typedef int ErlDrvSSizeT; ++#endif ++ + static ErlDrvData sdl_driver_start(ErlDrvPort port, char *buff); + static void sdl_driver_stop(ErlDrvData handle); + static void sdl_driver_finish(void); +-static int sdl_driver_control(ErlDrvData handle, unsigned int command, +- char* buf, int count, char** res, int res_size); ++static ErlDrvSSizeT sdl_driver_control(ErlDrvData handle, unsigned int command, ++ char* buf, ErlDrvSizeT count, char** res, ErlDrvSizeT res_size); + static void standard_outputv(ErlDrvData drv_data, ErlIOVec *ev); + + /* +@@ -59,6 +64,17 @@ + sdl_driver_control, /* F_PTR control, port_control callback */ + NULL, /* F_PTR timeout, reserved */ + standard_outputv, /* F_PTR outputv, reserved */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ ERL_DRV_EXTENDED_MARKER, ++ ERL_DRV_EXTENDED_MAJOR_VERSION, ++ ERL_DRV_EXTENDED_MINOR_VERSION, ++ 0, ++ NULL, ++ NULL, ++ NULL + }; + + DRIVER_INIT(sdl_driver) +@@ -148,9 +164,9 @@ + { + } + +-static int ++static ErlDrvSSizeT + sdl_driver_control(ErlDrvData handle, unsigned op, +- char* buf, int count, char** res, int res_size) ++ char* buf, ErlDrvSizeT count, char** res, ErlDrvSizeT res_size) + { + sdl_data* sd = (sdl_data *) handle; + sdl_fun func;