aboutsummaryrefslogtreecommitdiffstats
path: root/comms/wsjtx
diff options
context:
space:
mode:
authorTobias C. Berner <tcberner@FreeBSD.org>2020-08-15 01:03:30 +0800
committerTobias C. Berner <tcberner@FreeBSD.org>2020-08-15 01:03:30 +0800
commitf7dc3894aac5093f755879279969727b26648717 (patch)
tree215a3b544555ca4cf0d611ee83bb6e7cfcb8c290 /comms/wsjtx
parent581f650a2f93837e99a9e82ef7011c69152beb84 (diff)
downloadfreebsd-ports-gnome-f7dc3894aac5093f755879279969727b26648717.tar.gz
freebsd-ports-gnome-f7dc3894aac5093f755879279969727b26648717.tar.zst
freebsd-ports-gnome-f7dc3894aac5093f755879279969727b26648717.zip
comms/wsjtx: prepare for cmake-3.18.x
- this belongs into the "let's forget this ever happened category". - with cmake-3.18 the target to patch the thirdparty sources gets ran twice. Onde during build and once during the install phase. - we silently remove the patches again after the build is done, so that during the install phase, the patching is a no-op. PR: 248003
Diffstat (limited to 'comms/wsjtx')
-rw-r--r--comms/wsjtx/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/comms/wsjtx/Makefile b/comms/wsjtx/Makefile
index 4aa89ffcb526..5435e0774176 100644
--- a/comms/wsjtx/Makefile
+++ b/comms/wsjtx/Makefile
@@ -32,9 +32,22 @@ CMAKE_ARGS+= -DCMAKE_PREFIX_PATH+=${LOCALBASE}/wsjtx/lib \
-DLOCALBASE::STRING="${LOCALBASE}"
PLIST_SUB+= PORTVERSION="${PORTVERSION}"
+_PATCHES= wsjtx.patch hamlib.patch
+
post-patch:
- ${CP} ${FILESDIR}/wsjtx.patch ${WRKSRC}
- ${CP} ${FILESDIR}/hamlib.patch ${WRKSRC}
+. for _patch in ${_PATCHES}
+ # Keep a copy of the blank patch for the post-build target below
+ ${MV} ${WRKSRC}/${_patch} ${WRKSRC}/${_patch}.orig
+ # Copy the patch provided by the ports system
+ ${CP} ${FILESDIR}/${_patch} ${WRKSRC}
+. endfor
+
+post-build:
+ # With cmake 3.18, the patching stage in the internal build
+ # is ran again, trick it by removing the patch again.
+. for _patch in ${_PATCHES}
+ ${MV} ${WRKSRC}/${_patch}.orig ${WRKSRC}/${_patch}
+. endfor
do-install:
(cd ${CONFIGURE_WRKSRC};${MAKE} -f Makefile DESTDIR=${STAGEDIR} install)