[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/RUBY PATCH 4/8] encodings: Build encodings



All encodings are included in a new library, libruby_enc. Given that the
extensions files are generated at build time by the origin build system, we
also have to run `./configure` and `make` for the original build before
building them for Unikraft. This is done once for both extensions and
encodings.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
Reviewed-by: Stefan Teodorescu <stefanl.teodorescu@xxxxxxxxx>
---
 Config.uk   |  6 +++++
 Makefile.uk | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/Config.uk b/Config.uk
index 5f84e57..a494540 100644
--- a/Config.uk
+++ b/Config.uk
@@ -125,4 +125,10 @@ config LIBRUBY_EXT
                bool "sdbm"
                default y
        endif
+
+config LIBRUBY_ENC
+       bool "Enable encodings"
+       depends on !LIBRUBY_MINI
+       default y
+
 endif
diff --git a/Makefile.uk b/Makefile.uk
index 2e68f4e..041e7ec 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -40,6 +40,7 @@
 
################################################################################
 $(eval $(call addlib_s,libruby,$(CONFIG_LIBRUBY)))
 $(eval $(call addlib_s,libruby_ext,$(CONFIG_LIBRUBY_EXT)))
+$(eval $(call addlib_s,libruby_enc,$(CONFIG_LIBRUBY_ENC)))
 
 
################################################################################
 # Sources
@@ -464,10 +465,84 @@ LIBRUBY_EXT_SRCS-y += $(LIBRUBY_SRC)/ext/sdbm/init.c|sdbm
 LIBRUBY_EXT_INIT_FLAGS-y += -I$(LIBRUBY_SRC)/ext/sdbm
 endif
 
+################################################################################
+# Encodings
+################################################################################
+LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_CINCLUDES-y)
+LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
+LIBRUBY_ENC_CFLAGS-y += -DRUBY_EXPORT=1 -DONIG_ENC_REGISTER=rb_enc_register
+
+ifeq ($(CONFIG_LIBRUBY_ENC),y)
+LIBRUBY_SRCS-y += $(LIBRUBY_SRC)/enc/encinit.c
+else
 ifneq ($(CONFIG_LIBRUBY_MINI),y)
 # Init_enc() is also in miniinit.c
 LIBRUBY_SRCS-y += $(LIBRUBY_SRC)/dmyenc.c
 endif
+endif
+
+# enc/libenc.a
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/encdb.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/big5.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/cp949.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/emacs_mule.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_jp.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_kr.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_tw.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gb2312.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gb18030.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gbk.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_1.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_2.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_3.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_4.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_5.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_6.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_7.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_8.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_9.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_10.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_11.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_13.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_14.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_15.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_16.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/koi8_r.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/koi8_u.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/shift_jis.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_16be.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_16le.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_32be.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_32le.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_31j.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1250.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1251.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1252.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1253.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1254.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1257.c
+
+# enc/libtrans.a
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/transdb.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/big5.c|trans
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/chinese.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/ebcdic.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_iso2022_kddi.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_docomo.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_kddi.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_softbank.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/escape.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/gb18030.c|trans
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/gbk.c|trans
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/iso2022.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese_euc.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese_sjis.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/korean.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/single_byte.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/utf8_mac.c
+LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/utf_16_32.c
 
 
################################################################################
 # Prepare rules
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.