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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
$NetBSD: patch-aa,v 1.12 2007/09/04 21:11:58 drochner Exp $
--- Makefile.orig 2007-07-01 17:05:57.000000000 +0200
+++ Makefile
@@ -18,7 +18,7 @@ VER_DATE=`date +"%Y-%m-%d"`
# Where to install things:
-PREFIX=/usr/local
+#PREFIX=/usr/local
# Root directory to place files when creating packages.
@@ -40,16 +40,9 @@ DATA_PREFIX=$(PKG_ROOT)$(PREFIX)/share/t
# Docs and man page:
DOC_PREFIX=$(PKG_ROOT)$(PREFIX)/share/doc/tuxpaint
-MAN_PREFIX=$(PKG_ROOT)$(PREFIX)/share/man
+MAN_PREFIX=$(PKG_ROOT)$(PREFIX)/$(PKGMANDIR)
-# 'System-wide' Config file:
-
-ifeq ($(PREFIX),/usr)
- CONFDIR=$(PKG_ROOT)/etc/tuxpaint
-else
- CONFDIR=$(PKG_ROOT)$(PREFIX)/etc/tuxpaint
-endif
# Commands useful to other arch's (e.g., BeOS)
@@ -103,12 +96,8 @@ SDL_MIXER_LIB=-lSDL_mixer
SDL_CFLAGS=$(shell sdl-config --cflags) $(SVG_CFLAGS)
-SVG_LIB=-lrsvg-2 -lcairo
-SVG_CFLAGS=-I/usr/include/librsvg-2/librsvg \
- -I/usr/include/gtk-2.0 \
- -I/usr/include/glib-2.0 \
- -I/usr/lib/glib-2.0/include \
- -I/usr/include/cairo
+SVG_LIB=$(shell pkg-config --libs librsvg-2.0) $(shell pkg-config --libs cairo)
+SVG_CFLAGS=$(shell pkg-config --cflags librsvg-2.0) $(shell pkg-config --cflags cairo)
PAPER_LIB=-lpaper
@@ -116,8 +105,8 @@ PAPER_LIB=-lpaper
# The entire set of CFLAGS:
#-ffast-math
-OPTFLAGS=-O2
-CFLAGS=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
+#OPTFLAGS=-O2
+CFLAGS+=$(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
-Wcast-align -Wredundant-decls \
-Wbad-function-cast -Wwrite-strings \
-Waggregate-return \
@@ -284,10 +273,9 @@ include Makefile-i18n
# to do this as superuser ("root"))
install: install-bin install-data install-man install-doc \
- install-icon install-gettext install-im install-importscript \
+ install-gettext install-im install-importscript \
install-default-config install-example-stamps \
- install-example-starters \
- install-gnome install-kde install-kde-icons
+ install-example-starters
@echo
@echo "--------------------------------------------------------------"
@echo
@@ -478,9 +466,9 @@ uninstall: uninstall-i18n
install-default-config:
@echo
@echo "...Installing default config file..."
- @install -d $(CONFDIR)
- @cp src/tuxpaint.conf $(CONFDIR)
- @chmod 644 $(CONFDIR)/tuxpaint.conf
+ @$(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/tuxpaint
+ @$(CP) src/tuxpaint.conf $(PREFIX)/share/examples/tuxpaint
+ @$(CHMOD) 644 $(PREFIX)/share/examples/tuxpaint/tuxpaint.conf
# Install example stamps
@@ -715,7 +703,7 @@ tuxpaint: obj/tuxpaint.o obj/i18n.o obj/
$(HQXX_O) $(ARCH_LIBS)
@echo
@echo "...Linking Tux Paint..."
- @$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(PAPER_CFLAGS) \
+ @$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(LDFLAGS) $(SDL_CFLAGS) $(PAPER_CFLAGS) \
$(DEFS) \
-o tuxpaint \
$^ \
@@ -723,7 +711,7 @@ tuxpaint: obj/tuxpaint.o obj/i18n.o obj/
$(SDL_LIBS) \
$(SVG_LIB) \
$(PAPER_LIB) \
- -lm $(ARCH_LINKS)
+ -lm $(ARCH_LINKS) $(LIBS)
@$(RSRC_CMD)
@$(MIMESET_CMD)
|