Wed Feb 15 15:25:15 2012 UTC ()
Change SunOS definitions to be more compatible with what is used on
other platforms:
 - use similar library installation rules
 - use CC, CXX and CFLAGS from pkgsrc


(hans)
diff -r1.17 -r1.18 pkgsrc/x11/xorg-cf-files/Makefile
diff -r1.11 -r1.12 pkgsrc/x11/xorg-cf-files/distinfo
diff -r1.2 -r1.3 pkgsrc/x11/xorg-cf-files/patches/patch-af
diff -r0 -r1.1 pkgsrc/x11/xorg-cf-files/patches/patch-sv4Lib.rules

cvs diff -r1.17 -r1.18 pkgsrc/x11/xorg-cf-files/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/xorg-cf-files/Makefile 2012/01/15 14:01:59 1.17
+++ pkgsrc/x11/xorg-cf-files/Makefile 2012/02/15 15:25:15 1.18
@@ -1,41 +1,41 @@ @@ -1,41 +1,41 @@
1# $NetBSD: Makefile,v 1.17 2012/01/15 14:01:59 shattered Exp $ 1# $NetBSD: Makefile,v 1.18 2012/02/15 15:25:15 hans Exp $
2# 2#
3 3
4DISTNAME= xorg-cf-files-1.0.4 4DISTNAME= xorg-cf-files-1.0.4
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= x11 devel 6CATEGORIES= x11 devel
7MASTER_SITES= ${MASTER_SITE_XORG:=util/} 7MASTER_SITES= ${MASTER_SITE_XORG:=util/}
8EXTRACT_SUFX= .tar.bz2 8EXTRACT_SUFX= .tar.bz2
9 9
10MAINTAINER= joerg@NetBSD.org 10MAINTAINER= joerg@NetBSD.org
11HOMEPAGE= http://xorg.freedesktop.org/ 11HOMEPAGE= http://xorg.freedesktop.org/
12COMMENT= Xorg imake rules 12COMMENT= Xorg imake rules
13 13
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16GNU_CONFIGURE= yes 16GNU_CONFIGURE= yes
17USE_TOOLS+= pkg-config 17USE_TOOLS+= pkg-config
18 18
19.include "../../mk/bsd.prefs.mk" 19.include "../../mk/bsd.prefs.mk"
20 20
21DARWIN_USE_QUARTZ?= 1 21DARWIN_USE_QUARTZ?= 1
22 22
23post-extract: 23post-extract:
24 ${CP} ${FILESDIR}/host.def ${WRKSRC} 24 ${CP} ${FILESDIR}/host.def ${WRKSRC}
25 ${CP} ${FILESDIR}/xorgsite.def ${WRKSRC} 25 ${CP} ${FILESDIR}/xorgsite.def ${WRKSRC}
26 26
27pre-configure: 27pre-configure:
28.for sys in NetBSD FreeBSD DragonFly linux darwin 28.for sys in NetBSD FreeBSD DragonFly linux darwin sun
29 mv ${WRKSRC}/${sys}.cf ${WRKSRC}/${sys}.cf.before && \ 29 mv ${WRKSRC}/${sys}.cf ${WRKSRC}/${sys}.cf.before && \
30 ${SED} -e "s|@@PKGSRC_CC@@|${CC}|g" \ 30 ${SED} -e "s|@@PKGSRC_CC@@|${CC}|g" \
31 -e "s|@@PKGSRC_CPP@@|${CPP}|g" \ 31 -e "s|@@PKGSRC_CPP@@|${CPP}|g" \
32 -e "s|@@PKGSRC_CXX@@|${CXX}|g" \ 32 -e "s|@@PKGSRC_CXX@@|${CXX}|g" \
33 -e "s|@@PKGSRC_CFLAGS@@|${CFLAGS}|g" \ 33 -e "s|@@PKGSRC_CFLAGS@@|${CFLAGS}|g" \
34 -e "s|@@DARWIN_USE_QUARTZ@@|${DARWIN_USE_QUARTZ}|g" \ 34 -e "s|@@DARWIN_USE_QUARTZ@@|${DARWIN_USE_QUARTZ}|g" \
35 ${WRKSRC}/${sys}.cf.before > ${WRKSRC}/${sys}.cf 35 ${WRKSRC}/${sys}.cf.before > ${WRKSRC}/${sys}.cf
36.endfor 36.endfor
37 ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ 37 ${SED} -e "s|@PREFIX@|${PREFIX}|g" \
38 -e "s|@PKGMANDIR@|${PKGMANDIR}|" \ 38 -e "s|@PKGMANDIR@|${PKGMANDIR}|" \
39 -e "s|@MAKE@|${MAKE_PROGRAM}|" ${FILESDIR}/host.def > \ 39 -e "s|@MAKE@|${MAKE_PROGRAM}|" ${FILESDIR}/host.def > \
40 ${WRKSRC}/host.def 40 ${WRKSRC}/host.def
41 41

