pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/libXpm Allow buildling x11/libXpm with old X11_TYP...
details: https://anonhg.NetBSD.org/pkgsrc/rev/55b1ab5f7ac9
branches: trunk
changeset: 568688:55b1ab5f7ac9
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Dec 16 19:57:47 2009 +0000
description:
Allow buildling x11/libXpm with old X11_TYPE=native to replace
graphics/xpm.
diffstat:
x11/libXpm/Makefile | 17 ++++++++++++++++-
x11/libXpm/buildlink3.mk | 14 ++------------
x11/libXpm/builtin.mk | 41 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 13 deletions(-)
diffs (103 lines):
diff -r 7139898a776c -r 55b1ab5f7ac9 x11/libXpm/Makefile
--- a/x11/libXpm/Makefile Wed Dec 16 19:55:01 2009 +0000
+++ b/x11/libXpm/Makefile Wed Dec 16 19:57:47 2009 +0000
@@ -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+= 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 -r 7139898a776c -r 55b1ab5f7ac9 x11/libXpm/buildlink3.mk
--- a/x11/libXpm/buildlink3.mk Wed Dec 16 19:55:01 2009 +0000
+++ b/x11/libXpm/buildlink3.mk Wed Dec 16 19:57:47 2009 +0000
@@ -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 @@
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/xproto/buildlink3.mk"
-.endif # LIBXPM_BUILDLINK3_MK
+.endif # LIBXPM_BUILDLINK3_MK
BUILDLINK_TREE+= -libXpm
-
-.endif
diff -r 7139898a776c -r 55b1ab5f7ac9 x11/libXpm/builtin.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/libXpm/builtin.mk Wed Dec 16 19:57:47 2009 +0000
@@ -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"
Home |
Main Index |
Thread Index |
Old Index