[BACK]Return to bsd.port.mk CVS log [TXT][DIR] Up to [local] / src / share / mk

Diff for /src/share/mk/bsd.port.mk between version 1.74 and 1.75

version 1.74, 1999/03/03 04:16:03 version 1.75, 1999/03/03 18:18:46
Line 96 
Line 96 
 #                                 ${WRKDIR} (see below).  This is useful for building ports on  #                                 ${WRKDIR} (see below).  This is useful for building ports on
 #                                 several architectures, then ${PORTSDIR} can be NFS-mounted  #                                 several architectures, then ${PORTSDIR} can be NFS-mounted
 #                                 while ${WRKOBJDIR} is local to every arch  #                                 while ${WRKOBJDIR} is local to every arch
   # PREFERRED_CIPHERS
   #                               - a list of the form cipher.sig of programs to use to check
   #                                 recorded checksums, in order of decreasing trust.
   #                                 (default to using sha1, then rmd160, then md5).
 #  #
 #  
 # Variables that typically apply to an individual port.  Non-Boolean  # Variables that typically apply to an individual port.  Non-Boolean
 # variables without defaults are *mandatory*.  # variables without defaults are *mandatory*.
 #  #
Line 348 
Line 351 
 # checkpatch    - Do a "patch -C" instead of a "patch".  Note that it may  # checkpatch    - Do a "patch -C" instead of a "patch".  Note that it may
 #                                 give incorrect results if multiple patches deal with  #                                 give incorrect results if multiple patches deal with
 #                                 the same file.  #                                 the same file.
 # checksum              - Use files/md5 to ensure that your distfiles are valid.  # checksum              - Use ${CHECKSUM_FILE} to ensure that your distfiles are valid.
 # makesum               - Generate files/md5 (only do this for your own ports!).  # makesum               - Generate ${CHECKSUM_FILE} (only do this for your own ports!).
 # addsum                - update files/md5 in a non-destructive way (own ports only!)  # addsum                - update ${CHECKSUM_FILE} in a non-destructive way
   #                                 (your own ports only!)
 # readme                - Create a README.html file describing the category or package  # readme                - Create a README.html file describing the category or package
 # mirror-distfiles      - Mirror the distfile(s) if they are freely redistributable  # mirror-distfiles      - Mirror the distfile(s) if they are freely redistributable
 #                                 Setting MIRROR_DISTFILE to "no" in the package Makefile  #                                 Setting MIRROR_DISTFILE to "no" in the package Makefile
Line 512 
Line 516 
 EGXX?=                  eg++  EGXX?=                  eg++
 XMKMF?=                 xmkmf -a  XMKMF?=                 xmkmf -a
   
 # be paranoid about which md5 we trust  # be paranoid about which ciphers we trust
 .if exists(/sbin/md5)  .if exists(/sbin/md5)
 MD5?=                   /sbin/md5  MD5?=                   /sbin/md5
 .elif exists(/bin/md5)  .elif exists(/bin/md5)
Line 522 
Line 526 
 .else  .else
 MD5?=                   md5  MD5?=                   md5
 .endif  .endif
   
   .if exists(/sbin/sha1)
   SHA1?=                  /sbin/sha1
   .elif exists(/bin/sha1)
   SHA1?=                  /bin/sha1
   .elif exists(/usr/bin/sha1)
   SHA1?=                  /usr/bin/sha1
   .else
   SHA1?=                  sha1
   .endif
   
   .if exists(/sbin/rmd160)
   RMD160?=                /sbin/rmd160
   .elif exists(/bin/rmd160)
   RMD160?=                /bin/rmd160
   .elif exists(/usr/bin/rmd160)
   RMD160?=                /usr/bin/rmd160
   .else
   RMD160?=                rmd160
   .endif
   
   # Compatibility game
 MD5_FILE?=              ${FILESDIR}/md5  MD5_FILE?=              ${FILESDIR}/md5
   CHECKSUM_FILE?= ${MD5_FILE}
   
   # Don't touch !!! Used for generating checksums.
   CIPHERS=                ${SHA1}.SHA1 ${RMD160}.RMD160 ${MD5}.MD5
   
   # This is the one you can override
   PREFERRED_CIPHERS?= ${CIPHERS}
   
 PORTPATH?= /usr/bin:/bin:/usr/sbin:/sbin:${LOCALBASE}/bin:${X11BASE}/bin  PORTPATH?= /usr/bin:/bin:/usr/sbin:/sbin:${LOCALBASE}/bin:${X11BASE}/bin
   
 MAKE_FLAGS?=    -f  MAKE_FLAGS?=    -f
