~ubuntu-branches/ubuntu/vivid/nethack/vivid

« back to all changes in this revision

Viewing changes to debian/patches/05_makefile_logic.dpatch

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng, Bernhard R. Link, Vincent Cheng
  • Date: 2012-06-11 00:47:38 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120611004738-3fy8b3wi0j45y2oq
Tags: 3.4.3-14
* Team upload.

[ Bernhard R. Link ]
* switch to "3.0 (quilt)"
* bump Standards-Version
* modernize debian/rules:
- use dpkg-buildflags
- support build-arch/-indep
- make parallel safe
- don't avoid make errors
* add patch so it can compile with -Werror=format-security
* drop no longer needed patches (-qt and -gnome are gone)
* don't use /dev/null as install template (Closes: 644647)
* drop nethack-common menu (both -console and -x11 have one)

[ Vincent Cheng ]
* Adopt package. (Closes: #673584)
  - Change Maintainer to Debian Games Team.
  - Add myself to Uploaders.
* Modify 0006-Common-config.h-for-all-binary-packages.patch to enable
  AUTOPICKUP_EXCEPTIONS. (Closes: #329318)
* Modify 0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch
  and 0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch; add
  0021-fix-kfreebsd-ftbfs.patch to fix FTBFS on kfreebsd.
* Convert debian/copyright to DEP-5 machine-readable format.
* Use dh_lintian to install overrides instead of manually installing them
  in debian/rules.
* Add watch file.
* Add Homepage field in debian/control.
* Add Vcs-* fields in debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
## 05_makefile_logic.dpatch by Aaron Lehmann <aaronl@vitelus.com>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Move some of the logical burden to make
6
 
 
7
 
if [ $# -ne 1 ]; then
8
 
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9
 
    exit 1
10
 
fi
11
 
case "$1" in
12
 
    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
13
 
    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
14
 
    *)
15
 
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
16
 
        exit 1;;
17
 
esac
18
 
 
19
 
exit 0
20
 
 
21
 
--- nethack-3.4.3/sys/unix/Makefile.src~        2003-12-22 01:54:52.000000000 -0800
22
 
+++ nethack-3.4.3/sys/unix/Makefile.src 2003-12-22 01:55:01.000000000 -0800
23
 
@@ -125,7 +125,7 @@
24
 
 # flags for Linux
25
 
 #   compile normally
26
 
 # CFLAGS = -O2 -fomit-frame-pointer -I../include
27
 
-# LFLAGS = -L/usr/X11R6/lib
28
 
+LFLAGS = -L/usr/X11R6/lib
29
 
 #   OR compile backwards compatible a.out format
30
 
 # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
31
 
 # LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
32
 
@@ -146,18 +146,16 @@
33
 
 # directories.  The ones given below is the usual spot for linux systems.
34
 
 # The paths are for glibconfig.h and gnomesupport.h respectively.
35
 
 #
36
 
-GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome
37
 
+GNOMEINC=$(shell gnome-config --cflags gnomeui)
38
 
 
39
 
 # flags for debugging:
40
 
 # CFLAGS = -g -I../include
41
 
 
42
 
-CFLAGS = -O -I../include
43
 
-LFLAGS = 
44
 
-
45
 
 # The Qt and Be window systems are written in C++, while the rest of
46
 
 # NetHack is standard C.  If using Qt, uncomment the LINK line here to get
47
 
 # the C++ libraries linked in.
48
 
-CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
49
 
+QTDIR = /usr
50
 
+CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include/qt3
51
 
 CXX=g++
52
 
 #LINK=g++
53
 
 #      For cross-compiling, eg. with gcc on Linux (see also CC further up):
54
 
@@ -212,10 +210,41 @@
55
 
 #      ../win/BeOS/NHMenuWindow.cpp ../win/BeOS/NHMapWindow.cpp tile.c
56
 
 #WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
57
 
 
58
 
+# Files for the lisp port
59
 
+WINLISPSRC = ../win/lisp/winlisp.c tile.c
60
 
+WINLISPOBJ = winlisp.o tile.o
61
 
+
62
 
 #
63
 
 #
64
 
-WINSRC = $(WINTTYSRC)
65
 
-WINOBJ = $(WINTTYOBJ)
66
 
+ifeq ($(WIN),console)
67
 
+       WINSRC = $(WINTTYSRC)
68
 
+       WINOBJ = $(WINTTYOBJ)
69
 
+       WINLIB = $(WINTTYLIB)
70
 
+endif
71
 
+ifeq ($(WIN),x11)
72
 
+       WINSRC = $(WINTTYSRC) $(WINX11SRC)
73
 
+       WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
74
 
+       WINLIB = $(WINTTYLIB) $(WINX11LIB)
75
 
+       CFLAGS += -I/usr/X11R6/include -DX11_GRAPHICS
76
 
+endif
77
 
+ifeq ($(WIN),gnome)
78
 
+       WINSRC = $(WINTTYSRC) $(WINGNOMESRC)
79
 
+       WINOBJ = $(WINTTYOBJ) $(WINGNOMEOBJ)
80
 
+       WINLIB = $(WINTTYLIB) $(WINGNOMELIB)
81
 
+       CFLAGS += -DGNOME_GRAPHICS
82
 
+endif
83
 
+ifeq ($(WIN),qt)
84
 
+       WINSRC = $(WINTTYSRC) $(WINQTSRC)
85
 
+       WINOBJ = $(WINTTYOBJ) $(WINQTOBJ)
86
 
+       WINLIB = $(WINTTYLIB) $(WINQTLIB)
87
 
+       CFLAGS += -DQT_GRAPHICS
88
 
+endif
89
 
+ifeq ($(WIN),lisp)
90
 
+       WINSRC = $(WINLISPSRC)
91
 
+       WINOBJ = $(WINLISPOBJ)
92
 
+       WINLIB = $(WINLISPLIB)
93
 
+       CFLAGS += -DLISP_GRAPHICS -DDEFAULT_WINDOW_SYS=\"lisp\"
94
 
+endif
95
 
 
96
 
 # on some systems the termcap library is in -ltermcap or -lcurses
97
 
 # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
98
 
@@ -230,24 +259,24 @@
99
 
 # WINTTYLIB = -ltermcap
100
 
 # WINTTYLIB = -lcurses
101
 
 # WINTTYLIB = -lcurses16
102
 
-# WINTTYLIB = -lncurses
103
 
-WINTTYLIB = -ltermlib
104
 
+WINTTYLIB = -lncurses
105
 
+# WINTTYLIB = -ltermlib
106
 
 #
107
 
 # libraries for X11
108
 
 # If USE_XPM is defined in config.h, you will also need -lXpm here.
109
 
-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
110
 
+WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
111
 
 # WINX11LIB = -lXaw -lXmu -lXt -lX11
112
 
 # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
113
 
 # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
114
 
 #
115
 
 # libraries for Qt
116
 
-WINQTLIB = -L$(QTDIR)/lib -lqt
117
 
+WINQTLIB = -L$(QTDIR)/lib -lqt-mt
118
 
 #
119
 
 # libraries for KDE (with Qt)
120
 
 WINKDELIB = -lkdecore -lkdeui -lXext
121
 
 #
122
 
 # libraries for Gnome
123
 
-WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt
124
 
+WINGNOMELIB = $(shell gnome-config --libs gnomeui)
125
 
 #
126
 
 # libraries for Gem port
127
 
 WINGEMLIB = -le_gem -lgem
128
 
@@ -255,8 +284,6 @@
129
 
 # libraries for BeOS 
130
 
 WINBELIB = -lbe
131
 
 
132
 
-WINLIB = $(WINTTYLIB)
133
 
-
134
 
 # any other strange libraries your system needs (for Sysunix only -- the more
135
 
 # specialized targets should already be right)
136
 
 #
137
 
@@ -338,7 +365,7 @@
138
 
 GENCSRC = monstr.c vis_tab.c   #tile.c
139
 
 
140
 
 # all windowing-system-dependent .c (for dependencies and such)
141
 
-WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC)
142
 
+WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINLISPSRC)
143
 
 # all windowing-system-dependent .cpp (for dependencies and such)
