summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-11-27 18:36:30 +0000
committerjhb <jhb@FreeBSD.org>2002-11-27 18:36:30 +0000
commit6880dc45b681e98479c738e20ddac983cddd50b5 (patch)
tree42e618e03749610dff45c10e12b377678fc7939b /usr.sbin/sade
parent05cb8cd7b7d41fa96a64a0f8b120806eb4fb0933 (diff)
downloadFreeBSD-src-6880dc45b681e98479c738e20ddac983cddd50b5.zip
FreeBSD-src-6880dc45b681e98479c738e20ddac983cddd50b5.tar.gz
Expand X_AS_PKG so that we don't declare distribution bitmasks or menus
for the X distributions if X_AS_PKG is defined. Tested on: i386 Approved by: re
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/dispatch.c2
-rw-r--r--usr.sbin/sade/menus.c20
-rw-r--r--usr.sbin/sade/sade.h7
3 files changed, 24 insertions, 5 deletions
diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c
index 357cd60..e065df8 100644
--- a/usr.sbin/sade/dispatch.c
+++ b/usr.sbin/sade/dispatch.c
@@ -76,7 +76,9 @@ static struct _word {
{ "distSetMinimum", distSetMinimum },
{ "distSetEverything", distSetEverything },
{ "distSetSrc", distSetSrc },
+#ifndef X_AS_PKG
{ "distSetXF86", distSetXF86 },
+#endif
{ "distExtractAll", distExtractAll },
{ "docBrowser", docBrowser },
{ "docShowDocument", docShowDocument },
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 68c13e0..3a226f3 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -60,6 +60,7 @@ clearSrc(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_REDRAW;
}
+#ifndef X_AS_PKG
static int
setX11Misc(dialogMenuItem *self)
{
@@ -108,6 +109,7 @@ clearX11Fonts(dialogMenuItem *self)
XF86FontDists = 0;
return DITEM_SUCCESS | DITEM_REDRAW;
}
+#endif /* !X_AS_PKG */
#define _IS_SET(dist, set) (((dist) & (set)) == (set))
@@ -162,11 +164,15 @@ checkDistMinimum(dialogMenuItem *self)
static int
checkDistEverything(dialogMenuItem *self)
{
- return Dists == DIST_ALL && CRYPTODists == DIST_CRYPTO_ALL && \
- _IS_SET(SrcDists, DIST_SRC_ALL) && \
- _IS_SET(XF86Dists, DIST_XF86_ALL) && \
- _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) && \
+ return Dists == DIST_ALL && CRYPTODists == DIST_CRYPTO_ALL &&
+ _IS_SET(SrcDists, DIST_SRC_ALL) &&
+#ifndef X_AS_PKG
+ _IS_SET(XF86Dists, DIST_XF86_ALL) &&
+ _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) &&
_IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL);
+#else
+ 1;
+#endif
}
static int
@@ -218,7 +224,9 @@ DMenu MenuIndex = {
{ " Dists, User", "Select average user distribution.", checkDistUser, distSetUser },
{ " Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser },
{ " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
+#ifndef X_AS_PKG
{ " Distributions, XFree86","XFree86 distribution menu.", NULL, distSetXF86 },
+#endif
{ " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
{ " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" },
{ " Doc, Early Adopter's", "Early Adopter's Guide to FreeBSD 5.0.", NULL, dmenuDisplayFile, NULL, "EARLY" },
@@ -280,11 +288,13 @@ DMenu MenuIndex = {
{ " Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
{ " Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" },
{ " User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
+#ifndef X_AS_PKG
{ " XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
{ " XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
#if defined(__i386__) && defined(PC98)
{ " XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
#endif
+#endif
{ NULL } },
};
@@ -1101,6 +1111,7 @@ DMenu MenuXDesktops = {
{ NULL } },
};
+#ifndef X_AS_PKG
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
"XFree86 Distribution",
@@ -1279,6 +1290,7 @@ Mono servers are particularly well-suited to most LCD displays).",
{ NULL } }
};
#endif
+#endif /* !X_AS_PKG */
DMenu MenuDiskDevices = {
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 4b47541..e8653c7 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -372,9 +372,11 @@ extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */
extern unsigned int CRYPTODists; /* Which naughty distributions we want */
extern unsigned int SrcDists; /* Which src distributions we want */
+#ifndef X_AS_PKG
extern unsigned int XF86Dists; /* Which XFree86 dists we want */
extern unsigned int XF86ServerDists; /* The XFree86 servers we want */
extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
+#endif
extern int BootMgr; /* Which boot manager to use */
extern int StatusLine; /* Where to print our status messages */
extern DMenu MenuInitial; /* Initial installation menu */
@@ -418,12 +420,13 @@ extern DMenu MenuDiskDevices; /* Disk type devices */
extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
extern DMenu MenuXF86; /* XFree86 main menu */
+#ifndef X_AS_PKG
extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */
extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
-extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
+#endif
extern DMenu MenuXDesktops; /* Disk devices menu */
extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
extern DMenu MenuUsermgmt; /* User management menu */
@@ -531,7 +534,9 @@ extern int distSetXUser(dialogMenuItem *self);
extern int distSetMinimum(dialogMenuItem *self);
extern int distSetEverything(dialogMenuItem *self);
extern int distSetSrc(dialogMenuItem *self);
+#ifndef X_AS_PKG
extern int distSetXF86(dialogMenuItem *self);
+#endif
extern int distExtractAll(dialogMenuItem *self);
/* dmenu.c */
OpenPOWER on IntegriCloud