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:           Fri Apr 12 19:56:03 UTC 2024

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

Log Message:
bsd.prefs.mk: New CROSS_VARBASE and CROSS_SYSCONFBASE.

These default to /var and /etc, respectively.

When cross-building packages, VARBASE and SYSCONFBASE are set to
these instead of whatever they were set to in mk.conf.

No change to native builds because use of these variables is
conditional on USE_CROSS_COMPILE = yes.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/doc/HOWTO-use-crosscompile
cvs rdiff -u -r1.442 -r1.443 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.13 pkgsrc/doc/HOWTO-use-crosscompile:1.14
--- pkgsrc/doc/HOWTO-use-crosscompile:1.13      Fri Apr 12 19:53:25 2024
+++ pkgsrc/doc/HOWTO-use-crosscompile   Fri Apr 12 19:56:03 2024
@@ -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.13 2024/04/12 19:53:25 riastradh Exp $
+$NetBSD: HOWTO-use-crosscompile,v 1.14 2024/04/12 19:56:03 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
@@ -59,16 +59,25 @@ In addition to whatever else you want in
    CROSS_LOWER_VARIANT_VERSION= # empty
    CROSS_LOWER_VENDOR=          # empty
 
-Optionally, you can set CROSS_LOCALBASE for cross-compiled packages
-separately from LOCALBASE for natively compiled packages.  For example,
+Optionally, you can set CROSS_LOCALBASE, CROSS_SYSCONFBASE, and
+CROSS_VARBASE for cross-compiled packages separately from LOCALBASE,
+SYSCONFBASE, and VARBASE for natively compiled packages.  For example,
 you can use an unprivileged pkgsrc build into /home/user/cross/pkg that
 will create packages which install to /opt/pkg:
 
    LOCALBASE=          /home/user/cross/pkg
    CROSS_LOCALBASE=    /opt/pkg
 
-By default, CROSS_LOCALBASE will be /usr/pkg, meaning packages that are
-being cross-compiled will see LOCALBASE=/usr/pkg.
+By default, pkgsrc will assume:
+
+   CROSS_LOCALBASE=    /usr/pkg
+   CROSS_SYSCONFBASE=  /etc
+   CROSS_VARBASE=      /var
+
+That is, no matter what you set LOCALBASE, SYSCONFBASE, and VARBASE to
+in mk.conf for native packages, like directores under /home/user, by
+default cross-compiled packages will see LOCALBASE=/usr/pkg,
+SYSCONFBASE=/etc, and VARBASE=/var.
 
 ** Bootstrapped pkgsrc
 

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.442 pkgsrc/mk/bsd.prefs.mk:1.443
--- pkgsrc/mk/bsd.prefs.mk:1.442        Fri Apr 12 19:55:16 2024
+++ pkgsrc/mk/bsd.prefs.mk      Fri Apr 12 19:56:03 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.442 2024/04/12 19:55:16 riastradh Exp $
+# $NetBSD: bsd.prefs.mk,v 1.443 2024/04/12 19:56:03 riastradh Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -701,6 +701,8 @@ LOCALBASE?=         /usr/pkg
 TOOLBASE:=             ${LOCALBASE}
 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
 LOCALBASE=             ${CROSS_LOCALBASE:U/usr/pkg}
+VARBASE=               ${CROSS_VARBASE:U/var}
+SYSCONFBASE=           ${CROSS_SYSCONFBASE:U/etc}
 .endif
 X11_TYPE?=             modular
 .if !empty(X11_TYPE:Mnative)



Home | Main Index | Thread Index | Old Index