cvs diff -r1.11 -r1.12 pkgsrc/x11/xorg-cf-files/distinfo (expand / switch to unified diff)

--- pkgsrc/x11/xorg-cf-files/distinfo 2012/01/15 14:01:59 1.11
+++ pkgsrc/x11/xorg-cf-files/distinfo 2012/02/15 15:25:15 1.12
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1$NetBSD: distinfo,v 1.11 2012/01/15 14:01:59 shattered Exp $ 1$NetBSD: distinfo,v 1.12 2012/02/15 15:25:15 hans Exp $
2 2
3SHA1 (xorg-cf-files-1.0.4.tar.bz2) = c58b7252df481572ec1ccd77b9f1ab561ed89e45 3SHA1 (xorg-cf-files-1.0.4.tar.bz2) = c58b7252df481572ec1ccd77b9f1ab561ed89e45
4RMD160 (xorg-cf-files-1.0.4.tar.bz2) = 975942e8974812aae91c45d81eb27522e5aa0a5d 4RMD160 (xorg-cf-files-1.0.4.tar.bz2) = 975942e8974812aae91c45d81eb27522e5aa0a5d
5Size (xorg-cf-files-1.0.4.tar.bz2) = 367380 bytes 5Size (xorg-cf-files-1.0.4.tar.bz2) = 367380 bytes
6SHA1 (patch-aa) = 6b776ab3c9cc04759eb2fefcd95dcd65ea5909b3 6SHA1 (patch-aa) = 6b776ab3c9cc04759eb2fefcd95dcd65ea5909b3
7SHA1 (patch-ab) = f8f816409eb233ae4d8430bd9d43b9bf83c5711d 7SHA1 (patch-ab) = f8f816409eb233ae4d8430bd9d43b9bf83c5711d
8SHA1 (patch-ac) = 1f977650d9e903a4ea72afc8541b7649cb989ab8 8SHA1 (patch-ac) = 1f977650d9e903a4ea72afc8541b7649cb989ab8
9SHA1 (patch-ad) = 12c918ad85fa44518525d2c4bc628b342b8c0280 9SHA1 (patch-ad) = 12c918ad85fa44518525d2c4bc628b342b8c0280
10SHA1 (patch-ae) = b1c870feb6372b8443aac498c24dfa802a536ba2 10SHA1 (patch-ae) = b1c870feb6372b8443aac498c24dfa802a536ba2
11SHA1 (patch-af) = bb3ff7952ba3ac24d1eb4165a1d3abc736e77cf7 11SHA1 (patch-af) = e48481afac82cd93e61a1f44dab84876d645ce09
12SHA1 (patch-ag) = 20010c3ade12a6ee07e1093c6143d9600cca3b37 12SHA1 (patch-ag) = 20010c3ade12a6ee07e1093c6143d9600cca3b37
13SHA1 (patch-ah) = f329f44a81c49ba66e8da197ab99a53172a1d247 13SHA1 (patch-ah) = f329f44a81c49ba66e8da197ab99a53172a1d247
14SHA1 (patch-ai) = a0795dcd3442471a58c77c667b3eeb50d7bb47bb 14SHA1 (patch-ai) = a0795dcd3442471a58c77c667b3eeb50d7bb47bb
15SHA1 (patch-aj) = 6fd05a766895c06b940e28cd5cadde48365790c3 15SHA1 (patch-aj) = 6fd05a766895c06b940e28cd5cadde48365790c3
16SHA1 (patch-ak) = ce8c0fa88f6fa4fb1207f95e6e1f3d5ca9018b8c 16SHA1 (patch-ak) = ce8c0fa88f6fa4fb1207f95e6e1f3d5ca9018b8c
 17SHA1 (patch-sv4Lib.rules) = 20bd05fe6e49cabb74317ded2f4b7565dd45c49d

