1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

- Make dependency on python unconditional, as filters always require python

- Make python module installation unconditional, as disabling it no longer brings any profit
- Don't install compiled python files, which fixes installation with python3 as default
- Switch to USES=localbase
- Fix shebangs
- Simplify stripping
- Fix plist for WITHOUT=QT4 case
- Mark BROKEN with X11MON, required libfam is not linked which breaks the installation
This commit is contained in:
Dmitry Marakasov 2018-01-26 17:08:59 +00:00
parent 9e3c4802ec
commit 0f25fd88c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=460009
3 changed files with 80 additions and 72 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= recoll
PORTVERSION= 1.23.4
PORTREVISION= 1
CATEGORIES= deskutils
MASTER_SITES= http://www.lesbonscomptes.com/recoll/
@ -19,20 +20,27 @@ RUN_DEPENDS= unrar:archivers/unrar \
wpd2html:textproc/libwpd010 \
unrtf:textproc/unrtf
USES= bison gmake iconv libtool shebangfix
SHEBANG_FILES= filters/rclimg filters/rclpdf.py desktop/hotrecoll.py
USES= bison gmake iconv libtool localbase python shebangfix
SHEBANG_FILES= filters/*.py desktop/hotrecoll.py \
filters/rcl7z filters/rclaudio filters/rclchm \
filters/rcldia filters/rclepub filters/rclepub1 \
filters/rclics filters/rclinfo filters/rclkar \
filters/rclpython filters/rclrar filters/rcltar \
filters/rclwar filters/rclzip
USE_GNOME= libxslt:run
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-pic
MAKE_ENV= PYTHON_CMD=${PYTHON_CMD}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PYDISTUTILS_PKGNAME= Recoll
PYDISTUTILS_PKGVERSION= 1.0
PLIST_SUB= VERSION="${PORTVERSION}"
PLIST_SUB= VERSION="${PORTVERSION}" \
PYDISTUTILS_EGGINFO="${PYDISTUTILS_EGGINFO}"
OPTIONS_DEFINE= ASPELL CHM DJVU KONQUEROR LATEX IMAGE PDF PS PYTHON \
OPTIONS_DEFINE= ASPELL CHM DJVU KONQUEROR LATEX IMAGE PDF PS \
SOUND QT4 X11MON
OPTIONS_DEFAULT= ASPELL IMAGE PDF PS PYTHON SOUND QT4
OPTIONS_DEFAULT= ASPELL IMAGE PDF PS SOUND QT4
OPTIONS_SUB= yes
ASPELL_LIB_DEPENDS= libaspell.so:textproc/aspell
@ -47,11 +55,6 @@ KONQUEROR_RUN_DEPENDS= kwebkitpart>0:www/kwebkitpart
LATEX_USE= tex=dvipsk:run,latex:run
PDF_RUN_DEPENDS= pdftotext:graphics/poppler-utils
PS_RUN_DEPENDS= pstotext:print/pstotext
PYTHON_USES= python:build,run
PYTHON_CONFIGURE_ENABLE=python-module
PYTHON_PLIST_SUB= PYDISTUTILS_EGGINFO="${PYDISTUTILS_EGGINFO}"
PYTHON_VARS= PYDISTUTILS_PKGNAME=Recoll \
PYDISTUTILS_PKGVERSION=1.0
QT4_USE= qt4=moc_build,qmake_build,rcc_build,uic_build \
qt4=iconengines_run,imageformats_run \
qt4=corelib,gui,xml,webkit
@ -66,18 +69,19 @@ X11MON_USES= fam
X11MON_USE= xorg=ice,sm,x11
X11MON_CONFIGURE_ENABLE=x11mon
X11MON_CONFIGURE_WITH= fam
X11MON_BROKEN= does not build: index/rclmonrcv.cpp:(.text+0x1f13): undefined reference to `FAMOpen2'
post-patch:
${REINPLACE_CMD} -e \
@${REINPLACE_CMD} -e \
's|@QMAKE@|${TRUE}|' \
${WRKSRC}/Makefile.in
${REINPLACE_CMD} -e \
@${REINPLACE_CMD} -e \
's|/usr/local/lib|${LOCALBASE}/lib|' \
${WRKSRC}/configure
${REINPLACE_CMD} -e \
@${REINPLACE_CMD} -e \
's|python setup.py|${PYTHON_CMD} setup.py|; s|sudo||' \
${WRKSRC}/python/recoll/Makefile.in
${REINPLACE_CMD} -e \
@${REINPLACE_CMD} -e \
's|python setup.py|${PYTHON_CMD} setup.py|' \
${WRKSRC}/Makefile.in
@ -85,12 +89,8 @@ pre-build-QT4-on:
@(cd ${WRKSRC}/qtgui && ${SETENV} ${QMAKE_ENV} ${QMAKE} \
${QMAKE_ARGS} recoll.pro)
post-install-PYTHON-on:
.for l in recoll rclextract
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/recoll/${l}.so
.endfor
cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -m compileall \
-d ${PYTHONPREFIX_SITELIBDIR} \
-f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/recoll/*.so \
${STAGEDIR}${PREFIX}/lib/recoll/*.so
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig 2017-11-06 17:57:14 UTC
+++ Makefile.in
@@ -2206,7 +2206,7 @@ PicStatic: $(librecoll_la_OBJECTS)
@MAKEPYTHON_TRUE@ OPTSFORPYTHON=--install-layout=deb; \
@MAKEPYTHON_TRUE@ fi; \
@MAKEPYTHON_TRUE@ set -x; \
-@MAKEPYTHON_TRUE@ python setup.py install \
+@MAKEPYTHON_TRUE@ ${PYTHON_CMD} setup.py install --no-compile \
@MAKEPYTHON_TRUE@ --prefix=${prefix} --root=$${DESTDIR:-/} $${OPTSFORPYTHON})
@MAKEPYTHON_TRUE@clean-local: recollpython-clean
@MAKEPYTHON_TRUE@recollpython-clean:

View File

@ -1,12 +1,10 @@
%%QT4%%bin/recoll
bin/recollindex
%%PYTHON%%%%PYTHON_SITELIBDIR%%/%%PYDISTUTILS_EGGINFO%%
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/__init__.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/__init__.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/rclconfig.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/rclconfig.pyc
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/rclextract.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/recoll/recoll.so
%%PYTHON_SITELIBDIR%%/%%PYDISTUTILS_EGGINFO%%
%%PYTHON_SITELIBDIR%%/recoll/__init__.py
%%PYTHON_SITELIBDIR%%/recoll/rclconfig.py
%%PYTHON_SITELIBDIR%%/recoll/rclextract.so
%%PYTHON_SITELIBDIR%%/recoll/recoll.so
lib/recoll/librecoll-%%VERSION%%.so
lib/recoll/librecoll.so
%%QT4%%man/man1/recoll.1.gz
@ -88,45 +86,44 @@ man/man5/recoll.conf.5.gz
%%DATADIR%%/filters/rclzip
%%DATADIR%%/filters/xls-dump.py
%%DATADIR%%/filters/xlsxmltocsv.py
%%DATADIR%%/images/aptosid-book.png
%%DATADIR%%/images/aptosid-manual.png
%%DATADIR%%/images/archive.png
%%DATADIR%%/images/book.png
%%DATADIR%%/images/bookchap.png
%%DATADIR%%/images/document.png
%%DATADIR%%/images/drawing.png
%%DATADIR%%/images/emblem-symbolic-link.png
%%DATADIR%%/images/folder.png
%%DATADIR%%/images/html.png
%%DATADIR%%/images/image.png
%%DATADIR%%/images/message.png
%%DATADIR%%/images/mozilla_doc.png
%%DATADIR%%/images/pdf.png
%%DATADIR%%/images/pidgin.png
%%DATADIR%%/images/postscript.png
%%DATADIR%%/images/presentation.png
%%DATADIR%%/images/sidux-book.png
%%DATADIR%%/images/soffice.png
%%DATADIR%%/images/source.png
%%DATADIR%%/images/sownd.png
%%DATADIR%%/images/spreadsheet.png
%%DATADIR%%/images/text-x-python.png
%%DATADIR%%/images/txt.png
%%DATADIR%%/images/video.png
%%DATADIR%%/images/wordprocessing.png
%%DATADIR%%/translations/recoll_cs.qm
%%DATADIR%%/translations/recoll_da.qm
%%DATADIR%%/translations/recoll_de.qm
%%DATADIR%%/translations/recoll_el.qm
%%DATADIR%%/translations/recoll_es.qm
%%DATADIR%%/translations/recoll_fr.qm
%%DATADIR%%/translations/recoll_it.qm
%%DATADIR%%/translations/recoll_lt.qm
%%DATADIR%%/translations/recoll_pl.qm
%%DATADIR%%/translations/recoll_ru.qm
%%DATADIR%%/translations/recoll_tr.qm
%%DATADIR%%/translations/recoll_uk.qm
%%DATADIR%%/translations/recoll_xx.qm
%%DATADIR%%/translations/recoll_zh.qm
%%DATADIR%%/translations/recoll_zh_CN.qm
%%NO_QT4%%@dir share/icons/hicolor/48x48/apps
%%QT4%%%%DATADIR%%/images/aptosid-book.png
%%QT4%%%%DATADIR%%/images/aptosid-manual.png
%%QT4%%%%DATADIR%%/images/archive.png
%%QT4%%%%DATADIR%%/images/book.png
%%QT4%%%%DATADIR%%/images/bookchap.png
%%QT4%%%%DATADIR%%/images/document.png
%%QT4%%%%DATADIR%%/images/drawing.png
%%QT4%%%%DATADIR%%/images/emblem-symbolic-link.png
%%QT4%%%%DATADIR%%/images/folder.png
%%QT4%%%%DATADIR%%/images/html.png
%%QT4%%%%DATADIR%%/images/image.png
%%QT4%%%%DATADIR%%/images/message.png
%%QT4%%%%DATADIR%%/images/mozilla_doc.png
%%QT4%%%%DATADIR%%/images/pdf.png
%%QT4%%%%DATADIR%%/images/pidgin.png
%%QT4%%%%DATADIR%%/images/postscript.png
%%QT4%%%%DATADIR%%/images/presentation.png
%%QT4%%%%DATADIR%%/images/sidux-book.png
%%QT4%%%%DATADIR%%/images/soffice.png
%%QT4%%%%DATADIR%%/images/source.png
%%QT4%%%%DATADIR%%/images/sownd.png
%%QT4%%%%DATADIR%%/images/spreadsheet.png
%%QT4%%%%DATADIR%%/images/text-x-python.png
%%QT4%%%%DATADIR%%/images/txt.png
%%QT4%%%%DATADIR%%/images/video.png
%%QT4%%%%DATADIR%%/images/wordprocessing.png
%%QT4%%%%DATADIR%%/translations/recoll_cs.qm
%%QT4%%%%DATADIR%%/translations/recoll_da.qm
%%QT4%%%%DATADIR%%/translations/recoll_de.qm
%%QT4%%%%DATADIR%%/translations/recoll_el.qm
%%QT4%%%%DATADIR%%/translations/recoll_es.qm
%%QT4%%%%DATADIR%%/translations/recoll_fr.qm
%%QT4%%%%DATADIR%%/translations/recoll_it.qm
%%QT4%%%%DATADIR%%/translations/recoll_lt.qm
%%QT4%%%%DATADIR%%/translations/recoll_pl.qm
%%QT4%%%%DATADIR%%/translations/recoll_ru.qm
%%QT4%%%%DATADIR%%/translations/recoll_tr.qm
%%QT4%%%%DATADIR%%/translations/recoll_uk.qm
%%QT4%%%%DATADIR%%/translations/recoll_xx.qm
%%QT4%%%%DATADIR%%/translations/recoll_zh.qm
%%QT4%%%%DATADIR%%/translations/recoll_zh_CN.qm