pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/26232: Mesa is broken on Solaris/SunPro because of our libtoolification



>Number:         26232
>Category:       pkg
>Synopsis:       Mesa is broken on Solaris/SunPro because of our 
>libtoolification
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 10 16:24:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     grant beattie
>Release:        pkgsrc-current
>Organization:
>Environment:
System: SunOS u10 5.9 Generic_117171-02 sun4u sparc SUNW,Ultra-5_10
Architecture: sparc
Machine: sun4u
>Description:
Mesa and co. build fine with SunPro, however libGLU isn't linked
against libCrun so programs which use it can't resolve all the symbols
required.

this is addressed in Mesa itself by way of different targets for
different systems, and the sunos5* targets pass the required flags
when compiling and linking.

pkgsrc however patches the "netbsd" target to "pkgsrc" and sets
ALL_TARGET=pkgsrc, so these aren't used. also, this package has
been libtoolised by us and simply using the sunos5 targets doesn't
work out of the box because "-lname" is passed to the libtool instead
of the libtool .la file.

>How-To-Repeat:
build graphics/MesaLib on Solaris with SunPro.
>Fix:

the following patch somewhat fixes it, but there is lossage because of
the mentioned -lname vs libname.la stuff which I don't know how to
fix. the library dependencies for Solaris (and other platforms) are in
work/Mesa*/Make-config.

should be easy for someone who knows something about Mesa to fix.


Index: Mesa/Makefile.common
===================================================================
RCS file: /work/netbsd/cvsroot/pkgsrc/graphics/Mesa/Makefile.common,v
retrieving revision 1.30
diff -u -r1.30 Makefile.common
--- Mesa/Makefile.common        9 Apr 2004 13:05:52 -0000       1.30
+++ Mesa/Makefile.common        10 Jul 2004 16:04:05 -0000
@@ -14,7 +14,6 @@
 MAINTAINER=    tech-pkg%NetBSD.org@localhost
 HOMEPAGE=      http://www.mesa3d.org/
 
-ALL_TARGET=             pkgsrc
 USE_LIBTOOL=           yes
 USE_X11=               yes
 
@@ -26,6 +25,26 @@
 
 INSTALLATION_DIRS+=    lib
 
+.include "../../mk/compiler.mk"
+.include "../../mk/bsd.prefs.mk"
+
+# Mesa has proper support for Solaris and SunPro, use it.
+.if ${OPSYS} == "SunOS"
+.  if !empty(CC_VERSION:MSun)
+.    if ${SPARC_TARGET_ARCH} == "sparcv7"
+ALL_TARGET=             sunos5
+.    elif ${SPARC_TARGET_ARCH} == "sparcv8"
+ALL_TARGET=             sunos5-v8
+.    elif ${SPARC_TARGET_ARCH} == "sparcv9"
+ALL_TARGET=             sunos5-v9
+.    endif
+.  else
+ALL_TARGET=             sunos5-gcc
+.  endif
+.else
+ALL_TARGET=             pkgsrc
+.endif
+
 pre-install:
        @if [ -n "${INSTLIBS}" ]; then                                  \
                ${ECHO_MSG} "Installing libraries.";                    \
Index: MesaLib/patches/patch-ad
===================================================================
RCS file: /work/netbsd/cvsroot/pkgsrc/graphics/MesaLib/patches/patch-ad,v
retrieving revision 1.4
diff -u -r1.4 patch-ad
--- MesaLib/patches/patch-ad    9 Apr 2004 13:06:06 -0000       1.4
+++ MesaLib/patches/patch-ad    10 Jul 2004 15:43:07 -0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ad,v 1.4 2004/04/09 13:06:06 adam Exp $
+$NetBSD$
 
---- src/mesa/Makefile.X11.orig 2004-03-24 19:27:19.000000000 +0000
+--- src/mesa/Makefile.X11.orig 2004-03-25 06:27:19.000000000 +1100
 +++ src/mesa/Makefile.X11
 @@ -53,10 +53,10 @@ OBJECTS = \
  ##### RULES #####
@@ -15,7 +15,7 @@
  
  
  # need some special rules here, unfortunately
-@@ -95,18 +95,16 @@ targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$
+@@ -95,18 +95,18 @@ targets: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$
  
  # Make the GL library
  $(LIBDIR)/$(GL_LIB): $(OBJECTS)
@@ -23,7 +23,8 @@
 -              -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIBDIR) \
 -              $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS)
 +      ${LIBTOOL} --mode=link ${CC} -o ${GL_LIB:.so=.la} ${OBJECTS:.o=.lo} \
-+              -rpath ${PREFIX}/lib -version-info ${GL_MAJOR}:${GL_MINOR}
++              -rpath ${PREFIX}/lib -version-info ${GL_MAJOR}:${GL_MINOR} \
++              ${MKLIB_OPTIONS} ${GL_LIB_DEPS}
  
  
  # Make the OSMesa library
@@ -35,7 +36,8 @@
 -                      $(OSMESA_LIB_DEPS) $(OSMESA_OBJECTS) ; \
 +          ${LIBTOOL} --mode=link ${CC} -o ${OSMESA_LIB:.so=.la} \
 +              ${OSMESA_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \
-+              -version-info ${MESA_MAJOR}:${MESA_MINOR} ; \
++              -version-info ${MESA_MAJOR}:${MESA_MINOR} \
++              ${MKLIB_OPTIONS} ${OSMESA_LIB_DEPS}; \
        fi
  
  
Index: MesaLib/patches/patch-af
===================================================================
RCS file: /work/netbsd/cvsroot/pkgsrc/graphics/MesaLib/patches/patch-af,v
retrieving revision 1.2
diff -u -r1.2 patch-af
--- MesaLib/patches/patch-af    9 Apr 2004 13:06:06 -0000       1.2
+++ MesaLib/patches/patch-af    10 Jul 2004 15:27:25 -0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.2 2004/04/09 13:06:06 adam Exp $
+$NetBSD$
 
---- src/glu/sgi/Makefile.X11.orig      2004-03-24 20:02:03.000000000 +0000
+--- src/glu/sgi/Makefile.X11.orig      2004-03-25 07:02:03.000000000 +1100
 +++ src/glu/sgi/Makefile.X11
 @@ -119,9 +119,11 @@ OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
  ##### RULES #####
@@ -14,7 +14,7 @@
        $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
  
  
-@@ -140,10 +142,8 @@ targets: $(LIBDIR)/$(GLU_LIB)
+@@ -140,10 +142,9 @@ targets: $(LIBDIR)/$(GLU_LIB)
  
  # Make the library:
  $(LIBDIR)/$(GLU_LIB): $(OBJECTS)
@@ -24,6 +24,7 @@
 -              $(GLU_LIB_DEPS) $(OBJECTS)
 +      ${LIBTOOL} --mode=link ${CXX} -o ${GLU_LIB:.so=.la} ${OBJECTS:.o=.lo} \
 +              -rpath ${PREFIX}/lib -version-info ${GLU_MAJOR}:${GLU_MINOR}
++              ${MKLIB_OPTIONS} ${GLU_LIB_DEPS}
  
  
  
>Release-Note:
>Audit-Trail:
>Unformatted:



Home | Main Index | Thread Index | Old Index