aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2003-10-03 06:56:19 +0800
committerkris <kris@FreeBSD.org>2003-10-03 06:56:19 +0800
commit708383ca20b88cd22aeb78067fdbd128c6f88b57 (patch)
treed75c4987a1eec6a06415640f039b0fd0e2fd07be /games
parent0639a374c5a0bd7fa4ec04c31220ceca74ce8ea4 (diff)
downloadfreebsd-ports-gnome-708383ca20b88cd22aeb78067fdbd128c6f88b57.tar.gz
freebsd-ports-gnome-708383ca20b88cd22aeb78067fdbd128c6f88b57.tar.zst
freebsd-ports-gnome-708383ca20b88cd22aeb78067fdbd128c6f88b57.zip
Respect CC, CFLAGS, PTHREAD_LIBS and PTHREAD_CFLAGS (unbreaks build on 5.x)
Diffstat (limited to 'games')
-rw-r--r--games/doomlegacy/Makefile8
-rw-r--r--games/doomlegacy/files/patch-makefile74
-rw-r--r--games/doomlegacy/files/patch-sndserver::Makefile13
3 files changed, 90 insertions, 5 deletions
diff --git a/games/doomlegacy/Makefile b/games/doomlegacy/Makefile
index f2ba49a7fd84..8775257b486e 100644
--- a/games/doomlegacy/Makefile
+++ b/games/doomlegacy/Makefile
@@ -29,7 +29,8 @@ USE_GMAKE= yes
USE_MESA= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
-MAKE_ARGS= -f makefile FREEBSD=1
+MAKEFILE= makefile
+MAKE_ENV= FREEBSD=1
# I have no ideas about build status on other platforms
ONLY_FOR_ARCHS= i386
@@ -45,11 +46,8 @@ post-extract:
@cd ${WRKDIR} && ${MKDIR} bin && \
unzip -q ${_DISTDIR}/${WADFILE} -d ${WRKDIR}/bin
-do-build:
- cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} && \
- ${LN} -s ${WRKSRC}/linux_x/sndserv/linux/llsndserv ${WRKDIR}/bin
-
do-install:
+ ${LN} -sf ${WRKSRC}/linux_x/sndserv/linux/llsndserv ${WRKDIR}/bin
${INSTALL} -d ${TARGET_DIR} && \
${INSTALL_PROGRAM} ${PROG_FILES} ${TARGET_DIR} && \
${INSTALL} ${SGID_ARGS} ${SGID_FILES} ${TARGET_DIR} && \
diff --git a/games/doomlegacy/files/patch-makefile b/games/doomlegacy/files/patch-makefile
new file mode 100644
index 000000000000..446fc48901ff
--- /dev/null
+++ b/games/doomlegacy/files/patch-makefile
@@ -0,0 +1,74 @@
+--- makefile.orig Thu Jan 3 11:20:06 2002
++++ makefile Thu Oct 2 15:40:05 2003
+@@ -224,7 +224,7 @@
+
+ # gcc or g++
+ #CC=@gcc
+-CC=gcc
++CC?=gcc
+
+ #if use PGCC or EGCS
+ PGCC=1
+@@ -351,7 +351,8 @@
+
+ OPTS := $(OPTS) -DVID_X11 -DPOLL_POINTER -I. -I/usr/X11R6/include
+ LDFLAGS=-L/usr/X11R6/lib
+- LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
++ LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm ${PTHREAD_LIBS}
++ CFLAGS+=${PTHREAD_CFLAGS}
+ # name of the exefile
+ EXENAME=llxdoom
+ SFLAGS=-g $(OPTS)
+@@ -372,7 +373,8 @@
+ DEBUGLIBS=$(LIBS)
+
+ LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
+- LIBS=-lm -lSDL-1.1 -lSDL_mixer -lGL -lGLU -lipx -lkvm -pthread
++ LIBS=-lm -lSDL-1.1 -lSDL_mixer -lGL -lGLU -lipx -lkvm ${PTHREAD_LIBS}
++ CFLAGS+=${PTHREAD_CFLAGS}
+ DEBUGLIBS=$(LIBS)
+
+ # name of the exefile
+@@ -460,13 +462,13 @@
+
+ # build a normal optimised version
+ ifdef PGCC
+- CFLAGS = $(OPTS) -mpentium -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
++ CFLAGS += $(OPTS) -fwritable-strings
+ # -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
+ # -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps \
+ # -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
+ # -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
+ else
+- CFLAGS = -m486 -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
++ CFLAGS += -fwritable-strings $(OPTS)
+ endif
+ endif
+
+@@ -623,7 +625,7 @@
+
+ #dll
+ dll : $(O)/r_opengl.o $(O)/ogl_x11.o
+- $(CC) -mpentium -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lGL -lX11 -lXext -lGLU -lm
++ $(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 -lGL -lX11 -lXext -lGLU -lm
+
+ musserv:
+ @mkdir -p $(MUSSERV)/linux
+@@ -651,7 +653,7 @@
+ $(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
+ else #FBSD_SDL
+ $(O)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
+- $(CC) -mpentium -O6 -o $(O)/r_opengl.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
++ $(CC) $(CFLAGS) -o $(O)/r_opengl.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
+ endif #FBSD_SDL
+ endif #FREEBSD
+
+@@ -660,7 +662,7 @@
+ $(CC) -mpentium -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
+ else
+ $(O)/ogl_x11.o: hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
+- $(CC) -mpentium -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
++ $(CC) $(CFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD -DPOLL_POINTER -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
+ endif
+
+
diff --git a/games/doomlegacy/files/patch-sndserver::Makefile b/games/doomlegacy/files/patch-sndserver::Makefile
new file mode 100644
index 000000000000..9e7182fd2fbd
--- /dev/null
+++ b/games/doomlegacy/files/patch-sndserver::Makefile
@@ -0,0 +1,13 @@
+--- linux_x/sndserv/Makefile.orig Thu Oct 2 15:42:17 2003
++++ linux_x/sndserv/Makefile Thu Oct 2 15:42:40 2003
+@@ -21,8 +21,8 @@
+ #
+ #
+
+-CC=gcc
+-CFLAGS=-O2 -m486 -Wall -DNORMALUNIX -DLINUX
++CC?=gcc
++CFLAGS+=-Wall -DNORMALUNIX -DLINUX
+ ifdef FREEBSD
+ CFLAGS:=${CFLAGS} -DFREEBSD
+ endif