# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231281769 -3600 # Node ID 0cd2ee160ef5d2e4d971ab12dfd48278ed377dbf # Parent cb59d6afeb61e699f7380f0ff8061fdf43c1c1ec Port miniperl and rpmio components to Solaris 11. diff -r cb59d6afeb61 -r 0cd2ee160ef5 openpkg/HISTORY --- a/openpkg/HISTORY Tue Jan 06 23:40:39 2009 +0100 +++ b/openpkg/HISTORY Tue Jan 06 23:42:49 2009 +0100 @@ -1,3 +1,12 @@ +2009 +==== + +20090106 port miniperl and rpmio to Solaris 11 + +2008 +==== + +20080101 closedpkg 2007 ==== diff -r cb59d6afeb61 -r 0cd2ee160ef5 openpkg/openpkg.spec --- a/openpkg/openpkg.spec Tue Jan 06 23:40:39 2009 +0100 +++ b/openpkg/openpkg.spec Tue Jan 06 23:42:49 2009 +0100 @@ -39,7 +39,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20071227 +%define V_openpkg 20090106 # the used software versions %define V_rpm 4.2.1 diff -r cb59d6afeb61 -r 0cd2ee160ef5 openpkg/perl.patch --- a/openpkg/perl.patch Tue Jan 06 23:40:39 2009 +0100 +++ b/openpkg/perl.patch Tue Jan 06 23:42:49 2009 +0100 @@ -15,7 +15,7 @@ my $installman1dir = "$destdir$Config{installman1dir}"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; -@@ -403,6 +405,8 @@ +@@ -372,6 +374,8 @@ mkpath($installarchlib, $verbose, 0777); mkpath($installsitelib, $verbose, 0777) if ($installsitelib); mkpath($installsitearch, $verbose, 0777) if ($installsitearch); @@ -38,7 +38,7 @@ Index: perl.c --- perl.c.orig 2006-08-15 14:37:41 +0200 +++ perl.c 2006-08-18 21:08:14 +0200 -@@ -4749,39 +4749,6 @@ +@@ -4753,39 +4753,6 @@ incpush(APPLLIB_EXP, TRUE, TRUE, TRUE, TRUE); #endif @@ -78,7 +78,7 @@ #ifdef SITEARCH_EXP /* sitearch is always relative to sitelib on Windows for * DLL-based path intuition to work correctly */ -@@ -4824,6 +4791,39 @@ +@@ -4828,6 +4795,39 @@ incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE, TRUE); #endif @@ -160,7 +160,7 @@ Index: perlio.c --- perlio.c.orig 2006-08-15 14:37:41 +0200 +++ perlio.c 2006-08-18 21:05:05 +0200 -@@ -461,7 +461,14 @@ +@@ -472,7 +472,14 @@ #include #endif #ifdef HAS_MMAP @@ -211,9 +211,9 @@ Index: Configure --- Configure.orig 2006-08-15 14:37:40 +0200 +++ Configure 2006-08-18 21:05:05 +0200 -@@ -7787,7 +7787,7 @@ - ;; - linux|irix*|gnu*) dflt='-shared' ;; +@@ -7871,7 +7871,7 @@ + ;; + linux|irix*|gnu*) dflt="-shared $optimize" ;; next) dflt='none' ;; - solaris) dflt='-G' ;; + solaris) dflt='-shared' ;; @@ -228,7 +228,7 @@ Index: sv.c --- sv.c.orig 2006-08-15 14:37:41 +0200 +++ sv.c 2006-08-18 21:05:05 +0200 -@@ -8595,7 +8595,10 @@ +@@ -8667,7 +8667,10 @@ if ( (width = expect_number(&q)) ) { if (*q == '$') { ++q; @@ -241,3 +241,19 @@ goto gotwidth; } +----------------------------------------------------------------------------- + +Corrections for Solaris 11: + +Index: perl.h +diff -Nau perl.h.orig perl.h +--- perl.h.orig 2007-12-18 11:47:08.000000000 +0100 ++++ perl.h 2009-01-06 15:28:45.843276063 +0100 +@@ -1393,6 +1393,7 @@ + */ + + #if defined(I_SYSMODE) && !defined(PERL_MICRO) ++#include + #include + #endif + diff -r cb59d6afeb61 -r 0cd2ee160ef5 openpkg/rpm.patch.porting --- a/openpkg/rpm.patch.porting Tue Jan 06 23:40:39 2009 +0100 +++ b/openpkg/rpm.patch.porting Tue Jan 06 23:42:49 2009 +0100 @@ -1482,3 +1482,52 @@ #include /* The code at the top of get_date which figures out the offset of the + ++--------------------------------------------------------------------------- +| The following patch works around a general failure of RPM to +| adhere to the ISO C standard, for which newer GCC releases claim +| compile errors and fail. ++--------------------------------------------------------------------------- +Index: misc/err.h +--- misc/err.h 2009-01-06 22:48:16.104430941 +0100 ++++ misc/err.h 2009-01-06 22:47:55.944312482 +0100 +@@ -29,31 +29,4 @@ + # define __gnuc_va_list __ptr_t + #endif + +-__BEGIN_DECLS +- +-/* Print "program: ", FORMAT, ": ", the standard error string for errno, +- and a newline, on stderr. */ +-extern void warn __P ((__const char *__format, ...)) +- __attribute__ ((__format__ (__printf__, 1, 2))); +-extern void vwarn __P ((__const char *__format, __gnuc_va_list)) +- __attribute__ ((__format__ (__printf__, 1, 0))); +- +-/* Likewise, but without ": " and the standard error string. */ +-extern void warnx __P ((__const char *__format, ...)) +- __attribute__ ((__format__ (__printf__, 1, 2))); +-extern void vwarnx __P ((__const char *__format, __gnuc_va_list)) +- __attribute__ ((__format__ (__printf__, 1, 0))); +- +-/* Likewise, and then exit with STATUS. */ +-extern void err __P ((int __status, __const char *__format, ...)) +- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); +-extern void verr __P ((int __status, __const char *__format, __gnuc_va_list)) +- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); +-extern void errx __P ((int __status, __const char *__format, ...)) +- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); +-extern void verrx __P ((int __status, __const char *, __gnuc_va_list)) +- __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); +- +-__END_DECLS +- + #endif /* err.h */ + ++--------------------------------------------------------------------------- +| Due to either GCC enforcing ISO C or faulty references in the +| rpmio component, Solaris 11 fails to build while compiling fts.c. +| Hack a custom 'dirent.h' as found in /usr/include, remove the +| line 104 'extern int dirfd(DIR *);' from the header file, and +| place in directory openpkg-`date +%Y%m%d`/rpm-/rpmio/. ++---------------------------------------------------------------------------