summaryrefslogtreecommitdiff
path: root/games/tyrquake/patches/patch-Makefile
blob: 5464934401b04017eab42ccb8b5def5874dfa2f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
$NetBSD: patch-Makefile,v 1.1 2015/02/10 22:10:33 snj Exp $

- add DragonFly support
- add Solaris support
- honor pkgsrc LDFLAGS
- don't invoke git to obtain version info

--- Makefile.orig	2015-02-10 13:43:40.000000000 -0800
+++ Makefile	2015-02-10 14:00:56.000000000 -0800
@@ -28,7 +28,7 @@ TARGET_UNIX      ?= $(if $(filter UNIX,$
 # ============================================================================
 
 TYR_RELEASE := v0.62-pre
-TYR_GIT := $(shell git describe --dirty 2> /dev/null)
+TYR_GIT := v0.61-1226-g0ca7766-dirty
 TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE))
 TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION))
 
@@ -52,7 +52,7 @@ TOPDIR := $(shell pwd)
 ifneq (,$(findstring MINGW32,$(SYSNAME)))
 HOST_OS = WIN32
 else
-ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD))
+ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD DragonFly))
 HOST_OS = UNIX
 HOST_UNIX = bsd
 else
@@ -68,12 +68,19 @@ ifneq (,$(findstring $(SYSNAME),Linux))
 HOST_OS = UNIX
 HOST_UNIX = linux
 else
+ifneq (,$(findstring $(SYSNAME),SunOS))
+HOST_OS = UNIX
+# enable this if someone can provide a cd_solaris.c with cdrom stuff
+#HOST_UNIX = solaris
+HOST_UNIX = null
+else
 $(error OS type not detected.)
 endif
 endif
 endif
 endif
 endif
+endif
 
 # --------------------------------------------------------------------
 # Setup driver options, choosing sensible defaults based on target OS
@@ -412,7 +419,7 @@ endef
 endif
 endif
 
-git_date = $(shell git log -1 --date=short --format="%ad" -- $< 2>/dev/null)
+git_date = 2014-06-30
 doc_version = $(git_date) $(TYR_VERSION)
 
 quiet_cmd_man2man = '  MAN2MAN  $@'
@@ -988,23 +995,23 @@ ALL_QWSV_LFLAGS += $(patsubst %,-l%,$(AL
 # ============================================================================
 
 $(BIN_DIR)/tyr-quake$(EXT):	$(patsubst %,$(NQSWDIR)/%,$(ALL_NQSW_OBJS))
-	$(call do_cc_link,$(ALL_NQSW_LFLAGS))
+	$(call do_cc_link,$(ALL_NQSW_LFLAGS)) $(LDFLAGS)
 	$(call do_strip,$@)
 
 $(BIN_DIR)/tyr-glquake$(EXT):	$(patsubst %,$(NQGLDIR)/%,$(ALL_NQGL_OBJS))
-	$(call do_cc_link,$(ALL_NQGL_LFLAGS))
+	$(call do_cc_link,$(ALL_NQGL_LFLAGS)) $(LDFLAGS)
 	$(call do_strip,$@)
 
 $(BIN_DIR)/tyr-qwcl$(EXT):	$(patsubst %,$(QWSWDIR)/%,$(ALL_QWSW_OBJS))
-	$(call do_cc_link,$(ALL_QWSW_LFLAGS))
+	$(call do_cc_link,$(ALL_QWSW_LFLAGS)) $(LDFLAGS)
 	$(call do_strip,$@)
 
 $(BIN_DIR)/tyr-glqwcl$(EXT):	$(patsubst %,$(QWGLDIR)/%,$(ALL_QWGL_OBJS))
-	$(call do_cc_link,$(ALL_QWGL_LFLAGS))
+	$(call do_cc_link,$(ALL_QWGL_LFLAGS)) $(LDFLAGS)
 	$(call do_strip,$@)
 
 $(BIN_DIR)/tyr-qwsv$(EXT):	$(patsubst %,$(QWSVDIR)/%,$(ALL_QWSV_OBJS))
-	$(call do_cc_link,$(ALL_QWSV_LFLAGS))
+	$(call do_cc_link,$(ALL_QWSV_LFLAGS)) $(LDFLAGS)
 	$(call do_strip,$@)
 
 # Build man pages, text and html docs from source