Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
level and libc-like functions. The API is used in the Mozilla clients, many
of Red Hat's and Sun's server applications, and other software offerings.

Signed-off-by: Lucas Stach <[email protected]>
---
 rules/nspr.in   | 10 +++++++
 rules/nspr.make | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)
 create mode 100644 rules/nspr.in
 create mode 100644 rules/nspr.make

diff --git a/rules/nspr.in b/rules/nspr.in
new file mode 100644
index 000000000000..6ba9fa296c0a
--- /dev/null
+++ b/rules/nspr.in
@@ -0,0 +1,10 @@
+## SECTION=networking
+
+config NSPR
+       tristate
+       prompt "nspr"
+       help
+         Netscape Portable Runtime (NSPR) provides a platform-neutral API
+         for system level and libc-like functions. The API is used in the
+         Mozilla clients, many of Red Hat's and Sun's server applications,
+         and other software offerings.
diff --git a/rules/nspr.make b/rules/nspr.make
new file mode 100644
index 000000000000..72ec449af5f7
--- /dev/null
+++ b/rules/nspr.make
@@ -0,0 +1,88 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Lucas Stach <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_NSPR) += nspr
+
+#
+# Paths and names
+#
+NSPR_VERSION   := 4.12
+NSPR_MD5       := 0de760c1e00a92e180e611cf06ce9589
+NSPR           := nspr-$(NSPR_VERSION)
+NSPR_SUFFIX    := tar.gz
+NSPR_URL       := 
http://ftp.mozilla.org/pub/nspr/releases/v$(NSPR_VERSION)/src/$(NSPR).$(NSPR_SUFFIX)
+NSPR_SOURCE    := $(SRCDIR)/$(NSPR).$(NSPR_SUFFIX)
+NSPR_DIR       := $(BUILDDIR)/$(NSPR)
+NSPR_LICENSE   := MPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+NSPR_CONF_ENV  := $(CROSS_ENV)
+
+#
+# autoconf
+#
+NSPR_CONF_TOOL := autoconf
+NSPR_CONF_OPT  := $(CROSS_AUTOCONF_USR)
+
+$(STATEDIR)/nspr.prepare:
+       @$(call targetinfo)
+       @$(call clean, $(NSPR_DIR)/config.cache)
+       cd $(NSPR_DIR)/nspr && \
+               $(NSPR_PATH) $(NSPR_ENV) \
+               ./configure $(NSPR_CONF_OPT)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/nspr.compile:
+       @$(call targetinfo)
+       @$(call compile, NSPR, CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" 
CC=gcc -C nspr/config export)
+       @$(call compile, NSPR, -C nspr)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/nspr.install:
+       @$(call targetinfo)
+       @$(call compile, NSPR, DESTDIR=$(NSPR_PKGDIR) -C nspr install)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/nspr.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, nspr)
+       @$(call install_fixup, nspr,PRIORITY,optional)
+       @$(call install_fixup, nspr,SECTION,base)
+       @$(call install_fixup, nspr,AUTHOR,"Lucas Stach 
<[email protected]>")
+       @$(call install_fixup, nspr,DESCRIPTION,missing)
+
+       @$(call install_lib, nspr, 0, 0, 0644, libnspr4)
+       @$(call install_lib, nspr, 0, 0, 0644, libplc4)
+       @$(call install_lib, nspr, 0, 0, 0644, libplds4)
+
+       @$(call install_finish, nspr)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.8.0.rc3


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to