mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-17 08:01:36 +00:00
- Update to 0.06y
This commit is contained in:
parent
325c5676d1
commit
6bc9d0a548
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473564
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= twms
|
||||
PORTVERSION= 0.02w
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 0.06y
|
||||
CATEGORIES= www astro
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
@ -13,42 +12,42 @@ LICENSE= GPLv3+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyproj>0:graphics/py-pyproj@${PY_FLAVOR} \
|
||||
${PYTHON_SITELIBDIR}/web/__init__.py:www/webpy@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR}
|
||||
webpy>0:www/webpy@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}cairo>0:graphics/py-cairo@${PY_FLAVOR} \
|
||||
${FREESANS}:x11-fonts/freefont-ttf
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= Komzpa
|
||||
|
||||
USES= python:2.7 shebangfix tar:bzip2
|
||||
SHEBANG_FILES= twms.py
|
||||
NO_BUILD= yes
|
||||
USES= python
|
||||
USE_PYTHON= distutils py3kplist optsuffix
|
||||
NO_ARCH= yes
|
||||
|
||||
TWMS_USER?= twms
|
||||
TWMS_GROUP?= twms
|
||||
TWMS_CACHEDIR?= /var/cache/twms
|
||||
|
||||
SUB_FILES= pkg-install pkg-deinstall
|
||||
SUB_LIST= USER=${TWMS_USER} GROUP=${TWMS_GROUP} CACHEDIR=${TWMS_CACHEDIR}
|
||||
FREESANS= ${LOCALBASE}/share/fonts/freefont-ttf/FreeSans.ttf
|
||||
|
||||
USE_RC_SUBR= twms
|
||||
|
||||
USERS= ${TWMS_USER}
|
||||
GROUPS= ${TWMS_GROUP}
|
||||
USERS= twms
|
||||
GROUPS= twms
|
||||
|
||||
PLIST_SUB= USER=${USERS} GROUP=${GROUPS}
|
||||
SUB_LIST= USER=${USERS} PYTHON_CMD="${PYTHON_CMD}"
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/etc/twms/twms.conf|${PREFIX}/etc/twms.conf|' ${WRKSRC}/twms/twms.py
|
||||
@${REINPLACE_CMD} -e '/tiles_cache =/ s|".*"|"${TWMS_CACHEDIR}/cache/"|; \
|
||||
/install_path =/ s|".*"|"${DATADIR}/"|; \
|
||||
/gpx_cache =/ s|".*"|"${TWMS_CACHEDIR}/traces/"|; \
|
||||
s|import fetchers|from twms &|' ${WRKSRC}/twms/twms.conf
|
||||
@${REINPLACE_CMD} -e 's|/etc/twms/twms.conf|${PREFIX}/etc/twms/twms.conf|' \
|
||||
${WRKSRC}/twms/twms.py
|
||||
@${REINPLACE_CMD} -e '/install_path/ s|/usr/share/twms/|${DATADIR}/|' \
|
||||
-e 's|/usr/share/fonts/truetype/freefont/FreeSans.ttf|${FREESANS}|' \
|
||||
${WRKSRC}/twms/twms.conf
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/twms
|
||||
${INSTALL_DATA} ${WRKSRC}/twms/*.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/twms/
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/twms.py ${STAGEDIR}${PREFIX}/bin/twms
|
||||
@${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/*.jpg ${STAGEDIR}${DATADIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/twms/twms.conf ${STAGEDIR}${PREFIX}/etc/twms.conf.default
|
||||
post-install:
|
||||
@${MV} ${STAGEDIR}${ETCDIR}/twms.conf ${STAGEDIR}${ETCDIR}/twms.conf.sample
|
||||
@${RM} ${STAGEDIR}${DOCSDIR}/COPYING
|
||||
@${RM} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/twms/twms.conf
|
||||
@${MKDIR} ${STAGEDIR}/var/cache/twms/tiles
|
||||
@${MKDIR} ${STAGEDIR}/var/cache/twms/traces
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1476144541
|
||||
SHA256 (Komzpa-twms-0.02w_GH0.tar.gz) = a93f66a06be76d541747f370cc17e9568060cb4d4d9b9b41d135ce46d60a2c38
|
||||
SIZE (Komzpa-twms-0.02w_GH0.tar.gz) = 36022
|
||||
TIMESTAMP = 1526309311
|
||||
SHA256 (Komzpa-twms-0.06y_GH0.tar.gz) = bc699f8a947d4e240c8a2b7944893bdf5690de8f57d633f8e2300cfc00e39a71
|
||||
SIZE (Komzpa-twms-0.06y_GH0.tar.gz) = 30018
|
||||
|
20
www/twms/files/patch-setup.py
Normal file
20
www/twms/files/patch-setup.py
Normal file
@ -0,0 +1,20 @@
|
||||
--- setup.py.orig 2018-05-08 12:10:19 UTC
|
||||
+++ setup.py
|
||||
@@ -11,7 +11,7 @@ is_windows = __platform__ in ['Windows']
|
||||
__name__ = "twms"
|
||||
|
||||
def read(fname):
|
||||
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
+ return open(os.path.join(os.path.dirname(__file__), fname), 'rb').read().decode('utf-8')
|
||||
|
||||
def glob(fname):
|
||||
return abs_glob(os.path.join(os.path.dirname(__file__), fname))
|
||||
@@ -25,7 +25,7 @@ def man_files(pattern):
|
||||
|
||||
def config_files():
|
||||
if not is_windows:
|
||||
- return [(os.path.join('/etc', __name__), [os.path.join('twms', 'twms.conf')])]
|
||||
+ return [(os.path.join('etc', __name__), [os.path.join('twms', 'twms.conf')])]
|
||||
else:
|
||||
return []
|
||||
|
@ -1,18 +0,0 @@
|
||||
--- twms/canvas.py.orig 2014-10-07 11:58:01 UTC
|
||||
+++ twms/canvas.py
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
import projections
|
||||
-import Image, ImageFilter
|
||||
+from PIL import Image, ImageFilter
|
||||
import urllib2
|
||||
import StringIO
|
||||
import datetime
|
||||
@@ -132,4 +132,4 @@
|
||||
tiles = self.tiles.keys()
|
||||
for tile in tiles:
|
||||
self.tiles[tile]["im"] = self.tiles[tile]["im"].filter(ImageFilter.MedianFilter(size))
|
||||
- self.tiles[tile]["pix"] = self.tiles[tile]["im"].load()
|
||||
\ No newline at end of file
|
||||
+ self.tiles[tile]["pix"] = self.tiles[tile]["im"].load()
|
@ -1,18 +0,0 @@
|
||||
--- twms/drawing.py.orig 2014-10-07 11:57:57 UTC
|
||||
+++ twms/drawing.py
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with tWMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-import Image, ImageDraw
|
||||
+from PIL import Image, ImageDraw
|
||||
import urllib
|
||||
import os, sys
|
||||
|
||||
@@ -79,4 +79,4 @@
|
||||
draw.ellipse((coords[0][0]-3,coords[0][1]-3,coords[0][0]+3,coords[0][1]+3),fill=color,outline=color)
|
||||
elif geometry == "POLYGON":
|
||||
draw.polygon(coords, fill=color, outline=color)
|
||||
- return img
|
||||
\ No newline at end of file
|
||||
+ return img
|
@ -1,18 +0,0 @@
|
||||
--- twms/fetchers.py.orig 2014-10-07 11:58:04 UTC
|
||||
+++ twms/fetchers.py
|
||||
@@ -21,7 +21,7 @@
|
||||
import math
|
||||
import sys
|
||||
import StringIO
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
import config
|
||||
import projections
|
||||
@@ -115,4 +115,4 @@
|
||||
tne.close()
|
||||
os.remove(local+ this_layer["ext"])
|
||||
return False
|
||||
- return im
|
||||
\ No newline at end of file
|
||||
+ return im
|
@ -1,13 +0,0 @@
|
||||
--- twms/filter.py.orig 2014-10-07 11:57:53 UTC
|
||||
+++ twms/filter.py
|
||||
@@ -15,8 +15,8 @@
|
||||
# along with tWMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
-import ImageFilter
|
||||
-import ImageEnhance
|
||||
+from PIL import ImageFilter
|
||||
+from PIL import ImageEnhance
|
||||
|
||||
def raster(result_img, filt):
|
||||
"""
|
@ -1,11 +0,0 @@
|
||||
--- twms/reproject.py.orig 2014-10-07 11:58:11 UTC
|
||||
+++ twms/reproject.py
|
||||
@@ -14,7 +14,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with tWMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
import projections
|
||||
import sys
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$2" = "POST-DEINSTALL" ]; then
|
||||
echo "===> Removing tWMS cache directory"
|
||||
rm -rf "%%CACHEDIR%%" || exit 1
|
||||
|
||||
echo "===> Removing tWMS user and group"
|
||||
if pw usershow "%%USER%%" >/dev/null 2>&1; then
|
||||
pw userdel "%%USER%%" || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ]; then
|
||||
if [ ! -d "%%CACHEDIR%%" ]; then
|
||||
mkdir -p "%%CACHEDIR%%/cache" || exit 1
|
||||
mkdir -p "%%CACHEDIR%%/traces" || exit 1
|
||||
chown -R "%%USER%%:%%GROUP%%" "%%CACHEDIR%%" || exit 1
|
||||
chmod -R 0775 "%%CACHEDIR%%" || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
@ -12,29 +12,23 @@
|
||||
name=twms
|
||||
rcvar=twms_enable
|
||||
|
||||
twms_enable=${twms_enable:-"NO"}
|
||||
twms_user=%%USER%%
|
||||
twms_group=%%GROUP%%
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command="%%PREFIX%%/bin/twms"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${twms_enable="NO"}
|
||||
: ${twms_user="${name}"}
|
||||
|
||||
pidfile=/var/run/${name}.pid
|
||||
procname=/usr/local/bin/twms
|
||||
command_interpreter="%%PYTHON_CMD%%"
|
||||
start_cmd="twms_start"
|
||||
|
||||
pidfile=/var/run/${name}.pid
|
||||
command="%%PREFIX%%/bin/${name}"
|
||||
|
||||
twms_start()
|
||||
{
|
||||
su -m ${twms_user} -c "nohup $command >/dev/null 2>&1 & echo \$! " | tail -1 > ${pidfile}
|
||||
}
|
||||
|
||||
twms_stop()
|
||||
{
|
||||
if [ -f ${pidfile} ]; then
|
||||
rc_pid=`cat ${pidfile}`
|
||||
kill -TERM $rc_pid
|
||||
wait_for_pids $rc_pid
|
||||
rm ${pidfile}
|
||||
fi
|
||||
echo "Starting ${name}."
|
||||
/usr/sbin/daemon -c -f -p ${pidfile} -u ${twms_user} ${command_interpreter} ${procname}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
@ -1,19 +1,57 @@
|
||||
bin/twms
|
||||
@sample etc/twms.conf.default etc/twms.conf
|
||||
@sample %%ETCDIR%%/twms.conf.sample
|
||||
%%PYTHON_SITELIBDIR%%/twms/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/bbox.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/bbox.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/bbox.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/canvas.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/canvas.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/canvas.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/capabilities.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/capabilities.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/capabilities.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/correctify.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/correctify.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/correctify.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/daemon.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/daemon.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/daemon.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/drawing.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/drawing.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/drawing.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/fetchers.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/fetchers.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/fetchers.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/filter.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/filter.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/filter.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/gpxparse.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/gpxparse.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/gpxparse.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/overview.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/overview.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/overview.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/projections.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/projections.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/projections.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/reproject.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/reproject.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/reproject.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/sketch.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/sketch.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/sketch.pyo
|
||||
%%PYTHON_SITELIBDIR%%/twms/twms.py
|
||||
%%PYTHON_SITELIBDIR%%/twms/twms.pyc
|
||||
%%PYTHON_SITELIBDIR%%/twms/twms.pyo
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.md
|
||||
share/man/man1/twms.1
|
||||
%%DATADIR%%/irs_nxt.jpg
|
||||
%%DATADIR%%/tools/compile_correction.py
|
||||
%%DATADIR%%/tools/decompile_correction.py
|
||||
%%DATADIR%%/yahoo_nxt.jpg
|
||||
%%DATADIR%%/yandex_nxt.jpg
|
||||
@dir(%%USER%%,%%GROUP%%,775) /var/cache/twms/tiles
|
||||
@dir(%%USER%%,%%GROUP%%,775) /var/cache/twms/traces
|
||||
@dir /var/cache/twms
|
||||
|
Loading…
Reference in New Issue
Block a user