Annotation of src/share/mk/bsd.port.mk, revision 1.20

1.1       dillon      1: # $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $
1.20    ! joerg       2: # $DragonFly: src/share/mk/bsd.port.mk,v 1.19 2004/11/15 14:29:00 joerg Exp $
1.1       dillon      3: 
                      4: PORTSDIR?=     /usr/ports
1.4       dillon      5: DFPORTSDIR?=   /usr/dfports
1.3       dillon      6: PORTPATH!=     /usr/bin/relpath ${PORTSDIR} ${.CURDIR}
1.1       dillon      7: 
1.17      joerg       8: .if !defined(DFOSVERSION)
                      9: DFOSVERSION!=  /sbin/sysctl -n kern.osreldate
                     10: .endif
                     11: 
1.7       dillon     12: # Temporary Hack
                     13: #
                     14: OSVERSION ?= 480102
                     15: UNAME_s?= FreeBSD
                     16: UNAME_v?=FreeBSD 4.8-CURRENT
                     17: UNAME_r?=4.8-CURRENT
                     18: 
                     19: .makeenv UNAME_s
                     20: .makeenv UNAME_v
                     21: .makeenv UNAME_r
                     22: .makeenv OSVERSION
                     23: 
1.9       joerg      24: .if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile)
                     25: 
1.13      joerg      26: .if defined(USE_RC_SUBR)
                     27: .undef USE_RC_SUBR
                     28: RC_SUBR=       /etc/rc.subr
                     29: .endif
                     30: 
1.20    ! joerg      31: .if defined(USE_GCC)
        !            32: .  if ${USE_GCC} == 3.4
        !            33: .undef USE_GCC
        !            34: CCVER= gcc34
        !            35: .makeenv CCVER
        !            36: .  endif
        !            37: .endif
        !            38: 
1.5       dillon     39: # If the port does not exist in /usr/dfports/<portpath> use the original
                     40: # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
                     41: # any expected variables are set.
1.3       dillon     42: #
1.1       dillon     43: .include <bsd.own.mk>
                     44: .include "${PORTSDIR}/Mk/bsd.port.mk"
1.3       dillon     45: 
                     46: .else
                     47: 
1.5       dillon     48: .undef BEFOREPORTMK
                     49: .undef AFTERPORTMK
                     50: 
1.3       dillon     51: # Otherwise retarget to the DragonFly override port.
                     52: #
                     53: 
                     54: TARGETS+=      all
                     55: TARGETS+=      build
                     56: TARGETS+=      checksum
                     57: TARGETS+=      clean
                     58: TARGETS+=      clean-for-cdrom
                     59: TARGETS+=      clean-for-cdrom-list
                     60: TARGETS+=      clean-restricted
                     61: TARGETS+=      clean-restricted-list
                     62: TARGETS+=      configure
                     63: TARGETS+=      deinstall
                     64: TARGETS+=      depend
                     65: TARGETS+=      depends
                     66: TARGETS+=      describe
                     67: TARGETS+=      distclean
                     68: TARGETS+=      extract
                     69: TARGETS+=      fetch
                     70: TARGETS+=      fetch-list
                     71: TARGETS+=      ignorelist
                     72: TARGETS+=      makesum
                     73: TARGETS+=      maintainer
                     74: TARGETS+=      package
                     75: TARGETS+=      realinstall
                     76: TARGETS+=      reinstall
                     77: TARGETS+=      install
                     78: TARGETS+=      tags
                     79: 
1.6       dillon     80: .undef PORTSDIR
1.14      cpressey   81: .if !make(package-depends-list) && !make(all-depends-list) && \
1.19      joerg      82:     !make(run-depends-list) && !make(build-depends-list) && \
                     83:     !make(describe)
1.5       dillon     84: .BEGIN:
1.4       dillon     85:        @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
1.5       dillon     86:        cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS}
1.9       joerg      87: .endif
1.3       dillon     88: 
1.12      joerg      89: .if !empty(.TARGETS)
1.8       joerg      90: ${.TARGETS}:
1.12      joerg      91: .else
                     92: all:
                     93: .MAIN: all
                     94: .endif
1.8       joerg      95: 
1.11      joerg      96: # Hack to get Makefiles with conditional statements working
                     97: XFREE86_VERSION?=      4
                     98: ARCH?=                 i386
                     99: MACHINE_ARCH?=         i386
                    100: HAVE_GNOME?=
1.16      joerg     101: FILESDIR?=             ${.CURDIR}/files
1.18      dillon    102: X_WINDOW_SYSTEM?=      xfree86-4
1.19      joerg     103: CAT?=                  cat
                    104: PREFIX?=               /usr
                    105: PERL_LEVEL?=           5
1.11      joerg     106: 
1.15      hmp       107: # WORKAROUND to get portupgrade working
                    108: # Taken from: ${PORTSDIR}/Mk/bsd.port.mk
                    109: .if !defined(PKGNAME)
                    110: PKGNAME=       ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
                    111: .endif
                    112:  
1.3       dillon    113: .endif
                    114: