diff options
author | pho <pho@pkgsrc.org> | 2015-02-11 07:47:16 +0000 |
---|---|---|
committer | pho <pho@pkgsrc.org> | 2015-02-11 07:47:16 +0000 |
commit | 0087b099c259e981838524951c6a0d5daa3d881b (patch) | |
tree | 3a40da2a5d3f5bd2630be8b67183b6f027439e60 | |
parent | 431d164c43f4f3ab3bc98f9b3377a1874c16f280 (diff) | |
download | pkgsrc-0087b099c259e981838524951c6a0d5daa3d881b.tar.gz |
Preparing to upload some of bootkits to LOCAL_PORTS
Refactored bootstrap.mk with no semantic changes in this commit. I
will soon upload some of bootkits derived from wip/ghc to LOCAL_PORTS
but only for safe ones. Here's a note about safety:
* NetBSD/amd64, FreeBSD/i386, Darwin/ppc [SAFE]: These kits were built
on my secured private machines under my exclusive control. I'm
planning to upload them.
* Linux/amd64 [UNSAFE]: I built my kit for this one on a machine
shared with my co-workers with root access. I won't upload it.
* NetBSD/i386 [UNSAFE]: I built my kit for this one on an Amazon EC2
instance (although it's private). I won't upload it either.
For other developers, please do not upload any bootkits derived from
unsafe ones mentioned above, because they have some degree of
possibility of being compromised. And please keep in mind that
machines shared with someone or on a cloud hosting service should be
avoided for building bootkits.
-rw-r--r-- | lang/ghc7/Makefile | 18 | ||||
-rw-r--r-- | lang/ghc7/bootstrap.mk | 60 |
2 files changed, 42 insertions, 36 deletions
diff --git a/lang/ghc7/Makefile b/lang/ghc7/Makefile index 96169630e38..e5b6d028843 100644 --- a/lang/ghc7/Makefile +++ b/lang/ghc7/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2015/02/04 06:53:18 pho Exp $ +# $NetBSD: Makefile,v 1.15 2015/02/11 07:47:16 pho Exp $ # ----------------------------------------------------------------------------- # Package metadata # @@ -33,22 +33,6 @@ ONLY_FOR_PLATFORM= \ # Distfiles # DISTFILES= ${DEFAULT_DISTFILES} -#.if make(distinfo) -#DISTFILES+= ${PKGNAME_NOREV}-boot-i386-unknown-freebsd.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-i386-unknown-netbsd.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-powerpc-apple-darwin.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-linux.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-netbsd.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-i386-unknown-solaris2.tar.xz -#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-solaris2.tar.xz -#.else -#DISTFILES+= ${BOOT_ARCHIVE} -#.endif - -.for i in ${DISTFILES:M*-boot-*} -SITES.${i}?= ${MASTER_SITE_LOCAL} -.endfor - WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} # We don't want to extract all of the DISTFILEs. diff --git a/lang/ghc7/bootstrap.mk b/lang/ghc7/bootstrap.mk index e32e31e562b..920d43d9265 100644 --- a/lang/ghc7/bootstrap.mk +++ b/lang/ghc7/bootstrap.mk @@ -1,4 +1,4 @@ -# $NetBSD: bootstrap.mk,v 1.18 2015/02/07 20:08:30 joerg Exp $ +# $NetBSD: bootstrap.mk,v 1.19 2015/02/11 07:47:16 pho Exp $ # ----------------------------------------------------------------------------- # Select a bindist of bootstrapping compiler on a per-platform basis. # @@ -10,36 +10,60 @@ # Similar to BOOT_ARCHIVE, but "*.tar" not "*.tar.xz". # .include "../../mk/bsd.prefs.mk" -.if ${MACHINE_ARCH} == "i386" && ${OPSYS} == "FreeBSD" -BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-freebsd.tar.xz -.elif ${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD" -BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-netbsd.tar.xz +BOOT_ARCHIVE:= # empty + +.if !empty(MACHINE_PLATFORM:MDarwin-*-powerpc) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-powerpc-apple-darwin.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} -.elif ${MACHINE_ARCH} == "powerpc" && ${OPSYS} == "Darwin" -BOOT_ARCHIVE:= ${PKGNAME}-boot-powerpc-apple-darwin.tar.xz # Existence of libelf makes LeadingUnderscore being "NO", which is # incorrect for this platform. See ${WRKSRC}/aclocal.m4 # (FP_LEADING_UNDERSCORE) CONFLICTS+= libelf-[0-9]* +.endif -.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "Linux" -BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-linux.tar.xz +.if !empty(MACHINE_PLATFORM:MFreeBSD-*-i386) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME_NOREV}-boot-i386-unknown-freebsd.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif -.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "NetBSD" -BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-netbsd.tar.xz +.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-i386-unknown-netbsd.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif -.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-i386) -BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-solaris2.tar.xz +.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-x86_64-unknown-netbsd.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif -.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64) -BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-solaris2.tar.xz +.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-x86_64-unknown-linux.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif -.else -BOOT_ARCHIVE:= ${PKGNAME}-boot-unknown.tar.xz +.if !empty(MACHINE_PLATFORM:MSunOS-5.11-i386) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-i386-unknown-solaris2.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif + +.if !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64) || make(distinfo) +BOOT_ARCHIVE= ${PKGNAME}-boot-x86_64-unknown-solaris2.tar.xz +#DISTFILES+= ${BOOT_ARCHIVE} +.endif + +.if empty(BOOT_ARCHIVE) +BOOT_ARCHIVE= ${PKGNAME}-boot-unknown.tar.xz PKG_FAIL_REASON+= "internal error: unsupported platform" .endif +.for i in ${DISTFILES:M*-boot-*} +SITES.${i}?= ${MASTER_SITE_LOCAL} +.endfor + +BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//} + # FreeBSD < 10 surprisingly doesn't have a native iconv so we need to # use pkgsrc libiconv for this OPSYS. And if a bootkit depends on # pkgsrc libiconv, the "normal" build must do the same because GHC @@ -55,8 +79,6 @@ USE_BUILTIN.iconv= no BUILD_DEPENDS+= ncurses>=5.0:../../devel/ncurses .endif -BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//} - # ----------------------------------------------------------------------------- # The "pre-configure" hook |