144
 
 WINCXXSRC = $(WINQTSRC) $(WINBESRC)
145
 
 
146
 
@@ -683,6 +710,9 @@
147
 
        $(CC) $(CFLAGS) -c ../win/gem/load_img.c
148
 
 gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h
149
 
        $(CC) $(CFLAGS) -c ../win/gem/gr_rect.c
150
 
+winlisp.o: ../win/lisp/winlisp.c $(HACK_H) ../include/winlisp.h \
151
 
+               ../include/func_tab.h ../include/dlb.h ../include/patchlevel.h
152
 
+       $(CC) $(CFLAGS) -c ../win/lisp/winlisp.c
153
 
 tile.o: tile.c $(HACK_H)
154
 
 qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \
155
 
                ../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \
156
 
@@ -803,7 +833,8 @@
157
 
 weapon.o: weapon.c $(HACK_H)
158
 
 were.o: were.c $(HACK_H)
159
 
 wield.o: wield.c $(HACK_H)
160
 
-windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h
161
 
+windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h \
162
 
+               ../include/winlisp.h
163
 
 wizard.o: wizard.c $(HACK_H) ../include/qtext.h ../include/epri.h
164
 
 worm.o: worm.c $(HACK_H) ../include/lev.h
165
 
 worn.o: worn.c $(HACK_H)