pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Rework the way to use the -dirs packages (ATM, xdg-...
details: https://anonhg.NetBSD.org/pkgsrc/rev/36a1489133b3
branches: trunk
changeset: 472945:36a1489133b3
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Wed Apr 14 15:26:41 2004 +0000
description:
Rework the way to use the -dirs packages (ATM, xdg-dirs, xdg-x11-dirs,
gnome1-dirs and gnome2-dirs):
- Introduce a global USE_DIRS variable, which takes pairs of names and
versions. For example, an xdg-1.1 value will request the use of the
xdg-dirs package, at least version 1.1. This variable must always be
appended to. If there are duplicates with different versions, the
one with the higher number will be picked up.
- Introduce the mk/dirs.mk file, which is automatically included by
bsd.pkg.mk when USE_DIRS is not empty. It parses the variable's value
and includes the required dirs.mk files, present in each -dirs package.
- For each -dirs package, add a dirs.mk file that defines a variable
holding the list of directories provided by it, adds a dependency on
that package, and modifies the PRINT_PLIST_AWK variable to output
comments for the directories handled by it.
- Drop some Makefile.common files that only make things difficult and
more confusing now (in favour of the new dirs.mk files). The only thing
to worry about is to keep version numbers consistent across xdg-* and
gnome*-* packages, but that will be easier to handle.
The main reason for this change is to be able to modify PRINT_PLIST_AWK in
a clean way, but I hope this will improve clarity too. Also, this simplifies
the addition of future -dirs packages (if needed) in a consistent way.
diffstat:
misc/gnome-dirs/Makefile | 15 ++++++++----
misc/gnome-dirs/Makefile.common | 41 -----------------------------------
misc/gnome-dirs/dirs.mk | 34 +++++++++++++++++++++++++++++
misc/gnome1-dirs/Makefile | 18 +++++++++------
misc/gnome1-dirs/dirs.mk | 25 +++++++++++++++++++++
misc/gnome2-dirs/Makefile | 23 ++++++++-----------
misc/gnome2-dirs/dirs.mk | 30 ++++++++++++++++++++++++++
misc/xdg-dirs/Makefile | 22 +++++++++++++++---
misc/xdg-dirs/Makefile.common | 31 ---------------------------
misc/xdg-dirs/dirs.mk | 28 ++++++++++++++++++++++++
misc/xdg-x11-dirs/Makefile | 26 ++++++++++++++++------
misc/xdg-x11-dirs/dirs.mk | 28 ++++++++++++++++++++++++
mk/bsd.pkg.mk | 6 ++++-
mk/dirs.mk | 47 +++++++++++++++++++++++++++++++++++++++++
14 files changed, 265 insertions(+), 109 deletions(-)
diffs (truncated from 531 to 300 lines):
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome-dirs/Makefile
--- a/misc/gnome-dirs/Makefile Wed Apr 14 15:13:56 2004 +0000
+++ b/misc/gnome-dirs/Makefile Wed Apr 14 15:26:41 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2004/02/15 12:12:32 jlam Exp $
+# $NetBSD: Makefile,v 1.7 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= gnome-dirs-${GNOME_DIRS_VERSION}
+DISTNAME= gnome-dirs-1.5
CATEGORIES= misc gnome
MASTER_SITES= # empty
DISTFILES= # empty
@@ -12,15 +12,20 @@
WRKSRC= ${WRKDIR}
USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
+USE_X11BASE= yes
NO_CHECKSUM= # defined
NO_EXTRACT= # defined
NO_BUILDLINK= # defined
NO_CONFIGURE= # defined
NO_BUILD= # defined
-USE_X11BASE= YES
+.include "dirs.mk"
+.include "../../mk/bsd.prefs.mk"
-GNOME_DIRS= ${GNOME_DIRS_COMMON}
+_SORTED!= ${ECHO} ${GNOME_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-.include "Makefile.common"
+do-install: # nothing
+
.include "../../mk/bsd.pkg.mk"
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome-dirs/Makefile.common
--- a/misc/gnome-dirs/Makefile.common Wed Apr 14 15:13:56 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-# $NetBSD: Makefile.common,v 1.7 2004/03/08 19:30:58 jmmv Exp $
-#
-
-# This Makefile contains all the logic needed to automatically generate
-# PLIST's for the gnome*-dirs packages.
-# It also installs all GTK/GNOME directories common to v1 and v2.
-
-GNOME_DIRS_VERSION= 1.5
-
-GNOME_DIRS_COMMON= share/gnome/apps
-GNOME_DIRS_COMMON+= share/gnome/apps/Applications
-GNOME_DIRS_COMMON+= share/gnome/apps/Development
-GNOME_DIRS_COMMON+= share/gnome/apps/Games
-GNOME_DIRS_COMMON+= share/gnome/apps/Graphics
-GNOME_DIRS_COMMON+= share/gnome/apps/Internet
-GNOME_DIRS_COMMON+= share/gnome/apps/Multimedia
-GNOME_DIRS_COMMON+= share/gnome/apps/Settings
-GNOME_DIRS_COMMON+= share/gnome/apps/Settings/Desktop
-GNOME_DIRS_COMMON+= share/gnome/apps/Settings/Peripherals
-GNOME_DIRS_COMMON+= share/gnome/apps/Settings/Session
-GNOME_DIRS_COMMON+= share/gnome/apps/System
-GNOME_DIRS_COMMON+= share/gnome/apps/Utilities
-GNOME_DIRS_COMMON+= share/gnome/help
-GNOME_DIRS_COMMON+= share/gnome/help/fdl
-GNOME_DIRS_COMMON+= share/gnome/help/fdl/C
-GNOME_DIRS_COMMON+= share/gnome/help/fdl/C/figures
-GNOME_DIRS_COMMON+= share/gnome/help/gpl
-GNOME_DIRS_COMMON+= share/gnome/help/gpl/C
-GNOME_DIRS_COMMON+= share/gnome/help/gpl/C/figures
-GNOME_DIRS_COMMON+= share/gnome/help/lgpl
-GNOME_DIRS_COMMON+= share/gnome/help/lgpl/C
-GNOME_DIRS_COMMON+= share/gnome/help/lgpl/C/figures
-
-.include "../../mk/bsd.prefs.mk"
-
-_SORTED!= ${ECHO} ${GNOME_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
-
-USE_PKGINSTALL= yes
-MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-
-do-install: # nothing
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome-dirs/dirs.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/gnome-dirs/dirs.mk Wed Apr 14 15:26:41 2004 +0000
@@ -0,0 +1,34 @@
+# $NetBSD: dirs.mk,v 1.1 2004/04/14 15:26:41 jmmv Exp $
+#
+# This file is intended to be included by misc/gnome1/dirs.mk and
+# misc/gnome2/dirs.mk, not directly by packages.
+#
+
+.if !defined(DIRS_GNOME_MK)
+DIRS_GNOME_MK= # defined
+
+GNOME_DIRS= share/gnome/apps
+GNOME_DIRS+= share/gnome/apps/Applications
+GNOME_DIRS+= share/gnome/apps/Development
+GNOME_DIRS+= share/gnome/apps/Games
+GNOME_DIRS+= share/gnome/apps/Graphics
+GNOME_DIRS+= share/gnome/apps/Internet
+GNOME_DIRS+= share/gnome/apps/Multimedia
+GNOME_DIRS+= share/gnome/apps/Settings
+GNOME_DIRS+= share/gnome/apps/Settings/Desktop
+GNOME_DIRS+= share/gnome/apps/Settings/Peripherals
+GNOME_DIRS+= share/gnome/apps/Settings/Session
+GNOME_DIRS+= share/gnome/apps/System
+GNOME_DIRS+= share/gnome/apps/Utilities
+GNOME_DIRS+= share/gnome/help
+GNOME_DIRS+= share/gnome/help/fdl
+GNOME_DIRS+= share/gnome/help/fdl/C
+GNOME_DIRS+= share/gnome/help/fdl/C/figures
+GNOME_DIRS+= share/gnome/help/gpl
+GNOME_DIRS+= share/gnome/help/gpl/C
+GNOME_DIRS+= share/gnome/help/gpl/C/figures
+GNOME_DIRS+= share/gnome/help/lgpl
+GNOME_DIRS+= share/gnome/help/lgpl/C
+GNOME_DIRS+= share/gnome/help/lgpl/C/figures
+
+.endif # !defined(DIRS_GNOME_MK)
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome1-dirs/Makefile
--- a/misc/gnome1-dirs/Makefile Wed Apr 14 15:13:56 2004 +0000
+++ b/misc/gnome1-dirs/Makefile Wed Apr 14 15:26:41 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2004/03/12 20:44:16 jmmv Exp $
+# $NetBSD: Makefile,v 1.14 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= gnome1-dirs-${GNOME_DIRS_VERSION}
+DISTNAME= gnome1-dirs-1.5
CATEGORIES= misc gnome
MASTER_SITES= # empty
DISTFILES= # empty
@@ -11,20 +11,24 @@
COMMENT= Shared GTK/GNOME (v1) directories
DEPENDS+= gnome-dirs>=1.0:../../misc/gnome-dirs
-DEPENDS+= xdg-x11-dirs>=1.1:../../misc/xdg-x11-dirs
WRKSRC= ${WRKDIR}
USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
+USE_X11BASE= yes
NO_CHECKSUM= # defined
NO_EXTRACT= # defined
NO_BUILDLINK= # defined
NO_CONFIGURE= # defined
NO_BUILD= # defined
-USE_X11BASE= YES
+.include "dirs.mk"
+.include "../../mk/bsd.prefs.mk"
-# No GNOME 1 specific directories yet.
-GNOME_DIRS=
+_SORTED!= ${ECHO} ${GNOME_DIRS} ${GNOME1_DIRS} | ${TR} -s ' \t' '\n' | \
+ ${SORT}
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-.include "../../misc/gnome-dirs/Makefile.common"
+do-install: # nothing
+
.include "../../mk/bsd.pkg.mk"
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome1-dirs/dirs.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/gnome1-dirs/dirs.mk Wed Apr 14 15:26:41 2004 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: dirs.mk,v 1.1 2004/04/14 15:26:41 jmmv Exp $
+#
+# This file is intended to be included by mk/dirs.mk, not directly by packages.
+#
+
+.if !defined(DIRS_GNOME1_MK)
+DIRS_GNOME1_MK= # defined
+
+_USE_XDG_X11_DIRS= 1.1
+.include "../../misc/xdg-x11-dirs/dirs.mk"
+.include "../../misc/gnome-dirs/dirs.mk"
+
+GNOME1_DIRS= # none yet
+
+.if defined(_USE_GNOME1_DIRS) && !empty(_USE_GNOME1_DIRS)
+DEPENDS+= gnome1-dirs>=${_USE_GNOME1_DIRS}:../../misc/gnome1-dirs
+
+. for dir in ${GNOME_DIRS} ${GNOME1_DIRS}
+PRINT_PLIST_AWK+= /^@dirrm ${dir:S|/|\\/|g}$$/ \
+ { print "@comment in gnome1-dirs: " $$0; next; }
+. endfor
+. undef dir
+.endif
+
+.endif # !defined(DIRS_GNOME1_MK)
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome2-dirs/Makefile
--- a/misc/gnome2-dirs/Makefile Wed Apr 14 15:13:56 2004 +0000
+++ b/misc/gnome2-dirs/Makefile Wed Apr 14 15:26:41 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2004/03/08 19:30:58 jmmv Exp $
+# $NetBSD: Makefile,v 1.16 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= gnome2-dirs-${GNOME_DIRS_VERSION}
+DISTNAME= gnome2-dirs-1.5
CATEGORIES= misc gnome
MASTER_SITES= # empty
DISTFILES= # empty
@@ -12,29 +12,26 @@
WRKSRC= ${WRKDIR}
USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
NO_EXTRACT= # defined
NO_CHECKSUM= # defined
NO_BUILDLINK= # defined
NO_CONFIGURE= # defined
NO_BUILD= # defined
+.include "dirs.mk"
.include "../../mk/bsd.prefs.mk"
-DEPENDS+= xdg-dirs>=1.1:../../misc/xdg-dirs
-
.if ${X11PREFIX} == ${LOCALBASE}
DEPENDS+= gnome-dirs>=1.0:../../misc/gnome-dirs
-GNOME_DIRS=
+_SORTED!= ${ECHO} ${GNOME2_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
.else
-GNOME_DIRS= ${GNOME_DIRS_COMMON}
+_SORTED!= ${ECHO} ${GNOME_DIRS} ${GNOME2_DIRS} | ${TR} -s ' \t' '\n' | \
+ ${SORT}
.endif
-GNOME_DIRS+= share/control-center-2.0
-GNOME_DIRS+= share/control-center-2.0/capplets
-GNOME_DIRS+= share/control-center-2.0/icons
-GNOME_DIRS+= share/gnome-2.0
-GNOME_DIRS+= share/gnome-2.0/ui
-GNOME_DIRS+= share/gnome/wm-properties
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-.include "../../misc/gnome-dirs/Makefile.common"
+do-install: # nothing
+
.include "../../mk/bsd.pkg.mk"
diff -r f41c53aab19b -r 36a1489133b3 misc/gnome2-dirs/dirs.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/gnome2-dirs/dirs.mk Wed Apr 14 15:26:41 2004 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: dirs.mk,v 1.1 2004/04/14 15:26:41 jmmv Exp $
+#
+# This file is intended to be included by mk/dirs.mk, not directly by packages.
+#
+
+.if !defined(DIRS_GNOME2_MK)
+DIRS_GNOME2_MK= # defined
+
+_USE_XDG_DIRS= 1.1
+.include "../../misc/xdg-dirs/dirs.mk"
+.include "../../misc/gnome-dirs/dirs.mk"
+
+GNOME2_DIRS= share/control-center-2.0
+GNOME2_DIRS+= share/control-center-2.0/capplets
+GNOME2_DIRS+= share/control-center-2.0/icons
+GNOME2_DIRS+= share/gnome-2.0
+GNOME2_DIRS+= share/gnome-2.0/ui
+GNOME2_DIRS+= share/gnome/wm-properties
+
+.if defined(_USE_GNOME2_DIRS) && !empty(_USE_GNOME2_DIRS)
+DEPENDS+= gnome2-dirs>=${_USE_GNOME2_DIRS}:../../misc/gnome2-dirs
+
+. for dir in ${GNOME_DIRS} ${GNOME2_DIRS}
+PRINT_PLIST_AWK+= /^@dirrm ${dir:S|/|\\/|g}$$/ \
+ { print "@comment in gnome2-dirs: " $$0; next; }
+. endfor
+. undef dir
+.endif
+
+.endif # !defined(DIRS_GNOME2_MK)
diff -r f41c53aab19b -r 36a1489133b3 misc/xdg-dirs/Makefile
--- a/misc/xdg-dirs/Makefile Wed Apr 14 15:13:56 2004 +0000
+++ b/misc/xdg-dirs/Makefile Wed Apr 14 15:26:41 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2004/03/08 19:27:53 jmmv Exp $
+# $NetBSD: Makefile,v 1.4 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= xdg-dirs-${XDG_DIRS_VERSION}
+DISTNAME= xdg-dirs-1.1
CATEGORIES= misc gnome kde
MASTER_SITES= # empty
DISTFILES= # empty
@@ -12,7 +12,21 @@
CONFLICTS= gnome2-dirs<=1.2
-XDG_DIRS_REGISTER= yes
+NO_BUILD= # defined
+NO_BUILDLINK= # defined
+NO_CONFIGURE= # defined
+NO_CHECKSUM= # defined
+NO_EXTRACT= # defined
Home |
Main Index |
Thread Index |
Old Index