cvs diff -r1.2 -r1.3 pkgsrc/x11/xorg-cf-files/patches/patch-af (expand / switch to unified diff)

--- pkgsrc/x11/xorg-cf-files/patches/patch-af 2009/02/25 14:20:50 1.2
+++ pkgsrc/x11/xorg-cf-files/patches/patch-af 2012/02/15 15:25:15 1.3
@@ -1,35 +1,64 @@ @@ -1,35 +1,64 @@
1$NetBSD: patch-af,v 1.2 2009/02/25 14:20:50 joerg Exp $ 1$NetBSD: patch-af,v 1.3 2012/02/15 15:25:15 hans Exp $
2 2
3Use ginstall on Solaris 11, /usr/ucb/install has been removed. 3Use ginstall on Solaris 11, /usr/ucb/install has been removed.
4 4
5Run-time path fix for Solaris for the X client libraries. Without this 5Run-time path fix for Solaris for the X client libraries. Without this
6patch, libraries such as libXext.so will not contain a run-time link path 6patch, libraries such as libXext.so will not contain a run-time link path
7to /usr/pkg/xorg/lib, causing run time link failures or possibly linking 7to /usr/pkg/xorg/lib, causing run time link failures or possibly linking
8with other (non-Pkgsrc) X libraries on the system! 8with other (non-Pkgsrc) X libraries on the system!
9 9
 10Use pkgsrc CC, CXX and CFLAGS.
 11
10--- sun.cf.orig 2005-12-03 18:20:48.000000000 +0100 12--- sun.cf.orig 2005-12-03 18:20:48.000000000 +0100
11+++ sun.cf 13+++ sun.cf
12@@ -429,7 +429,9 @@ XCOMM SunPro C++ CplusplusCompilerMajorV 14@@ -429,7 +429,9 @@ XCOMM SunPro C++ CplusplusCompilerMajorV
13 # define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS 15 # define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
14 # endif 16 # endif
15 # endif 17 # endif
16-# if OSMinorVersion > 3 18-# if OSMinorVersion > 3
17+# if OSMinorVersion >= 11 19+# if OSMinorVersion >= 11
18+# define InstallCmd /usr/bin/ginstall 20+# define InstallCmd /usr/bin/ginstall
19+# elif OSMinorVersion > 3  21+# elif OSMinorVersion > 3
20 # define InstallCmd /usr/ucb/install 22 # define InstallCmd /usr/ucb/install
21 # endif 23 # endif
22 #ifndef LargefileDefines 24 #ifndef LargefileDefines
23@@ -688,10 +690,10 @@ XCOMM SunPro C++ CplusplusCompilerMajorV 25@@ -669,29 +671,29 @@ XCOMM SunPro C++ CplusplusCompilerMajorV
 26 # endif
 27 # if HasGcc2
 28 # ifndef CcCmd
 29-# define CcCmd gcc
 30+# define CcCmd @@PKGSRC_CC@@
 31+# endif
 32+# ifndef CppCmd
 33+# define CppCmd @@PKGSRC_CPP@@
 34+# endif
 35+# ifndef CplusplusCmd
 36+# define CplusplusCmd @@PKGSRC_CXX@@
 37 # endif
 38 # ifndef AsCmd
 39 # define AsCmd CcCmd -c -x assembler
 40 # endif
 41 # ifndef OptimizedCDebugFlags
 42-# ifdef i386Architecture
 43-# define OptimizedCDebugFlags DefaultGcc2i386Opt
 44-# elif defined(AMD64Architecture)
 45-# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
 46-# else
 47-# define OptimizedCDebugFlags -O2
 48-# endif
 49+# define OptimizedCDebugFlags @@PKGSRC_CFLAGS@@
 50 # endif
 51 # if !defined(SharedLibraryLoadFlags) && !defined(SharedLibraryLdCmd)
 52 # if OSMajorVersion == 5 && OSMinorVersion > 6 && defined(i386Architecture)
