freebsd-ports/emulators/x48/Makefile

59 lines
1.8 KiB
Makefile
Raw Normal View History

# Created by: Eric L. Hernes <erich@FreeBSD.org>
1999-08-25 07:57:29 +02:00
# $FreeBSD$
2000-04-12 06:56:17 +02:00
PORTNAME= x48
PORTVERSION= 0.6.4
PORTREVISION= 1
CATEGORIES= emulators math
MASTER_SITES= SF/${PORTNAME}.berlios
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} gxrom-r.bz2 sxrom-j.bz2
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= danfe@FreeBSD.org
COMMENT= HP48 SX/GX graphic calculator emulator
LICENSE= GPLv3
RUN_DEPENDS= ${LOCALBASE}/share/fonts/misc/7x14B-ISO8859-1.pcf.gz:${PORTSDIR}/x11-fonts/font-misc-misc \
${LOCALBASE}/share/fonts/75dpi/helvR12-ISO8859-1.pcf.gz:${PORTSDIR}/x11-fonts/font-adobe-75dpi
2015-06-21 16:13:49 +02:00
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
Support LIBS like LDFLAGS. - Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. - Some ports did not support having a LIBS environment variable and required additional patches. Somewhat simplified a linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. If possible -L and -l flags need to be added to LIBS to make sure they appear after any -L and -l flags set by upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this may appear too early on the command line causing installed libraries to be linked in instead of freshly built ones. Additional changes: benchmarks/netio: Replace WITH_IPV6 with an IPV6 option. comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC. graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR. graphics/visionworkbench: Remove FreeBSD 7 support. multimedia/libmovtar: New LIB_DEPENDS syntax. multimedia/opencinematools: Use standard do-build. net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins) net-mgmt/nagios: Remove -fPIC. net-mgmt/nagios4: Remove -fPIC. print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036. security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test in configure that falsely detects pthread_mutexattr_init in our libc. sysutils/dar: Fix iconv detection. x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD hack and use $CXX as linker as on other platforms. PR: 190592 Exp-run by: antoine Approved by: portmgr (antoine)
2014-06-11 16:49:59 +02:00
LIBS+= -lutil
2015-06-21 16:13:49 +02:00
USES= autoreconf gmake pkgconfig tar:bzip2
USE_XORG= x11 xext xt
NO_WRKSUBDIR= yes
PORTDOCS= ChangeLog README
OPTIONS_DEFINE= DOCS
post-extract: .SILENT
# Extract official HP ROM images for GX/SX
${CP} ${_DISTDIR}/gxrom-r.bz2 ${WRKSRC} && ${BZIP2_CMD} \
-d ${WRKSRC}/gxrom-r.bz2
${CP} ${_DISTDIR}/sxrom-j.bz2 ${WRKSRC} && ${BZIP2_CMD} \
-d ${WRKSRC}/sxrom-j.bz2
post-patch:
# Enable serial communication and prefer GX Revision R ROM by default
@${REINPLACE_CMD} -e '/useSerial/s+False+True+ ; s+ttyS+cuau+ ; \
s+rom\.dump+${DATADIR}/gxrom-r+' ${WRKSRC}/src/X48.ad.h
# Force correct type per what comment says
@${REINPLACE_CMD} -e '/timer1/s+char+signed &+' ${WRKSRC}/src/hp48.h
2013-05-06 03:14:55 +02:00
# Fix the build against Clang (lots of warnings remain)
@${REINPLACE_CMD} -e '1531s+char \*+void+' ${WRKSRC}/src/debugger.c
@${REINPLACE_CMD} -e '698s+^+static +' ${WRKSRC}/src/emulate.c
do-install:
.for p in x48 dump2rom checkrom mkcard
2013-10-24 14:00:17 +02:00
${INSTALL_PROGRAM} ${WRKSRC}/src/${p} ${STAGEDIR}${PREFIX}/bin
.endfor
2013-10-24 14:00:17 +02:00
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/??rom-? ${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S+^+${WRKSRC}/+} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>