1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

"can't find the Python and f2py and fail to build"

Patch provided hard codes the full python path to use.

PR:		ports/208274
Submitted by:	takefu@airport.fm
This commit is contained in:
Diane Bruce 2016-03-25 14:35:34 +00:00
parent c99140c0c7
commit c98ccae7fd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=411846
3 changed files with 63 additions and 33 deletions

View File

@ -11,17 +11,19 @@ COMMENT= Weak signal ham radio communication package
LICENSE= GPLv3
RUN_DEPENDS= ${LOCALBASE}/bin/kvasd:${PORTSDIR}/comms/kvasd \
${WSJT_DEPENDS}
BUILD_DEPENDS= python:${PORTSDIR}/lang/python \
${WSJT_DEPENDS}
LIB_DEPENDS= libfftw3.so:${PORTSDIR}/math/fftw3 \
libfftw3f.so:${PORTSDIR}/math/fftw3-float \
libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
libportaudio.so:${PORTSDIR}/audio/portaudio
WSJT_DEPENDS= ${PYTHON_LIBDIR}/lib-dynload/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter \
${PYTHON_SITELIBDIR}/scipy:${PORTSDIR}/science/py-scipy \
${PYTHON_SITELIBDIR}/PIL:${PORTSDIR}/graphics/py-pillow \
${PYNUMPY}
BUILD_DEPENDS= ${WSJT_DEPENDS}
RUN_DEPENDS= ${LOCALBASE}/bin/kvasd:${PORTSDIR}/comms/kvasd \
${WSJT_DEPENDS}
USE_GCC= yes
USES= autoreconf fortran gmake python:3.3+ tar:bzip2
@ -64,37 +66,39 @@ do-fetch:
.endif
.endif
post-patch:
${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|'\
-e 's|%%PYTHON_VER%%|${PYTHON_VER}|'\
${WRKSRC}/configure.ac
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for d in WSJT_Source_Code.txt UpdateHistory.txt LICENSE.TXT call_to.txt \
calledby.txt wsjt7a.txt
${INSTALL_DATA} ${WRKSRC}/${d} ${STAGEDIR}${DOCSDIR}
.endfor
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/wsjt/WsjtMod/Audio.so
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${CP} ${FILESDIR}/wsjt ${WRKSRC}
${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
${WRKSRC}/wsjt
${REINPLACE_CMD} -e 's|%%PYTHON%%|${PYTHON_CMD}|' \
${WRKSRC}/wsjt
-e 's|%%PYTHON%%|${PYTHON_CMD}|' ${WRKSRC}/wsjt
${INSTALL_SCRIPT} ${WRKSRC}/wsjt ${STAGEDIR}${LOCALBASE}/bin
${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
${MKDIR} ${STAGEDIR}${LOCALBASE}/lib/wsjt/WsjtMod
.for d in ${WRKSRC}/WsjtMod/Audio.so ${WRKSRC}/WsjtMod/__init__.py \
${WRKSRC}/WsjtMod/astro.py ${WRKSRC}/WsjtMod/g.py \
${WRKSRC}/WsjtMod/go.py ${WRKSRC}/WsjtMod/options.py \
${WRKSRC}/WsjtMod/palettes.py ${WRKSRC}/WsjtMod/smeter.py \
${WRKSRC}/WsjtMod/specjt.py
${INSTALL_DATA} ${WRKSRC}${d} ${STAGEDIR}${LOCALBASE}/lib/wsjt/WsjtMod
.for d in Audio.so __init__.py astro.py g.py go.py options.py palettes.py \
smeter.py specjt.py
${INSTALL_DATA} ${WRKSRC}/WsjtMod/${d} ${STAGEDIR}${LOCALBASE}/lib/wsjt/WsjtMod
.endfor
.for d in ${WRKSRC}/CALL3.TXT ${WRKSRC}/dmet_10_-1_3.dat \
${WRKSRC}/dmet_10_0_3.dat ${WRKSRC}/dmet_20_-2_2.dat \
${WRKSRC}/dmet_20_-3_2.dat ${WRCSRC}/wsjtrc ${WRCSRC}/wsjt.py \
${WRKSRC}/Pmw.py ${WRKSRC}/PmwColor.py ${WRKSRC}/PmwBlt.py
${INSTALL_DATA} ${WRKSRC}${d} ${STAGEDIR}${DATADIR}
.for d in CALL3.TXT dmet_10_-1_3.dat dmet_10_0_3.dat dmet_20_-2_2.dat \
dmet_20_-3_2.dat wsjtrc wsjt.py Pmw.py PmwColor.py PmwBlt.py
${INSTALL_DATA} ${WRKSRC}/${d} ${STAGEDIR}${DATADIR}
.endfor
do-build:
(cd ${WRKSRC};${GMAKE})
post-configure:
${REINPLACE_CMD} -e 's|f2py|f2py-${PYTHON_VER}|' \
${WRKSRC}/Makefile
.if defined(PACKAGE_BUILDING) && ${PYTHON_VER} != ${PYTHON_DEFAULT}
IGNORE= you have python ${PYTHON_DEFAULT} set as the default, and this needs ${PYTHON_VER}
.endif

View File

@ -0,0 +1,20 @@
--- configure.ac.orig 2014-04-30 19:38:38 UTC
+++ configure.ac
@@ -75,7 +75,7 @@ AC_PATH_PROG(AR, ar)
AC_PATH_PROG(LD, ld)
AC_PATH_PROG(TEST, [test], [test])
AC_PATH_PROG(PYTHON, python)
-AC_PATH_PROG(F2PY, f2py)
+AC_PATH_PROG(F2PY, f2py-%%PYTHON_VER%%)
AC_SUBST(VERSION, "${version}")
AC_MSG_CHECKING([OS])
OS=`uname`
@@ -206,7 +206,7 @@ fi
if test "$F2PY" = ""; then
echo "You are missing f2py, trying local copy."
- F2PY="python f2py.py";
+ F2PY="%%PYTHON%% f2py-%%PYTHON_VER%%";
fi
dnl

View File

@ -1,14 +1,28 @@
bin/wsjt
lib/wsjt/WsjtMod/Audio.so
lib/wsjt/WsjtMod/__init__.py
lib/wsjt/WsjtMod/astro.py
lib/wsjt/WsjtMod/g.py
lib/wsjt/WsjtMod/go.py
lib/wsjt/WsjtMod/options.py
lib/wsjt/WsjtMod/palettes.py
lib/wsjt/WsjtMod/smeter.py
lib/wsjt/WsjtMod/specjt.py
%%DATADIR%%/CALL3.TXT
%%DATADIR%%/Pmw.py
%%DATADIR%%/PmwBlt.py
%%DATADIR%%/PmwColor.py
%%DATADIR%%/dmet_10_-1_3.dat
%%DATADIR%%/dmet_10_0_3.dat
%%DATADIR%%/dmet_20_-2_2.dat
%%DATADIR%%/dmet_20_-3_2.dat
%%DATADIR%%/Pmw.py
%%DATADIR%%/PmwBlt.py
%%DATADIR%%/PmwColor.py
%%DATADIR%%/wsjt.py
%%DATADIR%%/wsjtrc
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.TXT
%%PORTDOCS%%%%DOCSDIR%%/UpdateHistory.txt
%%PORTDOCS%%%%DOCSDIR%%/WSJT_Source_Code.txt
%%PORTDOCS%%%%DOCSDIR%%/call_to.txt
%%PORTDOCS%%%%DOCSDIR%%/calledby.txt
%%PORTDOCS%%%%DOCSDIR%%/common/communication.adoc
%%PORTDOCS%%%%DOCSDIR%%/common/license.adoc
%%PORTDOCS%%%%DOCSDIR%%/common/links.adoc
@ -64,12 +78,4 @@ bin/wsjt
%%PORTDOCS%%%%DOCSDIR%%/user_guide/wsjt-main.adoc
%%PORTDOCS%%%%DOCSDIR%%/wsjt-jtsdk2.conf
%%PORTDOCS%%%%DOCSDIR%%/wsjt.conf.in
lib/wsjt/WsjtMod/Audio.so
lib/wsjt/WsjtMod/__init__.py
lib/wsjt/WsjtMod/astro.py
lib/wsjt/WsjtMod/g.py
lib/wsjt/WsjtMod/go.py
lib/wsjt/WsjtMod/options.py
lib/wsjt/WsjtMod/palettes.py
lib/wsjt/WsjtMod/smeter.py
lib/wsjt/WsjtMod/specjt.py
%%PORTDOCS%%%%DOCSDIR%%/wsjt7a.txt