package/pcre: add host variant
PATCH 1/2 package/pcre: add host variant
Needed by leafnode2.
--- package/pcre/pcre.mk | 1 + 1 file changed, 1 insertion(+)
package/pcre/pcre.mk +1 -0
@@ -23,3 +23,4 @@ PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf) PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties) $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.7.10.4
PATCH 2/2 package/leafnode2: New package
--- package/Config.in | 1 + package/leafnode2/Config.in | 9 ++++++ .../leafnode2/leafnode2-0001-cross_makefile.patch | 15 +++++++++ package/leafnode2/leafnode2.mk | 33 ++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 package/leafnode2/Config.in create mode 100644 package/leafnode2/leafnode2-0001-cross_makefile.patch create mode 100644 package/leafnode2/leafnode2.mk
package/Config.in +1 -0
@@ -1000,6 +1000,7 @@ endif source "package/iw/Config.in" source "package/kismet/Config.in" source "package/knock/Config.in" + source "package/leafnode2/Config.in" source "package/lftp/Config.in" source "package/lighttpd/Config.in" source "package/linknx/Config.in"
package/leafnode2/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_LEAFNODE2 + bool "leafnode2" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_PCRE + help + Leafnode-2 is a store-and-forward NNTP (or Usenet) proxy server designed + for small sites with just a few active newsgroups. + + http://www.dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/
package/leafnode2/leafnode2-0001-cross_makefile.patch new file +15 -0
@@ -0,0 +1,15 @@ +During target package compilation the host version of b_sortnl is needed. + +Signed-off-by: Bernd Kuhls <[email protected]> + +--- a/Makefile.in.orig 2012-11-01 15:23:21.000000000 +0100 ++++ b/Makefile.in 2012-11-13 20:54:42.000000000 +0100 +@@ -1834,7 +1834,7 @@ + + configparam_data.c: $(srcdir)/config.table b_sortnl$(EXEEXT) genconfigparam_data.awk + rm -f config.table.sorted +- ./b_sortnl$(EXEEXT) <$(srcdir)/config.table >config.table.sorted ++ ./b_sortnl_host$(EXEEXT) <$(srcdir)/config.table >config.table.sorted + $(AWK) -f $(srcdir)/genconfigparam_data.awk <config.table.sorted >$@ \ + || { rm -f $@ ; false ; } +
package/leafnode2/leafnode2.mk new file +33 -0
@@ -0,0 +1,33 @@ +################################################################################ +# +# leafnode2 +# +################################################################################ + +LEAFNODE2_VERSION = 2.0.0.alpha20140727b +LEAFNODE2_SOURCE = leafnode-$(LEAFNODE2_VERSION).tar.bz2 +LEAFNODE2_SITE = http://home.pages.de/~mandree/leafnode/beta +LEAFNODE2_LICENSE = LGPLv2.1+ +LEAFNODE2_LICENSE_FILES = COPYING.LGPL +LEAFNODE2_DEPENDENCIES = host-pcre pcre + +LEAFNODE2_CONF_ENV = \ + PCRECONFIG="$(STAGING_DIR)/usr/bin/pcre-config" + +LEAFNODE2_CONF_OPT = \ + --sysconfdir=/etc/leafnode2 \ + --enable-spooldir=/var/spool/news + +# Leafnode2 needs the host version of b_sortnl during compilation. Instead of +# creating a seperate host package and installing b_sortnl to $(HOST_DIR) this +# binary is compiled on-the-fly, host-pcre is needed for this +define LEAFNODE2_BUILD_CMDS + cd $(@D); \ + $(HOST_CONFIGURE_OPTS) $(CC) -o b_sortnl_host \ + arc4random.c mergesort.c b_sortnl.c critmem_malloc.c \ + critmem_realloc.c -DHAVE_CONFIG_H -I$(HOST_DIR)/usr/include \ + -L $(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib -lpcre + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +$(eval $(autotools-package))
Signature · 1 line
1.7.10.4
Thomas Petazzoni
AppliedPATCH 2/2 package/leafnode2: New package
Dear Bernd Kuhls,
Quoted 11 lines · Bernd Kuhls
Signed-off-by Bernd Kuhls <[email protected]>--- package/Config.in | 1 + package/leafnode2/Config.in | 9 ++++++ .../leafnode2/leafnode2-0001-cross_makefile.patch | 15 +++++++++ package/leafnode2/leafnode2.mk | 33 ++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 package/leafnode2/Config.in create mode 100644 package/leafnode2/leafnode2-0001-cross_makefile.patch create mode 100644 package/leafnode2/leafnode2.mk
Applied, after doing quite a few changes:
[Thomas:
- Rewrap help text in Config.in
- Improve cross-compilation patch to not call the 'amiroot' program on the host, while it is compiled for the target.
- Use CONF_OPTS instead of CONF_OPT.
- Use a pre-build hook rather than re-implementing the BUILD_CMDS entirely.
- Also include COPYING file in license files.
- License is LGPLv2.1, not LGPLv2.1+: only one file is LGPLv2.1+, the rest doesn't have any "or later" specification, so we assume it's only LGPLv2.1.]
If you could work with upstream to get proper cross-compilation support, it would be great.
Also, it seems like the documentation recommends using a separate non-root user to run leafnode2. Maybe leafnode2.mk should create such a user?
In addition, maybe we should write somewhere in the help text that leafnode2 only works through inetd, and mention the inetd line needed to get it running? We generally like to have some minimal information in Buildroot to get started with a given package.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH 1/2 package/pcre: add host variant
In reply to Bernd KuhlsDear Bernd Kuhls,
Quoted 6 lines · Bernd Kuhls
Needed by leafnode2.
Signed-off-by Bernd Kuhls <[email protected]>--- package/pcre/pcre.mk | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com