FreeBSD Bugzilla – Attachment 198854 Details for
Bug 230114
[NEW PORT] textproc/scancode-toolkit: Scans code for license, copyright, package and documented dependencies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
scancode-toolkit-2.9.7.patch
scancode-toolkit-2.9.7.patch (text/plain), 14.76 KB, created by
Kai Knoblich
on 2018-11-01 13:26:36 UTC
(
hide
)
Description:
scancode-toolkit-2.9.7.patch
Filename:
MIME Type:
Creator:
Kai Knoblich
Created:
2018-11-01 13:26:36 UTC
Size:
14.76 KB
patch
obsolete
>Index: textproc/scancode-toolkit/Makefile >=================================================================== >--- textproc/scancode-toolkit/Makefile (nonexistent) >+++ textproc/scancode-toolkit/Makefile (working copy) >@@ -0,0 +1,147 @@ >+# $FreeBSD$ >+ >+PORTNAME= scancode-toolkit >+DISTVERSIONPREFIX= v >+DISTVERSION= 2.9.7 >+CATEGORIES= textproc python >+ >+MAINTAINER= freebsd_ports@k-worx.org >+COMMENT= Scans code for license, copyright, package and documented dependencies >+ >+LICENSE= APACHE20 CC0-1.0 >+LICENSE_COMB= multi >+LICENSE_FILE_APACHE20= ${WRKSRC}/apache-2.0.LICENSE >+LICENSE_FILE_CC0-1.0= ${WRKSRC}/cc0-1.0.LICENSE >+ >+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nltk>=3.2:textproc/py-nltk@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}url>=0.1.4:www/py-url@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}fingerprints>=0.5.4:textproc/py-fingerprints@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}patch>=1.15:devel/py-patch@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}bz2file>=0.98:archivers/py-bz2file@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}backports.os=0.1.1:devel/py-backports.os@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}future>=0.16.0:devel/py-future@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}text-unidecode>=1.0:converters/py-text-unidecode@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}bitarray>=0.8.1:devel/py-bitarray@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}intbitset>=2.3.0:devel/py-intbitset@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}boolean.py>=3.5:devel/py-boolean.py@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}license-expression>=0.99:textproc/py-license-expression@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pyahocorasick>=1.1:textproc/py-pyahocorasick@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}yaml>=3.0:devel/py-yaml@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}lxml>=4.0.0:devel/py-lxml@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4.0.0:www/py-beautifulsoup@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}html5lib>=0:www/py-html5lib@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pdfminer.six>=20170720:textproc/py-pdfminer.six@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.4:security/py-pycryptodome@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}binaryornot>=0.4.0:devel/py-binaryornot@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}chardet>=3.0.0:textproc/py-chardet@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pygments>=2.2.0:textproc/py-pygments@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pefile>=2018.8.8:devel/py-pefile@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pymaven-patch>=0.2.4:devel/py-pymaven-patch@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}requests>=2.7.0:www/py-requests@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}packageurl-python>=0.5.0:textproc/py-packageurl-python@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.11.0:devel/py-xmltodict@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}click>=6.0.0:devel/py-click@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}colorama>=0.3.9:devel/py-colorama@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pluggy>=0.4.0:devel/py-pluggy@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}attrs>=17.4:devel/py-attrs@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}typing>=3.6:devel/py-typing@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.7.0:devel/py-Jinja2@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}MarkupSafe>=0.23:textproc/py-MarkupSafe@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}simplejson>=0:devel/py-simplejson@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}spdx-tools>=0.5.4:misc/py-spdx-tools@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}unicodecsv>=0:devel/py-unicodecsv@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}yg.lockfile>=2.0.1:devel/py-yg.lockfile@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}zclockfile>=1.0.0:devel/py-zclockfile@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}contextlib2>=0:devel/py-contextlib2@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}pytz>=0:devel/py-pytz@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}tempora>=0:devel/py-tempora@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}jaraco.timing>=0:devel/py-jaraco.timing@${PY_FLAVOR} \ >+ ${PY_IPADDRESS} \ >+ ${LOCALBASE}/bin/7z:archivers/p7zip \ >+ ${LOCALBASE}/bin/file:sysutils/file \ >+ ${LOCALBASE}/lib/libarchive.so:archivers/libarchive >+ >+USES= python:2.7 >+USE_PYTHON= distutils autoplist noflavors >+USE_GITHUB= yes >+GH_ACCOUNT= nexB >+ >+NO_ARCH= yes >+ >+# The upstream package comes with several Python packages of libmagic, p7zip >+# and zlib that include precompiled binaries for different architectures: >+# >+# - plugins/extractcode-7z-ARCH >+# bin/ >+# - plugins/extractcode-libarchive-ARCH >+# lib/ >+# - plugins/typecode-libmagic-ARCH >+# /data >+# /lib >+# >+# We use as ARCH the "manylinux_1_x86_64" architecture to get the directory >+# structure. The binary files will be overwritten in the post-install target >+# when the relative symlinks are created. >+BOGUSLNKS= ${LOCALBASE}/bin/7z \ >+ ${LOCALBASE}/libexec/p7zip/7z.so \ >+ ${LOCALBASE}/lib/libarchive.so \ >+ ${LOCALBASE}/lib/libmagic.so \ >+ ${LOCALBASE}/share/file/magic.mgc >+ >+.for _b in ${BOGUSLNKS} >+BOGUSDIR_${_b}= `${DIRNAME} ${_b}` >+.endfor >+ >+post-patch: >+ @${FIND} ${WRKSRC} -name "*.orig" -or -name "*.bak" -delete >+ >+do-build: >+ # Build the port and the plugin packages >+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) >+ @(cd ${BUILD_WRKSRC}/plugins/extractcode-7z-manylinux1_x86_64; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) >+ @(cd ${BUILD_WRKSRC}/plugins/extractcode-libarchive-manylinux1_i686; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) >+ @(cd ${BUILD_WRKSRC}/plugins/typecode-libmagic-manylinux1_x86_64; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) >+ >+do-install: >+ # Install scancode and the plugin packages. After each installation run >+ # the newly created ${_PYTHONPKGLIST} is renamed for later processing. >+ (cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) >+ @${MV} ${_PYTHONPKGLIST} ${_PYTHONPKGLIST}.scancode >+ (cd ${INSTALL_WRKSRC}/plugins/extractcode-7z-manylinux1_x86_64; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) >+ @${MV} ${_PYTHONPKGLIST} ${_PYTHONPKGLIST}.extractcode-7z >+ (cd ${INSTALL_WRKSRC}/plugins/extractcode-libarchive-manylinux1_i686; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) >+ @${MV} ${_PYTHONPKGLIST} ${_PYTHONPKGLIST}.extractcode-libarchive >+ (cd ${INSTALL_WRKSRC}/plugins/typecode-libmagic-manylinux1_x86_64; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) >+ @${MV} ${_PYTHONPKGLIST} ${_PYTHONPKGLIST}.typecode-libmagic >+ # Merge the package lists from the previous install steps into one >+ # ${_PYTHONPKGLIST} >+ @${CAT} ${_PYTHONPKGLIST}.scancode ${_PYTHONPKGLIST}.extractcode-7z ${_PYTHONPKGLIST}.extractcode-libarchive ${_PYTHONPKGLIST}.typecode-libmagic > ${_PYTHONPKGLIST} >+ >+post-install: >+ # Create bogus directories and files that will be used as sources for >+ # the relative symlinks in the stagedir. Also keep track of the >+ # files/directory that need to be created for later removal. >+.for _f in ${BOGUSLNKS} >+ @if ! ${TEST} -d ${STAGEDIR}${BOGUSDIR_${_f}}; then \ >+ ${MKDIR} ${STAGEDIR}${BOGUSDIR_${_f}} && \ >+ ${ECHO} ${STAGEDIR}${BOGUSDIR_${_f}} >> ${WRKDIR}/.bogusdirs ; \ >+ fi >+ >+ @${ECHO} DUMMY > ${STAGEDIR}${_f} >+ @${ECHO} ${STAGEDIR}${_f} >> ${WRKDIR}/.bogusdirs >+.endfor >+ >+ # Create the relative symlinks using the bogus libmagic, p7zip and zlib >+ # as sources to overwrite the placeholder that were created with the >+ # post-extract target. >+ @${RLN} ${STAGEDIR}${LOCALBASE}/bin/7z ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/extractcode_7z/bin/ >+ @${RLN} ${STAGEDIR}${LOCALBASE}/libexec/p7zip/7z.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/extractcode_7z/bin/ >+ @${RLN} ${STAGEDIR}${LOCALBASE}/lib/libarchive.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/extractcode_libarchive/lib/ >+ @${RLN} ${STAGEDIR}${LOCALBASE}/share/file/magic.mgc ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/typecode_libmagic/data/ >+ @${RLN} ${STAGEDIR}${LOCALBASE}/lib/libmagic.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/typecode_libmagic/lib/ >+ >+ # Remove all bogus source files/directories to pass stage qa >+ @${RM} -r `${CAT} ${WRKDIR}/.bogusdirs` >+ >+.include <bsd.port.mk> > >Property changes on: textproc/scancode-toolkit/Makefile >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: textproc/scancode-toolkit/distinfo >=================================================================== >--- textproc/scancode-toolkit/distinfo (nonexistent) >+++ textproc/scancode-toolkit/distinfo (working copy) >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1540635003 >+SHA256 (nexB-scancode-toolkit-v2.9.7_GH0.tar.gz) = 717249edb32ffc65668f21c9b7630932e7d5fad713954c53892afaa8bc1e935d >+SIZE (nexB-scancode-toolkit-v2.9.7_GH0.tar.gz) = 173522172 > >Property changes on: textproc/scancode-toolkit/distinfo >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: textproc/scancode-toolkit/files/patch-setup.py >=================================================================== >--- textproc/scancode-toolkit/files/patch-setup.py (nonexistent) >+++ textproc/scancode-toolkit/files/patch-setup.py (working copy) >@@ -0,0 +1,38 @@ >+--- setup.py.orig 2018-10-19 14:31:36 UTC >++++ setup.py >+@@ -125,9 +125,7 @@ setup( >+ # cluecode >+ # Some nltk version ranges are buggy >+ 'nltk >= 3.2, < 4.0', >+- 'publicsuffix2', >+- 'py2-ipaddress >= 2.0, <3.5', >+- 'url >= 0.1.4, < 0.1.6', >++ 'url >= 0.1.4', >+ 'fingerprints == 0.5.4', >+ >+ # extractcode >+@@ -135,8 +133,6 @@ setup( >+ # to work around bug http://bugs.python.org/issue19839 >+ # on multistream bzip2 files: this can removed in Python 3. >+ 'bz2file >= 0.98', >+- 'extractcode-libarchive', >+- 'extractcode-7z', >+ >+ # commoncode >+ 'backports.os == 0.1.1', >+@@ -166,7 +162,6 @@ setup( >+ 'chardet >= 3.0.0, <4.0.0', >+ # note that we use a short version range because we use a simpler lexer list >+ 'pygments >= 2.2.0, <2.3', >+- 'typecode-libmagic', >+ >+ # packagedcode >+ 'pefile >= 2018.8.8', >+@@ -180,7 +175,6 @@ setup( >+ 'colorama >= 0.3.9', >+ 'pluggy >= 0.4.0, < 1.0', >+ 'attrs >=17.4, < 19.0', >+- 'cattrs', >+ 'typing >=3.6, < 3.7', >+ >+ # scancode outputs > >Property changes on: textproc/scancode-toolkit/files/patch-setup.py >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: textproc/scancode-toolkit/files/patch-src_commoncode_system.py >=================================================================== >--- textproc/scancode-toolkit/files/patch-src_commoncode_system.py (nonexistent) >+++ textproc/scancode-toolkit/files/patch-src_commoncode_system.py (working copy) >@@ -0,0 +1,30 @@ >+--- src/commoncode/system.py.orig 2018-05-08 13:54:52 UTC >++++ src/commoncode/system.py >+@@ -46,6 +46,8 @@ def os_arch(): >+ os = 'win' >+ elif 'darwin' in sys_platform: >+ os = 'mac' >++ elif 'freebsd' in sys_platform: >++ os = 'freebsd' >+ else: >+ raise Exception('Unsupported OS/platform %r' % sys_platform) >+ return os, arch >+@@ -84,7 +86,8 @@ current_os, current_arch = os_arch() >+ on_windows = current_os == 'win' >+ on_mac = current_os == 'mac' >+ on_linux = current_os == 'linux' >+-on_posix = not on_windows and (on_mac or on_linux) >++on_freebsd = current_os == 'freebsd' >++on_posix = not on_windows and (on_mac or on_linux or on_freebsd) >+ >+ current_os_arch = '%(current_os)s-%(current_arch)s' % locals() >+ noarch = 'noarch' >+@@ -97,7 +100,7 @@ if on_windows: >+ lib_ext = '.dll' >+ if on_mac: >+ lib_ext = '.dylib' >+-if on_linux: >++if on_linux or on_freebsd: >+ lib_ext = '.so' >+ >+ # > >Property changes on: textproc/scancode-toolkit/files/patch-src_commoncode_system.py >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: textproc/scancode-toolkit/files/patch-src_extractcode_libarchive2.py >=================================================================== >--- textproc/scancode-toolkit/files/patch-src_extractcode_libarchive2.py (nonexistent) >+++ textproc/scancode-toolkit/files/patch-src_extractcode_libarchive2.py (working copy) >@@ -0,0 +1,10 @@ >+--- src/extractcode/libarchive2.py.orig 2018-10-15 13:51:18 UTC >++++ src/extractcode/libarchive2.py >+@@ -101,6 +101,7 @@ def load_lib(): >+ # get paths from plugins >+ dll = get_location(EXTRACTCODE_LIBARCHIVE_DLL) >+ libdir = get_location(EXTRACTCODE_LIBARCHIVE_LIBDIR) >++ dll = libdir >+ return command.load_shared_library(dll, libdir) >+ >+ > >Property changes on: textproc/scancode-toolkit/files/patch-src_extractcode_libarchive2.py >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: textproc/scancode-toolkit/pkg-descr >=================================================================== >--- textproc/scancode-toolkit/pkg-descr (nonexistent) >+++ textproc/scancode-toolkit/pkg-descr (working copy) >@@ -0,0 +1,5 @@ >+ScanCode scans code and detects licenses, copyrights, package manifests, >+dependencies and more. It can be also used to discover and inventory open source >+and third-party packages used in your code. >+ >+WWW: https://github.com/nexB/scancode-toolkit > >Property changes on: textproc/scancode-toolkit/pkg-descr >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230114
:
195537
|
195538
|
198850
| 198854