View | Details | Raw Unified | Return to bug 86446
Collapse All | Expand All

(-)doomlegacy/Makefile (-34 / +30 lines)
Lines 11-56 Link Here
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
13
DISTNAME=	legacy_${PORTVERSION}_src
13
DISTNAME=	legacy_${PORTVERSION}_src
14
DISTFILES=	${DIST} ${WADFILE}
14
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${WADFILE}
15
DIST=		${DISTNAME}${EXTRACT_SUFX}
15
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
16
WADFILE=	legacy_dat.zip
17
EXTRACT_ONLY=	${DIST}
18
16
19
MAINTAINER=	bock@bock.nnov.ru
17
MAINTAINER=	bock@bock.nnov.ru
20
COMMENT=	DooM Legacy: popular DooM clone!
18
COMMENT=	DooM Legacy: popular DooM clone!
21
19
22
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
20
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
23
BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
24
21
25
USE_XLIB=	yes
26
USE_GMAKE=	yes
27
USE_GL=		yes
22
USE_GL=		yes
28
USE_SDL=	mixer
23
USE_GMAKE=	yes
24
USE_SDL=	mixer sdl
25
USE_XLIB=	yes
26
27
OPTIONS=	X86_ASM "Enable use of x86 assembly code" on
29
28
30
WRKSRC=		${WRKDIR}/doomlegacy_${PORTVERSION}_src
29
WRKSRC=		${WRKDIR}/doomlegacy_${PORTVERSION}_src
31
MAKEFILE=	makefile
30
MAKEFILE=	makefile
32
MAKE_ENV+=	FREEBSD=1 FBSD_SDL=1 PTHREAD_LIBS="${PTHREAD_LIBS}" \
31
MAKE_ENV+=	FREEBSD=1 FBSD_SDL=1 PTHREAD_LIBS="${PTHREAD_LIBS}" \
33
		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
32
		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
34
33
35
# I have no ideas about build status on other platforms
34
SUB_FILES=	legacy
36
ONLY_FOR_ARCHS=		i386
35
WADFILE=	legacy_dat.zip
37
36
DATADIR=	${PREFIX}/lib/${PORTNAME}
38
TARGET_DIR=	${PREFIX}/${PORTNAME}
39
40
DATA_FILES=	${WRKDIR}/bin/legacy.dat
41
PROG_FILES=	${WRKDIR}/bin/llsndserv ${WRKDIR}/bin/r_opengl.so
42
SGID_FILES=	${WRKDIR}/bin/lsdldoom
43
SGID_ARGS=	-c -s -o root -g kmem -m 2555
44
DOC_FILES=	*.html *.txt *.cfg README_SDL copying
45
37
46
post-extract:
38
post-extract:
47
	@${MKDIR} ${WRKDIR}/bin
48
	${UNZIP_CMD} -q ${DISTDIR}/${WADFILE} -d ${WRKDIR}/bin
39
	${UNZIP_CMD} -q ${DISTDIR}/${WADFILE} -d ${WRKDIR}/bin
49
40
50
post-patch:
51
	@${SED} -e "s|%%INSTALLDIR%%|${PREFIX}/${PORTNAME}|" ${FILESDIR}/wrapper.sh > \
52
		${WRKDIR}/bin/wrapper.sh
53
54
pre-build:
41
pre-build:
55
	cd ${WRKSRC}/linux_x/sndserv && ${GMAKE} clean
42
	cd ${WRKSRC}/linux_x/sndserv && ${GMAKE} clean
56
43
Lines 58-77 Link Here
58
	@${LN} -s ${WRKSRC}/linux_x/sndserv/linux/llsndserv ${WRKDIR}/bin
45
	@${LN} -s ${WRKSRC}/linux_x/sndserv/linux/llsndserv ${WRKDIR}/bin
59
46
60
do-install:
47
do-install:
61
	${INSTALL} -d ${TARGET_DIR}
48
	${MKDIR} ${DATADIR}
62
	${INSTALL_PROGRAM} ${PROG_FILES} ${TARGET_DIR}
49
	${INSTALL_PROGRAM} ${WRKDIR}/bin/llsndserv ${WRKDIR}/bin/r_opengl.so \
