1 # $NetBSD: Makefile,v 1.140 2013/02/24 01:27:16 obache Exp $
3 # NOTE: If you update this package, then you'll likely need to also update
4 # the x11-links dependency in buildlink3.mk to the correct version,
5 # usually the most recent.
7 DISTNAME
= x11-links-0.74
8 CATEGORIES
= pkgtools x11
12 MAINTAINER
= pkgsrc-users@NetBSD.org
13 HOMEPAGE
= http
://ftp.NetBSD.org
/pub
/NetBSD
/packages
/pkgsrc
/doc
/pkgsrc.html
14 COMMENT
= Shadow tree of links to native X11 headers and libraries
17 .
include "../../mk/bsd.prefs.mk"
18 .if
${OPSYS} == "OpenBSD"
19 CHECK_SHLIBS_SUPPORTED
= no
22 PKG_INSTALLATION_TYPES
= overwrite pkgviews
24 NOT_FOR_PLATFORM
= DragonFly-
*-*
27 USE_LANGUAGES
= # empty
30 PLIST_SRC.files
= ${WRKDIR}/.PLIST_SRC.files
31 PLIST_SRC
= ${PLIST_SRC_DFLT} ${PLIST_SRC.files
}
33 OSVERSION_SPECIFIC
= yes
35 .
include "../../mk/bsd.prefs.mk"
37 .if
${X11_TYPE} == "modular"
38 PKG_FAIL_REASON
+= "${PKGNAME} should only be used with X11_TYPE=native."
39 .elif
!exists
(${X11BASE}/include/X11
/X.h
)
40 PKG_FAIL_REASON
+= "pkgsrc has been configured to use a system provided X11 installation"
41 PKG_FAIL_REASON
+= "but one could not be found. Possible solutions:"
43 PKG_FAIL_REASON
+= " *) install X headers and libraries in X11BASE (currently ${X11BASE})"
44 PKG_FAIL_REASON
+= " *) set X11_TYPE=modular in mk.conf to use X11 from pkgsrc"
46 PKG_FAIL_REASON
+= "Please note that changing the value of X11_TYPE in existing"
47 PKG_FAIL_REASON
+= "pkgsrc installations is not supported!"
50 .if
${OPSYS} == "IRIX"
52 .elif
${OPSYS} == "OSF1"
54 .elif
!empty
(X11BASE
:M
*openwin
)
55 .
include "openwin.mk"
56 .elif exists
(${X11BASE}/lib
/X11
/config
/xorgversion.def
) || \
57 (exists
(${X11BASE}/lib
/X11
/config
/xorg.cf
) && \
58 exists
(${X11BASE}/lib
/X11
/config
/version.def
)) || \
59 exists
(${X11BASE}/lib
/pkgconfig
/xorg-server.
pc) || \
60 exists
(${X11BASE}/bin
/Xquartz
)
66 X11_LINKS_SUBDIR
= share
/x11-links
67 X11_LINKS_BUILD_DIR
= ${WRKSRC}/${X11_LINKS_SUBDIR}
68 X11_LINKS_DIR
= ${PREFIX}/${X11_LINKS_SUBDIR}
70 FILES_LIST_CMD
= ${SED} -e
"s/@ABI@/${ABI}/" ${FILES_LIST} |
${GREP} -v
"^\#"
72 CREATE_X11LINK?
= ${LN} -fs
$$src $$dest
74 .
include "../../mk/x11.buildlink3.mk"
77 ${MKDIR} ${X11_LINKS_BUILD_DIR}
78 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}
79 ${FILES_LIST_CMD} |
${SED} -e
"s,/[^/]*$$,," |
${SORT} -u | \
81 if
[ -d
${X11BASE}/$$dir ]; then \
82 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \
83 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \
84 elif
[ -d
/usr
/$$dir ]; then \
85 ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \
86 ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \
89 ${RM} -f
${PLIST_SRC.files
}
90 ${FILES_LIST_CMD} |
${SORT} -u | \
93 if
${TEST} -r
${X11BASE}/$$file; then \
94 srcdir="${X11BASE}"; \
95 elif
${TEST} -r
/usr
/$$file; then \
98 if
${TEST} ! -z
"$$srcdir"; then \
99 src
="$$srcdir/$$file"; \
100 dest
="${X11_LINKS_BUILD_DIR}/$$file"; \
102 ${ECHO} "${X11_LINKS_SUBDIR}/$$file" \
103 >> ${PLIST_SRC.files
}; \
104 if
(${ECHO} $$file |
${GREP} -q
'\.la$$'); then \
106 ${_LIBTOOL_EXPAND} $${file} | \
108 src
="$$srcdir/$$lib"; \
109 dest
="${X11_LINKS_BUILD_DIR}/$$lib"; \
111 ${ECHO} "${X11_LINKS_SUBDIR}/$$lib" \
112 >> ${PLIST_SRC.files
}; \
119 ${INSTALL_DATA_DIR} ${DESTDIR
:Q
}${X11_LINKS_DIR
:Q
}
120 cd
${X11_LINKS_BUILD_DIR} && \
121 pax
-rw .
${DESTDIR
:Q
}${X11_LINKS_DIR
:Q
}
123 .
include "../../mk/bsd.pkg.mk"