1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

- Pet portlint

- Switch to options helpers
- Respect CFLAGS
This commit is contained in:
Dmitry Marakasov 2016-06-17 09:05:04 +00:00
parent 29eac2606e
commit e099562643
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417001
3 changed files with 31 additions and 32 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= blockout
PORTVERSION= 2.5
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/BlockOut%20${PORTVERSION}/ \
http://www.stasyan.com/devel/distfiles/
@ -13,18 +14,21 @@ COMMENT= BlockOut II is an adaptation of the original Blockout DOS game
LICENSE= GPLv2+
LIB_DEPENDS= libasound.so:audio/alsa-lib
ONLY_FOR_ARCHS= i386 amd64
USE_SDL= mixer sdl
USES= gmake dos2unix
DOS2UNIX_FILES= ${WRKSRC}/ImageLib/src/gif/gif.h \
${WRKSRC}/ImageLib/src/gif/gif.cpp ${WRKSRC}/BlockOut/*.cpp
LIB_DEPENDS+= libasound.so:audio/alsa-lib
USE_GL= gl glu
WRKSRC= ${WRKDIR}/BL_SRC
BUILD_WRKSRC= ${WRKSRC}/BlockOut
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/BlockOut/Utils.cpp
@ -34,6 +38,8 @@ pre-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/BlockOut/blockout ${STAGEDIR}${PREFIX}/bin
cd ${WRKDIR}/blockout && ${COPYTREE_SHARE} "images sounds" ${STAGEDIR}${DATADIR}
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${BUILD_WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR}

View File

@ -1,6 +1,6 @@
--- ImageLib/src/Makefile.orig 2014-02-09 13:14:33.000000000 +0700
+++ ImageLib/src/Makefile 2014-02-09 13:15:28.000000000 +0700
@@ -32,8 +32,8 @@
--- ImageLib/src/Makefile.orig 2013-12-11 19:03:43.000000000 +0400
+++ ImageLib/src/Makefile 2016-05-23 20:38:27.381210000 +0300
@@ -32,11 +32,11 @@
#---------------------------------------------------------------------
@ -9,5 +9,10 @@
+#CXX = g++
+#CC = gcc
CXXFLAGS = -O2 -Dlinux -c -I.
CFLAGS = -O2 -Dlinux -c -I.
-CXXFLAGS = -O2 -Dlinux -c -I.
-CFLAGS = -O2 -Dlinux -c -I.
+CXXFLAGS += -Dlinux -c -I.
+CFLAGS += -Dlinux -c -I.
#--------------------------------------------------------------------

View File

@ -1,32 +1,18 @@
--- BlockOut/Makefile.orig 2014-05-06 16:47:56.000000000 +0700
+++ BlockOut/Makefile 2015-08-30 12:41:52.375668000 +0600
@@ -41,33 +41,37 @@
ADD_LIBS = ../ImageLib/src/libimagelib.a
-ifdef _linux64
-SDL_LIBS = /usr/lib/x86_64-linux-gnu
-else
-SDL_LIBS = /usr/lib/i386-linux-gnu
-endif
+#ifdef _linux64
+#SDL_LIBS = /usr/lib/x86_64-linux-gnu
+#else
+#SDL_LIBS = /usr/lib/i386-linux-gnu
+#endif
+SDL_LIBS = /usr/local/lib
+
+#CXX = g++
--- BlockOut/Makefile.orig 2014-05-06 13:47:56.000000000 +0400
+++ BlockOut/Makefile 2016-05-23 20:37:54.725070000 +0300
@@ -47,27 +47,27 @@
SDL_LIBS = /usr/lib/i386-linux-gnu
endif
-CXX = g++
+SDL_ROOT = /usr/local
+IMGLIB_ROOT = ../ImageLib/src
+#CXX = g++
ifdef _release
CXXFLAGS = -O2 -Dlinux -c \
-CXXFLAGS = -O2 -Dlinux -c \
- -I/usr/include/SDL -I../ImageLib/src -I.
+ -I/usr/include -I$(SDL_ROOT)/include/SDL -I$(SDL_ROOT)/include -I$(IMGLIB_ROOT) -I.
+CXXFLAGS += -Dlinux -c \
+ -I$(LOCALBASE)/include/SDL -I$(LOCALBASE)/include -I../ImageLib/src -I.
LFLAGS = -Wl,--strip-all \
$(ADD_LIBS) \
@ -36,11 +22,13 @@
else
CXXFLAGS = -g -D_DEBUG -Dlinux -c \
-CXXFLAGS = -g -D_DEBUG -Dlinux -c \
- -I/usr/include/SDL -I../ImageLib/src -I.
+ -I/usr/include -I$(SDL_ROOT)/include/SDL -I$(SDL_ROOT)/include -I$(IMGLIB_ROOT) -I.
+CXXFLAGS += -D_DEBUG -Dlinux -c \
+ -I$(LOCALBASE)/include/SDL -I$(LOCALBASE)/include -I../ImageLib/src -I.
LFLAGS = -L $(SDL_LIBS) \
-LFLAGS = -L $(SDL_LIBS) \
+LFLAGS = -L $(LOCALBASE)/lib \
$(ADD_LIBS) \
-lSDL_mixer -lSDL -lasound \
- -lGL -lGLU -lpthread -lm -ldl