Files
pkgsrc-ng/games/einstein-puzzle/patches/patch-Makefile
2016-11-18 22:39:22 +01:00

41 lines
1.4 KiB
Plaintext

$NetBSD: patch-Makefile,v 1.2 2016/09/29 12:09:48 joerg Exp $
- Add DESTDIR support.
- Support install(1) that does not create directories automatically.
- Fix linking against freetype.
--- Makefile.orig 2015-12-03 16:45:59.000000000 +0000
+++ Makefile
@@ -6,6 +6,7 @@
# installation prefix
PREFIX=/usr/local
+DESTDIR?=
########################################
#
@@ -16,8 +17,8 @@ PREFIX=/usr/local
OPTIMIZE=#-O6 -march=pentium4 -mfpmath=sse -fomit-frame-pointer -funroll-loops
PROFILER=#-pg
DEBUG=#-ggdb
-CXXFLAGS=-pipe -Wall $(OPTIMIZE) $(DEBUG) `sdl-config --cflags` -DPREFIX=L\"$(PREFIX)\" $(PROFILER)
-LNFLAGS=-pipe -lSDL_ttf -lfreetype `sdl-config --libs` -lz -lSDL_mixer $(PROFILER)
+CXXFLAGS+=-pipe -Wall $(OPTIMIZE) $(DEBUG) `sdl-config --cflags` -DPREFIX=L\"$(PREFIX)\" $(PROFILER)
+LNFLAGS= ${COMPILER_RPATH_FLAG}${X11BASE}/lib -lSDL_ttf -lfreetype `sdl-config --libs` -lz -lSDL_mixer $(PROFILER)
INSTALL=install
TARGET=einstein
@@ -61,8 +62,10 @@ run: $(TARGET)
./$(TARGET)
install: $(TARGET)
- $(INSTALL) -s -D $(TARGET) $(PREFIX)/bin/$(TARGET)
- $(INSTALL) -D einstein.res $(PREFIX)/share/einstein/res/einstein.res
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/einstein/res
+ $(INSTALL) -s $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
+ $(INSTALL) einstein.res $(DESTDIR)$(PREFIX)/share/einstein/res/einstein.res
# DO NOT DELETE THIS LINE -- make depend depends on it.