diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2024-01-21 19:32:50 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2024-01-21 19:38:31 +0000 |
commit | 26fa495285d9d7bcd85794665c45d31e1ed1ccb2 (patch) | |
tree | 09b8dbdf5482404759f5ee0906a33d9e43b2d100 /net-im/purple-gowhatsapp/Makefile | |
parent | 03835e702fdaf18d6b2751f585762ac4ddf296ff (diff) |
net-im/purple-gowhatsapp: unbreak by prefetching the Go-modules.
List all of the necessary Go-modules as GH_TUPLEs, as other Go-using
ports are doing.
This software is using a combination of C and Go, so, unfortunately, the
straight usage of go.mk is not working.
Diffstat (limited to 'net-im/purple-gowhatsapp/Makefile')
-rw-r--r-- | net-im/purple-gowhatsapp/Makefile | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/net-im/purple-gowhatsapp/Makefile b/net-im/purple-gowhatsapp/Makefile index 568300a76ca2..8b14b085d45f 100644 --- a/net-im/purple-gowhatsapp/Makefile +++ b/net-im/purple-gowhatsapp/Makefile @@ -10,7 +10,6 @@ WWW= https://github.com/hoehermann/purple-gowhatsapp LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= downloads things at build time, which breaks under poudriere LIB_DEPENDS= libpurple.so:net-im/libpurple \ libopusfile.so:audio/opusfile @@ -21,29 +20,52 @@ OPTIONS_MULTI_DB-backend= SQLITE3 PGSQL MYSQL OPTIONS_DEFAULT=SQLITE3 .for o in ${OPTIONS_MULTI_DB-backend} $o_DESC= Support use of $o for storing account information +post-patch-$o-off: + ${REINPLACE_CMD} '/${$o_GH_TUPLE:C/^([^:]+):([^:]+):.*/\1\\\/\2/}"/d' \ + ${WRKSRC}/src/go/login.go .endfor USE_GITHUB= yep... GH_ACCOUNT= hoehermann DOS2UNIX_GLOB= CMake*.txt +EXTRACT_AFTER_ARGS=--exclude vendor +MAKE_ENV+= ${GO_ENV} + +GH_TUPLE= \ + FiloSottile:edwards25519:v1.0.0:filosottile_edwards25519/vendor/filippo.io/edwards25519 \ + alfg:mp4:55ea58c08aeb:alfg_mp4/vendor/github.com/alfg/mp4 \ + davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ + google:go-cmp:v0.5.9:google_go_cmp/vendor/github.com/google/go-cmp \ + gorilla:websocket:v1.5.1:gorilla_websocket/vendor/github.com/gorilla/websocket \ + mdp:qrterminal:v3.2.0:mdp_qrterminal/vendor/github.com/mdp/qrterminal \ + pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ + skip2:go-qrcode:da1b6568686e:skip2_go_qrcode/vendor/github.com/skip2/go-qrcode \ + stretchr:testify:v1.8.4:stretchr_testify/vendor/github.com/stretchr/testify \ + tulir:libsignal-protocol-go:v0.1.0:tulir_libsignal_protocol_go/vendor/go.mau.fi/libsignal \ + mautrix:go-util:v0.3.0:mautrix_go_util/vendor/go.mau.fi/util \ + tulir:whatsmeow:66c756f1ba45:tulir_whatsmeow/vendor/go.mau.fi/whatsmeow \ + golang:crypto:v0.18.0:golang_crypto/vendor/golang.org/x/crypto \ + golang:net:v0.20.0:golang_net/vendor/golang.org/x/net \ + golang:sys:v0.16.0:golang_sys/vendor/golang.org/x/sys \ + golang:term:v0.16.0:golang_term/vendor/golang.org/x/term \ + golang:text:v0.14.0:golang_text/vendor/golang.org/x/text \ + golang:xerrors:9bdfabe68543:golang_xerrors/vendor/golang.org/x/xerrors \ + protocolbuffers:protobuf-go:v1.32.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \ + go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \ + rsc:qr:v0.2.0:rsc_qr/vendor/rsc.io/qr + +SQLITE3_GH_TUPLE=\ + mattn:go-sqlite3:v1.14.19:mattn_go_sqlite3/vendor/github.com/mattn/go-sqlite3 +PGSQL_GH_TUPLE= lib:pq:v1.10.9:lib_pq/vendor/github.com/lib/pq +MYSQL_GH_TUPLE= go-sql-driver:mysql:v1.7.1:go_sql_driver_mysql/vendor/github.com/go-sql-driver/mysql CMAKE_ARGS= -DPURPLE_INCLUDE_DIRS=${LOCALBASE}/include/libpurple \ -DPURPLE_LIBRARY_DIRS=${LOCALBASE}/lib \ -DPURPLE_PLUGIN_DIR=${PREFIX}/lib/purple-2 \ -DPURPLE_DATA_DIR=${PREFIX}/share -post-patch-PGSQL-off: - ${REINPLACE_CMD} '/lib\/pq/d' ${WRKSRC}/src/go/login.go - -post-patch-MYSQL-off: - ${REINPLACE_CMD} '/go-sql-driver\/mysql/d' ${WRKSRC}/src/go/login.go - -post-patch-SQLITE3-off: - ${REINPLACE_CMD} '/mattn\/go-sqlite3/d' ${WRKSRC}/src/go/login.go - -# The downloaded Go-files are read-only and the simple rm -f does not work -# against them (unless invoked as root). Here we relax the permissions first: -pre-clean: - -@${FIND} ${WRKDIR} | ${XARGS} ${CHMOD} u+w +post-configure: + ${MKDIR} ${CONFIGURE_WRKSRC}/src/go/go + ${LN} -sf ${WRKSRC}/vendor ${CONFIGURE_WRKSRC}/src/go/go/src .include <bsd.port.mk> |