View | Details | Raw Unified | Return to bug 202544 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-36 / +30 lines)
Lines 2-28 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	eduke32
4
PORTNAME=	eduke32
5
PORTVERSION=	20110627
5
PORTVERSION=	20150830
6
PORTREVISION=	5
7
CATEGORIES=	games
6
CATEGORIES=	games
8
MASTER_SITES=	http://dukeworld.duke4.net/eduke32/synthesis/${PORTVERSION}-${SVNREVISION}/ \
7
MASTER_SITES=	http://dukeworld.duke4.net/eduke32/synthesis/${PORTVERSION}-${SVNREVISION}/ \
9
		http://dukeworld.duke4.net/eduke32/synthesis/old/${PORTVERSION}-${SVNREVISION}/
8
		http://dukeworld.duke4.net/eduke32/synthesis/old/${PORTVERSION}-${SVNREVISION}/
10
DISTNAME=	${PORTNAME}_src_${PORTVERSION}-${SVNREVISION}
9
DISTNAME=	${PORTNAME}_src_${PORTVERSION}-${SVNREVISION}
11
10
12
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	pkubaj@riseup.net
13
COMMENT=	Duke Nukem 3D Port based on JFDuke and EDuke
12
COMMENT=	Duke Nukem 3D Port based on JFDuke and EDuke
14
13
15
LICENSE=	GPLv2
14
LICENSE=	GPLv2
16
LICENSE_FILE=	${WRKSRC}/GNU.TXT
15
LICENSE_FILE=	${WRKSRC}/source/gpl-2.0.txt
17
16
18
USES=		execinfo gmake tar:bzip2
17
LIB_DEPENDS=	libFLAC.so:${PORTSDIR}/audio/flac \
18
		libogg.so:${PORTSDIR}/audio/libogg \
19
		libvorbis.so:${PORTSDIR}/audio/libvorbis \
20
		libvpx.so:${PORTSDIR}/multimedia/libvpx
21
22
USES=		execinfo gmake tar:xz
19
USE_GCC=	any
23
USE_GCC=	any
20
USE_CSTD=	gnu89
24
USE_GL=		gl glu
21
USE_GL=		gl
22
USE_GNOME=	gtk20
25
USE_GNOME=	gtk20
23
USE_SDL=	mixer sdl
26
USE_SDL=	sdl2 mixer2
24
WRKSRC=		${WRKDIR}/${PORTNAME}_${PORTVERSION}-${SVNREVISION}
27
WRKSRC=		${WRKDIR}/${PORTNAME}_${PORTVERSION}-${SVNREVISION}
25
SVNREVISION=	1923
28
SVNREVISION=	5338
26
29
27
PLIST_FILES=	bin/eduke32 bin/mapster32
30
PLIST_FILES=	bin/eduke32 bin/mapster32
28
PORTDOCS=	*
31
PORTDOCS=	*
Lines 30-39 Link Here
30
33
31
BROKEN_sparc64=		Does not compile on sparc64
34
BROKEN_sparc64=		Does not compile on sparc64
32
35
33
OPTIONS_DEFINE=	VORBIS
36
OPTIONS_DEFINE=	ASM DOCS EXAMPLES
34
OPTIONS_RADIO=	MIDI
37
OPTIONS_RADIO=	MIDI
35
OPTIONS_RADIO_MIDI=	TIMIDITY TIMIDITYPLUS
38
OPTIONS_RADIO_MIDI=	TIMIDITY TIMIDITYPLUS
36
OPTIONS_DEFAULT=TIMIDITY VORBIS
39
OPTIONS_DEFAULT=TIMIDITY
40
OPTIONS_DEFAULT_i386=	ASM
37
41
38
MIDI_DESC=	MIDI music support
42
MIDI_DESC=	MIDI music support
39
TIMIDITY_DESC=	Use Timidity for music support
43
TIMIDITY_DESC=	Use Timidity for music support
Lines 40-46 Link Here
40
TIMIDITY_RUN_DEPENDS=	timidity:${PORTSDIR}/audio/timidity
44
TIMIDITY_RUN_DEPENDS=	timidity:${PORTSDIR}/audio/timidity
41
TIMIDITYPLUS_DESC=	Use Timidity++ for music support
45
TIMIDITYPLUS_DESC=	Use Timidity++ for music support
42
TIMIDITYPLUS_RUN_DEPENDS=	timidity:${PORTSDIR}/audio/timidity++
46
TIMIDITYPLUS_RUN_DEPENDS=	timidity:${PORTSDIR}/audio/timidity++
43
VORBIS_LIB_DEPENDS=	libvorbis.so:${PORTSDIR}/audio/libvorbis
44
47
45
.include "${.CURDIR}/../duke3d-data/Makefile.include"
48
.include "${.CURDIR}/../duke3d-data/Makefile.include"
46
49
Lines 51-86 Link Here
51
.endif
54
.endif
52
55
53
post-patch:
56
post-patch:
54
.if ! ${PORT_OPTIONS:MVORBIS}
57
.if ! ${PORT_OPTIONS:MASM}
55
	@${REINPLACE_CMD} '/+= -lvorbis/d' ${WRKSRC}/Makefile
56
.endif
57
.if ${ARCH} != "i386"
58
	@${REINPLACE_CMD} '/^NOASM =/s/0/1/' ${WRKSRC}/Makefile.common
58
	@${REINPLACE_CMD} '/^NOASM =/s/0/1/' ${WRKSRC}/Makefile.common
59
.endif
59
.endif
60
	@${REINPLACE_CMD} -e '/^CC=/s/gcc/${CC}/' -e '/^CXX=/s/g++/${CXX}/' \
60
	@${REINPLACE_CMD} -e '/^CC=/s|gcc|${CC}|' -e '/^CXX=/s|g++|${CXX}|' \
61
		${WRKSRC}/Makefile.common
61
		${WRKSRC}/Makefile.common
62
	@${REINPLACE_CMD} 's/ \$$(ARCH)//' ${WRKSRC}/Makefile \
63
		${WRKSRC}/build/Makefile
64
	@${REINPLACE_CMD} -Ee '/^ifeq/s/LINUX/BSD/' \
65
		-e 's/(\+= -lvorbisfile)/\1 -lexecinfo/' ${WRKSRC}/Makefile
66
	@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|' -e 's/ -ldl//' \
67
		${WRKSRC}/build/Makefile
68
	@${REINPLACE_CMD} -E 's|(SDLCONFIG[[:space:]]*=).*|\1${SDL_CONFIG}|' \
69
		${WRKSRC}/build/Makefile.shared
70
	@${REINPLACE_CMD} 's|/usr/share/games/eduke32|${DN3DDIR}|' \
62
	@${REINPLACE_CMD} 's|/usr/share/games/eduke32|${DN3DDIR}|' \
71
		${WRKSRC}/source/game.c ${WRKSRC}/source/astub.c
63
		${WRKSRC}/source/game.c ${WRKSRC}/source/astub.c
72
	@${REINPLACE_CMD} -E 's|(-DHAVE_VORBIS)|-I${LOCALBASE}/include \1|' \
73
		${WRKSRC}/source/jaudiolib/Makefile
74
64
75
do-install:
65
do-install:
76
.for f in eduke32 mapster32
66
	${INSTALL_PROGRAM} ${WRKSRC}/eduke32 ${STAGEDIR}${PREFIX}/bin
77
	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
67
	${INSTALL_PROGRAM} ${WRKSRC}/mapster32 ${STAGEDIR}${PREFIX}/bin
78
.endfor
79
	${MKDIR} ${STAGEDIR}${DOCSDIR}
