2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2011, Andrzej Szeszo
13 # Copyright 2013, Jon Tibble
14 # Copyright 2019, Michal Nowak
15 # Copyright 2022, Andreas Wacknitz
19 DROP_STATIC_LIBRARIES
= yes
21 include ..
/..
/..
/make-rules
/shared-macros.mk
24 COMPONENT_VERSION
= 4.36
25 COMPONENT_SUMMARY
= Netscape Portable Runtime
26 COMPONENT_PROJECT_URL
= https
://developer.mozilla.org
/en-US
/docs
/Mozilla
/Projects
/NSPR
27 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
28 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
29 COMPONENT_ARCHIVE_HASH
= sha256
:55dec317f1401cd2e5dba844d340b930ab7547f818179a4002bce62e6f1c6895
30 COMPONENT_ARCHIVE_URL
= https
://ftp.mozilla.org
/pub
/nspr
/releases
/v
$(COMPONENT_VERSION
)/src
/$(COMPONENT_ARCHIVE
)
31 COMPONENT_FMRI
= library
/$(COMPONENT_NAME
)
32 COMPONENT_CLASSIFICATION
= Development
/System
33 COMPONENT_LICENSE
= MPL-2.0
34 COMPONENT_LICENSE_FILE
= nspr
/LICENSE
36 COMPONENT_FMRI.nspr-32
= $(COMPONENT_FMRI
)/32
37 COMPONENT_SUMMARY.nspr-32
= $(COMPONENT_SUMMARY
) (32-bit
)
39 include $(WS_MAKE_RULES
)/common.mk
41 CONFIGURE_SCRIPT
= $(SOURCE_DIR
)/nspr
/configure
43 CONFIGURE_LIBDIR
.32 = /usr
/lib
/mps
44 CONFIGURE_LIBDIR
.64 = /usr
/lib
/mps
/$(MACH64
)
45 CONFIGURE_LIBSECDIR
.32 = /usr
/lib
/mps
/secv1
46 CONFIGURE_LIBSECDIR
.64 = /usr
/lib
/mps
/secv1
/$(MACH64
)
48 CONFIGURE_OPTIONS
.64 += --enable-64bit
50 CONFIGURE_OPTIONS
+= --includedir=/usr
/include/mps
52 # Generate the nspr-config(1) man page
53 COMPONENT_POST_BUILD_ACTION
.64 += \
54 $(GSED
) -e
's/@version@/$(COMPONENT_VERSION)/' $(COMPONENT_DIR
)/files
/nspr-config.xml
> $(BUILD_DIR_
$(BITS
))/nspr-config.xml
; \
55 /usr
/bin
/xmlto
-o
$(BUILD_DIR_
$(BITS
)) man
$(BUILD_DIR_
$(BITS
))/nspr-config.xml
;
57 # Install the nspr-config(1) man page
58 COMPONENT_POST_INSTALL_ACTION
.64 += \
59 $(INSTALL
) -D
$(BUILD_DIR_
$(BITS
))/nspr-config
.1 $(PROTOUSRSHAREMAN1DIR
)/nspr-config
.1 ;
61 # Fix RPATH/RUNPATH in libraries
62 COMPONENT_POST_INSTALL_ACTION
+= \
63 for i in
$(PROTO_DIR
)$(CONFIGURE_LIBDIR.
$(BITS
))/*.so
; do \
64 $(ELFEDIT
) -e
'dyn:value -s RPATH "$(CONFIGURE_LIBDIR.$(BITS))"' $$i ; \
65 $(ELFEDIT
) -e
'dyn:value -s RUNPATH "$(CONFIGURE_LIBDIR.$(BITS))"' $$i ; \
68 # Create compatibility symlinks for libraries
69 COMPONENT_POST_INSTALL_ACTION
.64 += \
70 $(SYMLINK
) $(MACH64
) $(PROTO_DIR
)$(CONFIGURE_LIBDIR.
$(BITS
))/..
/64 ; \
71 $(INSTALL
) -d
$(PROTO_DIR
)$(CONFIGURE_LIBSECDIR.
$(BITS
)) ; \
72 $(SYMLINK
) $(MACH64
) $(PROTO_DIR
)$(CONFIGURE_LIBSECDIR.
$(BITS
))/..
/64 ;
73 COMPONENT_POST_INSTALL_ACTION
+= \
74 $(INSTALL
) -d
$(PROTO_DIR
)$(CONFIGURE_LIBSECDIR.
$(BITS
)) ; \
75 ( cd
$(PROTO_DIR
)$(CONFIGURE_LIBDIR.
$(BITS
)) ; \
76 D
=$(if
$(filter 64,$(BITS
)),..
/$(MACH64
)/) ; \
78 $(SYMLINK
) ..
/$$D$$f $(PROTO_DIR
)$(CONFIGURE_LIBSECDIR.
$(BITS
))/$$f ; \
81 # Move the pkg-config file to our preferred location
82 COMPONENT_POST_INSTALL_ACTION
+= \
83 $(INSTALL
) -d
$(PROTOUSRLIBDIR.
$(BITS
))/pkgconfig
; \
84 $(MV
) $(PROTO_DIR
)$(CONFIGURE_LIBDIR.
$(BITS
))/pkgconfig
/nspr.
pc $(PROTOUSRLIBDIR.
$(BITS
))/pkgconfig
;
86 # Drop binaries we do not want to distribute
87 COMPONENT_POST_INSTALL_ACTION
+= $(RM
) $(PROTO_DIR
)$(CONFIGURE_BINDIR.
$(BITS
))/compile-et.pl
;
88 COMPONENT_POST_INSTALL_ACTION
+= $(RM
) $(PROTO_DIR
)$(CONFIGURE_BINDIR.
$(BITS
))/prerr.properties
;
90 # Drop include files installed for 32-bit build
91 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) -r
$(PROTOUSRINCDIR
) ;
92 # Drop the aclocal file installed for 32-bit build
93 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) $(PROTOUSRSHAREDIR
)/aclocal
/nspr.m4
;
95 # Test suite is just this script
96 COMPONENT_TEST_CMD
= $(PERL
) $(SOURCE_DIR
)/nspr
/pr
/tests
/runtests.pl
97 COMPONENT_TEST_ENV_CMD
=
99 COMPONENT_TEST_TARGETS
=
100 COMPONENT_TEST_TRANSFORMS
+= \
105 REQUIRED_PACKAGES
+= text
/xmlto
107 # Auto-generated dependencies
108 REQUIRED_PACKAGES
+= shell/ksh93
109 REQUIRED_PACKAGES
+= system
/library