MFH: r337784

- Fix build with clang
- Use multiple make jobs
- Strip binaries
- Support staging

Approved by:    portmgr
This commit is contained in:
Pawel Pekala 2013-12-28 18:05:20 +00:00
parent 4a5779fbca
commit 1cc19dbc97
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2014Q1/; revision=337892
4 changed files with 48 additions and 6 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= djgame2
PORTVERSION= 3.2.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= http://www.bluedj.com/download/src/
DISTNAME= source-${PORTVERSION}
@ -15,13 +15,14 @@ COMMENT= bluedj contains many popular online games
NO_BUILD= yes
USE_ZIP= yes
USE_QT4= gui qt3support qmake_build uic_build rcc_build moc_build svg
USES= dos2unix
DOS2UNIX_FILES= Base/src/DJGraphicsChessTimerItem.cpp
WRKSRC= ${WRKDIR}/${DISTNAME}
DATADIR= ${PREFIX}/share/djgame2
SUB_FILES= djgame2.desktop startdjg
NO_STAGE= yes
post-patch:
${RM} -f ${WRKSRC}/Hall/HallRes/platform/x11/install
@${REINPLACE_CMD} -e 's|linux/soundcard.h|sys/soundcard.h|g' \
@ -29,6 +30,7 @@ post-patch:
@${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' \
${WRKSRC}/make_linux_output
@${REINPLACE_CMD} -e 's|qmake|${QMAKE} ${QMAKE_ARGS}|' \
-e 's|make$$|make -j${MAKE_JOBS_NUMBER}|' \
${WRKSRC}/make_linux_output
@${ECHO_CMD} "INCLUDEPATH += ${LOCALBASE}/include" \
>> ${WRKSRC}/Base/Base.pro
@ -40,10 +42,13 @@ do-configure:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./make_linux_output
do-install:
${MKDIR} ${DATADIR}
@${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC}/Hall/build; ${TAR} -cf - *) | \
${TAR} -xf - -C ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/djgame2.desktop ${PREFIX}/share/applications
${INSTALL_SCRIPT} ${WRKDIR}/startdjg ${PREFIX}/bin
${TAR} -xf - -C ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/djgame2.desktop \
${STAGEDIR}${PREFIX}/share/applications
${INSTALL_SCRIPT} ${WRKDIR}/startdjg ${STAGEDIR}${PREFIX}/bin
@(cd ${STAGEDIR}${DATADIR} && ${STRIP_CMD} modules/*.so Hall \
UpdateHall libBase.so.1)
.include <bsd.port.mk>

View File

@ -0,0 +1,10 @@
--- ./Base/src/DJGraphicsChessTimerItem.cpp.orig 2013-12-27 20:08:04.531116404 +0100
+++ ./Base/src/DJGraphicsChessTimerItem.cpp 2013-12-27 20:08:30.220122689 +0100
@@ -19,6 +19,7 @@
//Contact us at ggwizard@gmail.com or darkdong@gmail.com.
//****************************************************************************/
+#include <time.h>
#include "DJGraphicsChessTimerItem.h"
#include "DJGraphicsTextItem.h"
#include "DJDesktop.h"

View File

@ -0,0 +1,10 @@
--- ./Shisensho/src/DJGameRank.h.orig 2008-03-11 13:17:22.000000000 +0100
+++ ./Shisensho/src/DJGameRank.h 2013-12-27 20:07:09.040179358 +0100
@@ -22,6 +22,7 @@
#ifndef DJGAMERANK_H
#define DJGAMERANK_H
+#include <time.h>
#include "DJTreeWidget.h"
#include "protocol.h"

View File

@ -0,0 +1,17 @@
--- ./Shisensho/src/LLKPanelController.cpp.orig 2008-03-19 12:20:04.000000000 +0100
+++ ./Shisensho/src/LLKPanelController.cpp 2013-12-27 20:07:09.043178203 +0100
@@ -19,6 +19,7 @@
//Contact us at ggwizard@gmail.com or darkdong@gmail.com.
//****************************************************************************/
+#include <time.h>
#include "LLKPanelController.h"
#include "LLKDesktopController.h"
#include "DJGameController.h"
@@ -61,4 +62,4 @@
break;
}
DJPanelController::gameTrace(gameTrace);
-}
\ No newline at end of file
+}