blob: 3203ed39d31b8f672c75e9d2db080cdcb82219c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# $NetBSD: Makefile,v 1.23 2007/02/07 18:28:00 joerg Exp $
#
DISTNAME= xbeeb-0.4.1
PKGREVISION= 1
CATEGORIES= emulators x11
MASTER_SITES= http://bbc.nvg.org/emul/Xbeeb/ \
http://www.getafile.com/cgi-bin/merlot/get/james/xbeeb/
EXTRACT_SUFX= .tgz
MAINTAINER= dsainty@NetBSD.org
HOMEPAGE= http://www.cloud9.co.uk/james/BBCMicro/Xbeeb/
COMMENT= Acorn BBC Micro emulator with an X based interface
USE_IMAKE= yes
USE_TOOLS+= bdftopcf xmkmf mkfontdir
MAN_PAGE= ${WRKDIR}/xbeeb.1
XBEEBROOT= share/xbeeb
MESSAGE_SUBST+= XBEEBROOT=${XBEEBROOT}
PLIST_SUBST+= XBEEBROOT=${XBEEBROOT:Q}
FONTS_DIRS.x11= ${PREFIX}/lib/X11/fonts/xbeeb
REQD_DIRS= ${PREFIX}/lib/X11/fonts/xbeeb
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
PKG_OPTIONS_VAR= PKG_OPTIONS.xbeeb
PKG_SUPPORTED_OPTIONS= mitshm
PKG_SUGGESTED_OPTIONS=
.include "../../mk/bsd.options.mk"
# The emulator can be compiled either to use MIT-SHM, or to not.
# Unfortunately it doesn't support both at once.
.if empty(PKG_OPTIONS:Mmitshm)
SUBST_CLASSES+= nomitshm
SUBST_STAGE.nomitshm= post-patch
SUBST_MESSAGE.nomitshm= Disabling MIT-SHM
SUBST_FILES.nomitshm= src/Config.h
SUBST_SED.nomitshm= -e "s|\#define *MITSHM|\#undef MITSHM|"
.endif
.include "../../mk/oss.buildlink3.mk"
.if ${OSS_TYPE} != "none"
SUBST_CLASSES+= dsp
SUBST_STAGE.dsp= post-patch
SUBST_MESSAGE.dsp= Adjusting sound device path
SUBST_FILES.dsp= src/SoundOSS.c
SUBST_SED.dsp= -e "s|\"/dev/dsp\"|\"${DEVOSSAUDIO}\"|"
SUBST_CLASSES+= osslib
SUBST_STAGE.osslib= post-patch
SUBST_MESSAGE.osslib= Linking OSS library
SUBST_FILES.osslib= src/Imakefile
SUBST_SED.osslib= -e "s|\\(SYS_LIBRARIES[ ]*=.*\\)|\\1 ${LIBOSSAUDIO}|"
.else
SUBST_CLASSES+= nooss
SUBST_STAGE.nooss= post-patch
SUBST_MESSAGE.nooss= Disabling sound support: No OSS on this platform
SUBST_FILES.nooss= src/Config.h
SUBST_SED.nooss= -e "s|^\#define\\([ ]*SOUND_OSS.*\\)\$$|\#undef\\1|"
.endif # OSS_TYPE
SUBST_CLASSES+= beebroot
SUBST_STAGE.beebroot= post-patch
SUBST_MESSAGE.beebroot= Adjusting XBEEBROOT path
SUBST_FILES.beebroot= src/Config.h
SUBST_SED.beebroot= -e "s|^\\(\#define[ ]*XBEEBROOT[ ]*\\)[^ ].*\$$|\\1\"${PREFIX}/${XBEEBROOT}/\"|"
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${XBEEBROOT}/roms ${XBEEBROOT}/docs lib/X11/fonts/xbeeb
# xbeeb build starts in the source directory
do-configure:
cd ${WRKSRC}/src && xmkmf
post-patch:
sed -e 's+@XBEEBROOT@+${XBEEBROOT}+g' \
-e 's+@PREFIX@+${PREFIX}+g' \
${FILESDIR}/xbeeb.1 > ${MAN_PAGE}
do-build:
cd ${WRKSRC}/src && env ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} xbeeb
set -e; \
cd ${WRKSRC}/fonts; \
for i in *.bdf; do \
bdftopcf "$$i" -o `${BASENAME} "$$i" .bdf`.pcf; \
done
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/xbeeb ${PREFIX}/bin/xbeeb
${INSTALL_MAN} ${MAN_PAGE} ${PREFIX}/${PKGMANDIR}/man1/xbeeb.1
${INSTALL_DATA} ${WRKSRC}/roms/xdfs0.90.rom ${PREFIX}/${XBEEBROOT}/roms/xdfs0.90.rom
cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${PREFIX}/${XBEEBROOT}/docs
cd ${WRKSRC}/fonts && ${INSTALL_DATA} *.pcf ${PREFIX}/lib/X11/fonts/xbeeb
mkfontdir ${PREFIX}/lib/X11/fonts/xbeeb
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|