summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2004-04-14 15:26:41 +0000
committerjmmv <jmmv@pkgsrc.org>2004-04-14 15:26:41 +0000
commit86b7cbd71b6c148587b4f9111260d9a0da763c21 (patch)
treef6c7a498a69efa61adb9a84dba84dca241ea297b /misc
parent8cbbbc4da0284dcdc7965d032606032bf8435e40 (diff)
downloadpkgsrc-86b7cbd71b6c148587b4f9111260d9a0da763c21.tar.gz
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 (limited to 'misc')
-rw-r--r--misc/gnome-dirs/Makefile15
-rw-r--r--misc/gnome-dirs/Makefile.common41
-rw-r--r--misc/gnome-dirs/dirs.mk34
-rw-r--r--misc/gnome1-dirs/Makefile18
-rw-r--r--misc/gnome1-dirs/dirs.mk25
-rw-r--r--misc/gnome2-dirs/Makefile23
-rw-r--r--misc/gnome2-dirs/dirs.mk30
-rw-r--r--misc/xdg-dirs/Makefile22
-rw-r--r--misc/xdg-dirs/Makefile.common31
-rw-r--r--misc/xdg-dirs/dirs.mk28
-rw-r--r--misc/xdg-x11-dirs/Makefile26
-rw-r--r--misc/xdg-x11-dirs/dirs.mk28
12 files changed, 213 insertions, 108 deletions
diff --git a/misc/gnome-dirs/Makefile b/misc/gnome-dirs/Makefile
index 63ef27a4851..0eb0023678e 100644
--- a/misc/gnome-dirs/Makefile
+++ b/misc/gnome-dirs/Makefile
@@ -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 @@ COMMENT= Shared GTK/GNOME (v1 and v2) directories
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}\//}
+
+do-install: # nothing
-.include "Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/gnome-dirs/Makefile.common b/misc/gnome-dirs/Makefile.common
deleted file mode 100644
index d80d738ade1..00000000000
--- a/misc/gnome-dirs/Makefile.common
+++ /dev/null
@@ -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 --git a/misc/gnome-dirs/dirs.mk b/misc/gnome-dirs/dirs.mk
new file mode 100644
index 00000000000..a689c9d41e5
--- /dev/null
+++ b/misc/gnome-dirs/dirs.mk
@@ -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 --git a/misc/gnome1-dirs/Makefile b/misc/gnome1-dirs/Makefile
index 21e28f5d4d5..b9c14717162 100644
--- a/misc/gnome1-dirs/Makefile
+++ b/misc/gnome1-dirs/Makefile
@@ -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 @@ HOMEPAGE= # empty
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}\//}
+
+do-install: # nothing
-.include "../../misc/gnome-dirs/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/gnome1-dirs/dirs.mk b/misc/gnome1-dirs/dirs.mk
new file mode 100644
index 00000000000..e00e2a447a2
--- /dev/null
+++ b/misc/gnome1-dirs/dirs.mk
@@ -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 --git a/misc/gnome2-dirs/Makefile b/misc/gnome2-dirs/Makefile
index d8415cf996a..ca6560a5bfa 100644
--- a/misc/gnome2-dirs/Makefile
+++ b/misc/gnome2-dirs/Makefile
@@ -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 @@ COMMENT= Shared GTK/GNOME (v2) directories
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}\//}
+
+do-install: # nothing
-.include "../../misc/gnome-dirs/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/gnome2-dirs/dirs.mk b/misc/gnome2-dirs/dirs.mk
new file mode 100644
index 00000000000..fcded98ce9d
--- /dev/null
+++ b/misc/gnome2-dirs/dirs.mk
@@ -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 --git a/misc/xdg-dirs/Makefile b/misc/xdg-dirs/Makefile
index 608e6d70cdf..6b1e0e65272 100644
--- a/misc/xdg-dirs/Makefile
+++ b/misc/xdg-dirs/Makefile
@@ -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 @@ COMMENT= Shared XDG directories
CONFLICTS= gnome2-dirs<=1.2
-XDG_DIRS_REGISTER= yes
+NO_BUILD= # defined
+NO_BUILDLINK= # defined
+NO_CONFIGURE= # defined
+NO_CHECKSUM= # defined
+NO_EXTRACT= # defined
+USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
+WRKSRC= ${WRKDIR}
+
+.include "dirs.mk"
+.include "../../mk/bsd.prefs.mk"
+
+_SORTED!= ${ECHO} ${XDG_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
+
+do-install: # nothing
-.include "Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/xdg-dirs/Makefile.common b/misc/xdg-dirs/Makefile.common
deleted file mode 100644
index e8ebcc7384a..00000000000
--- a/misc/xdg-dirs/Makefile.common
+++ /dev/null
@@ -1,31 +0,0 @@
-# $NetBSD: Makefile.common,v 1.1 2004/03/08 19:27:53 jmmv Exp $
-#
-
-XDG_DIRS_VERSION= 1.1
-
-WRKSRC= ${WRKDIR}
-USE_LANGUAGES= # empty
-USE_PKGINSTALL= yes
-NO_EXTRACT= # defined
-NO_CHECKSUM= # defined
-NO_BUILDLINK= # defined
-NO_CONFIGURE= # defined
-NO_BUILD= # defined
-
-XDG_DIRS+= share/application-registry
-XDG_DIRS+= share/applications
-XDG_DIRS+= share/icons
-XDG_DIRS+= share/images
-XDG_DIRS+= share/mime-info
-XDG_DIRS+= share/pixmaps
-XDG_DIRS+= share/sounds
-XDG_DIRS+= share/themes
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${XDG_DIRS_REGISTER} == "yes"
-_SORTED!= ${ECHO} ${XDG_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
-MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-.endif
-
-do-install: # nothing
diff --git a/misc/xdg-dirs/dirs.mk b/misc/xdg-dirs/dirs.mk
new file mode 100644
index 00000000000..a41af4d74df
--- /dev/null
+++ b/misc/xdg-dirs/dirs.mk
@@ -0,0 +1,28 @@
+# $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_XDG_MK)
+DIRS_XDG_MK= # defined
+
+XDG_DIRS= share/application-registry
+XDG_DIRS+= share/applications
+XDG_DIRS+= share/icons
+XDG_DIRS+= share/images
+XDG_DIRS+= share/mime-info
+XDG_DIRS+= share/pixmaps
+XDG_DIRS+= share/sounds
+XDG_DIRS+= share/themes
+
+.if defined(_USE_XDG_DIRS) && !empty(_USE_XDG_DIRS)
+DEPENDS+= xdg-dirs>=${_USE_XDG_DIRS}:../../misc/xdg-dirs
+
+. for dir in ${XDG_DIRS}
+PRINT_PLIST_AWK+= /^@dirrm ${dir:S|/|\\/|g}$$/ \
+ { print "@comment in xdg-dirs: " $$0; next; }
+. endfor
+. undef dir
+.endif
+
+.endif # !defined(DIRS_XDG_MK)
diff --git a/misc/xdg-x11-dirs/Makefile b/misc/xdg-x11-dirs/Makefile
index 24e54ca5539..bda394c568a 100644
--- a/misc/xdg-x11-dirs/Makefile
+++ b/misc/xdg-x11-dirs/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.1.1.1 2004/03/08 19:29:05 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= xdg-x11-dirs-${XDG_DIRS_VERSION}
+DISTNAME= xdg-x11-dirs-1.1
CATEGORIES= misc gnome kde
MASTER_SITES= # empty
DISTFILES= # empty
@@ -10,16 +10,28 @@ MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= # empty
COMMENT= Shared XDG directories under the X11 tree
-USE_X11BASE= yes
+CONFLICTS= gnome2-dirs<=1.2
+NO_BUILD= # defined
+NO_BUILDLINK= # defined
+NO_CONFIGURE= # defined
+NO_CHECKSUM= # defined
+NO_EXTRACT= # defined
+USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
+USE_X11BASE= yes
+WRKSRC= ${WRKDIR}
+
+.include "dirs.mk"
.include "../../mk/bsd.prefs.mk"
.if ${X11PREFIX} == ${LOCALBASE}
-DEPENDS+= xdg-dirs>=1.1:../../misc/xdg-dirs
-XDG_DIRS_REGISTER= no
+DEPENDS+= xdg-dirs>=1.1:../../misc/xdg-dirs
.else
-XDG_DIRS_REGISTER= yes
+_SORTED!= ${ECHO} ${XDG_X11_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
.endif
-.include "../../misc/xdg-dirs/Makefile.common"
+do-install: # nothing
+
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/xdg-x11-dirs/dirs.mk b/misc/xdg-x11-dirs/dirs.mk
new file mode 100644
index 00000000000..ad8a92d7a9f
--- /dev/null
+++ b/misc/xdg-x11-dirs/dirs.mk
@@ -0,0 +1,28 @@
+# $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_XDG_X11_MK)
+DIRS_XDG_X11_MK= # defined
+
+XDG_X11_DIRS= share/application-registry
+XDG_X11_DIRS+= share/applications
+XDG_X11_DIRS+= share/icons
+XDG_X11_DIRS+= share/images
+XDG_X11_DIRS+= share/mime-info
+XDG_X11_DIRS+= share/pixmaps
+XDG_X11_DIRS+= share/sounds
+XDG_X11_DIRS+= share/themes
+
+.if defined(_USE_XDG_X11_DIRS) && !empty(_USE_XDG_X11_DIRS)
+DEPENDS+= xdg-x11-dirs>=${_USE_XDG_X11_DIRS}:../../misc/xdg-x11-dirs
+
+. for dir in ${XDG_X11_DIRS}
+PRINT_PLIST_AWK+= /^@dirrm ${dir:S|/|\\/|g}$$/ \
+ { print "@comment in xdg-x11-dirs: " $$0; next; }
+. endfor
+. undef dir
+.endif
+
+.endif # !defined(DIRS_XDG_X11_MK)