Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gocryptfs: Fix build for arm64 #13069

Merged
merged 1 commit into from
Nov 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions fuse/gocryptfs/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ go.vendors gopkg.in/yaml.v3 \
set builddate "build_date_not_set"
set ldflags "-X \"main.GitVersion=${version}\" -X \"main.GitVersionFuse=${gitversionfuse}\" -X \"main.BuildDate=${builddate}\""

depends_build-append \
port:pandoc

build.args -ldflags="${ldflags}"

# According to [1] there is no benefit to build gocryptfs with openssl on M1 Macs.
Expand All @@ -137,15 +134,31 @@ variant openssl description {Build with openssl support} {
depends_lib-append path:lib/libcrypto.dylib:openssl
}

variant doc description {Build man pages} {
if {${configure.build_arch} eq "arm64"} {
depends_build-append port:go-md2man

post-build {
system -W ${worksrcpath}/Documentation "${prefix}/bin/go-md2man -in=MANPAGE.md -out=${name}.1"
system -W ${worksrcpath}/Documentation "${prefix}/bin/go-md2man -in=MANPAGE-XRAY.md -out=${name}-xray.1"
system -W ${worksrcpath}/Documentation "${prefix}/bin/go-md2man -in=MANPAGE-STATFS.md -out=statfs.1"
}
} else {
depends_build-append port:pandoc

post-build {
system -W ${worksrcpath}/Documentation "sh MANPAGE-render.bash"
}
}
}

default_variants +doc

if {![variant_isset openssl]} {
build.env CGO_ENABLED=0
build.args-append -tags without_openssl
}

post-build {
system -W ${worksrcpath}/Documentation "sh MANPAGE-render.bash"
}

destroot {
xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
xinstall -m 0755 ${worksrcpath}/Documentation/gocryptfs.1 ${destroot}${prefix}/share/man/man1
Expand Down