openbsd-ports/games/tuxpaint-config/patches/patch-Makefile
2009-12-20 21:13:31 +00:00

171 lines
5.3 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.4 2009/12/20 21:13:31 naddy Exp $
--- Makefile.orig Fri May 29 00:08:08 2009
+++ Makefile Sun Dec 20 22:09:37 2009
@@ -20,7 +20,6 @@ VER_DATE=`date +"%Y-%m-%d"`
# Where to install things:
-PREFIX=/usr/local
# Program:
@@ -37,16 +36,12 @@ DATA_PREFIX=$(PREFIX)/share/tuxpaint-config/
# Docs and man page:
DOC_PREFIX=$(PREFIX)/share/doc/tuxpaint-config/
-MAN_PREFIX=$(PREFIX)/share/man/
+MAN_PREFIX=$(PREFIX)/man/
# Tux Paint's 'System-wide' Config file:
-ifeq ($(PREFIX),/usr)
- CONFDIR=/etc/tuxpaint
-else
- CONFDIR=$(PREFIX)/etc/tuxpaint
-endif
+CONFDIR=${SYSCONFDIR}/tuxpaint
# Icons and launchers:
@@ -84,7 +79,6 @@ FLTK_LIBS=`fltk-config --ldflags`
PAPER_LIB=-lpaper
# Default CFLAGS:
-CFLAGS=-O2 -Wall
# The entire set of CFLAGS:
ALL_CFLAGS=$(CFLAGS) $(FLTK_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
@@ -96,11 +90,6 @@ ALL_CFLAGS=$(CFLAGS) $(FLTK_CFLAGS) -DDATA_PREFIX=\"$(
# "make" with no arguments builds the program and man page from sources:
all: tuxpaint-config translations
- @echo
- @echo "Done compiling."
- @echo "Now (probably as 'root' superuser), run 'make install'"
- @echo "to install Tux Paint Configuration Tool."
- @echo
releaseclean:
@echo
@@ -153,16 +142,9 @@ install-win32:
# (depending on the *PREFIX variables at the top, you probably need
# to do this as superuser ("root"))
-install: install-bin install-data install-man install-doc \
- install-gnome install-kde install-kde-icons \
+install: install-bin install-man install-doc \
+ install-gnome \
install-icon install-gettext
- @echo
- @echo "All done! Now (preferably NOT as 'root' superuser),"
- @echo "you can type the command 'tuxpaint-config' to run the"
- @echo "configuration tool!"
- @echo
- @echo "Enjoy!"
- @echo
# "make clean" deletes the program, the compiled objects and the
@@ -240,23 +222,15 @@ install-kde-icons:
# and the 24-color 32x32 XPM (for other Window managers):
install-icon:
- @echo
- @echo "...Installing launcher icon graphics..."
- @install -d $(ICON_PREFIX)
- @cp data/images/icon.png $(ICON_PREFIX)tuxpaint-config.png
- @chmod 644 $(ICON_PREFIX)tuxpaint-config.png
- @install -d $(X11_ICON_PREFIX)
- @cp data/images/icon32x32.xpm $(X11_ICON_PREFIX)tuxpaint-config.xpm
- @chmod 644 $(X11_ICON_PREFIX)tuxpaint-config.xpm
+ ${BSD_INSTALL_DATA_DIR} $(ICON_PREFIX)
+ ${BSD_INSTALL_DATA} data/images/icon.png $(ICON_PREFIX)tuxpaint-config.png
+ ${BSD_INSTALL_DATA} data/images/icon32x32.xpm $(ICON_PREFIX)tuxpaint-config.xpm
# Install the program:
install-bin:
- @echo
- @echo "...Installing program itself..."
- @cp tuxpaint-config $(BIN_PREFIX)
- @chmod a+rx,g-w,o-w $(BIN_PREFIX)/tuxpaint-config$(EXE_EXT)
+ ${BSD_INSTALL_PROGRAM} tuxpaint-config $(BIN_PREFIX)
# Install the data (sound, graphics, fonts):
@@ -272,31 +246,15 @@ install-data:
# Install the text documentation:
install-doc:
- @echo
- @echo "...Installing documentation..."
- @echo "(English)"
- @install -d $(DOC_PREFIX)
- @install -d $(DOC_PREFIX)/html
- @cp docs/AUTHORS.txt $(DOC_PREFIX)
- @cp docs/CHANGES.txt $(DOC_PREFIX)
- @cp docs/COPYING.txt $(DOC_PREFIX)
- @cp docs/README.txt $(DOC_PREFIX)
- @cp docs/html/README.html $(DOC_PREFIX)/html
- @cp docs/TODO.txt $(DOC_PREFIX)
- @echo "(...Setting permissions)"
- @chmod -R a+rx,g-w,o-w $(DOC_PREFIX)
+ ${BSD_INSTALL_DATA_DIR} $(DOC_PREFIX)
+ ${BSD_INSTALL_DATA} docs/README.txt $(DOC_PREFIX)
# Install the man page:
install-man:
- @echo "...Installing man pages..."
- # man1 directory...
- @install -d $(MAN_PREFIX)/man1/
- # tuxpaint-config.1
- @cp src/tuxpaint-config.1 $(MAN_PREFIX)/man1/
- @gzip -9f $(MAN_PREFIX)/man1/tuxpaint-config.1
- @chmod a+rx,g-w,o-w $(MAN_PREFIX)/man1/tuxpaint-config.1.gz
+ ${BSD_INSTALL_MAN_DIR} $(MAN_PREFIX)/man1/
+ ${BSD_INSTALL_MAN} src/tuxpaint-config.1 $(MAN_PREFIX)/man1/
# Build the program!
@@ -304,22 +262,22 @@ install-man:
tuxpaint-config: obj/tuxpaint-config.o obj/tuxpaint-config2.o \
obj/defaults.o $(ARCH_LIBS)
@echo Linking
- $(CXX) $(ALL_CFLAGS) -o tuxpaint-config obj/tuxpaint-config.o \
+ $(CXX) $(ALL_CFLAGS) -liconv -lintl -o tuxpaint-config obj/tuxpaint-config.o \
obj/tuxpaint-config2.o obj/defaults.o $(ARCH_LIBS) \
$(FLTK_LIBS) $(ARCH_LINKS) $(PAPER_LIB)
# Build the object for the program!
-obj/tuxpaint-config.o: src/tuxpaint-config.cxx src/version.h src/about.h
+obj/tuxpaint-config.o: src/tuxpaint-config.cxx obj src/version.h src/about.h
@echo Compiling tuxpaint-config.cxx
$(CXX) $(ALL_CFLAGS) -c src/tuxpaint-config.cxx -o obj/tuxpaint-config.o
-obj/tuxpaint-config2.o: src/tuxpaint-config2.cxx src/version.h src/about.h
+obj/tuxpaint-config2.o: src/tuxpaint-config2.cxx obj src/version.h src/about.h
@echo Compiling tuxpaint-config2.cxx
$(CXX) $(ALL_CFLAGS) -c src/tuxpaint-config2.cxx -o obj/tuxpaint-config2.o
-obj/defaults.o: src/defaults.cxx
+obj/defaults.o: src/defaults.cxx obj
@echo Compiling defaults.cxx
$(CXX) $(ALL_CFLAGS) -c src/defaults.cxx -o obj/defaults.o
@@ -340,7 +298,8 @@ MOFILES:=$(patsubst src/po/%.po,trans/%.mo,$(POFILES))
INSTALLED_MOFILES:=$(patsubst trans/%.mo,$(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint-config.mo,$(MOFILES))
$(INSTALLED_MOFILES): $(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint-config.mo: trans/%.mo
- install -D -m 644 $< $@
+ $(BSD_INSTALL_DATA_DIR) $(@D)
+ $(BSD_INSTALL_DATA) $< $@
.PHONY: uninstall-i18n
uninstall-i18n: