summaryrefslogtreecommitdiff
path: root/misc/xdg-x11-dirs
diff options
context:
space:
mode:
authorjmmv <jmmv>2004-04-14 15:26:41 +0000
committerjmmv <jmmv>2004-04-14 15:26:41 +0000
commitaf7a8e6812e27117c6754a8fa8798c01e0b8e859 (patch)
treef6c7a498a69efa61adb9a84dba84dca241ea297b /misc/xdg-x11-dirs
parent03e9790c46a3ca9577117b3113ee6e543d9e63cc (diff)
downloadpkgsrc-af7a8e6812e27117c6754a8fa8798c01e0b8e859.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/xdg-x11-dirs')
-rw-r--r--misc/xdg-x11-dirs/Makefile26
-rw-r--r--misc/xdg-x11-dirs/dirs.mk28
2 files changed, 47 insertions, 7 deletions
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)