freebsd-ports/editors/sam/Makefile
Florian Limberger c046f20e40 editors/sam: Fix build on 32-bit architectures
The build fails on 32-bit architectures, because the source assumes
that unsigned long and uint64_t have the same size. Until upstream is
fixed (I have submitted the patch there, too), fix the build with local
patches.

Reviewed By: arrowd

Differential Revision: https://reviews.freebsd.org/D40942
2023-07-09 13:51:47 +03:00

44 lines
1.4 KiB
Makefile

PORTNAME= sam
DISTVERSION= g20230103
PORTREVISION= 1
CATEGORIES= editors
MAINTAINER= flo@purplekraken.com
COMMENT= Unix port of the Sam text editor from Plan 9
WWW= https://github.com/deadpixi/sam
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libfreetype.so:print/freetype2
USES= localbase:ldflags xorg
USE_GITHUB= yes
GH_ACCOUNT= deadpixi
GH_PROJECT= sam
GH_TAGNAME= 5d8acb3
USE_XORG= x11 xft xi xt
# Some random build system fixes
MAKE_JOBS_UNSAFE=yes
CFLAGS+= -I${LOCALBASE}/include/freetype2
do-configure:
${SED} -e 's/LDFLAGS=/LDFLAGS?=/' -e 's/CC=/CC?=/' \
${WRKSRC}/config.mk.def >${WRKSRC}/config.mk
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sam/sam ${STAGEDIR}${PREFIX}/bin
${RLN} ${STAGEDIR}${PREFIX}/bin/sam ${STAGEDIR}${PREFIX}/bin/B
${INSTALL_PROGRAM} ${WRKSRC}/samterm/samterm ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/ssam/ssam.sh ${STAGEDIR}${PREFIX}/bin/ssam
${INSTALL_MAN} ${WRKSRC}/doc/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/B.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/samterm.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/rsam.1
${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/sam.1 ${STAGEDIR}${PREFIX}/share/man/man1/sam.save.1
${INSTALL_MAN} ${WRKSRC}/doc/samrc.5 ${STAGEDIR}${PREFIX}/share/man/man5
.include <bsd.port.mk>