[csw-devel] SF.net SVN: gar:[7372] csw/mgar/pkg

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Nov 21 16:16:44 CET 2009


Revision: 7372
          http://gar.svn.sourceforge.net/gar/?rev=7372&view=rev
Author:   wahwah
Date:     2009-11-21 15:16:44 +0000 (Sat, 21 Nov 2009)

Log Message:
-----------
nss: Initial commit, work in progress, installer segfaults.

Modified Paths:
--------------
    csw/mgar/pkg/nss/trunk/Makefile
    csw/mgar/pkg/nss/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/nss/
    csw/mgar/pkg/nss/trunk/files/nss-3.12.4.patch
    csw/mgar/pkg/nss/trunk/files/shared-libs.patch

Modified: csw/mgar/pkg/nss/trunk/Makefile
===================================================================
--- csw/mgar/pkg/template/trunk/Makefile	2009-11-12 20:57:45 UTC (rev 7254)
+++ csw/mgar/pkg/nss/trunk/Makefile	2009-11-21 15:16:44 UTC (rev 7372)
@@ -11,8 +11,11 @@
 ## For more information about GAR variables, please see:
 ## https://sourceforge.net/apps/trac/gar/wiki/GAR%20Variable%20Reference
 ##
-GARNAME = mypkg
-GARVERSION = 1.0
+# Based on:
+# http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/nss/nss-3.12.4-r1.ebuild?view=markup
+GARNAME = nss
+GARVERSION = 3.12.4
+# http://www.gentoo-portage.com/AJAX/Ebuild/96014
 ##
 ## The category that your software fits in. This is not a descriptive field, but
 ## influences the build process. Depending on the CATEGORIES setting, different
@@ -25,21 +28,22 @@
 CATEGORIES = lib
 ##
 ## A one-line description of the package, which will appear in the pkginfo.
-DESCRIPTION = <please fill in>
+DESCRIPTION = Network Security Services library, implements PKI support
 ##
 ## A longer description of the package. This is only for descriptive purposes
 ## inside the Makefile and is not used elsewhere.
 define BLURB
-  <please fill in>
 endef
 ##
 ## Upstream URL that should show up in the VENDOR field as well as on
 ## http://opencsw.org/packages/<packagename>.
-SPKG_SOURCEURL =
+SPKG_SOURCEURL = http://www.mozilla.org/projects/security/pki/nss/
 ##
 ## Whitespace-separated list of URLs to download the source package from.
 ## There are presets: $(SF_MIRRORS), $(GNU_MIRRORS) and $(GOOGLE_MIRROR).
-MASTER_SITES =
+# TODO: Generate RTM_NAME from GARVERSION
+RTM_NAME = NSS_3_12_4_RTM
+MASTER_SITES = ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/$(RTM_NAME)/src/
 ##
 ## SF_PROJ is required if you set $(MASTER_SITES) to $(SF_MIRRORS) and the
 ## Sourceforge project name differs from $(GARNAME). Specifies the Sourceforge
@@ -49,14 +53,18 @@
 ## A list of space separated patch filenames from files/ that are to be applied
 ## to the extracted software before the ./configure stage. Patches need to be
 ## included in the DISTFILES variable as well.
-## PATCHFILES =
+# http://bugs.gentoo.org/show_bug.cgi?id=256102
+PATCHFILES  = nss-3.12.4.patch
+PATCHFILES += shared-libs.patch
+## PATCHFILES = freebl.patch
 ##
 ## Whitespace-separated list of files which comprise this build. mGAR will look
 ## for the files in the $(FILEDIR) (trunk/files) directory and on the
 ## $(MASTER_SITES).
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
 ##
-## We define upstream file regex so we can be notifed of new upstream software release
+## We define upstream file regex so we can be notifed of new upstream software
+## release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 ##
 ## Catalog name is the name to be used with pkg{-get,util} -i <pkgname>.
@@ -123,10 +131,10 @@
 ## ETCSERVICES = <file containing an entry for /etc/services>
 ## INETDCONF = <file containing an inetd.conf formatted entry>
 ## A list of runtime package dependencies in the form of CSWfoo.
-## REQUIRED_PKGS =
+REQUIRED_PKGS = CSWnspr CSWsqlite3
 ##
 ## A list of packages necessary to build this package
