aboutsummaryrefslogtreecommitdiffstats
path: root/x11/aminal/Makefile
blob: 626821305629149931de385e2289b058b4e32005 (plain) (blame)
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
# $FreeBSD$

PORTNAME=   aminal
DISTVERSIONPREFIX=  v
DISTVERSION=    0.9.0
CATEGORIES= x11

MAINTAINER= yuri@FreeBSD.org
COMMENT=    Golang terminal emulator from scratch

LICENSE=    GPLv3
LICENSE_FILE=   ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/LICENSE

BUILD_DEPENDS=  go:lang/go

USES=       gl
USE_GITHUB= nodefault # the main code is in GH_TUPLE
GH_ACCOUNT= liamg
GH_TUPLE=   liamg:aminal:${DISTVERSIONFULL}:main/src/github.com/liamg/aminal \
        BurntSushi:xgb:27f1227:xgb/src/github.com/BurntSushi/xgb \
        gen2brain:shm:6c18ff7:shm/src/github.com/gen2brain/shm
GH_SUBDIR=  src/github.com/${GH_ACCOUNT}/${PORTNAME}
USE_GL=     gl
USE_XORG=   x11 xcursor xi xinerama xrandr xxf86vm

MAKE_ENV=   CGO_CFLAGS="-I${LOCALBASE}/include" CGO_LDFLAGS="-L${LOCALBASE}/lib"

PLIST_FILES=    bin/${PORTNAME}

PORTSCOUT=  limit:^[0-9].*

post-patch: # https://github.com/liamg/aminal/issues/208
    @cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/platform && \
        ${CP} linuxLaunch.go freebsdLaunch.go && \
        ${REINPLACE_CMD} 's|build linux|build freebsd|' freebsdLaunch.go

do-build:
    @cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} && \
        ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go install ./...

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>