aboutsummaryrefslogtreecommitdiff
path: root/games/eboard
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2007-01-30 20:40:50 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2007-01-30 20:40:50 +0000
commit6c2202a9ef2992435800d1f56a2cda311e9baa66 (patch)
treef54a28a4f7bb822886995323462af5e86d275b3a /games/eboard
parent1ba17e0c018ba8c57c6546051ac13b16d7f67c14 (diff)
downloadports-6c2202a9ef2992435800d1f56a2cda311e9baa66.tar.gz
ports-6c2202a9ef2992435800d1f56a2cda311e9baa66.zip
Notes
Diffstat (limited to 'games/eboard')
-rw-r--r--games/eboard/Makefile24
-rw-r--r--games/eboard/distinfo6
-rw-r--r--games/eboard/files/patch-main.cc11
3 files changed, 35 insertions, 6 deletions
diff --git a/games/eboard/Makefile b/games/eboard/Makefile
index 7f09f2760d85..8b15a77ddde5 100644
--- a/games/eboard/Makefile
+++ b/games/eboard/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= eboard
-PORTVERSION= 1.0.2
+PORTVERSION= 1.0.3
EXTRAS= 1pl2 2
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -22,13 +22,18 @@ HAS_CONFIGURE= yes
USE_PERL5_BUILD=yes
USE_GNOME= gtk20
-CONFIGURE_ARGS= --prefix=${PREFIX} --extra-inc=${LOCALBASE}/include:${X11BASE}/include --extra-ld=${LOCALBASE}/lib:${X11BASE}/lib
+CONFIGURE_ARGS= --prefix=${PREFIX} \
+ --extra-inc=${LOCALBASE}/include:${X11BASE}/include \
+ --extra-ld=${LOCALBASE}/lib:${X11BASE}/lib \
+ --disable-dgt
INSTALL_TARGET= install install-man
MAN1= eboard-config.1 eboard-addtheme.1
MAN6= eboard.6
+OPTIONS= JOYSTICK "joystick support" off
+
DESKTOP_ENTRIES="eboard" \
"Play chess" \
"eboard.xpm" \
@@ -36,6 +41,13 @@ DESKTOP_ENTRIES="eboard" \
"Application;Game;" \
true
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_JOYSTICK)
+BUILD_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js
+RUN_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js
+.endif
+
post-extract:
.for e in ${EXTRAS}
@cd ${WRKDIR} && ${GZIP_CMD} -dc \
@@ -46,6 +58,12 @@ post-patch:
@${REINPLACE_CMD} -e 's,g++,${CXX},' -e 's,-O6,${CXXFLAGS},' \
${WRKSRC}/configure
+.if !defined(WITH_JOYSTICK)
+post-configure:
+ @${REINPLACE_CMD} -e '/^#define HAVE_LINUX_JOYSTICK_H 1/ d' \
+ ${WRKSRC}/config.h
+.endif
+
post-install:
${LN} -sf ${LOCALBASE}/bin/timeseal ${DATADIR}/timeseal.FreeBSD
.if !defined(NOPORTDOCS)
@@ -64,4 +82,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/icon-eboard.xpm ${PREFIX}/share/pixmaps/eboard.xpm
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/eboard/distinfo b/games/eboard/distinfo
index 6b6fc7bd364d..29621729dbf3 100644
--- a/games/eboard/distinfo
+++ b/games/eboard/distinfo
@@ -1,6 +1,6 @@
-MD5 (eboard-1.0.2.tar.bz2) = faea915d4aaaf5ac20fd631ab4d47ea2
-SHA256 (eboard-1.0.2.tar.bz2) = a377f06300537e6e869542c49cb1ab4be0918be9dbf35a3771239c9a283732c5
-SIZE (eboard-1.0.2.tar.bz2) = 408023
+MD5 (eboard-1.0.3.tar.bz2) = 833e656549d9fd9191e51b08005633e3
+SHA256 (eboard-1.0.3.tar.bz2) = 96556e9b94496bb315349f8dc3c79f264621db8f2e4a8c5d640a8bc37a49012f
+SIZE (eboard-1.0.3.tar.bz2) = 428502
MD5 (eboard-extras-1pl2.tar.gz) = d5fb7a541d9ef5f6d1d565d877b1ab9a
SHA256 (eboard-extras-1pl2.tar.gz) = 6849cc104e454167db8b8e9ae0573accade5c941a140b47e58b601164e99fcc3
SIZE (eboard-extras-1pl2.tar.gz) = 361237
diff --git a/games/eboard/files/patch-main.cc b/games/eboard/files/patch-main.cc
new file mode 100644
index 000000000000..afe72228d1e9
--- /dev/null
+++ b/games/eboard/files/patch-main.cc
@@ -0,0 +1,11 @@
+--- main.cc.orig Mon Jan 22 18:57:40 2007
++++ main.cc Tue Jan 30 21:07:51 2007
+@@ -139,7 +139,7 @@
+ char devname[64];
+
+ for(i=0;i<10;i++) {
+- snprintf(devname,64,"/dev/js%d",i);
++ snprintf(devname,64,"/dev/input/js%d",i);
+ fd = open(devname,O_RDONLY);
+ if (fd >= 0) break;
+ }