pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ghc7 Preparing to upload some of bootkits to LOCA...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a8d6ccee718
branches:  trunk
changeset: 646552:0a8d6ccee718
user:      pho <pho%pkgsrc.org@localhost>
date:      Wed Feb 11 07:47:16 2015 +0000

description:
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.

diffstat:

 lang/ghc7/Makefile     |  18 +--------------
 lang/ghc7/bootstrap.mk |  60 ++++++++++++++++++++++++++++++++++---------------
 2 files changed, 42 insertions(+), 36 deletions(-)

diffs (127 lines):

diff -r 3ef1cb08d984 -r 0a8d6ccee718 lang/ghc7/Makefile
--- a/lang/ghc7/Makefile        Wed Feb 11 00:17:42 2015 +0000
+++ b/lang/ghc7/Makefile        Wed Feb 11 07:47:16 2015 +0000
@@ -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 @@
 # 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 -r 3ef1cb08d984 -r 0a8d6ccee718 lang/ghc7/bootstrap.mk
--- a/lang/ghc7/bootstrap.mk    Wed Feb 11 00:17:42 2015 +0000
+++ b/lang/ghc7/bootstrap.mk    Wed Feb 11 07:47:16 2015 +0000
@@ -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
+
+BOOT_ARCHIVE:= # empty
 
-.elif ${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD"
-BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-netbsd.tar.xz
+.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
+
+.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-i386)
-BOOT_ARCHIVE:=  ${PKGNAME}-boot-i386-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
 
-.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64)
-BOOT_ARCHIVE:=  ${PKGNAME}-boot-x86_64-unknown-solaris2.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
 
-.else
-BOOT_ARCHIVE:= ${PKGNAME}-boot-unknown.tar.xz
+.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 @@
 BUILD_DEPENDS+=        ncurses>=5.0:../../devel/ncurses
 .endif
 
-BOOT_TARBALL=  ${BOOT_ARCHIVE:C/\.xz$//}
-
 
 # -----------------------------------------------------------------------------
 # The "pre-configure" hook



Home | Main Index | Thread Index | Old Index