Subject: pkg/35289: Build of graphics/xpm fails on Irix with MIPSPro
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <fanch@kekpar.net>
List: pkgsrc-bugs
Date: 12/20/2006 09:20:00
>Number: 35289
>Category: pkg
>Synopsis: Build of graphics/xpm fails on Irix with MIPSPro
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 09:20:00 +0000 2006
>Originator: Francois Brunel
>Release: pkgsrc-2006Q3
>Organization:
>Environment:
IP30
Irix 6.5.30
MIPSPro 7.4.1m
ABI=32
>Description:
The build of graphics/xpm fails with system includes not found.
Tracked down the problem to xpkgwedge sgi.cf, so I will fill another PR.
The install fails with invalid PLIST: problems with the
revision number in package Imakefile, and symbolic links in pkgsrc
Makefile
Also, builtin.mk depends on awk non-portable features.
>How-To-Repeat:
>Fix:
--- builtin.mk.orig 2006-12-20 07:12:53.045269600 +0100
+++ builtin.mk
@@ -40,7 +40,7 @@ MAKEVARS+= IS_BUILTIN.xpm
!empty(IS_BUILTIN.xpm:M[yY][eE][sS]) && \
empty(H_XPM:M__nonexistent__)
BUILTIN_VERSION.xpm!= \
- ${AWK} 'BEGIN { split("abcdefghijklmnopqrstuvwxyz", alpha, ""); \
+ ${AWK} 'BEGIN { split("a b c d e f g h i j k l m n o p q r s t u v w x y z", alpha, " "); \
p = ".0" } \
/\#define[ ]*XpmFormat/ { M = $$3 } \
/\#define[ ]*XpmVersion/ { m = "."$$3 } \
--- Makefile.orig 2006-12-20 07:12:52.846540800 +0100
+++ Makefile
@@ -16,11 +16,13 @@ USE_IMAKE= yes
.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} == "SunOS"
+.if (${OPSYS} == "SunOS") || (${OPSYS} == "IRIX")
post-install:
cd ${PREFIX}/lib && \
+ ${RM} -f libXpm.so && \
${RM} -f libXpm.so.4 && \
- ${LN} -f libXpm.so.4.11 libXpm.so.4
+ ${LN} -s libXpm.so.4.11 libXpm.so && \
+ ${LN} -s libXpm.so.4.11 libXpm.so.4
.endif
.if !empty(LOWER_OPSYS:Mirix5*)
-----------------
patches/patch-ac
-----------------
--- lib/Imakefile.orig 1998-03-19 20:50:59.000000000 +0100
+++ lib/Imakefile
@@ -34,7 +34,7 @@ XCOMM default locations
#define XpmLibDir $(USRLIBDIR)
#endif
#ifndef XpmIncDir
-#define XpmIncDir $(INCDIR)
+#define XpmIncDir $(PROJECTROOT)/include
#endif
XCOMM If not already set in top dir,
@@ -55,7 +55,7 @@ REQUIREDLIBS = $(XLIB)
#endif
XCOMM on Dec Alpha we need to define the following to build the shared library
-#ifdef AlphaArchitecture
+#if defined(AlphaArchitecture) && defined(ModernOSF1)
REQUIREDLIBS = $(LDPRELIB) $(XLIB)
SO_REQLIBS = -lX11 -lc
#endif
@@ -97,20 +97,22 @@ XPMINCDIR = XpmIncDir
XCOMM get the version numbers from the xpm include file
#define XPM_NUMBERS
#include "xpm.h"
-SOXPMLIBREV = XpmVersion./**/XpmRevision
+SOXPMLIBREV = .XpmVersion./**/XpmRevision
HEADERS = xpm.h
SRCS = data.c create.c misc.c rgb.c scan.c parse.c hashtab.c \
CrBufFrI.c CrDatFrP.c CrPFrBuf.c RdFToI.c WrFFrI.c \
CrBufFrP.c CrIFrBuf.c CrPFrDat.c RdFToP.c WrFFrP.c \
CrDatFrI.c CrIFrDat.c RdFToDat.c WrFFrDat.c \
- Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c
+ Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c \
+ s_popen.c
OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \
CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o \
CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o \
CrDatFrI.o CrIFrDat.o RdFToDat.o WrFFrDat.o \
- Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o
+ Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o \
+ s_popen.o
INCLUDES = -I.
LINTLIBS = $(LINTXTOLL) $(LINTXLIB)