-## PREREQUISITE_PKGS = $(REQUIRED_PKGS)
+PREREQUISITE_PKGS = $(REQUIRED_PKGS) CSWnspr-devel CSWsqlite3devel
 ##
 ## When using non-empty $(PACKAGES):
 ## REQUIRED_PKGS_CSWpkgname =
@@ -145,10 +153,10 @@
 ## completely (for example when your software doesn't need to be compiled) assign
 ## this variable an empty value. The procedure works for configure, build,
 ## install and test steps.
-## CONFIGURE_SCRIPTS =
-## BUILD_SCRIPTS =
-## INSTALL_SCRIPTS =
-## TEST_SCRIPTS =
+CONFIGURE_SCRIPTS = nss
+BUILD_SCRIPTS = nss
+INSTALL_SCRIPTS = nss
+TEST_SCRIPTS =
 ##
 ## Compilation settings
 ##
@@ -162,7 +170,7 @@
 ## Arguments passed to the ./configure script.
 CONFIGURE_ARGS = $(DIRPATHS)
 ##
-## BUILD64 =
+BUILD64 = 1
 ## CONFIGURE_ENV =
 ## EXTRA_CFLAGS =
 ## EXTRA_LDFLAGS =
@@ -176,10 +184,66 @@
 ## The compiler to use. Defaults to SOS11, can be also: SOS12, GCC3, GCC4.
 ## GARCOMPILER = SOS11
 ##
-# Remove the following rules and uncomment the
-# include before building.
-all: .DEFAULT
-.DEFAULT:
-	@true
 
-#include gar/category.mk
+EXTRA_PKG_CONFIG_DIRS = $(prefix)/X11/lib
+## # To fix PR_STATIC_ASSERT(sizeof(size_t) > 4); in drbg.c, line 510
+## EXTRA_CFLAGS = -DNS_PTR_GT_32=1
+## EXTRA_CXXFLAGS = -DNS_PTR_GT_32=1
+BUILD_OPT = 1
+NSS_USE_SYSTEM_SQLITE = 1
+NSPR_INCLUDE_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --cflags-only-I nspr | gsed 's/-I//')
+NSPR_LIB_DIR = $(shell PKG_CONFIG_PATH=/opt/csw/lib pkg-config --libs-only-L nspr | gsed 's/-L//')
+USE_SYSTEM_ZLIB = 1
+ZLIB_LIBS = -lz
+NSDISTMODE = copy
+NSS_ENABLE_ECC = 1
+XCFLAGS=$(CFLAGS)
+FREEBL_NO_DEPEND = 1
+# DSO_LDOPTS = -R/opt/csw/lib/$$$$ISALIST -L/opt/csw/lib
+# export DSO_LDOPTS
+ifeq ($(MODULATION),isa-sparcv9)
+	USE_64 = 1
+endif
+ifeq ($(MODULATION),isa-amd64)
+	USE_64 = 1
+endif
+export BUILD_OPT NSS_USE_SYSTEM_SQLITE NSPR_INCLUDE_DIR NSPR_LIB_DIR USE_64
+export USE_SYSTEM_ZLIB ZLIB_LIBS NSDISTMODE NSS_ENABLE_ECC XCFLAGS FREEBL_NO_DEPEND
+
+include gar/category.mk
+
+configure-nss:
+	(cd $(WORKSRC)/mozilla/security/coreconf \
+		&& \
+	gsed -e 's:SOURCE_PREFIX = $$(CORE_DEPTH)/\.\./dist:SOURCE_PREFIX = $$(CORE_DEPTH)/dist:' \
+		-i source.mk \
+		&& \
+	gsed -i -e 's/\$$(MKSHLIB) -o/\$$(MKSHLIB) \$$(LDFLAGS) -o/g' rules.mk \
+	)
+	@$(MAKECOOKIE)
+
+build-nss: build-coreconf build-dbm build-nss-compile
+
+build-coreconf:
+	(cd $(WORKSRC)/mozilla/security/coreconf \
+		&& \
+	$(BUILD_ENV) \
+		&& \
+	gmake -j1 CC="$(CC)")
+	@$(MAKECOOKIE)
+
+build-dbm:
+	(cd $(WORKSRC)/mozilla/security/dbm \
+		&& \
+	$(BUILD_ENV) \
+		&& \
+	gmake -j1 CC="$(CC)")
+	@$(MAKECOOKIE)
+
+build-nss-compile:
+	(cd $(WORKSRC)/mozilla/security/nss \
+		&& \
+	$(BUILD_ENV) \
+		&& \
+	gmake -j1 CC="$(CC)")
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/nss/trunk/checksums
===================================================================
--- csw/mgar/pkg/template/trunk/checksums	2009-11-12 20:57:45 UTC (rev 7254)
+++ csw/mgar/pkg/nss/trunk/checksums	2009-11-21 15:16:44 UTC (rev 7372)
@@ -0,0 +1,3 @@
+39b9d2431d4ff717d103b742fcaefb81  nss-3.12.4.patch
+1ee3ed9c1900079319bd1de51388d856  nss-3.12.4.tar.gz
+0b7f69f1fdd6fbeddd9c216f59ecabc6  shared-libs.patch

