cad/k40-whisperer: Update to 0.35

Changelog:
- http://www.scorchworks.com/K40whisperer/k40whisperer_change_log.html
- http://www.scorchworks.com/K40whisperer/k40whisperer.html

- Do not set PKGNAMEPREFIX to the Python package name prefix. The software
  does not care about the underlying Python version and supporting flavors
  is not worth it in this case.
- Mark the port as working with Python 3.7.
- Set DESKTOP_ENTRIES, USES=shebangfix, and NO_ARCH.
- Put variables in order.
- Change the way files are installed so that it is easier to spot a change
  in pkg-plist in the future.
- Fix Python script indentation issues (mixed up tabs and spaces) in
  post-patch.
- Suggest the user to look in the docs directory instead of the data
  directory for notes about Linux and macOS setups.
This commit is contained in:
Mateusz Piotrowski 2019-09-05 10:29:39 +00:00
parent dc64c34496
commit e6dda16248
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511170
4 changed files with 40 additions and 39 deletions

View File

@ -1,10 +1,9 @@
# $FreeBSD$
PORTNAME= k40-whisperer
DISTVERSION= 0.19
DISTVERSION= 0.35
CATEGORIES= cad python
MASTER_SITES= http://www.scorchworks.com/K40whisperer/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= K40_Whisperer-${DISTVERSION}_src
MAINTAINER= 0mp@FreeBSD.org
@ -17,50 +16,46 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}usb>0:devel/py-usb@${PY_FLAVOR}
USES= python:2.7 zip
OPTIONS_DEFINE= DOCS
USES= python:run,-3.7 shebangfix zip
SHEBANG_FILES= *.py
NO_ARCH= yes
NO_BUILD= yes
WHISPERER_COMMAND= ${PORTNAME}
DESKTOP_ENTRIES= "K40 Whisperer" "${COMMENT}" \
"${DATADIR}/scorchworks.ico" "${WHISPERER_COMMAND}" \
"Development;Art;Engineering;VectorGraphics;" false
PLIST_SUB= WHISPERER_COMMAND=${WHISPERER_COMMAND}
SUB_FILES= pkg-message ${WHISPERER_COMMAND}
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} WHISPERER_COMMAND=${WHISPERER_COMMAND}
PLIST_SUB= WHISPERER_COMMAND=${WHISPERER_COMMAND}
DATA= bezmisc.py \
CC.png \
cspsubdiv.py \
cubicsuperpath.py \
down.png \
dxf.py \
egv.py \
emblem64 \
ffgeom.py \
g_code_library.py \
inkex.py \
interpolate.py \
k40_whisperer.py \
left.png \
LL.png \
LR.png \
nano_library.py \
right.png \
simplepath.py \
simplestyle.py \
simpletransform.py \
svg_reader.py \
UL.png \
up.png \
UR.png
OPTIONS_DEFINE= DOCS
DOCS= README_Linux.txt \
README_MacOS.md
DOCS= Change_Log.txt \
README_Linux.txt \
README_MacOS.md
NON_DATA_FILES= ${DOCS} \
${LICENSE_FILE:S,${WRKSRC}/,,} \
build_exe.bat \
py2exe_setup.py \
requirements.txt
WHISPERER_COMMAND= ${PORTNAME}
post-patch:
# Replace every leading tab with 8 spaces. It is a workaround for
# misindented Python scripts.
@${REINPLACE_CMD} -e 's|^ | |g' \
-e ':again' \
-e 's|^\( \)* |\1 |g' \
-e 't again' \
${WRKSRC}/*.py
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/${WHISPERER_COMMAND} ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${DATA:S,^,${WRKSRC}/,} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} . \
${STAGEDIR}${DATADIR} "${NON_DATA_FILES:S,^,! -name &,}")
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1527085070
SHA256 (K40_Whisperer-0.19_src.zip) = c688cf1746aa391b6a9d4cfb3e66c2f183d1f45da88a2770e8ddefac44349193
SIZE (K40_Whisperer-0.19_src.zip) = 121328
TIMESTAMP = 1567611773
SHA256 (K40_Whisperer-0.35_src.zip) = e555dc8de00d88596463d3af61d523b3df3d0beb3385aa38dab2dfbd1cfc1015
SIZE (K40_Whisperer-0.35_src.zip) = 170723

View File

@ -3,7 +3,7 @@
message: <<EOM
At the moment K40 Whisperer has to be run as root unless devd(8) is properly
configured. Some notes on how it is handled on macOS and Linux can be
found in %%DATADIR%%.
found in %%DOCSDIR%%.
K40 Whisperer can be launched with a `%%WHISPERER_COMMAND%%` command.
EOM

View File

@ -1,9 +1,11 @@
bin/%%WHISPERER_COMMAND%%
%%PORTDOCS%%%%DOCSDIR%%/Change_Log.txt
%%PORTDOCS%%%%DOCSDIR%%/README_Linux.txt
%%PORTDOCS%%%%DOCSDIR%%/README_MacOS.md
%%DATADIR%%/CC.png
%%DATADIR%%/LL.png
%%DATADIR%%/LR.png
%%DATADIR%%/LaserSpeed.py
%%DATADIR%%/UL.png
%%DATADIR%%/UR.png
%%DATADIR%%/bezmisc.py
@ -11,7 +13,9 @@ bin/%%WHISPERER_COMMAND%%
%%DATADIR%%/cubicsuperpath.py
%%DATADIR%%/down.png
%%DATADIR%%/dxf.py
%%DATADIR%%/ecoords.py
%%DATADIR%%/egv.py
%%DATADIR%%/emblem
%%DATADIR%%/emblem64
%%DATADIR%%/ffgeom.py
%%DATADIR%%/g_code_library.py
@ -21,8 +25,10 @@ bin/%%WHISPERER_COMMAND%%
%%DATADIR%%/left.png
%%DATADIR%%/nano_library.py
%%DATADIR%%/right.png
%%DATADIR%%/scorchworks.ico
%%DATADIR%%/simplepath.py
%%DATADIR%%/simplestyle.py
%%DATADIR%%/simpletransform.py
%%DATADIR%%/svg_reader.py
%%DATADIR%%/up.png
%%DATADIR%%/windowsinhibitor.py