Browse Source

nspr: add package

Signed-off-by: Luka Perkov <luka@openwrt.org>
Luka Perkov 10 years ago
parent
commit
4ca8a2dbc2
2 changed files with 85 additions and 0 deletions
  1. 59
    0
      libs/nspr/Makefile
  2. 26
    0
      libs/nspr/patches/001-compile.patch

+ 59
- 0
libs/nspr/Makefile View File

@@ -0,0 +1,59 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=nspr
11
+PKG_VERSION:=3.16
12
+PKG_RELEASE:=1
13
+
14
+PKG_BUILD_DIR:=$(BUILD_DIR)/nss-$(PKG_VERSION)
15
+PKG_SOURCE:=nss-$(PKG_VERSION)-with-nspr-4.10.4.tar.gz
16
+PKG_SOURCE_URL:=ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_RTM/src/
17
+PKG_INSTALL:=1
18
+
19
+include $(INCLUDE_DIR)/package.mk
20
+
21
+CONFIGURE_PATH=nspr
22
+MAKE_PATH=nspr
23
+
24
+define Package/nspr
25
+  SECTION:=libs
26
+  CATEGORY:=Libraries
27
+  TITLE:=Netscape Portable Runtime (NSPR)
28
+  URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR
29
+  DEPENDS:=+libpthread +librt
30
+  MAINTAINER:=Luka Perkov <luka@openwrt.org>
31
+endef
32
+
33
+define Package/nspr/description
34
+  Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
35
+  level and libc-like functions. The API is used in the Mozilla clients, many of
36
+  Red Hat's and Sun's server applications, and other software offerings.
37
+endef
38
+
39
+CONFIGURE_ARGS += \
40
+	--with-arch=toolchain-default \
41
+	--with-fpu=toolchain-default \
42
+	--with-float-abi=toolchain-default \
43
+	--with-soft-float=toolchain-default
44
+
45
+define Build/InstallDev
46
+	$(INSTALL_DIR) $(1)/usr/
47
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
48
+	$(INSTALL_DIR) $(1)/usr/lib
49
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*{a,so} $(1)/usr/lib/
50
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
51
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/nspr.pc $(1)/usr/lib/pkgconfig/
52
+endef
53
+
54
+define Package/nspr/install
55
+	$(INSTALL_DIR) $(1)/usr/lib
56
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*so $(1)/usr/lib
57
+endef
58
+
59
+$(eval $(call BuildPackage,nspr))

+ 26
- 0
libs/nspr/patches/001-compile.patch View File

@@ -0,0 +1,26 @@
1
+--- a/nspr/config/Makefile.in
2
++++ b/nspr/config/Makefile.in
3
+@@ -30,7 +30,6 @@ CSRCS	= now.c
4
+ 
5
+ # This version hasn't been ported for us; the one in mozilla/config has
6
+ ifneq ($(OS_ARCH),OS2)
7
+-CSRCS  += nsinstall.c
8
+  
9
+ PLSRCS	= nfspwd.pl
10
+ endif
11
+@@ -84,7 +83,6 @@ else
12
+ ifeq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH)))
13
+ TARGETS = $(PROGS)
14
+ else
15
+-PROGS	+= $(OBJDIR)/nsinstall$(PROG_SUFFIX)
16
+ TARGETS = $(PROGS) $(PLSRCS:.pl=)
17
+ endif
18
+ endif
19
+@@ -114,6 +112,7 @@ endif
20
+ $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
21
+ 	@$(MAKE_OBJDIR)
22
+ 	$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
23
++	gcc nsinstall.c -o nsinstall
24
+ 
25
+ install:: nspr.m4
26
+ 	$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal