Skip to content

Commit

Permalink
Infrastructure: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Mar 20, 2015
1 parent 674260c commit c3874a8
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 60 deletions.
25 changes: 25 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ in the release notes and/or placed into UPDATING.

All ports committers are allowed to commit to this file.

20150319:
AUTHOR: [email protected]

MASTER_SITE GHR (GITHUB_RELEASE) has been removed. The same functionality
can be achieved with just USE_GITHUB/GH_ACCOUNT/GH_PROJECT. GH_TAGNAME
defaults to DISTVERSION. If the tag needs to be adjusted then change
GH_TAGNAME. No GH_COMMIT is needed.

20150319:
AUTHOR: [email protected]

USE_GITHUB has been updated to make GH_COMMIT optional. Using this new
scheme allows only setting the _tag_ or _commit hash_ in GH_TAGNAME and
not having to know the hash for a tag. This scheme will download a tarball
that has a different checksum than before due to a changed directory name
for extraction.

GH_TAGNAME can now be any length of the hash as long as it is unique. There
is no longer a 7-character requirement.

The following MASTER_SITES are provided to retain the old checksum and
directory structure (that require GH_COMMIT):
GH -> GHL
GITHUB -> GITHUB_LEGACY

20150305:
AUTHOR: [email protected]

Expand Down
1 change: 1 addition & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -7441,3 +7441,4 @@ devel/p5-Errno||2015-03-09|Errno is part of Perl
devel/p5-Class-XSAccessor-Array||2015-03-09|Has been a part of devel/p5-Class-XSAccessor for >5 years. Use that port instead
multimedia/ffmpeg25|multimedia/ffmpeg26|2015-03-14|ffmpeg upstream now points to 2.6.x series
www/squid33|www/squid|2015-03-15|Has expired: Reached EOL on 28 August 2014, use www/squid (v3.4) instead
x11-fonts/font-alias||2015-03-20|Not needed anymore aliases are created dynamically
1 change: 0 additions & 1 deletion Mk/Uses/display.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ display_ARGS= install
.if !defined(DISPLAY)
BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver \
${LOCALBASE}/lib/X11/fonts/misc/8x13O.pcf.gz:${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps \
${LOCALBASE}/lib/X11/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/font-alias \
${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \
xkbcomp:${PORTSDIR}/x11/xkbcomp

Expand Down
22 changes: 22 additions & 0 deletions Mk/Uses/fonts.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# $FreeBSD$
#
# handle fonts
# Feature: fonts
# Usage: USES=fonts

.if !defined(_INCLUDE_USES_FONTS_MK)
.if !empty(fonts_ARGS)
IGNORE= USES=fonts - expecting no arguments
.endif

RUN_DEPENDS+= fc-cache:${PORTSDIR}/x11-fonts/fontconfig \
mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale

FONTNAME?= ${PORTNAME}
FONTSDIR?= ${PREFIX}/lib/X11/fonts/${FONTNAME}
PLIST_FILES+= "@fcfontsdir ${FONTSDIR}"
SUB_LIST+= FONTSDIR="${FONTSDIR}"
PLIST_SUB+= FONTSDIR="${FONTSDIR}"
.endif

7 changes: 6 additions & 1 deletion Mk/bsd.port.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,8 @@ _SUF2= ,${PORTEPOCH}

PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL}

INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}

Expand Down Expand Up @@ -1550,7 +1551,11 @@ _POSTMKINCLUDED= yes

WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB)
. if defined(GH_COMMIT)
WRKSRC?= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
. else
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME}
. endif
.endif
.if defined(NO_WRKSUBDIR)
WRKSRC?= ${WRKDIR}
Expand Down
6 changes: 5 additions & 1 deletion Mk/bsd.sanity.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ DEV_ERROR+= "USE_GNOME=pkgconfig is unsupported, please use USES=pkgconfig"
DEV_ERROR+= "USE_ZOPE=yes is unsupported, please use USES=zope instead"
.endif

.if defined(USE_GITHUB) && defined(GH_COMMIT)
DEV_WARNING+= "GH_COMMIT is deprecated, please convert GHL-\>GH in MASTER_SITES and set GH_TAGNAME to tag or commit hash and remove GH_COMMIT"
.endif

.if defined(USE_GNOME) && ${USE_GNOME:Mgnomehack}
DEV_WARNING+= "USE_GNOME=gnomehack is deprecated, please use USES=pathfix"
.endif
Expand All @@ -73,7 +77,7 @@ DEV_WARNING+= "USE_GNOME=desktopfileutils is deprecated, please use USES=desktop
.endif

.if defined(LIB_DEPENDS) && ${LIB_DEPENDS:Nlib*}
DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. (libfoo.so vs foo.so)"
DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. \(libfoo.so vs foo.so\)"
.endif

