Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: wsjtx
Date: Thu, 30 May 2019 07:23:16 +0200	[thread overview]
Message-ID: <20190530052316.4X19JZr6UF_g_LV6Csr0bd9Qi8dWl7JqrJF6DOXDz6k@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11802@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

There is an updated pull request by acobaugh against master on the void-packages repository

https://github.com/acobaugh/void-packages wsjtx
https://github.com/void-linux/void-packages/pull/11802

New package: wsjtx
Second attempt of #11790 

Also had to restrict which archs this builds on. The last build errored out on the non-intel archs: https://travis-ci.org/void-linux/void-packages/builds/534087066

A patch file from https://github.com/void-linux/void-packages/pull/11802.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wsjtx-11802.patch --]
[-- Type: application/text/x-diff, Size: 4368 bytes --]

From 0c6ad9d4c689d770fefb30a89a550454cd68b99d Mon Sep 17 00:00:00 2001
From: Andy Cobaugh <andrew.cobaugh@gmail.com>
Date: Sat, 18 May 2019 10:15:23 -0400
Subject: [PATCH] New package: wsjtx-2.0.1

---
 srcpkgs/wsjtx/patches/cmake_cross.patch | 42 +++++++++++++++++++++++++
 srcpkgs/wsjtx/template                  | 35 +++++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 srcpkgs/wsjtx/patches/cmake_cross.patch
 create mode 100644 srcpkgs/wsjtx/template

diff --git a/srcpkgs/wsjtx/patches/cmake_cross.patch b/srcpkgs/wsjtx/patches/cmake_cross.patch
new file mode 100644
index 00000000000..ad6d59e5cb6
--- /dev/null
+++ b/srcpkgs/wsjtx/patches/cmake_cross.patch
@@ -0,0 +1,42 @@
+--- CMakeLists.txt	2019-02-24 23:11:18.000000000 -0500
++++ CMakeLists.txt	2019-05-24 21:58:42.000000000 -0400
+@@ -79,6 +79,10 @@
+ 
+ include (ExternalProject)
+ 
++if (DEFINED ENV{CROSS_BUILD})
++  get_filename_component(cross_triplet $ENV{XBPS_CROSS_BASE} NAME)
++  set (hamlib_cross "--host=${cross_triplet}")
++endif ()
+ 
+ #
+ # build and install hamlib locally so it can be referenced by the
+@@ -91,7 +95,7 @@
+   URL_HASH MD5=${hamlib_md5sum}
+   UPDATE_COMMAND ./bootstrap
+   PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 -N < ${CMAKE_CURRENT_SOURCE_DIR}/hamlib.patch
+-  CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-shared --enable-static --without-cxx-binding ${EXTRA_FLAGS} # LIBUSB_LIBS=${USB_LIBRARY}
++  CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-shared --enable-static --without-cxx-binding ${EXTRA_FLAGS} ${hamlib_cross} # LIBUSB_LIBS=${USB_LIBRARY}
+   BUILD_COMMAND $(MAKE) all V=1 # $(MAKE) is ExternalProject_Add() magic to do recursive make
+   INSTALL_COMMAND $(MAKE) install-strip V=1 DESTDIR=""
+   STEP_TARGETS update install
+@@ -128,6 +132,11 @@
+ # build and optionally install WSJT-X using the hamlib package built
+ # above
+ #
++if (DEFINED ENV{CROSS_BUILD})
++  message(STATUS "Enabling cross-compile toolchain, CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}")
++  set (wsjtx_cross "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
++endif ()
++
+ ExternalProject_Get_Property (hamlib INSTALL_DIR)
+ ExternalProject_Add (wsjtx
+   GIT_REPOSITORY ${wsjtx_repo}
+@@ -140,6 +149,7 @@
+   -DCMAKE_PREFIX_PATH=${INSTALL_DIR}
+   -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+   ${WSJTX_EXTRA_CMAKE_OPTIONS}
++  ${wsjtx_cross}
+   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+   STEP_TARGETS update configure build install package
+   )
diff --git a/srcpkgs/wsjtx/template b/srcpkgs/wsjtx/template
new file mode 100644
index 00000000000..d5995644bd6
--- /dev/null
+++ b/srcpkgs/wsjtx/template
@@ -0,0 +1,35 @@
+# Template file for 'wsjtx'
+pkgname=wsjtx
+version=2.0.1
+revision=1
+build_style=cmake
+hostmakedepends="git autoconf automake libtool gcc-fortran asciidoc ruby-asciidoctor"
+makedepends="fftw fftw-devel qt5-serialport-devel qt5-devel qt5-multimedia-devel libusb-devel libgomp-devel libgomp qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+short_desc="WSJT-X weak-signal radio communication program"
+maintainer="Andy Cobaugh <andrew.cobaugh@gmail.com>"
+license="GPL-3.0"
+homepage="http://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html"
+distfiles="http://www.physics.princeton.edu/pulsar/K1JT/wsjtx-${version}.tgz"
+checksum=18f18f93f7e0ecc631ff5f7e0002521c41b54322ea33e5d6ca3ab5144fe1a0cd
+nocross="https://travis-ci.org/void-linux/void-packages/builds/537982537?utm_source=github_status&utm_medium=notification"
+
+if [ -n "${CROSS_BUILD}" ] ; then
+	hostmakedepents+="qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-qmake qt5-devel"
+fi
+
+post_configure() {
+	# if cross-compiling, make sure cmake can find things local to the project like boost, hamlib, etc
+	# CMAKE_FIND_ROOT_PATH is overriden to $XBPS_CROSS_BASE, so append to the toolchain file a cmake list()
+	# to add the project build dir back in
+	if [ -n "${CROSS_BUILD}" ] ; then
+		builddir=/builddir/$(basename $PWD)/build
+		toolchain_file=${builddir}/cross_$(basename $XBPS_CROSS_BASE).cmake
+		toolchain_file_state=${toolchain_file}.patched
+		if [ ! -f ${toolchain_file_state} ] ; then
+			env | sort
+			pwd
+			echo "list(APPEND CMAKE_FIND_ROOT_PATH $builddir)" >> $toolchain_file
+			touch ${toolchain_file_state}
+		fi
+	fi
+}

  parent reply	other threads:[~2019-05-30  5:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11802@inbox.vuxu.org>
2019-05-30  5:17 ` voidlinux-github
2019-05-30  5:17 ` voidlinux-github
2019-05-30  5:23 ` voidlinux-github
2019-05-30  5:23 ` voidlinux-github [this message]
2019-07-19  1:32 ` [PR PATCH] [Updated] New package: wsjtx-2.0.1 voidlinux-github
2019-07-19  1:32 ` voidlinux-github
2020-03-20  7:15 ` travankor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190530052316.4X19JZr6UF_g_LV6Csr0bd9Qi8dWl7JqrJF6DOXDz6k@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).