63
	${INSTALL} ${SGID_ARGS} ${SGID_FILES} ${TARGET_DIR}
50
		${DATADIR}
64
	${INSTALL_DATA} ${DATA_FILES} ${TARGET_DIR}
51
	${INSTALL} -c -s -o root -g kmem -m 2555 ${WRKDIR}/bin/lsdldoom \
65
	${INSTALL_SCRIPT} ${WRKDIR}/bin/wrapper.sh ${TARGET_DIR}/legacy.sh
52
		${DATADIR}
66
	@${LN} -s ${TARGET_DIR}/legacy.sh ${PREFIX}/bin/legacy
53
	${INSTALL_DATA} ${WRKDIR}/bin/legacy.dat ${DATADIR}
54
	${INSTALL_SCRIPT} ${WRKDIR}/legacy ${PREFIX}/bin
67
55
68
post-install:
56
post-install:
69
.ifndef(NOPORTDOCS)
57
.ifndef(NOPORTDOCS)
70
	${MKDIR} ${DOCSDIR}
58
	${MKDIR} ${DOCSDIR}
71
.for file in ${DOC_FILES}
59
.   for f in *.html *.txt *.cfg README_SDL copying
72
	${INSTALL_MAN} ${WRKSRC}/_doc/${file} ${DOCSDIR}
60
	${INSTALL_DATA} ${WRKSRC}/_doc/${f} ${DOCSDIR}
