1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Switch huge REINPLACE to patch

- Simplify installation
- Add empty directory to plist
This commit is contained in:
Dmitry Marakasov 2014-12-12 00:39:27 +00:00
parent fdbee8e1ea
commit 1af12cbf8e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=374563
3 changed files with 48 additions and 20 deletions

View File

@ -24,9 +24,10 @@ WRKSRC= ${WRKDIR}/hhh-2008-03-29
USES= gmake
USE_SDL= sdl image mixer ttf
ALL_TARGET= # empty
MAKE_ENV= DATA_INSTALL_DIR="${DATADIR}" \
BIN_DIR="${PREFIX}/bin"
PORTDOCS= CHANGELOG README
OPTIONS_DEFINE= DOCS
INSTALLS_ICONS= yes
ICON_SIZES= 32x32 48x48 64x64 72x72 96x96
@ -34,27 +35,13 @@ ICON_SIZES= 32x32 48x48 64x64 72x72 96x96
DESKTOP_ENTRIES="Help Hannah's Horse" "" "${PORTNAME}" \
"${PORTNAME}" "Game;ArcadeGame;" ""
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local/games/hhh|${DATADIR}|; \
s|/usr/local/bin|${PREFIX}/bin|; \
s|CXX = g++|CXX ?= g++}|; \
s|CXXFLAGS = -O2 -Wall -g|CXXFLAGS +=|; \
s|OUT = hhh|OUT = ${PORTNAME}|; \
s|-include deps|#-include deps|' \
${WRKSRC}/Makefile
OPTIONS_DEFINE= DOCS
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.for d in blue carrot default freeze hannah images invert invis maps newanim \
pink red sounds stop
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
.endfor
.for f in *.ogg *.ttf *.dat *.png
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
.endfor
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/hhh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "blue carrot default freeze hannah \
images invert invis maps newanim pink red sounds stop \
*.ogg *.ttf *.dat *.png" ${STAGEDIR}${DATADIR})
.for s in ${ICON_SIZES}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \

View File

@ -0,0 +1,40 @@
--- Makefile.orig 2007-02-07 00:31:11.000000000 +0300
+++ Makefile 2014-12-12 01:25:23.000000000 +0300
@@ -4,11 +4,11 @@
# Install options
#
# For local install, comment the next line and uncomment the one after
-DATA_INSTALL_DIR=/usr/local/games/hhh
+DATA_INSTALL_DIR?=/usr/local/games/hhh
#DATA_INSTALL_DIR=.
# Where the binary goes (you might want /usr/bin instead)
-BIN_DIR=/usr/local/bin
+BIN_DIR?=/usr/local/bin
# Where the hiscore table is saved: user's home dir/.hannah
#SCORE_DIR=${HOME}/.hannah
@@ -16,10 +16,10 @@
# compiler options
-CXX = g++
-CPPFLAGS = $(shell sdl-config --cflags) -DDATA_INSTALL_DIR=\"${DATA_INSTALL_DIR}\" #-DSCORE_DIR=\"${SCORE_DIR}\"
-CXXFLAGS = -O2 -Wall -g
-LIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lSDL_mixer
+CXX ?= g++
+CPPFLAGS += $(shell sdl-config --cflags) -DDATA_INSTALL_DIR=\"${DATA_INSTALL_DIR}\" #-DSCORE_DIR=\"${SCORE_DIR}\"
+CXXFLAGS += -Wall
+LIBS += $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lSDL_mixer
# target binary and directory name
OUT = hhh
@@ -39,7 +39,7 @@
deps: $(SRCS)
gcc $(CPPFLAGS) -MM $^ > deps
--include deps
+#-include deps
install: hhh

View File

@ -154,3 +154,4 @@ share/icons/hicolor/64x64/apps/help_hannahs_horse.png
share/icons/hicolor/72x72/apps/help_hannahs_horse.png
share/icons/hicolor/96x96/apps/help_hannahs_horse.png
share/pixmaps/help_hannahs_horse.png
@dir %%DATADIR%%/default