.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TCL_RUN) || defined(USE_TCL_WRAPPER) || \
Expand Down
53 changes: 38 additions & 15 deletions Mk/bsd.sites.mk
Original file line number Diff line number Diff line change
Expand Up @@ -512,37 +512,60 @@ MASTER_SITE_GENTOO+= \
# variables:
#
# GH_ACCOUNT - account name of the GitHub user hosting the project
# default: not set, mandatory
# default: ${PORTNAME}
#
# GH_PROJECT - name of the project on GitHub
# default: ${PORTNAME}
#
# GH_TAGNAME - name of the tag to download (2.0.1, hash, ...)
# Using the name of a branch here is incorrect. It is
# possible to do GH_TAGNAME=${GH_COMMIT} to do a snapshot
# possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
# default: ${DISTVERSION}
#
# GH_COMMIT - first 7 digits of the commit that generated GH_TAGNAME
# (man git-describe(1))
# default: not set, mandatory
# if this is not set, archive corresponding to tag is fetched
# default: not set
# This is a deprecated option. Just set the hash in GH_TAGNAME
# instead.
#
.if defined(USE_GITHUB)
.if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
IGNORE?= Using master as GH_TAGNAME is invalid. \
Must use a tag or commit hash so the upstream does \
not "reroll" as soon as the branch is updated
.endif
MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR% \
http://codeload.github.com/%SUBDIR%
. endif
# We are cheating and using backend URLS for Github here. See ports/194898
# comment #15 for explanation as to why and how to deal with it if it breaks.
MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR%
MASTER_SITE_GITHUB_CLOUD+= http://cloud.github.com/downloads/%SUBDIR%
MASTER_SITE_GITHUB_RELEASE+= https://github.com/%SUBDIR%

.if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${MASTER_SITES:MGHR}
MASTER_SITES+= GH GHC GHR
.endif
MASTER_SITE_GITHUB_LEGACY+= https://codeload.github.com/%SUBDIR%

. if defined(GH_COMMIT)
. if !defined(MASTER_SITES) || !${MASTER_SITES:MGHL}
MASTER_SITES+= GHL
. endif
. else
. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC}
MASTER_SITES+= GH
. endif
# This new scheme rerolls distfiles. Also ensure they are renamed to avoid
# conflicts. Use _GITHUB_REV in case github changes their zipping or structure
# which has happened before.
_GITHUB_REV= 0
. if ${MASTER_SITES:MGH}
DISTNAME:= ${DISTNAME}_GH${_GITHUB_REV}
. endif
. endif
GH_ACCOUNT?= ${PORTNAME}
GH_PROJECT?= ${PORTNAME}
. if defined(GH_COMMIT)
# Use the old style for safety for now.
GH_TAGNAME?= ${DISTVERSION}
. else
# Use full PREFIX/SUFFIX and converted DISTVERSION
GH_TAGNAME?= ${DISTVERSIONFULL}
. endif
.endif
.endif

Expand Down Expand Up @@ -1486,7 +1509,7 @@ MASTER_SITE_KERNEL_ORG+= \
MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \
GH:GITHUB \
GHC:GITHUB_CLOUD \
GHR:GITHUB_RELEASE \
GHL:GITHUB_LEGACY \
LODEV:LIBREOFFICE_DEV \
NL:NETLIB \
SF:SOURCEFORGE \
Expand All @@ -1499,9 +1522,9 @@ MASTER_SITES_SUBDIRS= APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \
CSME:myports \
DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \
GCC:releases/${DISTNAME} \
GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/ \
GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/ \
GITHUB_CLOUD:${GH_ACCOUNT}/${GH_PROJECT}/ \
GITHUB_RELEASE:${GH_ACCOUNT}/${GH_PROJECT}/archive/${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}?dummy=/ \
GITHUB_LEGACY:${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/ \
GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
GIMP:${PORTNAME}/${PORTVERSION:R}/ \
GNU:${PORTNAME} \
Expand Down
46 changes: 4 additions & 42 deletions Mk/bsd.xorg.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,50 +69,12 @@ USES+= libtool
. endif

. if ${XORG_CAT} == "font"
FONTDIR?= ${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/}
FONTNAME?= ${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/}
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/lib/X11/fonts
CONFIGURE_ENV+= FONTROOTDIR=${PREFIX}/lib/X11/fonts
NEED_MKFONTFOO= yes

. if ${PORTNAME:M*type1*}x != x
INSTALLS_TTF?= yes
. elif ${PORTNAME:M*ttf*}x != x
INSTALLS_TTF?= yes
. elif ${PORTNAME:M*encodings*}x != x
# This is terrific, we want mkfontscale at build time, but don't use it like for the other ports.
NEED_MKFONTFOO= no
BUILD_DEPENDS+= ${LOCALBASE}/bin/mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
INSTALLS_TTF?= no
. else
INSTALLS_TTF?= no
. endif

. if ${PORTNAME:M*font-util*}x != x
USES+= pathfix
NEED_MKFONTFOO= no
. elif ${INSTALLS_TTF} == "yes"
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:${PORTSDIR}/x11-fonts/fontconfig
RUN_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:${PORTSDIR}/x11-fonts/fontconfig
. else
BUILD_DEPENDS+= ${LOCALBASE}/bin/bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
. endif

. if ${NEED_MKFONTFOO} == "yes"
BUILD_DEPENDS+= ${LOCALBASE}/bin/mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
${LOCALBASE}/bin/mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
RUN_DEPENDS+= ${LOCALBASE}/bin/mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
${LOCALBASE}/bin/mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
. endif

. for _fontdir in ${FONTDIR}
. if ${INSTALLS_TTF} == yes && ${NEED_MKFONTFOO} == yes
PLIST_FILES+= "@fcfontsdir ${PREFIX}/lib/X11/fonts/${_fontdir}"
. elif ${INSTALLS_TTF} == yes && ${NEED_MKFONTFOO} == no
PLIST_FILES+= "@fc ${PREFIX}/lib/X11/fonts/${_fontdir}"
. elif ${NEED_MKFONTFOO} == yes
PLIST_FILES+= "@fontsdir ${PREFIX}/lib/X11/fonts/${_fontdir}"
. endif
. endfor
USES+= fonts
BUILD_DEPENDS+= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
.endif

. if ${XORG_CAT} == "lib"
Expand Down

0 comments on commit c3874a8

Please sign in to comment.