Line 1716 
Line 1749 
 .if !target(makesum)  .if !target(makesum)
 makesum: fetch  makesum: fetch
         @${MKDIR} ${FILESDIR}          @${MKDIR} ${FILESDIR}
         @if [ -f ${MD5_FILE} ]; then ${RM} -f ${MD5_FILE}; fi          @if [ -f ${CHECKSUM_FILE} ]; then ${RM} -f ${CHECKSUM_FILE}; fi
         @(cd ${DISTDIR}; \          @(cd ${DISTDIR}; \
          for file in ${_CKSUMFILES}; do \           for file in ${_CKSUMFILES}; do \
                 ${MD5} $$file >> ${MD5_FILE}; \                  for cipher in ${CIPHERS:R}; do \
                           $$cipher $$file >> ${CHECKSUM_FILE}; \
                   done; \
          done)           done)
         @for file in ${_IGNOREFILES}; do \          @for file in ${_IGNOREFILES}; do \
                 ${ECHO} "MD5 ($$file) = IGNORE" >> ${MD5_FILE}; \                  ${ECHO} "MD5 ($$file) = IGNORE" >> ${CHECKSUM_FILE}; \
         done          done
 .endif  .endif
   
 .if !target(addsum)  .if !target(addsum)
 addsum: fetch  addsum: fetch
         @${MKDIR} ${FILESDIR}          @${MKDIR} ${FILESDIR}
         @touch ${MD5_FILE}          @touch ${CHECKSUM_FILE}
         @(cd ${DISTDIR}; \          @(cd ${DISTDIR}; \
          for file in ${_CKSUMFILES}; do \           for file in ${_CKSUMFILES}; do \
                 ${MD5} $$file >> ${MD5_FILE}; \                  for cipher in ${CIPHERS:R}; do \
                           $$cipher $$file >> ${CHECKSUM_FILE}; \
                   done; \
          done)           done)
         @for file in ${_IGNOREFILES}; do \          @for file in ${_IGNOREFILES}; do \
                 ${ECHO} "MD5 ($$file) = IGNORE" >> ${MD5_FILE}; \                  ${ECHO} "MD5 ($$file) = IGNORE" >> ${CHECKSUM_FILE}; \
         done          done
         @sort -u ${MD5_FILE} >${MD5_FILE}.new          @sort -u ${CHECKSUM_FILE} >${CHECKSUM_FILE}.new
         @${MV} -f ${MD5_FILE}.new ${MD5_FILE}          @${MV} -f ${CHECKSUM_FILE}.new ${CHECKSUM_FILE}
         @if [ `${SED} -e 's/\=.*$$//' ${MD5_FILE} | uniq -d | wc -l` -ne 0 ]; then \          @if [ `${SED} -e 's/\=.*$$//' ${CHECKSUM_FILE} | uniq -d | wc -l` -ne 0 ]; then \
                 ${ECHO} "Inconsistent checksum in ${MD5_FILE}"; \                  ${ECHO} "Inconsistent checksum in ${CHECKSUM_FILE}"; \
         else \          else \
                 ${ECHO} "${MD5_FILE} updated okay, don't forget to remove cruft"; \                  ${ECHO} "${CHECKSUM_FILE} updated okay, don't forget to remove cruft"; \
         fi          fi
 .endif  .endif
   
 .if !target(checksum)  .if !target(checksum)
 checksum: fetch  checksum: fetch
         @if [ ! -f ${MD5_FILE} ]; then \          @if [ ! -f ${CHECKSUM_FILE} ]; then \
                 ${ECHO_MSG} ">> No MD5 checksum file."; \                  ${ECHO_MSG} ">> No checksum file."; \
         else \          else \
                 (cd ${DISTDIR}; OK="true"; \                  (cd ${DISTDIR}; OK="true"; \
                   for file in ${_CKSUMFILES}; do \                    for file in ${_CKSUMFILES}; do \
                         CKSUM=`${MD5} < $$file`; \                          for cipher_sig in ${PREFERRED_CIPHERS}; do \
                         CKSUM2=`${GREP} "^MD5 ($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \                                  sig=`${EXPR} $$cipher_sig : '.*\.\(.*\)'`; \
                                   CKSUM2=`${GREP} "^$$sig ($$file)" ${CHECKSUM_FILE} | ${AWK} '{print $$4}'`; \
                                   if [ "$$CKSUM2" = "" ]; then \
                                           ${ECHO_MSG} ">> No $$sig checksum recorded for $$file."; \
                                   else \
                                           cipher=`${EXPR} $$cipher_sig : '\(.*\)\.'`; \
                                           break; \
                                   fi; \
                           done; \
                         if [ "$$CKSUM2" = "" ]; then \                          if [ "$$CKSUM2" = "" ]; then \
                                 ${ECHO_MSG} ">> No checksum recorded for $$file."; \                                  ${ECHO_MSG} ">> No checksum recorded for $$file."; \
                                 OK="false"; \                                  OK="false"; \
Line 1762 
Line 1807 
                                 ${ECHO_MSG} ">> Checksum for $$file is set to IGNORE in md5 file even though"; \                                  ${ECHO_MSG} ">> Checksum for $$file is set to IGNORE in md5 file even though"; \
                                 ${ECHO_MSG} "   the file is not in the "'$$'"{IGNOREFILES} list."; \                                  ${ECHO_MSG} "   the file is not in the "'$$'"{IGNOREFILES} list."; \
                                 OK="false"; \                                  OK="false"; \
                         elif [ "$$CKSUM" = "$$CKSUM2" ]; then \  
                                 ${ECHO_MSG} ">> Checksum OK for $$file."; \  
                         else \                          else \
                                 ${ECHO_MSG} ">> Checksum mismatch for $$file."; \                                  CKSUM=`$$cipher < $$file`; \
                                 OK="false"; \                                  if [ "$$CKSUM" = "$$CKSUM2" ]; then \
                                           ${ECHO_MSG} ">> Checksum OK for $$file. ($$sig)"; \
                                   else \
                                           ${ECHO_MSG} ">> Checksum mismatch for $$file. ($$sig)"; \
                                           OK="false"; \
                                   fi; \
                         fi; \                          fi; \
                   done; \                    done; \
                   for file in ${_IGNOREFILES}; do \                    for file in ${_IGNOREFILES}; do \
                         CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \                          CKSUM2=`${GREP} "($$file)" ${CHECKSUM_FILE} | ${AWK} '{print $$4}'`; \
                         if [ "$$CKSUM2" = "" ]; then \                          if [ "$$CKSUM2" = "" ]; then \
                                 ${ECHO_MSG} ">> No checksum recorded for $$file, file is in "'$$'"{IGNOREFILES} list."; \                                  ${ECHO_MSG} ">> No checksum recorded for $$file, file is in "'$$'"{IGNOREFILES} list."; \
                                 OK="false"; \                                  OK="false"; \
Line 1781 
Line 1829 
                         fi; \                          fi; \
                   done; \                    done; \
                   if [ "$$OK" != "true" ]; then \                    if [ "$$OK" != "true" ]; then \
                         ${ECHO_MSG} "Make sure the Makefile and md5 file (${MD5_FILE})"; \                          ${ECHO_MSG} "Make sure the Makefile and checksum file (${CHECKSUM_FILE})"; \
                         ${ECHO_MSG} "are up to date.  If you want to override this check, type"; \                          ${ECHO_MSG} "are up to date.  If you want to override this check, type"; \
                         ${ECHO_MSG} "\"make NO_CHECKSUM=yes [other args]\"."; \                          ${ECHO_MSG} "\"make NO_CHECKSUM=yes [other args]\"."; \
                         exit 1; \                          exit 1; \

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75