summaryrefslogtreecommitdiff
path: root/misc/gnome1-dirs
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
commit6bb0eff02e0f2c772b0ba3bc6cf6cf153aa53bd6 (patch)
treef6c7a498a69efa61adb9a84dba84dca241ea297b /misc/gnome1-dirs
parent34c7796109a07988ca0181707201e1730447c986 (diff)
downloadpkgsrc-6bb0eff02e0f2c772b0ba3bc6cf6cf153aa53bd6.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/gnome1-dirs')
-rw-r--r--misc/gnome1-dirs/Makefile18
-rw-r--r--misc/gnome1-dirs/dirs.mk25
2 files changed, 36 insertions, 7 deletions
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)