2006-02-05 04:12:50 +01:00
|
|
|
# New ports collection makefile for: linux-js
|
|
|
|
# Date created: 5 Feb 2006
|
|
|
|
# Whom: Jean-Yves Lefort <jylefort@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= linux-js
|
2006-04-13 10:35:30 +02:00
|
|
|
PORTVERSION= 2.2
|
2007-06-29 11:16:42 +02:00
|
|
|
CATEGORIES= devel emulators kld
|
2006-02-05 04:12:50 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
|
|
|
MASTER_SITE_SUBDIR= jylefort
|
|
|
|
|
2008-04-29 07:11:44 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2006-02-05 04:12:50 +01:00
|
|
|
COMMENT= The Linux joystick interface ported to FreeBSD
|
|
|
|
|
|
|
|
PROGRAMS= jscal jstest
|
|
|
|
|
|
|
|
MAN1= ${PROGRAMS:S|$|.1|}
|
2006-03-21 17:03:50 +01:00
|
|
|
MAN4= linux_js.4
|
2006-02-05 04:12:50 +01:00
|
|
|
PORTDOCS= joystick-api.txt
|
2006-03-21 17:03:50 +01:00
|
|
|
USE_RCORDER= jscal.sh linux_js.sh
|
|
|
|
|
2006-04-13 10:35:30 +02:00
|
|
|
OPTIONS= LINUX "Linux mode support (i386/amd64 only)" on \
|
|
|
|
JOY "PC joystick support" on \
|
2006-03-21 17:03:50 +01:00
|
|
|
UHID "USB joystick support" on
|
|
|
|
|
|
|
|
MAKE_ENV= WITHOUT_DEBUG=yes
|
2006-02-05 04:12:50 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${OSVERSION} < 503001
|
|
|
|
IGNORE= requires FreeBSD 5.3 or superior
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !exists(/usr/src/sys/Makefile)
|
|
|
|
IGNORE= requires kernel source files
|
|
|
|
.endif
|
|
|
|
|
2006-04-13 10:35:30 +02:00
|
|
|
.if defined(WITHOUT_LINUX)
|
|
|
|
MAKE_ENV+= WITHOUT_LINUX=yes
|
|
|
|
.endif
|
|
|
|
|
2006-03-21 17:03:50 +01:00
|
|
|
.if defined(WITHOUT_JOY)
|
|
|
|
MAKE_ENV+= WITHOUT_JOY=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_UHID)
|
|
|
|
MAKE_ENV+= WITHOUT_UHID=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/linux_js.4
|
2008-05-01 15:14:23 +02:00
|
|
|
.if ${OSVERSION} >= 700000
|
|
|
|
@${REINPLACE_CMD} -e 's|FILEDESC_UNLOCK|FILEDESC_SUNLOCK|' ${WRKSRC}/linux_js.c
|
|
|
|
@${REINPLACE_CMD} -e 's|FILEDESC_LOCK|FILEDESC_SLOCK|' ${WRKSRC}/linux_js.c
|
|
|
|
.endif
|
2006-03-21 17:03:50 +01:00
|
|
|
|
2006-02-05 04:12:50 +01:00
|
|
|
post-install:
|
|
|
|
${MKDIR} ${PREFIX}/include/linux
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/joystick.h ${PREFIX}/include/linux
|
|
|
|
${INSTALL_PROGRAM} ${PROGRAMS:S|^|${WRKSRC}/|} ${PREFIX}/bin
|
2006-03-21 17:03:50 +01:00
|
|
|
.for s in 1 4
|
|
|
|
${INSTALL_MAN} ${MAN${s}:S|^|${WRKSRC}/|} ${PREFIX}/man/man${s}
|
|
|
|
.endfor
|
2006-02-05 04:12:50 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/joystick-api.txt ${DOCSDIR}
|
|
|
|
.endif
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|