[BACK]Return to license.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /pkgsrc/mk/license.mk between version 1.80 and 1.81

version 1.80, 2017/05/11 12:56:21 version 1.81, 2018/01/02 22:40:32
Line 97 
Line 97 
   
 # This list is not complete.  Free and Open Source licenses should be  # This list is not complete.  Free and Open Source licenses should be
 # added to the list as they are added to pkgsrc.  # added to the list as they are added to pkgsrc.
   #
 # The convention is that Free or Open Source licenses do not have a  # The convention is that Free or Open Source licenses do not have a
 # -license suffix, and nonfree licenses end in -license.  # -license suffix, and nonfree licenses end in -license.
   #
 DEFAULT_ACCEPTABLE_LICENSES= \  DEFAULT_ACCEPTABLE_LICENSES= \
         apache-1.1 apache-2.0 \          apache-1.1 apache-2.0 \
         arphic-public \          arphic-public \
Line 236  PKG_FAIL_REASON+= \
Line 236  PKG_FAIL_REASON+= \
 .endif  .endif
   
 .endif  .endif
   
   # guess-license:
   #       Extracts the current package and tries to guess its license.
   #       This is useful for package developers.
   #
   # Keywords: license
   
   guess-license:
           ${RUN} ${MAKE} extract
           ${RUN} \
           type wdiff > /dev/null 2>&1 || ${FAIL_MSG} "To guess the license, textproc/wdiff must be installed."; \
           \
           printf "%8s   %s\n" "Wdiff" "License"; \
           bestsize=1000000; \
           bestlicense=; \
           for pkglicense in ${WRKSRC}/COPYING ${WRKSRC}/LICENSE; do \
               for license in ${PKGSRCDIR}/licenses/*; do \
                 if [ -f "$$pkglicense" ] && [ -f "$$license" ]; then \
                   size=`{ wdiff -3 "$$pkglicense" "$$license" || true; } | wc -c`; \
                   if [ "$$size" -lt "$$bestsize" ]; then \
                     printf "%8d   %s\n" "$$size" "$${license##*/}"; \
                     bestsize="$$size"; \
                     bestlicense="$$license"; \
                   fi \
                 fi \
               done; \
             if [ "$$bestlicense" ]; then \
               break; \
             fi \
           done; \
           \
           if [ "$$bestlicense" ]; then \
             if [ "$$bestsize" -lt 3000 ]; then \
               echo ""; \
               echo "Line differences in license texts:"; \
               echo ""; \
               diff -wu "$$pkglicense" "$$bestlicense" || true; \
               echo ""; \
               echo "Word differences in license texts:"; \
               echo ""; \
               wdiff -3 "$$pkglicense" "$$bestlicense" || true; \
             else \
               echo ""; \
               echo "No similar enough license found."; \
             fi \
           else \
             echo "No license file found in ${WRKSRC}."; \
           fi

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

CVSweb <webmaster@jp.NetBSD.org>