View | Details | Raw Unified | Return to bug 200483 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/bsd.port.mk (-8 / +2 lines)
Lines 1316-1329 Link Here
1316
PKGVERSION=	${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
1316
PKGVERSION=	${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
1317
PKGNAME=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
1317
PKGNAME=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
1318
DISTVERSIONFULL=	${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
1318
DISTVERSIONFULL=	${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
1319
.if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC)
1319
.if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC) && empty(DISTNAME)
1320
# Only add in DISTVERSIONFULL if GH_TAGNAME if set by port. Otherwise
1320
_GITHUB_MUST_SET_DISTNAME=		yes
1321
# GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice.
1322
.  if defined(GH_TAGNAME)
1323
DISTNAME?=	${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED}
1324
.  else
1325
DISTNAME?=	${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED}
1326
.  endif
1327
.else
1321
.else
1328
DISTNAME?=	${PORTNAME}-${DISTVERSIONFULL}
1322
DISTNAME?=	${PORTNAME}-${DISTVERSIONFULL}
1329
.endif
1323
.endif
(-)Mk/bsd.sites.mk (-9 / +101 lines)
Lines 523-532 Link Here
523
.  if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC}
523
.  if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC}
524
MASTER_SITES+=	GH
524
MASTER_SITES+=	GH
525
.  endif
525
.  endif
526
GH_ACCOUNT?=	${PORTNAME}
526
_GH_ACCOUNT_DEFAULT=	${PORTNAME}
527
GH_PROJECT?=	${PORTNAME}
527
GH_ACCOUNT?=	${_GH_ACCOUNT_DEFAULT}
528
_GH_PROJECT_DEFAULT=	${PORTNAME}
529
GH_PROJECT?=	${_GH_PROJECT_DEFAULT}
528
# Use full PREFIX/SUFFIX and converted DISTVERSION
530
# Use full PREFIX/SUFFIX and converted DISTVERSION
529
GH_TAGNAME?=	${DISTVERSIONFULL}
531
_GH_TAGNAME_DEFAULT=	${DISTVERSIONFULL}
532
GH_TAGNAME?=	${_GH_TAGNAME_DEFAULT}
533
_GITHUB_GROUPS= DEFAULT
534
.for _A in ${GH_ACCOUNT}
535
_S_TEMP=	${_A:S/^${_A:C@:[^/:]+$@@}//:S/^://}
536
.  if !empty(_S_TEMP)
537
.    for _group in ${_S_TEMP:S/,/ /g}
538
.      if ${_group} == all || ${_group} == ALL || ${_group} == default
539
check-makevars::
540
		@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
541
		@${ECHO_MSG} "used in group definitions. Please fix your GH_ACCOUNT"
542
		@${FALSE}
543
.      endif
544
.      if !${_GITHUB_GROUPS:M${_group}}
545
_GITHUB_GROUPS+=	${_group}
546
.       endif
547
_GH_ACCOUNT_${_group}=	${_A:C@^(.*):[^/:]+$@\1@}
548
.    endfor
549
.  else
550
_GH_ACCOUNT_DEFAULT=	${_A:C@^(.*):[^/:]+$@\1@}
551
.  endif
552
.endfor
553
.for _P in ${GH_PROJECT}
554
_S_TEMP=	${_P:S/^${_P:C@:[^/:]+$@@}//:S/^://}
555
.  if !empty(_S_TEMP)
556
.    for _group in ${_S_TEMP:S/,/ /g}
557
.      if ${_group} == all || ${_group} == ALL || ${_group} == default
558
check-makevars::
559
		@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
560
		@${ECHO_MSG} "used in group definitions. Please fix your GH_PROJECT"
561
		@${FALSE}
562
.      endif
563
.      if !${_GITHUB_GROUPS:M${_group}}
564
_GITHUB_GROUPS+=	${_group}
565
.       endif
566
_GH_PROJECT_${_group}=	${_P:C@^(.*):[^/:]+$@\1@}
567
.    endfor
568
.  else
569
_GH_PROJECT_DEFAULT=	${_P:C@^(.*):[^/:]+$@\1@}
570
.  endif
571
.endfor
572
.for _T in ${GH_TAGNAME}
573
_S_TEMP=	${_T:S/^${_T:C@:[^/:]+$@@}//:S/^://}
574
.  if !empty(_S_TEMP)
575
.    for _group in ${_S_TEMP:S/,/ /g}
576
.      if ${_group} == all || ${_group} == ALL || ${_group} == default
577
check-makevars::
578
		@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
579
		@${ECHO_MSG} "used in group definitions. Please fix your GH_TAGNAME"
580
		@${FALSE}
581
.      endif
582
.      if !${_GITHUB_GROUPS:M${_group}}
583
_GITHUB_GROUPS+=	${_group}
584
.       endif
585
_GH_TAGNAME_${_group}=	${_T:C@^(.*):[^/:]+$@\1@}
586
.    endfor
587
.  else
588
_GH_TAGNAME_DEFAULT=	${_T:C@^(.*):[^/:]+$@\1@}
589
.  endif
590
.endfor
591
GH_ACCOUNT:=	${_GH_ACCOUNT_DEFAULT}
592
GH_PROJECT:=	${_GH_PROJECT_DEFAULT}
593
GH_TAGNAME:=	${_GH_TAGNAME_DEFAULT}
594
.  if defined(GH_TAGNAME)
595
GH_TAGNAME_SANITIZED=	${GH_TAGNAME:S,/,-,}
596
# Github silently converts tags starting with v to not have v in the filename
597
# and extraction directory.
598
GH_TAGNAME_EXTRACT=	${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/}
599
.  endif 
600
.  if defined(_GITHUB_MUST_SET_DISTNAME)
601
# GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice
602
.    if ${GH_TAGNAME} != ${DISTVERSIONFULL}
603
DISTNAME=	${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED}
604
.    else
605
DISTNAME=	${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED}
606
.    endif
607
.  endif
530
# This new scheme rerolls distfiles. Also ensure they are renamed to avoid
608
# This new scheme rerolls distfiles. Also ensure they are renamed to avoid
531
# conflicts. Use _GITHUB_REV in case github changes their zipping or structure
609
# conflicts. Use _GITHUB_REV in case github changes their zipping or structure
532
# which has happened before.
610
# which has happened before.
Lines 534-547 Link Here
534
.  if ${MASTER_SITES:MGH}
612
.  if ${MASTER_SITES:MGH}
535
DISTNAME:=	${DISTNAME}_GH${_GITHUB_REV}
613
DISTNAME:=	${DISTNAME}_GH${_GITHUB_REV}
536
.  endif
614
.  endif
537
.  if defined(GH_TAGNAME)
538
GH_TAGNAME_SANITIZED=	${GH_TAGNAME:S,/,-,}
539
# Github silently converts tags starting with v to not have v in the filename
540
# and extraction directory.
541
GH_TAGNAME_EXTRACT=	${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/}
542
.  endif
543
.endif
615
.endif
616
_GITHUB_EXTRACT_SUFX=	.tar.gz
617
# If there are non default groups
618
.if !empty(_GITHUB_GROUPS:NDEFAULT)
619
# Put the DEFAULT distfile first
620
DISTFILES+=	${DISTNAME}${_GITHUB_EXTRACT_SUFX}
621
# Then for each group, add DISTFILES and MASTER_SITES entries
622
# and create a WRKSRC_group helper variable.
623
.  for _group in ${_GITHUB_GROUPS:NDEFAULT}
624
_a_tmp=	${_GH_ACCOUNT_${_group}:U${_GH_ACCOUNT_DEFAULT}}
625
_p_tmp=	${_GH_PROJECT_${_group}:U${_GH_PROJECT_DEFAULT}}
626
_t_tmp=	${_GH_TAGNAME_${_group}:U${_GH_TAGNAME_DEFAULT}}
627
_t_tmp_s=	${_t_tmp:S,/,-,}
628
_t_tmp_e=	${_t_tmp_s:C/^[vV]([0-9])/\1/}
629
DISTNAME_${_group}:=	${_a_tmp}-${_p_tmp}-${_t_tmp_s}
630
DISTFILE_${_group}:=	${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX}
631
DISTFILES:=	${DISTFILES} ${DISTFILE_${_group}}:${_group}
632
MASTER_SITES:=	${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${_a_tmp}/${_p_tmp}/tar.gz/${_t_tmp}?dummy=/:${_group}@}
633
WRKSRC_${_group}:=	${WRKDIR}/${_p_tmp}-${_t_tmp_e}
634
.  endfor
544
.endif
635
.endif
636
.endif
545
637
546
.if !defined(IGNORE_MASTER_SITE_GNOME)
638
.if !defined(IGNORE_MASTER_SITE_GNOME)
547
MASTER_SITE_GNOME+= \
639
MASTER_SITE_GNOME+= \

Return to bug 200483