73
.endfor
61
.   endfor
62
.endif
63
64
.include "${.CURDIR}/../doom-data/Makefile.include"
65
66
.include <bsd.port.pre.mk>
67
68
.if ${ARCH} == "i386" && defined(WITH_X86_ASM)
69
BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
70
MAKE_ARGS+=	USEASM=1
74
.endif
71
.endif
75
	@${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${PKGMESSAGE}
76
72
77
.include <bsd.port.mk>
73
.include <bsd.port.post.mk>
(-)doomlegacy/files/legacy.in (+20 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# The executable needs to run from a directory with the Doom Legacy data
4
# files, libraries and executables, and Doom WAD files. So we mirror the Doom
5
# Legacy and Doom (WAD files) data directory to ~/.legacy, and create symlinks
6
# to the data files.
7
8
cd %%DATADIR%% || exit 1
9
10
find * -type d -exec mkdir -p ~/.legacy/{} \; || exit 1
11
find * -type f -exec ln -sf %%DATADIR%%/{} ~/.legacy/{} \; || exit 1
12
13
cd %%DMDIR%% || exit 1
14
15
find * -type d -exec mkdir -p ~/.legacy/{} \; || exit 1
16
find * -type f -exec ln -sf %%DMDIR%%/{} ~/.legacy/{} \; || exit 1
17
18
cd ~/.legacy || exit 1
19
20
exec ./lsdldoom -nocheckwadversion $*
(-)doomlegacy/files/patch-makefile (-17 / +51 lines)
Lines 1-15 Link Here
1
--- makefile.orig	Fri Oct  3 15:11:05 2003
1
--- makefile.orig	Sun Apr 18 18:02:24 2004
2
+++ makefile	Sun Mar 28 17:15:39 2004
2
+++ makefile	Mon Sep 19 20:44:29 2005
3
@@ -260,7 +260,7 @@
3
@@ -260,12 +260,10 @@
4
 
4
 
5
 # gcc or g++
5
 # gcc or g++
6
 #CC=@gcc
6
 #CC=@gcc
7
-CC=gcc
7
-CC=gcc
8
+CC?=gcc
9
 
8
 
10
 #if use PGCC or EGCS
9
 #if use PGCC or EGCS
11
 PGCC=1
10
 PGCC=1
12
@@ -407,7 +407,8 @@
11
 
12
-WFLAGS=-Wall # -W -Wno-unused -Wno-sign-compare
13
 
14
 #uncomment if you want to use the POLL_POINTER hack
15
 #POLL_POINTER=-DPOLL_POINTER
16
@@ -407,7 +405,8 @@
13
 
17
 
14
 	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I. -I/usr/X11R6/include
18
 	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I. -I/usr/X11R6/include
15
 	    LDFLAGS=-L/usr/X11R6/lib
19
 	    LDFLAGS=-L/usr/X11R6/lib
Lines 19-25 Link Here
19
 	    # name of the exefile
23
 	    # name of the exefile
20
 	    EXENAME=llxdoom
24
 	    EXENAME=llxdoom
21
 	    SFLAGS=-g $(OPTS)
25
 	    SFLAGS=-g $(OPTS)
22
@@ -428,7 +429,8 @@
26
@@ -418,7 +417,7 @@
27
 	else #ifdef X
28
 	ifdef FBSD_SDL
29
             INTERFACE=sdl
30
-	    OPTS := -DLINUX -DFREEBSD -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -I/usr/local/include/SDL11 -I/usr/X11R6/include -Wall
31
+	    OPTS := -DLINUX -DFREEBSD -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -I/usr/local/include/SDL11 -I/usr/X11R6/include
32
 	    SFLAGS=-g $(OPTS)
33
 	    OBJS=$(O)/i_video.o $(O)/dosstr.o $(O)/endtxt.o \
34
 		 $(O)/hw_bsp.o $(O)/hw_draw.o $(O)/hw_light.o $(O)/hw_main.o \
35
@@ -428,7 +427,8 @@
23
 	    DEBUGLIBS=$(LIBS)
36
 	    DEBUGLIBS=$(LIBS)
24
 
37
 
25
 	    LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
38
 	    LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
Lines 29-65 Link Here
29
 	    DEBUGLIBS=$(LIBS)
42
 	    DEBUGLIBS=$(LIBS)
30
 
43
 
31
 	    # name of the exefile
44
 	    # name of the exefile
32
@@ -555,13 +557,13 @@
45
@@ -533,11 +533,7 @@
46
 
47
 ifndef SOLARIS
48
 ifdef GCC30
49
-	M5=-march=pentium
50
-	M4=-march=486
51
 else
52
-	M5=-mpentium
53
-	M4=-m486
54
 endif
55
 endif
56
 
57
@@ -555,13 +551,13 @@
33
 
58
 
34
 	# build a normal optimised version
59
 	# build a normal optimised version
35
 	ifdef PGCC
60
 	ifdef PGCC
36
-		CFLAGS = $(OPTS) $(M5) -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
61
-		CFLAGS = $(OPTS) $(M5) -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
37
+		CFLAGS += $(OPTS) -fwritable-strings
62
+		CFLAGS += $(OPTS)
38
 		# -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
63
 		# -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
39
 		# -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps  \
64
 		# -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps  \
40
 		# -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
65
 		# -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
41
 		# -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
66
 		# -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
42
 	else
67
 	else
43
-		CFLAGS = $(M4) -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
68
-		CFLAGS = $(M4) -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
44
+		CFLAGS += -fwritable-strings $(OPTS)
69
+		CFLAGS += $(OPTS)
45
 	endif
70
 	endif
46
 endif
71
 endif
47
 
72
 
48
@@ -735,7 +737,7 @@
73
@@ -735,7 +731,7 @@
49
 
74
 
50
 #dll
75
 #dll
51
 dll : $(O)/r_opengl.o $(O)/ogl_x11.o
76
 dll : $(O)/r_opengl.o $(O)/ogl_x11.o
52
-	$(CC) $(M5) -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
77
-	$(CC) $(M5) -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
53
+	$(CC) ${CFLAGS} -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
78
+	$(CC) $(CFLAGS) -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
54
 
79
 
55
 musserv:
80
 musserv:
56
 	@mkdir -p $(MUSSERV)/linux
81
 	@mkdir -p $(MUSSERV)/linux
57
@@ -763,7 +765,7 @@
82
@@ -760,7 +756,7 @@
58
 	$(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
83
 ifdef FREEBSD
84
 ifdef FBSD_SDL
85
 $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
86
-	$(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
87
+	$(CC) -fPIC $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
59
 else  #FBSD_SDL
88
 else  #FBSD_SDL
60
 $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
89
 $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
61
-	$(CC) $(M5) -O6 -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
90
 	$(CC) $(M5) -O6 -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
62
+	$(CC) ${CFLAGS} -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
91
@@ -777,7 +773,7 @@
63
 endif #FBSD_SDL
92
 	$(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
64
 endif #FREEBSD
93
 else
94
 $(O)/ogl_x11.o:  hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
95
-	$(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
96
+	$(CC) -fPIC $(CFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
97
 endif
98
 
65
 
99
 
(-)doomlegacy/files/patch-sndserv_Makefile (+12 lines)
Line 0 Link Here
1
--- linux_x/sndserv/Makefile.orig	Sun Apr 18 18:02:24 2004
2
+++ linux_x/sndserv/Makefile	Sun Sep 18 13:09:38 2005
3
@@ -26,8 +26,7 @@
4
 #
5
 #
6
 
7
-CC=gcc
8
-CFLAGS=-O2 -m486 -Wall -DNORMALUNIX -DLINUX
9
+CFLAGS=-DNORMALUNIX -DLINUX
10
 ifdef FREEBSD
11
 CFLAGS:=${CFLAGS} -DFREEBSD
12
 endif
(-)doomlegacy/files/patch-sndserver::Makefile (-13 lines)
Lines 1-13 Link Here
1
--- linux_x/sndserv/Makefile.orig	Thu Oct  2 15:42:17 2003
2
+++ linux_x/sndserv/Makefile	Thu Oct  2 15:42:40 2003
3
@@ -21,8 +21,8 @@
4
 #
5
 #
6
 
7
-CC=gcc
8
-CFLAGS=-O2 -m486 -Wall -DNORMALUNIX -DLINUX
9
+CC?=gcc
10
+CFLAGS+=-Wall -DNORMALUNIX -DLINUX
11
 ifdef FREEBSD
12
 CFLAGS:=${CFLAGS} -DFREEBSD
13
 endif
(-)doomlegacy/files/wrapper.sh (-6 lines)
Lines 1-6 Link Here
1
#!/bin/sh
2
# Needed to make symlinks/shortcuts work.
3
# Wrap lsdldoom binary
4
cd %%INSTALLDIR%%
5
./lsdldoom -nocheckwadversion $*
6
exit $?
(-)doomlegacy/pkg-message (-14 lines)
Lines 1-14 Link Here
1
2
************************************************************
3
Please read docs in
4
5
     %%PREFIX%%/share/doc/doomlegacy
6
7
before you run the application.
8
************************************************************
9
Copy DOOM.WAD or other id iwads into
10
11
     %%PREFIX%%/doomlegacy
12
13
************************************************************
14
(-)doomlegacy/pkg-plist (-7 / +6 lines)
Lines 1-9 Link Here
1
bin/legacy
1
bin/legacy
2
doomlegacy/legacy.dat
2
%%DATADIR%%/legacy.dat
3
doomlegacy/legacy.sh
3
%%DATADIR%%/llsndserv
4
doomlegacy/llsndserv
4
%%DATADIR%%/lsdldoom
5
doomlegacy/lsdldoom
5
%%DATADIR%%/r_opengl.so
6
doomlegacy/r_opengl.so
7
%%PORTDOCS%%%%DOCSDIR%%/3dfloors.html
6
%%PORTDOCS%%%%DOCSDIR%%/3dfloors.html
8
%%PORTDOCS%%%%DOCSDIR%%/Doublescan.txt
7
%%PORTDOCS%%%%DOCSDIR%%/Doublescan.txt
9
%%PORTDOCS%%%%DOCSDIR%%/README_SDL
8
%%PORTDOCS%%%%DOCSDIR%%/README_SDL
Lines 24-28 Link Here
24
%%PORTDOCS%%%%DOCSDIR%%/sound.cfg
23
%%PORTDOCS%%%%DOCSDIR%%/sound.cfg
25
%%PORTDOCS%%%%DOCSDIR%%/source.html
24
%%PORTDOCS%%%%DOCSDIR%%/source.html
26
%%PORTDOCS%%%%DOCSDIR%%/Whatsnew.html
25
%%PORTDOCS%%%%DOCSDIR%%/Whatsnew.html
27
@dirrm share/doc/doomlegacy
26
@dirrm %%DOCSDIR%%
28
@dirrm doomlegacy
27
@dirrm %%DATADIR%%

Return to bug 86446