Added: csw/mgar/pkg/nss/trunk/files/nss-3.12.4.patch
===================================================================
--- csw/mgar/pkg/nss/trunk/files/nss-3.12.4.patch	                        (rev 0)
+++ csw/mgar/pkg/nss/trunk/files/nss-3.12.4.patch	2009-11-21 15:16:44 UTC (rev 7372)
@@ -0,0 +1,141 @@
+--- mozilla/security/nss/lib/freebl/stubs.c.dist	2009-09-16 17:46:24.600678560 +0100
++++ b/mozilla/security/nss/lib/freebl/stubs.c	2009-09-16 18:09:59.275307160 +0100
+@@ -70,9 +70,32 @@
+ #include <secitem.h>
+ #include <blapi.h>
+ 
+-#define FREEBL_NO_WEAK 1
++#ifdef __sgi
++# include <rld_interface.h>
++# ifndef _RLD_INTERFACE_DLFCN_H_DLADDR
++#  define _RLD_INTERFACE_DLFCN_H_DLADDR
++   typedef struct Dl_info {
++       const char * dli_fname;
++       void       * dli_fbase;
++       const char * dli_sname;
++       void       * dli_saddr;
++       int          dli_version;
++       int          dli_reserved1;
++       long         dli_reserved[4];
++   } Dl_info;
++# endif
++# define _RLD_DLADDR             14
++int dladdr(void *address, Dl_info *dl);
++
++int dladdr(void *address, Dl_info *dl)
++{
++    void *v;
++    v = _rld_new_interface(_RLD_DLADDR,address,dl);
++    return (int)v;
++}
++#endif
+ 
+-#define WEAK __attribute__((weak))
++#define FREEBL_NO_WEAK 1
+ 
+ #ifdef FREEBL_NO_WEAK
+ 
+@@ -93,17 +116,17 @@
+    static type_##fn ptr_##fn = NULL
+ 
+ #define STUB_SAFE_CALL0(fn) \
+-    if (ptr_##fn) { return ptr_##fn(); }
++    if (ptr_##fn) { ptr_##fn(); }
+ #define STUB_SAFE_CALL1(fn,a1) \
+-    if (ptr_##fn) { return ptr_##fn(a1); }
++    if (ptr_##fn) { ptr_##fn(a1); }
+ #define STUB_SAFE_CALL2(fn,a1,a2) \
+-    if (ptr_##fn) { return ptr_##fn(a1,a2); }
++    if (ptr_##fn) { ptr_##fn(a1,a2); }
+ #define STUB_SAFE_CALL3(fn,a1,a2,a3) \
+-    if (ptr_##fn) { return ptr_##fn(a1,a2,a3); }
++    if (ptr_##fn) { ptr_##fn(a1,a2,a3); }
+ #define STUB_SAFE_CALL4(fn,a1,a2,a3,a4) \
+-    if (ptr_##fn) { return ptr_##fn(a1,a2,a3,a4); }
++    if (ptr_##fn) { ptr_##fn(a1,a2,a3,a4); }
+ #define STUB_SAFE_CALL6(fn,a1,a2,a3,a4,a5,a6) \
+-    if (ptr_##fn) { return ptr_##fn(a1,a2,a3,a4,a5,a6); }
++    if (ptr_##fn) { ptr_##fn(a1,a2,a3,a4,a5,a6); }
+ 
+ #define STUB_FETCH_FUNCTION(fn) \
+     ptr_##fn = (type_##fn) dlsym(lib,#fn); \
+@@ -118,6 +141,8 @@
+  * libutil will not resolve these symbols.
+  */
+ 
++#define WEAK __attribute__((weak))
++
+ #define STUB_DECLARE(ret, fn,  args) \
+    WEAK extern ret fn args
+ 
+@@ -200,7 +225,7 @@ extern void
+ PORT_Free_stub(void *ptr)
+ {
+     STUB_SAFE_CALL1(PORT_Free_Util, ptr);
+-    return free(ptr);
++    free(ptr);
+ }
+ 
+ extern void *
+@@ -220,14 +245,14 @@ PORT_ZFree_stub(void *ptr, size_t len)
+ {
+     STUB_SAFE_CALL2(PORT_ZFree_Util, ptr, len);
+     memset(ptr, 0, len);
+-    return free(ptr);
++    free(ptr);
+ }
+ 
+ extern void
+ PR_Free_stub(void *ptr)
+ {
+     STUB_SAFE_CALL1(PR_Free, ptr);
+-    return free(ptr);
++    free(ptr);
+ }
+ 
+ /*
+@@ -530,7 +555,7 @@ freebl_InitNSSUtil(void *lib)
+  * fetch the library if it's loaded. For NSS it should already be loaded
+  */
+ #define freebl_getLibrary(libName)  \
+-    dlopen (libName, RTLD_LAZY|RTLD_NOLOAD)
++    dlopen (libName, RTLD_LAZY)
+ 
+ #define freebl_releaseLibrary(lib) \
+     if (lib) dlclose(lib)
+@@ -538,7 +563,7 @@ freebl_InitNSSUtil(void *lib)
+ static void * FREEBLnsprGlobalLib = NULL;
+ static void * FREEBLnssutilGlobalLib = NULL;
+ 
+-void __attribute ((destructor)) FREEBL_unload()
++void FREEBL_unload()
+ {
+     freebl_releaseLibrary(FREEBLnsprGlobalLib);
+     freebl_releaseLibrary(FREEBLnssutilGlobalLib);
+--- mozilla/security/nss/lib/freebl/nsslowhash.c.dist	2009-09-16 18:16:17.529500640 +0100
++++ b/mozilla/security/nss/lib/freebl/nsslowhash.c	2009-09-16 18:16:37.634080480 +0100
+@@ -375,21 +375,21 @@ NSSLOWHASH_NewContext(NSSLOWInitContext 
+ void
+ NSSLOWHASH_Begin(NSSLOWHASHContext *context)
+ {
+-   return context->hashObj->begin(context->hashCtxt);
++   context->hashObj->begin(context->hashCtxt);
+ }
+ 
+ void
+ NSSLOWHASH_Update(NSSLOWHASHContext *context, const unsigned char *buf, 
+ 						 unsigned int len)
+ {
+-   return context->hashObj->update(context->hashCtxt, buf, len);
++   context->hashObj->update(context->hashCtxt, buf, len);
+ }
+ 
+ void
+ NSSLOWHASH_End(NSSLOWHASHContext *context, unsigned char *buf, 
+ 					 unsigned int *ret, unsigned int len)
+ {
+-   return context->hashObj->end(context->hashCtxt, buf, ret, len);
++   context->hashObj->end(context->hashCtxt, buf, ret, len);
+ }
+ 
+ void

Added: csw/mgar/pkg/nss/trunk/files/shared-libs.patch
===================================================================
--- csw/mgar/pkg/nss/trunk/files/shared-libs.patch	                        (rev 0)
+++ csw/mgar/pkg/nss/trunk/files/shared-libs.patch	2009-11-21 15:16:44 UTC (rev 7372)
@@ -0,0 +1,18 @@
+--- nss-3.12.4/mozilla/security/nss/lib/softoken/config.mk	2009-11-21 15:53:39.167529521 +0100
++++ nss-3.12.4/mozilla/security/nss/lib/softoken/config.mk.orig	2009-11-21 15:52:38.972288644 +0100
+@@ -54,7 +54,6 @@
+ 
+ ifdef NS_USE_GCC
+ EXTRA_SHARED_LIBS += \
+-	-L/opt/csw/lib \
+ 	-L$(DIST)/lib \
+ 	-L$(NSSUTIL_LIB_DIR) \
+ 	-lnssutil3 \
+@@ -81,7 +80,6 @@
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+ # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
+ EXTRA_SHARED_LIBS += \
+-	-L/opt/csw/lib \
+ 	-L$(DIST)/lib \
+ 	-L$(NSSUTIL_LIB_DIR) \
+ 	-lnssutil3 \


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list