diff options
author | joerg <joerg@pkgsrc.org> | 2009-12-16 19:57:47 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-12-16 19:57:47 +0000 |
commit | b34918b3ad04b621e94c2e41c7e3abd3f62cf2f4 (patch) | |
tree | f8b5d54c9e1625c45a2b9cd04b3ca7c0956ea92b /x11 | |
parent | 068b6c22dbfe3da94bd920ec3191589fe6ac1dd8 (diff) | |
download | pkgsrc-b34918b3ad04b621e94c2e41c7e3abd3f62cf2f4.tar.gz |
Allow buildling x11/libXpm with old X11_TYPE=native to replace
graphics/xpm.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/libXpm/Makefile | 17 | ||||
-rw-r--r-- | x11/libXpm/buildlink3.mk | 14 | ||||
-rw-r--r-- | x11/libXpm/builtin.mk | 41 |
3 files changed, 59 insertions, 13 deletions
diff --git a/x11/libXpm/Makefile b/x11/libXpm/Makefile index 3e1f93bfc26..587730bd275 100644 --- a/x11/libXpm/Makefile +++ b/x11/libXpm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2008/05/24 21:45:15 tnn Exp $ +# $NetBSD: Makefile,v 1.9 2009/12/16 19:57:47 joerg Exp $ # DISTNAME= libXpm-3.5.7 @@ -29,6 +29,21 @@ CONFIGURE_ENV+= APP_MAN_SUFFIX=1 CONFIGURE_ENV+= ac_cv_search_gettext=no MAKE_ENV+= INTLLIBS=${BUILDLINK_LDADD.gettext:Q} +.include "../../mk/bsd.prefs.mk" + +.if ${X11_TYPE} == "native" +XPM_CFLAGS= -I${X11BASE}/include +XPM_LIBS= -Wl,-rpath,${X11BASE}/lib -L${X11BASE}/lib -lX11 + +SXPM_CFLAGS= -I${X11BASE}/include +SXPM_LIBS= -Wl,-rpath,${X11BASE}/lib -L${X11BASE}/lib -lXt -lXext + +CONFIGURE_ARGS+= XPM_CFLAGS=${XPM_CFLAGS:Q} \ + XPM_LIBS=${XPM_LIBS:Q} \ + SXPM_CFLAGS=${SXPM_CFLAGS:Q} \ + SXPM_LIBS=${SXPM_LIBS:Q} +.endif + .include "../../devel/gettext-lib/buildlink3.mk" .include "../../x11/libX11/buildlink3.mk" .include "../../x11/libXext/buildlink3.mk" diff --git a/x11/libXpm/buildlink3.mk b/x11/libXpm/buildlink3.mk index 7e7d1a9d70b..969ab5f8cf3 100644 --- a/x11/libXpm/buildlink3.mk +++ b/x11/libXpm/buildlink3.mk @@ -1,12 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.4 2009/03/20 19:25:45 joerg Exp $ - -.include "../../mk/bsd.fast.prefs.mk" - -.if ${X11_TYPE} != "modular" -.include "../../graphics/xpm/buildlink3.mk" - -BUILDLINK_PREFIX.libXpm= ${BUILDLINK_PREFIX.xpm} -.else +# $NetBSD: buildlink3.mk,v 1.5 2009/12/16 19:57:47 joerg Exp $ BUILDLINK_TREE+= libXpm @@ -18,8 +10,6 @@ BUILDLINK_PKGSRCDIR.libXpm?= ../../x11/libXpm .include "../../x11/libX11/buildlink3.mk" .include "../../x11/xproto/buildlink3.mk" -.endif # LIBXPM_BUILDLINK3_MK +.endif # LIBXPM_BUILDLINK3_MK BUILDLINK_TREE+= -libXpm - -.endif diff --git a/x11/libXpm/builtin.mk b/x11/libXpm/builtin.mk new file mode 100644 index 00000000000..93bddd1d46d --- /dev/null +++ b/x11/libXpm/builtin.mk @@ -0,0 +1,41 @@ +# $NetBSD: builtin.mk,v 1.1 2009/12/16 19:57:47 joerg Exp $ + +BUILTIN_PKG:= libXpm + +BUILTIN_FIND_FILES_VAR:= H_XPM +BUILTIN_FIND_FILES.H_XPM= ${X11BASE}/include/X11/xpm.h + +.include "../../mk/buildlink3/bsd.builtin.mk" + +### +### Determine if there is a built-in implementation of the package and +### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). +### +.if ${X11BASE} == ${LOCALBASE} +IS_BUILTIN.libXpm= no +.elif !defined(IS_BUILTIN.libXpm) +IS_BUILTIN.libXpm= no +. if empty(H_XPM:M__nonexistent__) +IS_BUILTIN.libXpm= yes +. endif +.endif +MAKEVARS+= IS_BUILTIN.libXpm + +### +### Determine whether we should use the built-in implementation if it +### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). +### +.if !defined(USE_BUILTIN.libXpm) +. if ${PREFER.libXpm} == "pkgsrc" +USE_BUILTIN.libXpm= no +. else +USE_BUILTIN.libXpm= ${IS_BUILTIN.libXpm} +. if defined(BUILTIN_PKG.libXpm) && \ + !empty(IS_BUILTIN.libXpm:M[yY][eE][sS]) +USE_BUILTIN.libX11= yes +. endif +. endif # PREFER.libXpm +.endif +MAKEVARS+= USE_BUILTIN.libXpm + +.include "../../mk/x11.builtin.mk" |