pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Mon Apr  4 11:23:18 UTC 2022

Modified Files:
        pkgsrc/doc: HOWTO-use-crosscompile
        pkgsrc/mk: bsd.prefs.mk

Log Message:
mk: For cross-builds, use work.$ARCH and packages.$ARCH by default.

Otherwise it is mandatory to set these in mk.conf anyway, so let's
save the trouble.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/doc/HOWTO-use-crosscompile
cvs rdiff -u -r1.417 -r1.418 pkgsrc/mk/bsd.prefs.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/doc/HOWTO-use-crosscompile
diff -u pkgsrc/doc/HOWTO-use-crosscompile:1.9 pkgsrc/doc/HOWTO-use-crosscompile:1.10
--- pkgsrc/doc/HOWTO-use-crosscompile:1.9       Mon Apr  4 11:23:06 2022
+++ pkgsrc/doc/HOWTO-use-crosscompile   Mon Apr  4 11:23:18 2022
@@ -1,7 +1,7 @@
 Cross-compilation in pkgsrc (user's guide)              -*- outline -*-
 Taylor R. Campbell <riastradh%NetBSD.org@localhost>
 
-$NetBSD: HOWTO-use-crosscompile,v 1.9 2022/04/04 11:23:06 riastradh Exp $
+$NetBSD: HOWTO-use-crosscompile,v 1.10 2022/04/04 11:23:18 riastradh Exp $
 
 The following steps enable you to build binary packages for a machine
 architecture other than the one you are building on.  For example, you
@@ -53,20 +53,12 @@ In addition to whatever else you want in
    TOOLDIR=             /usr/obj/tooldir.NetBSD-6.1-amd64
    CROSS_DESTDIR=       /usr/obj/destdir.evbppc
 
-   .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
    # Specify the machine architecture of target packages.
    #
    # XXX This currently can't be set on the command line, which is a
    # bug.
+   .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
    MACHINE_ARCH=        powerpc
-
-   # Put target work and packages in separate directories.  (You might
-   # use OBJMACHINE=yes or WRKOBJDIR=/tmp/work.${MACHINE_ARCH} instead
-   # for the work directories.)
-   #
-   # XXX Should not need this.
-   PACKAGES=            ${PKGSRCDIR}/packages.${MACHINE_ARCH}
-   WRKDIR_BASENAME=     work.${MACHINE_ARCH}
    .endif
 
 You can bootstrap pkgsrc or not; it shouldn't make a difference for

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.417 pkgsrc/mk/bsd.prefs.mk:1.418
--- pkgsrc/mk/bsd.prefs.mk:1.417        Mon Apr  4 11:23:06 2022
+++ pkgsrc/mk/bsd.prefs.mk      Mon Apr  4 11:23:18 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.417 2022/04/04 11:23:06 riastradh Exp $
+# $NetBSD: bsd.prefs.mk,v 1.418 2022/04/04 11:23:18 riastradh Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -717,8 +717,12 @@ MAKEFLAGS+=                _PKGSRCDIR=${_PKGSRCDIR:Q}
 .endif
 PKGSRCDIR=             ${_PKGSRCDIR}
 
+.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+_CROSSDIR_SUFFIX=      .${MACHINE_ARCH}
+.endif
+
 DISTDIR?=              ${PKGSRCDIR}/distfiles
-PACKAGES?=             ${PKGSRCDIR}/packages
+PACKAGES?=             ${PKGSRCDIR}/packages${_CROSSDIR_SUFFIX}
 TEMPLATES?=            ${PKGSRCDIR}/templates
 
 PATCHDIR?=             ${.CURDIR}/patches
@@ -743,13 +747,13 @@ BUILD_DIR!=               cd ${.CURDIR} && ${PWD_CMD}
 _HOSTNAME!=            ${UNAME} -n
 MAKEFLAGS+=            _HOSTNAME=${_HOSTNAME:Q}
 .  endif
-WRKDIR_BASENAME?=      work.${_HOSTNAME:C|\..*||}
+WRKDIR_BASENAME?=      work${_CROSSDIR_SUFFIX}.${_HOSTNAME:C|\..*||}
 MAKEFLAGS+=            OBJHOSTNAME=${OBJHOSTNAME:Q}
 .elif defined(OBJMACHINE)
 WRKDIR_BASENAME?=      work.${MACHINE_ARCH}
 MAKEFLAGS+=            OBJMACHINE=${OBJMACHINE:Q}
 .else
-WRKDIR_BASENAME?=      work
+WRKDIR_BASENAME?=      work${_CROSSDIR_SUFFIX}
 .endif
 
 WRKDIR?=               ${BUILD_DIR}/${WRKDIR_BASENAME}



Home | Main Index | Thread Index | Old Index