4th: new package
authorFrancois Perrad <fperrad@gmail.com>
Tue, 5 Jul 2016 19:05:20 +0000 (21:05 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 6 Jul 2016 20:13:04 +0000 (22:13 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[Thomas:
 - fix the license information, it's GPLv3+, LGPLv3+.
 - add a comment about the COPYING file containing only the LGPLv3 text,
   even though there is some GPLv3+ code.
 - minor tweaks in the .mk file
 - rewrap Config.in help text.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/4th/0001-avoid-regen-during-install.patch [new file with mode: 0644]
package/4th/4th.hash [new file with mode: 0644]
package/4th/4th.mk [new file with mode: 0644]
package/4th/Config.in [new file with mode: 0644]
package/Config.in

diff --git a/package/4th/0001-avoid-regen-during-install.patch b/package/4th/0001-avoid-regen-during-install.patch
new file mode 100644 (file)
index 0000000..436cff1
--- /dev/null
@@ -0,0 +1,17 @@
+avoid regen during install
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+--- a/sources/Makefile
++++ b/sources/Makefile
+@@ -120,7 +120,7 @@
+       ln -sf $(SHARED_LIB) $(LIBRARIES)/lib4th.so
+ endif
+-mostlyinstall: libinstall all
++mostlyinstall: libinstall
+       cp 4th 4tsh pp4th $(BINARIES)
+ install: mostlyinstall
+-- 
+
diff --git a/package/4th/4th.hash b/package/4th/4th.hash
new file mode 100644 (file)
index 0000000..97083da
--- /dev/null
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  1c7adbb1a56dad4c4c781e6e023d77ac862842560c05246b691d07e9a4460ab2  4th-3.62.4-unix.tar.gz
diff --git a/package/4th/4th.mk b/package/4th/4th.mk
new file mode 100644 (file)
index 0000000..bdf0672
--- /dev/null
@@ -0,0 +1,63 @@
+################################################################################
+#
+# 4th
+#
+################################################################################
+
+4TH_VERSION = 3.62.4
+4TH_SOURCE = 4th-$(4TH_VERSION)-unix.tar.gz
+4TH_SITE = http://downloads.sourceforge.net/project/forth-4th/4th-$(4TH_VERSION)
+4TH_LICENSE = GPLv3+, LGPLv3+
+# The COPYING file only contains the text of the LGPLv3, but the
+# source code really contains parts under GPLv3+.
+4TH_LICENSE_FILES = COPYING
+4TH_DEPENDENCIES = host-4th
+4TH_INSTALL_STAGING = YES
+
+ifeq ($(BR2_STATIC_LIBS),y)
+4TH_MAKE_ENV = STATIC=1
+else
+4TH_MAKE_ENV = SHARED=1
+endif
+
+define 4TH_BUILD_CMDS
+       $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
+               CROSS="$(TARGET_CROSS)" \
+               CFLAGS="$(TARGET_CFLAGS) -DUNIX -fsigned-char" \
+               FOURTH=$(HOST_DIR)/usr/bin/4th
+endef
+
+define 4TH_INSTALL_STAGING_CMDS
+       $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources libinstall \
+               LIBRARIES=$(STAGING_DIR)/usr/lib
+       $(INSTALL) -D -m 0644 $(@D)/sources/4th.h \
+               $(STAGING_DIR)/usr/include/4th.h
+endef
+
+define 4TH_INSTALL_TARGET_CMDS
+       $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
+               BINARIES=$(TARGET_DIR)/usr/bin \
+               LIBRARIES=$(TARGET_DIR)/usr/lib
+       mkdir -p $(TARGET_DIR)/usr/share/4th/lib
+       cp -dpf $(@D)/4th/*.4th $(TARGET_DIR)/usr/share/4th
+       cp -dpf $(@D)/4th/lib/*.4th $(TARGET_DIR)/usr/share/4th/lib
+       mkdir -p $(TARGET_DIR)/usr/share/4th/demo
+       cp -dpf $(@D)/4th/demo/*.4th $(TARGET_DIR)/usr/share/4th/demo
+       mkdir -p $(TARGET_DIR)/usr/share/4th/4pp/lib
+       cp -dpf $(@D)/4th/4pp/*.4pp $(TARGET_DIR)/usr/share/4th/4pp
+       cp -dpf $(@D)/4th/4pp/lib/*.4pp $(TARGET_DIR)/usr/share/4th/4pp/lib
+endef
+
+define HOST_4TH_BUILD_CMDS
+       $(MAKE) -C $(@D)/sources all \
+               CFLAGS="$(HOST_CFLAGS) -DUNIX -fsigned-char"
+endef
+
+define HOST_4TH_INSTALL_CMDS
+       $(MAKE) -C $(@D)/sources mostlyinstall \
+               BINARIES=$(HOST_DIR)/usr/bin \
+               LIBRARIES=$(HOST_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
diff --git a/package/4th/Config.in b/package/4th/Config.in
new file mode 100644 (file)
index 0000000..4554664
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_4TH
+       bool "4th"
+       help
+         4tH is a Forth compiler that can create bytecode,
+         C-embeddable bytecode, standalone executables, but also
+         works fine as a scripting language
+
+         http://thebeez.home.xs4all.nl/4tH/
index d6c7600692b3c2d6136663eb32f64ae7c726a941..b9a75673a49d4f98227f41b27c9df1d521c19b32 100644 (file)
@@ -469,6 +469,7 @@ endmenu
 endmenu
 
 menu "Interpreter languages and scripting"
+       source "package/4th/Config.in"
        source "package/enscript/Config.in"
        source "package/erlang/Config.in"
 if BR2_PACKAGE_ERLANG