From: Michael Tremer Date: Fri, 15 Oct 2010 17:26:11 +0000 (+0200) Subject: nspr: New package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b2af69ae4dd8a816141742be8a3a72771dacc2a;p=ipfire-3.x.git nspr: New package. --- diff --git a/pkgs/core/nspr/nspr-config-vars.in b/pkgs/core/nspr/nspr-config-vars.in new file mode 100644 index 000000000..ebf0aa444 --- /dev/null +++ b/pkgs/core/nspr/nspr-config-vars.in @@ -0,0 +1,2 @@ +ldflags=@LDFLAGS@ +os_libs=@OS_LIBS@ diff --git a/pkgs/core/nspr/nspr.nm b/pkgs/core/nspr/nspr.nm new file mode 100644 index 000000000..4232a98b6 --- /dev/null +++ b/pkgs/core/nspr/nspr.nm @@ -0,0 +1,107 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = nspr +PKG_VER = 4.8.6 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = System/Libraries +PKG_URL = http://www.mozilla.org/projects/nspr/ +PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+ +PKG_SUMMARY = Netscape Portable Runtime. + +define PKG_DESCRIPTION + NSPR provides platform independence for non-GUI operating system \ + facilities. These facilities include threads, thread synchronization, \ + normal file and network I/O, interval timing and calendar time, basic \ + memory management (malloc and free) and shared library linking. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +PKG_PACKAGES += $(PKG_NAME_REAL)-devel + +# Original nspr-config is not suitable for our distribution, +# because on different platforms it contains different dynamic content. +# Therefore we produce an adjusted copy of nspr-config that will be +# identical on all platforms. +# However, we need to use original nspr-config to produce some variables +# that go into nspr.pc for pkg-config. + +define STAGE_PREPARE + cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(PKG_TARBALL) + + cp -vf $(DIR_APP)/mozilla/nsprpub/config/nspr-config.in \ + $(DIR_APP)/mozilla/nsprpub/config/nspr-config-pc.in + cp -vf $(DIR_SOURCE)/nspr-config-vars.in \ + $(DIR_APP)/mozilla/nsprpub/config/ + + $(DO_PATCHES) +endef + +define STAGE_BUILD + cd $(DIR_APP) && $(DIR_APP)/mozilla/nsprpub/configure \ + $(CONFIGURE_OPTIONS) \ + --libdir=/lib \ + --includedir=/usr/include/nspr4 \ + --enable-optimize="$(CFLAGS)" \ + --disable-debug + + cd $(DIR_APP) && make +endef + +define STAGE_INSTALL_CMDS + -mkdir -pv $(BUILDROOT)/usr/{bin,lib} + -mkdir -pv $(BUILDROOT)/lib + -mkdir -pv $(BUILDROOT)/usr/lib/pkgconfig + + cp -vf $(DIR_APP)/config/nspr-config-pc \ + $(BUILDROOT)/usr/bin/nspr-config + + sed \ + -e "s,%libdir%,/usr/lib,g" \ + -e "s,%prefix%,/usr,g" \ + -e "s,%exec_prefix%,/usr,g" \ + -e "s,%includedir%,/usr/include/nspr4,g" \ + -e "s,%NSPR_VERSION%,$(PKG_VER),g" \ + -e "s,%FULL_NSPR_LIBS%,-L/usr/lib -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \ + -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \ + < $(DIR_SOURCE)/nspr.pc.in \ + > $(BUILDROOT)/usr/lib/pkgconfig/nspr.pc + + #mv -v $(BUILDROOT)/usr/lib/lib{nspr,plc.plds}4.so $(BUILDROOT)/lib/ + ln -svf ../../lib/libnspr4.so $(BUILDROOT)/usr/lib/libnspr4.so + ln -svf ../../lib/libplc4.so $(BUILDROOT)/usr/lib/libplc4.so + ln -svf ../../lib/libplds4.so $(BUILDROOT)/usr/lib/libplds4.so + + # Remove unneeded stuff + rm -rfv \ + $(BUILDROOT)/usr/bin/compile-et.pl \ + $(BUILDROOT)/usr/bin/prerr.properties \ + $(BUILDROOT)/usr/share/aclocal/nspr.m4 \ + $(BUILDROOT)/usr/include/nspr4/md +endef diff --git a/pkgs/core/nspr/nspr.pc.in b/pkgs/core/nspr/nspr.pc.in new file mode 100644 index 000000000..1d8f4a0ca --- /dev/null +++ b/pkgs/core/nspr/nspr.pc.in @@ -0,0 +1,10 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: NSPR +Description: The Netscape Portable Runtime +Version: %NSPR_VERSION% +Libs: %FULL_NSPR_LIBS% +Cflags: %FULL_NSPR_CFLAGS% diff --git a/pkgs/core/nspr/patches/nspr-config-pc.patch b/pkgs/core/nspr/patches/nspr-config-pc.patch new file mode 100644 index 000000000..24b112392 --- /dev/null +++ b/pkgs/core/nspr/patches/nspr-config-pc.patch @@ -0,0 +1,48 @@ +--- a/bmozilla/nsprpub/config/nspr-config-pc.in.x123 2005-05-11 02:53:41.000000000 +0200 ++++ b/mozilla/nsprpub/config/nspr-config-pc.in 2006-05-24 20:52:12.000000000 +0200 +@@ -98,7 +98,7 @@ + includedir=@includedir@ + fi + if test -z "$libdir"; then +- libdir=@libdir@ ++ libdir=`pkg-config --variable=libdir nspr` + fi + + if test "$echo_prefix" = "yes"; then +@@ -132,12 +132,12 @@ + if test -n "$lib_nspr"; then + libdirs="$libdirs -lnspr${major_version}" + fi +- os_ldflags="@LDFLAGS@" ++ os_ldflags=`pkg-config --variable=ldflags nspr` + for i in $os_ldflags ; do + if echo $i | grep \^-L >/dev/null; then + libdirs="$libdirs $i" + fi + done +- echo $libdirs @OS_LIBS@ ++ echo $libdirs `pkg-config --variable=os_libs nspr` + fi + +--- a/mozilla/nsprpub/configure.in.x123 2006-05-24 20:52:12.000000000 +0200 ++++ b/mozilla/nsprpub/configure.in 2006-05-24 20:53:53.000000000 +0200 +@@ -2667,6 +2667,8 @@ + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config ++config/nspr-config-pc ++config/nspr-config-vars + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile +--- a/mozilla/nsprpub/configure.x123 2006-05-24 20:52:12.000000000 +0200 ++++ b/mozilla/nsprpub/configure 2006-05-24 20:54:05.000000000 +0200 +@@ -5899,6 +5899,8 @@ + config/nsprincl.mk + config/nsprincl.sh + config/nspr-config ++config/nspr-config-pc ++config/nspr-config-vars + lib/Makefile + lib/ds/Makefile + lib/libc/Makefile