Skip to content
Draft
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
60 changes: 43 additions & 17 deletions net/duck/Portfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0
PortGroup java 1.0
PortGroup xcode 1.0

name duck
version 7.8.5.34493
checksums rmd160 696c1572aadf30e2f39514162a7bb1ab8a716282 \
sha256 65ebfde2df81fce63e130ec988a81a7e81c1c76a7ca72426611f52e162abb3ad \
size 108484092
github.setup iterate-ch cyberduck 9-2-5 release
master_sites https://github.com/iterate-ch/cyberduck/archive/refs/tags/release-${version}
worksrcdir cyberduck-release-${version}

revision 0

categories net
platforms darwin

license GPL-2+
maintainers {ijackson @JacksonIsaac} openmaintainer
Expand All @@ -21,22 +24,45 @@ long_description The universal file transfer tool 'duck' which runs \
with FTP, SFTP or WebDAV plus support for cloud storage Amazon S3 & \
OpenStack Swift deployments.

homepage https://duck.sh/
master_sites https://dist.duck.sh/

checksums rmd160 cb5c8a99d21d4140f4fd9f053428438923cb8879 \
sha256 530746217e7212a709d2b586cf12507c1701ac6623c10470dc9bcb0b059f9f73 \
size 32208819

java.version 11+
java.fallback openjdk11

depends_build bin:mvn3:maven3
use_configure no

build { }
set maven_local_repository ${worksrcpath}/.m2/repository

## Upstream binary seems to be built using libstdc++
# Port keeps failing on rev-upgrade since it
# checks if duck is built against libc++ or not.
# Note: Check and update this when port version updates.
configure.cxx_stdlib \
libstdc++
pre-build {
file mkdir ${maven_local_repository}
system -W ${worksrcpath}/cli/osx "mvn3 package -Dmaven.repo.local=${maven_local_repository} -DskipTests -Drevision=0 -DskipITs"
file mkdir ${workpath}/DerivedData
file mkdir ${workpath}/ResultBundle
}

build {
set env(HOME) ${workpath}
set env(DEVELOPER_DIR) /Applications/Xcode.app/Contents/Developer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This holds only for some macOS versions. I don’t think it should be hardcoded in the portfile, you can pick the value from macports.conf.


system -W ${worksrcpath} \
"/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path also gonna be wrong, when developer_dir is elsewhere.

-derivedDataPath ${workpath}/DerivedData \
-resultBundlePath ${workpath}/ResultBundle \
-project ${worksrcpath}/Cyberduck.xcodeproj \
-configuration Release \
-target cli \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
SYMROOT=${worksrcpath}/cli/osx/target \
VERSION=${version} \
REVISION=0
}

destroot {
xinstall -m 755 -d ${destroot}${prefix}/libexec/${name}
file copy ${workpath}/${name}.bundle ${destroot}${prefix}/libexec/${name}
ln -s ${prefix}/libexec/${name}/${name}.bundle/Contents/MacOS/duck ${destroot}${prefix}/bin/duck
copy -- ${worksrcpath}/osx/target/release/Cyberduck.app \
${destroot}${applications_dir}
}
Loading