summaryrefslogtreecommitdiff
path: root/emulators/x48/Makefile
blob: 78ad30a0676064b1bc532ab403ab0bbccb0a4224 (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
# $NetBSD: Makefile,v 1.19 2017/09/06 10:40:27 wiz Exp $

DISTNAME=	x48-0.6.4
PKGREVISION=	1
CATEGORIES=	emulators
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=x48.berlios/}
DISTFILES=	${PKGNAME_NOREV}${EXTRACT_SUFX}
DISTFILES+=	sxrom-e.bz2 gxrom-r.bz2
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	pkgsrc-users@NetBSD.org
#HOMEPAGE=	http://x48.berlios.de/
COMMENT=	HP48 emulator
LICENSE=	gnu-gpl-v3

WRKSRC=		${WRKDIR}
#USE_IMAKE=	YES
GNU_CONFIGURE=	YES
USE_TOOLS+=	pkg-config aclocal autoconf automake autoreconf
USE_LIBTOOL=	yes
USE_TOOLS+=	gmake

DATADIR=	lib/x48
APPDEFS=	lib/X11/app-defaults

INSTALLATION_DIRS+=	share/doc/x48/romdump
INSTALLATION_DIRS+=	${DATADIR}
INSTALLATION_DIRS+=	${APPDEFS}

CONFIGURE_ARGS=	--disable-shm

CPPFLAGS+=	-DHAVE_STDLIB
CPPFLAGS+=	-DX11APPDEFS=\"${PREFIX}/${APPDEFS}\"

SUBST_CLASSES=	fix-ad
SUBST_STAGE.fix-ad=	post-configure
SUBST_MESSAGE.fix-ad=	Fix default rom path
SUBST_FILES.fix-ad=	src/X48.ad
SUBST_SED.fix-ad=	-e 's,rom.dump,${PREFIX}/${DATADIR}/gxrom-r,'


pre-configure:
	cd ${WRKSRC} && autoreconf -fi

post-install:
	cd ${WRKSRC} && \
		${INSTALL_DATA} X48 \
			${DESTDIR}${PREFIX}/lib/X11/app-defaults
	cd ${WRKSRC} && \
		${INSTALL_DATA} ??rom-? ${DESTDIR}${PREFIX}/${DATADIR}
	cd ${WRKSRC}/doc && \
		${INSTALL_MAN} CARDS.doc INSTALLING ROMDump.doc \
			${DESTDIR}${PREFIX}/share/doc/x48
	cd ${WRKSRC}/romdump && \
		${INSTALL_MAN} README ${DESTDIR}${PREFIX}/share/doc/x48/romdump && \
		${INSTALL_DATA} ROMDump ROMDump.s \
			${DESTDIR}${PREFIX}/share/doc/x48/romdump

.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"