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
16 include ..
/..
/..
/make-rules
/shared-macros.mk
19 COMPONENT_VERSION
= 4.12
20 COMPONENT_PROJECT_URL
= https
://developer.mozilla.org
/ru
/docs
/NSPR
21 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
22 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
23 COMPONENT_ARCHIVE_HASH
= sha256
:e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de
24 COMPONENT_ARCHIVE_URL
= http
://ftp.mozilla.org
/pub
/mozilla.org
/nspr
/releases
/v
$(COMPONENT_VERSION
)/src
/$(COMPONENT_ARCHIVE
)
26 include $(WS_TOP
)/make-rules
/prep.mk
27 include $(WS_TOP
)/make-rules
/configure.mk
28 include $(WS_TOP
)/make-rules
/ips.mk
30 CONFIGURE_SCRIPT
= $(SOURCE_DIR
)/nspr
/configure
32 CONFIGURE_ENV
+= CC
="$(CC)"
34 CONFIGURE_LIBDIR
.32 = /usr
/lib
/mps
35 CONFIGURE_LIBDIR
.64 = /usr
/lib
/mps
/$(MACH64
)
37 CONFIGURE_OPTIONS
.64 += --enable-64bit
39 CONFIGURE_OPTIONS
= --prefix=$(CONFIGURE_PREFIX
)
40 CONFIGURE_OPTIONS
+= --libdir=$(CONFIGURE_LIBDIR.
$(BITS
))
41 CONFIGURE_OPTIONS
+= --includedir=/usr
/include/mps
42 #CONFIGURE_OPTIONS += --disable-debug
43 CONFIGURE_OPTIONS
+= $(CONFIGURE_OPTIONS.
$(BITS
))
45 build
: $(BUILD_32_and_64
)
47 install: $(INSTALL_32_and_64
)
48 $(MKDIR
) -p
$(PROTO_DIR
)/usr
/lib
/pkgconfig
49 cat
$(COMPONENT_DIR
)/nspr.
pc | sed s
/^Version
:/Version
:\
$(COMPONENT_VERSION
)/ \
50 > $(PROTO_DIR
)/usr
/lib
/pkgconfig
/nspr.
pc
51 for i in
$(PROTO_DIR
)/usr
/lib
/mps
/*.so
; do \
52 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "/usr/lib/mps"' $$i ;\
54 for i in
$(PROTO_DIR
)/usr
/lib
/mps
/*.so
; do \
55 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "/usr/lib/mps"' $$i ;\
57 for i in
$(PROTO_DIR
)/usr
/lib
/mps
/$(MACH64
)/*.so
; do \
58 /usr
/bin
/elfedit
-e
'dyn:value -s RPATH "/usr/lib/mps/$(MACH64)"' $$i ;\
60 for i in
$(PROTO_DIR
)/usr
/lib
/mps
/$(MACH64
)/*.so
; do \
61 /usr
/bin
/elfedit
-e
'dyn:value -s RUNPATH "/usr/lib/mps/$(MACH64)"' $$i ;\
63 $(TOUCH
) $(BUILD_DIR_32
)/.installed
$(BUILD_DIR_64
)/.installed