tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
graphics/xpm replacement
Hi all,
some platforms still use graphics/xpm. Attached patch is supposed to
x11/libXpm usable for those. Can someone please report if it works?
Joerg
Index: Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/x11/libXpm/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 24 May 2008 21:45:15 -0000 1.8
+++ Makefile 30 Sep 2009 14:38:44 -0000
@@ -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"
Index: buildlink3.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/x11/libXpm/buildlink3.mk,v
retrieving revision 1.4
diff -u -p -r1.4 buildlink3.mk
--- buildlink3.mk 20 Mar 2009 19:25:45 -0000 1.4
+++ buildlink3.mk 30 Sep 2009 14:39:06 -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$
BUILDLINK_TREE+= libXpm
@@ -18,8 +10,6 @@ BUILDLINK_PKGSRCDIR.libXpm?= ../../x11/l
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/xproto/buildlink3.mk"
-.endif # LIBXPM_BUILDLINK3_MK
+.endif # LIBXPM_BUILDLINK3_MK
BUILDLINK_TREE+= -libXpm
-
-.endif
Index: builtin.mk
===================================================================
RCS file: builtin.mk
diff -N builtin.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ builtin.mk 30 Sep 2009 14:39:16 -0000
@@ -0,0 +1,41 @@
+# $NetBSD$
+
+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