24 /* This is to work around what appears to be a PIC bug in some gcc/egcs 53 /* This is to work around what appears to be a PIC bug in some gcc/egcs
25 versions that shows up with the Solaris 7/x86 <ctype.h>. */ 54 versions that shows up with the Solaris 7/x86 <ctype.h>. */
26 # define SharedLibraryLdCmd $(LD) 55 # define SharedLibraryLdCmd $(LD)
27-# define SharedLibraryLoadFlags -G -z textwarn 56-# define SharedLibraryLoadFlags -G -z textwarn
28+# define SharedLibraryLoadFlags -G -z textwarn LibraryRpathLoadFlags 57+# define SharedLibraryLoadFlags -G -z textwarn LibraryRpathLoadFlags
29 # else 58 # else
30 # define SharedLibraryLdCmd $(CC) 59 # define SharedLibraryLdCmd $(CC)
31-# define SharedLibraryLoadFlags -shared -z text 60-# define SharedLibraryLoadFlags -shared -z text
32+# define SharedLibraryLoadFlags -shared -z text LibraryRpathLoadFlags 61+# define SharedLibraryLoadFlags -shared -z text LibraryRpathLoadFlags
33 # endif 62 # endif
34 # endif 63 # endif
35 # else 64 # else

File Added: pkgsrc/x11/xorg-cf-files/patches/patch-sv4Lib.rules
$NetBSD: patch-sv4Lib.rules,v 1.1 2012/02/15 15:25:15 hans Exp $

--- sv4Lib.rules.orig	2009-10-16 23:45:42.000000000 +0200
+++ sv4Lib.rules	2012-01-15 22:45:33.359398571 +0100
@@ -63,26 +63,50 @@ XCOMM $XFree86: xc/config/cf/sv4Lib.rule
 /*
  * InstallSharedLibrary - generate rules to install the shared library.
  */
+INSTALLMINORREV = true
+
 #ifndef InstallSharedLibrary
 #if StripInstalledPrograms
 # define InstallSharedLibrary(libname,rev,dest)				@@\
 install:: Concat(lib,libname.so.rev) 					@@\
 	MakeDir($(DESTDIR)dest)						@@\
-	$(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+	T=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\	@@\
+	if $(INSTALLMINORREV); then \					@@\
+	  INST=Concat(lib,libname.so.rev); \				@@\
+	  LINK=$$T; \							@@\
+	else \								@@\
+	  INST=$$T; \							@@\
+	fi; \								@@\
+	(set -x; \							@@\
+	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) $$INST $(DESTDIR)dest); \ @@\
 	mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev)		@@\
-	@if $(SOSYMLINK); then (set -x; \				@@\
+	if [ X"$$LINK" != X ]; then (set -x; \				@@\
+	  $(RM) $(DESTDIR)dest/$$LINK; \				@@\
+	  $(LN) $$INST $(DESTDIR)dest/$$LINK); \			@@\
+	fi; \								@@\
+	if $(SOSYMLINK); then (set -x; \				@@\
 	  $(RM) Concat($(DESTDIR)dest/lib,libname.so); \		@@\
-	  cd $(DESTDIR)dest; \						@@\
-	  $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
+	  $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)); fi
 #else
 # define InstallSharedLibrary(libname,rev,dest)				@@\
 install:: Concat(lib,libname.so.rev) 					@@\
 	MakeDir($(DESTDIR)dest)						@@\
-	$(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
-	@if $(SOSYMLINK); then (set -x; \				@@\
+	T=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\	@@\
+	if $(INSTALLMINORREV); then \					@@\
+	  INST=Concat(lib,libname.so.rev); \				@@\
+	  LINK=$$T; \							@@\
+	else \								@@\
+	  INST=$$T; \							@@\
+	fi; \								@@\
+	(set -x; \							@@\
+	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) $$INST $(DESTDIR)dest); \ @@\
+	if [ X"$$LINK" != X ]; then (set -x; \				@@\
+	  $(RM) $(DESTDIR)dest/$$LINK; \				@@\
+	  $(LN) $$INST $(DESTDIR)dest/$$LINK); \			@@\
+	fi; \								@@\
+	if $(SOSYMLINK); then (set -x; \				@@\
 	  $(RM) Concat($(DESTDIR)dest/lib,libname.so); \		@@\
-	  cd $(DESTDIR)dest; \						@@\
-	  $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
+	  $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)); fi
 #endif
 
 #endif /* InstallSharedLibrary */