2 # Copyright (C) 2019 Lucian Cristian
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
12 PKG_MAINTAINER
:=Lucian Cristian
<lucian.cristian@gmail.com
>
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 https
://download.cdn.mozilla.net
/pub
/$(PKG_NAME
)/releases
/v
$(PKG_VERSION
)/src
/ \
18 https
://archive.mozilla.org
/pub
/$(PKG_NAME
)/releases
/v
$(PKG_VERSION
)/src
/
19 PKG_HASH
:=7ea3297ea5969b5d25a5dd8d47f2443cda88e9ee746301f6e1e1426f8a6abc8f
26 include $(INCLUDE_DIR
)/package.mk
28 CONFIGURE_PATH
= .
/nspr
30 PKG_AUTOMAKE_PATHS
= $(PKG_BUILD_DIR
)/nspr
31 LBITS
= $(shell $(TARGET_CC
) -dM
-E
- </dev
/null | grep
-q
"__LP64__" && echo
64 || echo
32)
37 export MUSL
=$(if
$(CONFIG_LIBC_USE_GLIBC
),0,1)
38 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
$(FPIC
)
39 ifneq ($(CONFIG_USE_MUSL
),)
40 TARGET_CFLAGS
+= -D_LARGEFILE64_SOURCE
44 --build
=$(GNU_HOST_NAME
) \
45 --host
=$(GNU_HOST_NAME
) \
46 --target
=$(REAL_GNU_TARGET_NAME
) \
49 $(if
$(CONFIG_IPV6
),--enable-ipv6
,--disable-ipv6
) \
53 CROSS_COMPILE
=1 CFLAGS
="-DXP_UNIX $(HOST_CFLAGS)" LDFLAGS
="" CC
="$(HOSTCC)" \
54 $(MAKE
) -C
$(PKG_BUILD_DIR
)/nspr
/config
55 $(call Build
/Compile
/Default
)
61 TITLE
:=Netscape Portable Runtime
(NSPR
)
62 URL
:=https
://developer.mozilla.org
/en-US
/docs
/Mozilla
/Projects
/NSPR
66 define Package
/nspr
/description
67 Netscape Portable Runtime
(NSPR
) provides a platform-neutral API for system
68 level and libc-like functions. The API is used in the Mozilla clients
, many
69 of Red Hat
's and Oracle's server applications
, and other software offerings.
72 define Build
/InstallDev
76 $(1)/usr
/lib
/pkgconfig
/ \
77 $(1)/usr
/share
/aclocal
/
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/nspr
$(1)/usr
/include/
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
/
81 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* $(1)/usr
/lib
/pkgconfig
/
82 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
/
85 define Package
/nspr
/install
86 $(INSTALL_DIR
) $(1)/usr
/lib
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
$(1)/usr
/lib
/
90 $(eval
$(call BuildPackage
,nspr
))