From 01428095dde420213964e752bfe441cdbc821f0d Mon Sep 17 00:00:00 2001 From: Chris Gorman Date: Thu, 11 Jul 2024 12:17:29 -0400 Subject: [PATCH] Use patch to wrap python files as windows executables - set don't strip as wrapped executables won't run if they are stripped. - add bsd 3 clause license as that is license of executable wrapper --- mingw-w64-gnuradio/LICENSE.txt | 27 +++++++++++++++++++++++++++ mingw-w64-gnuradio/PKGBUILD | 19 ++++++++++--------- 2 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 mingw-w64-gnuradio/LICENSE.txt diff --git a/mingw-w64-gnuradio/LICENSE.txt b/mingw-w64-gnuradio/LICENSE.txt new file mode 100644 index 0000000000..2ec51d75f3 --- /dev/null +++ b/mingw-w64-gnuradio/LICENSE.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/mingw-w64-gnuradio/PKGBUILD b/mingw-w64-gnuradio/PKGBUILD index dbd9f2cc77..ee55b08da2 100644 --- a/mingw-w64-gnuradio/PKGBUILD +++ b/mingw-w64-gnuradio/PKGBUILD @@ -60,6 +60,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" _commit='e5a88000c5e1aa8ccc066acd6f49eedd49405ac1' checkdepends=("${MINGW_PACKAGE_PREFIX}-python-jsonschema" "${MINGW_PACKAGE_PREFIX}-python-setuptools") +options=('!strip') source=("${_realname}"::"git+https://github.com/${_realname}/${_realname}.git#commit=${_commit}" 0001-gnuradio-runtime_dll_ws2_32.patch 0002-Using-os.path.join-is-unnecessary-as-get_cofig_file_.patch @@ -69,7 +70,8 @@ source=("${_realname}"::"git+https://github.com/${_realname}/${_realname}.git#co 0006-numpy-2.0.patch 0007-remove-full-windows-path-on-shebang.patch gnuradio-blocks-and-examples-path.hook.in - gnuradio-blocks-and-examples-path.script.in) + gnuradio-blocks-and-examples-path.script.in + LICENSE.txt) # FIXME restore use of pgp keys once we have a build from a tar ball #validpgpkeys=( @@ -86,7 +88,8 @@ sha256sums=('594ac409e1fbd21e6a4c7a2e7af2c6e91e923cc5e650c28e5786b2c6a469b55e' 'e3a2d9f63318b56f87829d224232724d9c815b46c6c7086ac3c5b6ae8980bc7b' 'dee07e22ecb67cd645ad8461be5907f85043c2ade89d6574aa9fdf23a8e7ae8b' 'b2f014a69b32afcb207e4d2e8e163fc04968594d7d4c3184b9ea5c8cf2a29329' - 'caa9a6cc253d508abcd01545f26b46df0d708d24f69b7dc59183d631872721ed') + 'caa9a6cc253d508abcd01545f26b46df0d708d24f69b7dc59183d631872721ed' + '86dc4bc79c9fa4d5dc3ae5558441d5bb8b8736403e70997cf9ae8f671ab5d0ca') pkgver() { cd "${srcdir}/${_realname}" @@ -99,13 +102,10 @@ prepare() { patch -Np1 -i "${srcdir}/0002-Using-os.path.join-is-unnecessary-as-get_cofig_file_.patch" patch -Np1 -i "${srcdir}/0003-Removing-the-use-of-os.path.join-when-getting-the-pa.patch" - patch -Np1 -i "${srcdir}/0004-Add-.py-extension-for-gr_filter_design-so-it-will-la.patch" - #FIXME - the next patch changes python files to executables. It was stolen from Ryan Volz - # radioconda package. Unfortunately the binaries error and exit. If a solution is found - # that fixes this, remove patch 0004 and add patch 0006 - #patch -Np1 -i "${srcdir}/0005-cmake-Install-python-wrapper-exe-for-scripts-on-Wind.patch" + # Patch number 0005 is credited to Ryan Volz and licensed under the + # BSD-3-Clause license + patch -Np1 -i "${srcdir}/0005-cmake-Install-python-wrapper-exe-for-scripts-on-Wind.patch" patch -Np1 -i "${srcdir}/0006-numpy-2.0.patch" - patch -Np1 -i "${srcdir}/0007-remove-full-windows-path-on-shebang.patch" } build() { @@ -154,6 +154,7 @@ package() { sed -s "s|@MINGW_PREFIX@|${MINGW_PREFIX}|g" -i "${script_path}" install -Dt "$pkgdir/usr/share/libalpm/scripts" -m755 "${script_path}" - #install license + #install licenses install -Dm644 "${srcdir}/${_realname}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" + install -Dm644 "${srcdir}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.txt" }