Date: Thu, 12 Dec 2013 21:10:36 +0000 (UTC) From: Rusmir Dusko <nemysis@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336290 - in head/games/anki: . files Message-ID: <201312122110.rBCLAax1086113@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nemysis Date: Thu Dec 12 21:10:36 2013 New Revision: 336290 URL: http://svnweb.freebsd.org/changeset/ports/336290 Log: - Bump PORTREVISION - Use patches instead of REINPLACE_CMD, for upstream - Cleanup Makefile, add patches, use Port Makefile - Change pkg-plist, adjust NLS Approved by: pawel / wg (mentors, implicit) Added: head/games/anki/files/ head/games/anki/files/patch-Makefile (contents, props changed) head/games/anki/files/patch-anki__lang.py (contents, props changed) head/games/anki/files/patch-runanki (contents, props changed) Modified: head/games/anki/Makefile head/games/anki/pkg-plist Modified: head/games/anki/Makefile ============================================================================== --- head/games/anki/Makefile Thu Dec 12 21:01:06 2013 (r336289) +++ head/games/anki/Makefile Thu Dec 12 21:10:36 2013 (r336290) @@ -3,6 +3,7 @@ PORTNAME= anki PORTVERSION= 2.0.19 +PORTREVISION= 1 CATEGORIES= games python MASTER_SITES= http://ankisrs.net/download/mirror/ EXTRACT_SUFX= .tgz @@ -36,49 +37,18 @@ NLS_USES= gettext:run .include <bsd.port.options.mk> post-patch: - @${REINPLACE_CMD} -e 's|/usr/share/|${PREFIX}/share/|' \ - ${WRKSRC}/runanki - @${REINPLACE_CMD} -e 's|/usr/share/anki/locale|${PREFIX}/share/locale/|' \ - ${WRKSRC}/anki/lang.py @${REINPLACE_CMD} \ -e 's|^Categories=.*|Categories=Education;Languages;KDE;Qt;Game;|' \ ${WRKSRC}/${PORTNAME}.desktop - @${FIND} ${WRKSRC} -name "*.bak" -delete + @${FIND} ${WRKSRC} -name "*.bak" -delete -or -name "*.orig" -delete + +.if ! ${PORT_OPTIONS:MNLS} + @${REINPLACE_CMD} -i '' '/mkdir -p qt-locale/,/cp -av locale/s/^/#/' \ + ${WRKSRC}/Makefile +.endif do-build: @${PYTHON_CMD} -m compileall ${WRKSRC} @${PYTHON_CMD} -O -m compileall ${WRKSRC} -do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/runanki ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - -.for d in anki aqt designer oldanki tests tools - @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR}) -.endfor - - @${MKDIR} ${STAGEDIR}${DATADIR}/locale - ${INSTALL_DATA} ${WRKSRC}/locale/qt* ${STAGEDIR}${DATADIR}/locale/ - -.if ${PORT_OPTIONS:MNLS} -. for f in af ar az bg bn ca cs da de el en_GB eo es et eu fa fi fr gl gu he \ - hu it ja km ko lt lv mn mr ms nb nl no oc pl pt pt_BR ro ru sk sl sr \ - sv th tlh tr uk vi wo zh_CN zh_HK zh_TW - ${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${f}/LC_MESSAGES && \ - ${INSTALL_DATA} ${WRKSRC}/locale/${f}/LC_MESSAGES/${PORTNAME}.mo \ - ${STAGEDIR}${PREFIX}/share/locale/${f}/LC_MESSAGES/${PORTNAME}.mo -. endfor -.endif - - ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/ - @${MKDIR} ${STAGEDIR}${DESKTOPDIR} - ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR} - @${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages/ - ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.xml \ - ${STAGEDIR}${PREFIX}/share/mime/packages/ - -.for p in *.png *.xpm - ${INSTALL_DATA} ${WRKSRC}/${p} \ - ${STAGEDIR}${PREFIX}/share/pixmaps/ -.endfor - .include <bsd.port.mk> Added: head/games/anki/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/anki/files/patch-Makefile Thu Dec 12 21:10:36 2013 (r336290) @@ -0,0 +1,51 @@ +--- ./Makefile.orig 2013-12-09 03:51:52.000000000 +0100 ++++ ./Makefile 2013-12-12 21:03:24.000000000 +0100 +@@ -1,4 +1,4 @@ +-PREFIX=/usr ++PREFIX=/usr/local + + all: + @echo "You can run Anki with ./runanki" +@@ -6,24 +6,31 @@ + @echo "Uninstall with 'sudo make uninstall'" + + install: +- rm -rf ${DESTDIR}${PREFIX}/share/anki + mkdir -p ${DESTDIR}${PREFIX}/share/anki +- cp -av * ${DESTDIR}${PREFIX}/share/anki/ +- cd ${DESTDIR}${PREFIX}/share/anki && (\ +- mv runanki ${DESTDIR}${PREFIX}/local/bin/anki;\ ++ cp -av anki aqt designer oldanki tests tools\ ++ ${DESTDIR}${PREFIX}/share/anki/ ++ cp -av runanki ${DESTDIR}${PREFIX}/bin/anki ++ mkdir -p ${DESTDIR}${PREFIX}/share/anki/locale/ ++ mkdir -p qt-locale/ && mv locale/qt* ./qt-locale/ ++ cp -av qt-locale/* ${DESTDIR}${PREFIX}/share/anki/locale/ ++ mkdir -p ${DESTDIR}${PREFIX}/share/locale/ ++ cp -av locale/* ${DESTDIR}${PREFIX}/share/locale/ + test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\ +- mv anki.xpm anki.png ${DESTDIR}${PREFIX}/share/pixmaps/;\ +- mv anki.desktop ${DESTDIR}${PREFIX}/share/applications;\ +- mv anki.1 ${DESTDIR}${PREFIX}/share/man/man1/) +- xdg-mime install anki.xml --novendor +- xdg-mime default anki.desktop application/x-anki +- xdg-mime default anki.desktop application/x-apkg ++ cp -av anki.xpm anki.png ${DESTDIR}${PREFIX}/share/pixmaps/ ++ cp -av anki.desktop ${DESTDIR}${PREFIX}/share/applications ++ mkdir -p ${DESTDIR}${PREFIX}/man/man1/ ++ cp -av anki.1 ${DESTDIR}${PREFIX}/man/man1/ ++ mkdir -p ${DESTDIR}${PREFIX}/share/mime/packages/ ++ cp -av anki.xml ${DESTDIR}${PREFIX}/share/mime/packages/ ++# xdg-mime install anki.xml --novendor ++# xdg-mime default anki.desktop application/x-anki ++# xdg-mime default anki.desktop application/x-apkg + @echo + @echo "Install complete." + + uninstall: + rm -rf ${DESTDIR}${PREFIX}/share/anki +- rm -rf ${DESTDIR}${PREFIX}/local/bin/anki ++ rm -rf ${DESTDIR}${PREFIX}/bin/anki + rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.xpm + rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.png + rm -rf ${DESTDIR}${PREFIX}/share/applications/anki.desktop Added: head/games/anki/files/patch-anki__lang.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/anki/files/patch-anki__lang.py Thu Dec 12 21:10:36 2013 (r336290) @@ -0,0 +1,11 @@ +--- ./anki/lang.py.orig 2013-10-11 06:12:53.000000000 +0200 ++++ ./anki/lang.py 2013-12-12 21:03:11.000000000 +0100 +@@ -76,7 +76,7 @@ + if not os.path.isdir(dir): + dir = os.path.join(os.path.dirname(sys.argv[0]), "locale") + if not os.path.isdir(dir): +- dir = "/usr/share/anki/locale" ++ dir = "/usr/local/share/locale" + return dir + + def setLang(lang, local=True): Added: head/games/anki/files/patch-runanki ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/anki/files/patch-runanki Thu Dec 12 21:10:36 2013 (r336290) @@ -0,0 +1,10 @@ +--- ./runanki.orig 2012-12-21 09:50:41.000000000 +0100 ++++ ./runanki 2013-12-12 21:03:11.000000000 +0100 +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + + import sys +-sys.path.insert(0, "/usr/share/anki") ++sys.path.insert(0, "/usr/local/share/anki") + import aqt + aqt.run() Modified: head/games/anki/pkg-plist ============================================================================== --- head/games/anki/pkg-plist Thu Dec 12 21:01:06 2013 (r336289) +++ head/games/anki/pkg-plist Thu Dec 12 21:10:36 2013 (r336290) @@ -512,28 +512,28 @@ man/man1/anki.1.gz %%DATADIR%%/designer/studydeck.ui %%DATADIR%%/designer/taglimit.ui %%DATADIR%%/designer/template.ui -%%DATADIR%%/locale/qt_ar.qm -%%DATADIR%%/locale/qt_cs.qm -%%DATADIR%%/locale/qt_da.qm -%%DATADIR%%/locale/qt_de.qm -%%DATADIR%%/locale/qt_es.qm -%%DATADIR%%/locale/qt_fa.qm -%%DATADIR%%/locale/qt_fr.qm -%%DATADIR%%/locale/qt_gl.qm -%%DATADIR%%/locale/qt_he.qm -%%DATADIR%%/locale/qt_hu.qm -%%DATADIR%%/locale/qt_ja.qm -%%DATADIR%%/locale/qt_ko.qm -%%DATADIR%%/locale/qt_lt.qm -%%DATADIR%%/locale/qt_pl.qm -%%DATADIR%%/locale/qt_pt.qm -%%DATADIR%%/locale/qt_ru.qm -%%DATADIR%%/locale/qt_sk.qm -%%DATADIR%%/locale/qt_sl.qm -%%DATADIR%%/locale/qt_sv.qm -%%DATADIR%%/locale/qt_uk.qm -%%DATADIR%%/locale/qt_zh_CN.qm -%%DATADIR%%/locale/qt_zh_TW.qm +%%NLS%%%%DATADIR%%/locale/qt_ar.qm +%%NLS%%%%DATADIR%%/locale/qt_cs.qm +%%NLS%%%%DATADIR%%/locale/qt_da.qm +%%NLS%%%%DATADIR%%/locale/qt_de.qm +%%NLS%%%%DATADIR%%/locale/qt_es.qm +%%NLS%%%%DATADIR%%/locale/qt_fa.qm +%%NLS%%%%DATADIR%%/locale/qt_fr.qm +%%NLS%%%%DATADIR%%/locale/qt_gl.qm +%%NLS%%%%DATADIR%%/locale/qt_he.qm +%%NLS%%%%DATADIR%%/locale/qt_hu.qm +%%NLS%%%%DATADIR%%/locale/qt_ja.qm +%%NLS%%%%DATADIR%%/locale/qt_ko.qm +%%NLS%%%%DATADIR%%/locale/qt_lt.qm +%%NLS%%%%DATADIR%%/locale/qt_pl.qm +%%NLS%%%%DATADIR%%/locale/qt_pt.qm +%%NLS%%%%DATADIR%%/locale/qt_ru.qm +%%NLS%%%%DATADIR%%/locale/qt_sk.qm +%%NLS%%%%DATADIR%%/locale/qt_sl.qm +%%NLS%%%%DATADIR%%/locale/qt_sv.qm +%%NLS%%%%DATADIR%%/locale/qt_uk.qm +%%NLS%%%%DATADIR%%/locale/qt_zh_CN.qm +%%NLS%%%%DATADIR%%/locale/qt_zh_TW.qm %%DATADIR%%/oldanki/README %%DATADIR%%/oldanki/__init__.py %%DATADIR%%/oldanki/__init__.pyc @@ -705,6 +705,7 @@ share/applications/anki.desktop %%NLS%%share/locale/gl/LC_MESSAGES/anki.mo %%NLS%%share/locale/gu/LC_MESSAGES/anki.mo %%NLS%%share/locale/he/LC_MESSAGES/anki.mo +%%NLS%%share/locale/hr/LC_MESSAGES/anki.mo %%NLS%%share/locale/hu/LC_MESSAGES/anki.mo %%NLS%%share/locale/it/LC_MESSAGES/anki.mo %%NLS%%share/locale/ja/LC_MESSAGES/anki.mo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312122110.rBCLAax1086113>