diff options
author | bouyer <bouyer@pkgsrc.org> | 2002-10-27 18:00:07 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2002-10-27 18:00:07 +0000 |
commit | 7c7c9e7a6fe42b6f59cee8908fc1818c959f4fa1 (patch) | |
tree | efa59886be3b554868b2b9625a81fa8a2e0f3bef /graphics/xpm | |
parent | dda4dac13b80a230ac9c87913581496f875646aa (diff) | |
download | pkgsrc-7c7c9e7a6fe42b6f59cee8908fc1818c959f4fa1.tar.gz |
On Solaris, if ${X11BASE} != "/usr/openwin" use the builtin XPM if it exists.
Diffstat (limited to 'graphics/xpm')
-rw-r--r-- | graphics/xpm/buildlink.mk | 57 | ||||
-rw-r--r-- | graphics/xpm/buildlink2.mk | 4 |
2 files changed, 59 insertions, 2 deletions
diff --git a/graphics/xpm/buildlink.mk b/graphics/xpm/buildlink.mk new file mode 100644 index 00000000000..cf7deef2cab --- /dev/null +++ b/graphics/xpm/buildlink.mk @@ -0,0 +1,57 @@ +# $NetBSD: buildlink.mk,v 1.15 2002/10/27 18:00:07 bouyer Exp $ +# +# This Makefile fragment is included by packages that use xpm. +# +# To use this Makefile fragment, simply: +# +# (1) Include this Makefile fragment in the package Makefile, +# (2) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (3) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(XPM_BUILDLINK_MK) +XPM_BUILDLINK_MK= # defined + +.include "../../mk/bsd.buildlink.mk" + +BUILDLINK_DEPENDS.xpm?= xpm-3.4k + +# Check if we got Xpm distributed with XFree86 4.x or Solaris 9 or if we need +# to depend on the Xpm package. +# +_REQUIRE_BUILTIN_XPM?= NO +.if (${OPSYS} != SunOS) || (${X11BASE} != "/usr/openwin") +.if exists(${X11BASE}/include/X11/xpm.h) && \ + exists(${X11BASE}/lib/X11/config/X11.tmpl) +_IS_BUILTIN_XPM!= ${EGREP} -c NormalLibXpm ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE} +.else +_IS_BUILTIN_XPM= 0 +.endif +.else +_IS_BUILTIN_XPM!= (/usr/sbin/pkgchk -l SUNWxwinc | ${EGREP} -c xpm.h) || ${TRUE} +.endif +.if (${_IS_BUILTIN_XPM} == "0") && (${_REQUIRE_BUILTIN_XPM} == "NO") +_NEED_XPM= YES +.else +_NEED_XPM= NO +.endif + +.if ${_NEED_XPM} == "YES" +DEPENDS+= ${BUILDLINK_DEPENDS.xpm}:../../graphics/xpm +EVAL_PREFIX+= BUILDLINK_PREFIX.xpm=xpm +BUILDLINK_PREFIX.xpm_DEFAULT= ${X11PREFIX} +.else +BUILDLINK_PREFIX.xpm= ${X11BASE} +.endif + +BUILDLINK_FILES.xpm+= include/X11/xpm.h +BUILDLINK_FILES.xpm+= lib/libXpm.* + +BUILDLINK_TARGETS.xpm= xpm-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.xpm} + +pre-configure: ${BUILDLINK_TARGETS.xpm} +xpm-buildlink: _BUILDLINK_USE + +.endif # XPM_BUILDLINK_MK diff --git a/graphics/xpm/buildlink2.mk b/graphics/xpm/buildlink2.mk index 7278b95bd49..660bcc5a73a 100644 --- a/graphics/xpm/buildlink2.mk +++ b/graphics/xpm/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.3 2002/09/01 15:13:43 tron Exp $ +# $NetBSD: buildlink2.mk,v 1.4 2002/10/27 18:00:07 bouyer Exp $ .if !defined(XPM_BUILDLINK2_MK) XPM_BUILDLINK2_MK= # defined @@ -12,7 +12,7 @@ BUILDLINK_PKGSRCDIR.xpm?= ../../graphics/xpm # to depend on the Xpm package. # _REQUIRE_BUILTIN_XPM?= NO -.if (${OPSYS} != SunOS) +.if (${OPSYS} != SunOS) || (${X11BASE} != "/usr/openwin") .if exists(${X11BASE}/include/X11/xpm.h) && \ exists(${X11BASE}/lib/X11/config/X11.tmpl) _IS_BUILTIN_XPM!= ${EGREP} -c NormalLibXpm ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE} |