80
	${INSTALL_DATA} ${WRKSRC}/ChangeLog ${WRKSRC}/samples/*.sample ${STAGEDIR}${DOCSDIR}
81
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
82
. for f in cfg map m32 txt
83
	${INSTALL_DATA} ${WRKSRC}/samples/*.${f} ${STAGEDIR}${EXAMPLESDIR}
84
. endfor
85
68
69
do-install-DOCS-on:
70
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
71
	${INSTALL_DATA} ${WRKSRC}/package/sdk/samples/*.sample ${STAGEDIR}${DOCSDIR}
72
73
do-install-EXAMPLES-on:
74
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
75
	${INSTALL_DATA} ${WRKSRC}/package/sdk/samples/*.map ${STAGEDIR}${EXAMPLESDIR}
76
	${INSTALL_DATA} ${WRKSRC}/package/sdk/samples/*.m32 ${STAGEDIR}${EXAMPLESDIR}
77
	${INSTALL_DATA} ${WRKSRC}/package/sdk/*.cfg ${STAGEDIR}${EXAMPLESDIR}
78
	${INSTALL_DATA} ${WRKSRC}/package/sdk/samples/*.txt ${STAGEDIR}${EXAMPLESDIR}
79
86
.include <bsd.port.post.mk>
80
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (eduke32_src_20110627-1923.tar.bz2) = 6ad33f7acf9cdd26ca49f7813fbe23b888b95fd2f587851c971f860b59185e4a
1
SHA256 (eduke32_src_20150830-5338.tar.xz) = 122375d58eb800e6b1eb4856757fccc3c6f463e5b724a866afc7ab6d84b1a0c2
2
SIZE (eduke32_src_20110627-1923.tar.bz2) = 2817419
2
SIZE (eduke32_src_20150830-5338.tar.xz) = 14328856
(-)files/patch-Makefile.common (+21 lines)
Line 0 Link Here
1
--- Makefile.common.orig	2015-07-08 03:34:34 UTC
2
+++ Makefile.common
3
@@ -258,7 +258,6 @@ ifndef LTO
4
     endif
5
 endif
6
 
7
-COMMONFLAGS=$(ARCH)
8
 COMPILERFLAGS=
9
 
10
 ifeq ($(PACKAGE_REPOSITORY),0)
11
@@ -278,8 +277,8 @@ ifneq ($(RELEASE)$(DEBUGANYWAY),10)
12
     OPTIMIZATIONS += $(DEBUGFLAG)
13
 endif
14
 
15
-CONLYFLAGS=-std=gnu99 -Wimplicit -Werror-implicit-function-declaration
16
-CPPONLYFLAGS= -fno-exceptions -fno-rtti -Wno-write-strings
17
+CONLYFLAGS=-std=gnu99 -Wimplicit 
18
+CPPONLYFLAGS= -fno-exceptions -fno-rtti -fpermissive -Wno-write-strings
19
 ASFORMAT=elf$(SYSBITS)
20
 ASFLAGS=-s -f $(ASFORMAT) #-g
21
 LINKERFLAGS=
(-)files/patch-build_src_baselayer.c (+11 lines)
Line 0 Link Here
1
--- build/src/baselayer.c.orig	2015-07-25 17:23:17 UTC
2
+++ build/src/baselayer.c
3
@@ -219,7 +219,7 @@ void calc_ylookup(int32_t bpl, int32_t l
4
     {
5
         Baligned_free(ylookup);
6
 
7
-        ylookup = (intptr_t *)Xaligned_alloc(16, lastyidx * sizeof(intptr_t));
8
+  	 posix_memalign(&ylookup, 16, lastyidx * sizeof(intptr_t));
9
 #if !defined(NOASM) && !defined(GEKKO) && !defined(__ANDROID__)
10
         nx_unprotect((intptr_t)ylookup, (intptr_t)ylookup + (lastyidx * sizeof(intptr_t)));
11
 #endif
(-)files/patch-build_src_engine.c (+30 lines)
Line 0 Link Here
1
--- build/src/engine.c.orig	2015-08-02 08:40:39 UTC
2
+++ build/src/engine.c
3
@@ -5349,7 +5349,8 @@ static void drawalls(int32_t bunch)
4
             static char fn[32], tmpbuf[80];
5
             char purple = getclosestcol(63, 0, 63);
6
             char yellow = getclosestcol(63, 63, 0);
7
-            char *bakframe = (char *)Xaligned_alloc(16, xdim*ydim);
8
+            char *bakframe;
9
+            posix_memalign(&bakframe, 16, xdim*ydim);
10
 
11
             begindrawing();  //{{{
12
             Bmemcpy(bakframe, (char *)frameplace, xdim*ydim);
13
@@ -8142,7 +8143,7 @@ static void dosetaspect(void)
14
         if (xdimen != oxdimen && voxoff[0][0])
15
         {
16
             if (distrecip == NULL)
17
-                distrecip = (uint32_t *)Xaligned_alloc(16, DISTRECIPSIZ * sizeof(uint32_t));
18
+                posix_memalign(&distrecip, 16, DISTRECIPSIZ * sizeof(uint32_t));
19
 
20
             if (xdimen < 1 << 11)
21
             {
22
@@ -11654,7 +11655,7 @@ static void initsmost(void)
23
         if (*dynarray[i].ptr)
24
             Baligned_free(*dynarray[i].ptr);
25
 
26
-        *dynarray[i].ptr = Xaligned_alloc(16, dynarray[i].size);
27
+         posix_memalign(dynarray[i].ptr, 16, dynarray[i].size);
28
     }
29
 
30
     ysavecnt = YSAVES;

Return to bug 202544