Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Libtool work: a tentative summary
From: Lionel Landwerlin @ 2010-10-03 13:22 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100928223652.6dc72083@surf>

Hello,

Here is what I would like to us to do for the next releases :

1) Bump libtool package to 2.2, more and more packages require libtool
2.2, and we're stuck to not autoreconfigure them without 2.2. This is
already creating problems to Thomas when trying to bump host
libglib/libgtk packages.

2) Eventually integrate some patches to libtool 2.2 to be able to cross
compile autoreconfigured packages.

3) When the libtool 2.4 sysroot issue is sorted out, bump to libtool 2.4
and get rid of the patches integrated in 2).

I think 1) is mandatory for 2010.11.

Regards,

--
Lionel Landwerlin


Le mardi 28 septembre 2010 ? 22:36 +0200, Thomas Petazzoni a ?crit :
> Hello,
> 
> There has recently been quite some work done around libtool handling in
> Buildroot, in the form of two proposals done by Martin Banky and Lionel
> Landwerlin. Those two proposals are quite different and we need to make
> a choice between them. This e-mail tries to summarize the libtool
> problem, how it is currently handled in Buildroot, the technical
> proposals made by Martin and Lionel with their respective advantages
> and drawbacks. Martin and Lionel are obviously invited to comment on
> those (and the rest of this e-mail as well).
> 
> Libtool problems
> ================
> 
> Libtool problems in cross-compilation mode are well-known. The
> famous http://www.metastatic.org/text/libtool.html lists most of the
> problems, and some hacks to solve them.
> 
> Basically, Libtool does not understand the fact that we may be building
> a root filesystem in a different place than "/", and keeps looking
> in /usr/lib for libraries.
> 
> It is worth noting that libtool 2.4 has finally introduced a --sysroot
> argument which should finally solve those problems. However, until
> libtool 2.4 is picked up by most packages, we will have to live with
> the libtool problems for quite some time. See
> http://lists.gnu.org/archive/html/libtool/2010-09/msg00082.html.
> 
> Current Buildroot solution
> ==========================
> 
> The current Buildroot solution consists in two mechanisms :
> 
>  *) Apply the package/buildroot-libtool.patch to packages when
>     <pkg>_LIBTOOL_PATCH is YES. This is the default value for
>     autotools-based packages.
> 
>     This patch directly modifies the ltmain.sh script, which will be
>     used to generate the libtool script in the package as configure
>     time.
> 
>     This patch only works with libtool 1.5.x, but a number of packages
>     are now using libtool 2.2.x, so more and more packages are doing
>     <pkg>_LIBTOOL_PATCH=NO to disable the patch. This works for most
>     packages but not for others (example: I'm bumping GTK to 2.20 and
>     it needs a patch for the ltmain.sh script which has been generated
>     by libtool 2.2.x)
> 
>  *) Modify the .la files installed by Buildroot in order to add
>     $(STAGING_DIR) at the beginning of the "libdir" paths.
> 
> Martin Banky proposal
> =====================
> 
> Martin Banky has sent a proposal to improve libtool handling in
> Buildroot on September 16th. See
> http://lists.busybox.net/pipermail/buildroot/2010-September/037505.html
> and the following 4 e-mails from Martin.
> 
> Basically, Martin's proposal is to continue with the current solution
> to the libtool problem, but to clean it up a bit and to extend it to
> libtool 2.2.
> 
> This patch set has 3 main components :
> 
>  *) Simplify the existing package/buildroot-libtool.patch by removing
>     useless chunks
> 
>  *) Rename package/buildroot-libtool.patch to
>     package/buildroot-libtool-v1.5.patch, add a new
>     package/buildroot-libtool-v2.2.patch. Those two patches
>     respectively modify the ltmain.sh generated by libtool 1.5 and 2.2.
>     Then the Autotools infrastructure is modified to apply one patch or
>     the other depending on which libtool version the package is using.
> 
>  *) The remaining modifications remove libtool-related patches in
>     various packages that have become useless thanks to the previous
>     patches.
> 
> Advantages of this approach :
> 
>  *) We're keeping the current solution and only cleanup/extend it to
>     work with recent libtool versions. This is good from a
>     "conservative" point of view.
> 
>  *) As today, we don't need to autoreconf all autotools-based packages
>     just to fix the libtool issue.
> 
> Drawbacks of this approach :
> 
>  *) We may have similar issues with future versions of libtool, even if
>     the addition of --sysroot to libtool 2.4 probably means that libtool
>     1.5 and 2.2 will remain the only two versions of libtool causing
>     problems in widespread use.
> 
>  *) It keeps the current solution, which is a bit ugly: modify scripts
>     that are generated, and hack the .la files.
> 
>  *) It modifies the .la by adding informations relative to
>     $(STAGING_DIR), which may cause problems if we want to generate
>     packages (.ipkg) or if we would like to allow users to relocate the
>     Buildroot staging directory.
> 
> Lionel Landwerlin proposal
> ==========================
> 
> Lionel Landwerlin has sent a proposal to improve libtool handling in
> Buildroot on September, 18th. See
> http://lists.busybox.net/pipermail/buildroot/2010-September/037663.html
> for the mailing list post.
> 
> Basically, Lionel's proposal is to patch libtool itself to make it
> sysroot-capable and then autoreconfigure all autotools-based packages
> to make them use the fixed libtool version.
> 
> Lionel's proposal is relatively complicated because in order for the
> patch on libtool to take effect, libtool itself needs to be
> autoreconfigured, which in turn requires libtool. So Lionel has
> introduced a host-libtool-host package, which is an unmodified libtool,
> installed in a new $(HOST_HOST_DIR) directory. He later uses that
> host-libtool-host to autoreconfigure the host-libtool (which has been
> previously patched to understand sysroot related things).
> host-libtool-host will be kept for the autoreconfiguration of host
> packages, while host-libtool is used for the autoreconfiguration of
> target packages. (If your head hasn't exploded yet, keep reading,
> otherwise, take a break and come back in 10 minutes). This is what the
> first patch in Lionel patch set does. The other patches are only minor
> related changes.
> 
> Advantages of this approach :
> 
>  *) We no longer arbitrarly patch ltmain.sh in every package, with the
>     need to carry libtool-version-specific patches.
> 
>  *) We no longer need to modify the .la files.
> 
>  *) The approach seems cleaner.
> 
>  *) It is closer to what we could have with libtool 2.4, except that
>     libtool 2.4 wouldn't need to be patch as it already supports
>     --sysroot by default. Therefore, a large part of the complexity of
>     this patch set could be removed (since we wouldn't have to
>     autoreconfigure libtool itself). However, we'd still need to
>     autoreconfigure all autotools-based packages (see below). I know
>     Lionel has started experimenting with libtool 2.4, as can be seen
>     on
>     http://lists.gnu.org/archive/html/bug-libtool/2010-09/msg00064.html
> 
> Drawbacks of this approach :
> 
>  *) We need to autoreconfigure *ALL* autotools-based packages. This may
>     be an issue for two reasons: 1/ speed, 2/ packages for which
>     autoreconfiguration does not work properly (yes those packages
>     should be fixed, but anyway, this may add some work to us).
>     Obviously, as packages will start using libtool 2.4 by default,
>     this shouldn't be a problem, but we all know that it's going to
>     take years before everybody moves to that newer libtool version.
> 
>  *) The HOST_HOST_DIR thing and the host-libtool-host as it is
>     implemented today is pretty ugly. I'd rather have a either single
>     libtool installed in $(HOST_DIR), which work for both the
>     autoreconfiguration of host and target packages, or have two
>     libtools installed in $(HOST_DIR), on for host packages (just named
>     'libtool') and another for target packages (named 'cross-libtool'
>     or something similar).
> 
> Conclusion
> ==========
> 
> Therefore, the choice seems to be between :
> 
>  * A conservative solution, only extending what we have today, with
>    limited changes and impact, but keeping the existing hacks in place.
> 
>  * A radically different solution, with wider changes, more in line
>    with libtool future, but requiring an autoreconfiguration of all
>    packages that will not have libtool 2.4 by default.
> 
> In my opinion, we should settle on a solution before mid-october, in
> order to merge it before the end of october and give us enough time for
> testing before the release at the end of november. Considering how much
> time Martin and Lionel have dedicated to this issue, I think that their
> respective work deserve some attention.
> 
> Thoughts ? Comments ?
> 
> Thomas

^ permalink raw reply

* [Buildroot] [PATCH 1/3] libgtk2: bump to version 2.20.1 and mark Gtk/DirectFB as broken
From: Thomas Petazzoni @ 2010-10-03 11:13 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <871v8bz9x4.fsf@macbook.be.48ers.dk>

On Thu, 30 Sep 2010 14:35:19 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

>  Thomas> Argh, I checked http://www.gtk.org/download-linux.html
>  Thomas> yesterday, and it still advertise Gtk 2.20 and Glib 2.24.
> 
>  Thomas> I will bump those versions, yes, and mark the DirectFB
>  Thomas> support as working again.
> 
> Ok, I'll put your pull request on hold for now then. Please resend
> once ready.

Unfortunately, things are not that simple.

In order to reduce the number of dependencies needed to build
host-libgtk2 (in which a few tools are needed to build the target
libgtk2), we apply a patch to libgtk2 configure.in file. Applying a
patch to the configure.in obviously means that host-libgtk2 needs to be
auto-reconfigured.

However, libgtk2 2.22 now requires libtool 2.2, and we only have
libtool 1.5. So unless we upgrade libtool to 2.2, it is not possible to
autoreconfigure libgtk2 and therefore not possible to apply a patch to
its configure.in file.

We *really* need to take a decision on the libtool stuff. I've sent a
summary of the two proposals and would like to see some more reactions
to it in order to move forward on this topic.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* [Buildroot] [PATCH 2/2] libeXosip2: convert to autotargets and bump to 3.3.0
From: Martin Banky @ 2010-10-02 22:06 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286057184-3486-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/libeXosip2/libeXosip2.mk |  109 +++++++------------------------------
 1 files changed, 21 insertions(+), 88 deletions(-)

diff --git a/package/libeXosip2/libeXosip2.mk b/package/libeXosip2/libeXosip2.mk
index 30eac9f..415745b 100644
--- a/package/libeXosip2/libeXosip2.mk
+++ b/package/libeXosip2/libeXosip2.mk
@@ -3,93 +3,26 @@
 # libeXosip2
 #
 #############################################################
+LIBEXOSIP2_VERSION = 3.3.0
+LIBEXOSIP2_SOURCE = libexosip2_$(LIBEXOSIP2_VERSION).orig.tar.gz
+LIBEXOSIP2_PATCH = libexosip2_$(LIBEXOSIP2_VERSION)-1.diff.gz
+LIBEXOSIP2_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libe/libexosip2
+LIBEXOSIP2_INSTALL_STAGING = YES
+
+LIBEXOSIP2_DEPENDENCIES = host-pkg-config libosip2
+
+ifneq ($(LIBEXOSIP2_PATCH),)
+define LIBEXOSIP2_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		(cd $(@D)/debian/patches && for i in *; \
+		 do $(SED) 's,^\+\+\+ .*cvs-$(LIBEXOSIP2_VERSION)/,+++ cvs-$(LIBEXOSIP2_VERSION)/,' $$i; \
+		 done; \
+		); \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \
+	fi
+endef
+endif
 
-LIBEXOSIP2_VERSION=3.1.0
-LIBEXOSIP2_SOURCE=libeXosip2-$(LIBEXOSIP2_VERSION).tar.gz
-LIBEXOSIP2_SITE=http://www.antisip.com/download/exosip2
-LIBEXOSIP2_DIR=$(BUILD_DIR)/libeXosip2-$(LIBEXOSIP2_VERSION)
-LIBEXOSIP2_CAT:=$(ZCAT)
-
-$(DL_DIR)/$(LIBEXOSIP2_SOURCE):
-	$(call DOWNLOAD,$(LIBEXOSIP2_SITE),$(LIBEXOSIP2_SOURCE))
-
-$(LIBEXOSIP2_DIR)/.unpacked: $(DL_DIR)/$(LIBEXOSIP2_SOURCE)
-	$(LIBEXOSIP2_CAT) $(DL_DIR)/$(LIBEXOSIP2_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	$(CONFIG_UPDATE) $(LIBEXOSIP2_DIR)
-	touch $(LIBEXOSIP2_DIR)/.unpacked
-
-$(LIBEXOSIP2_DIR)/.configured: $(LIBEXOSIP2_DIR)/.unpacked
-	(cd $(LIBEXOSIP2_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--enable-shared \
-		--enable-static \
-		$(DISABLE_NLS) \
-	)
-	touch $@
-
-$(LIBEXOSIP2_DIR)/.compiled: $(LIBEXOSIP2_DIR)/.configured
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBEXOSIP2_DIR)
-	touch $@
-
-#LDFLAGS=$(TARGET_LDFLAGS)
-
-$(STAGING_DIR)/usr/lib/libeXosip2.so: $(LIBEXOSIP2_DIR)/.compiled
-	cp -dpf $(LIBEXOSIP2_DIR)/src/.libs/libeXosip2.so* $(STAGING_DIR)/usr/lib
-	touch $@
-
-$(STAGING_DIR)/usr/lib/libeXosip2.a: $(LIBEXOSIP2_DIR)/.compiled
-	cp -dpf $(LIBEXOSIP2_DIR)/src/.libs/libeXosip2.a $(STAGING_DIR)/usr/lib
-	cp -dpf $(LIBEXOSIP2_DIR)/include/*.h $(STAGING_DIR)/usr/include
-	touch $@
-
-$(STAGING_DIR)/usr/lib/libeXosip2.la: $(LIBEXOSIP2_DIR)/.compiled
-	cp -dpf $(LIBEXOSIP2_DIR)/src/libeXosip2.la $(STAGING_DIR)/usr/lib
-	$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libeXosip2.la
-	touch $@
-
-$(STAGING_DIR)/usr/bin/sip_reg: $(LIBEXOSIP2_DIR)/.compiled
-	cp -dpf $(LIBEXOSIP2_DIR)/tools/.libs/sip_reg $(STAGING_DIR)/usr/bin
-	touch $@
-
-
-$(TARGET_DIR)/usr/lib/libeXosip2.so: $(STAGING_DIR)/usr/lib/libeXosip2.so
-	mkdir -p $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/lib/libeXosip2.so* $(TARGET_DIR)/usr/lib/
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libeXosip2.so*
-	touch $@
-
-$(TARGET_DIR)/usr/bin/sip_reg: $(STAGING_DIR)/usr/bin/sip_reg
-	mkdir -p $(TARGET_DIR)/usr/bin
-	cp -dpf $(STAGING_DIR)/usr/bin/sip_reg $(TARGET_DIR)/usr/bin
-	touch $@
-
-
-
-libeXosip2: host-pkg-config libosip2 $(TARGET_DIR)/usr/lib/libeXosip2.so
-
-libeXosip2-source: $(DL_DIR)/$(LIBEXOSIP2_SOURCE)
-
-libeXosip2-clean:
-	-$(MAKE) -C $(LIBEXOSIP2_DIR) clean
-	-rm -f $(STAGING_DIR)/usr/lib/libeXosip2.*
-	-rm -f $(TARGET_DIR)/usr/lib/libeXosip2.*
-
-
-libeXosip2-dirclean:
-	rm -rf $(LIBEXOSIP2_DIR)
+LIBEXOSIP2_POST_PATCH_HOOKS += LIBEXOSIP2_DEBIAN_PATCHES
 
-.PHONY: libeXosip2-headers libeXosip2-target-headers
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LIBEXOSIP2),y)
-TARGETS+=libeXosip2
-endif
+$(eval $(call AUTOTARGETS,package,libeXosip2))
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] libosip2: change site location and bump to 3.3.0
From: Martin Banky @ 2010-10-02 22:06 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286057184-3486-1-git-send-email-Martin.Banky@gmail.com>

Change the site location to debian mirror to get the latest debian patches.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/libosip2/libosip2.mk |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/package/libosip2/libosip2.mk b/package/libosip2/libosip2.mk
index 441b84c..aa15332 100644
--- a/package/libosip2/libosip2.mk
+++ b/package/libosip2/libosip2.mk
@@ -3,14 +3,24 @@
 # libosip2
 #
 #############################################################
-LIBOSIP2_VERSION=3.1.0
-LIBOSIP2_SOURCE=libosip2-$(LIBOSIP2_VERSION).tar.gz
-LIBOSIP2_SITE=http://www.antisip.com/download/exosip2
-LIBOSIP2_INSTALL_STAGING=YES
+LIBOSIP2_VERSION = 3.3.0
+LIBOSIP2_SOURCE = libosip2_$(LIBOSIP2_VERSION).orig.tar.gz
+LIBOSIP2_PATCH = libosip2_$(LIBOSIP2_VERSION)-1.diff.gz
+LIBOSIP2_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libo/libosip2
+LIBOSIP2_INSTALL_STAGING = YES
 
-LIBOSIP2_CONF_OPT = \
-	--with-gnu-ld \
-	--enable-shared \
-	--enable-static
+ifneq ($(LIBOSIP2_PATCH),)
+define LIBOSIP2_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		(cd $(@D)/debian/patches && for i in *; \
+		 do $(SED) 's,^\+\+\+ .*cvs-$(LIBOSIP2_VERSION)/,+++ cvs-$(LIBOSIP2_VERSION)/,' $$i; \
+		 done; \
+		); \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \
+	fi
+endef
+endif
+
+LIBOSIP2_POST_PATCH_HOOKS += LIBOSIP2_DEBIAN_PATCHES
 
 $(eval $(call AUTOTARGETS,package,libosip2))
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 0/2] libeXosip2: convert to autotargets and bump to 3.3.0
From: Martin Banky @ 2010-10-02 22:06 UTC (permalink / raw)
  To: buildroot

Both patches are needed for this to work properly.

Martin

[PATCH 1/2] libosip2: change site location and bump to 3.3.0
[PATCH 2/2] libeXosip2: convert to autotargets and bump to 3.3.0

^ permalink raw reply

* [Buildroot] [PATCH 2/2] imagemagick: convert to autotargets and bump to 6.6.4
From: Martin Banky @ 2010-10-02 20:51 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286052682-22218-1-git-send-email-Martin.Banky@gmail.com>

program-transform-name='s,,,' is needed, otherwise configure defines it as
$(platform)-$(cpu)-. During install, all executables are prepended with this
variable.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 ....3.4-add-errno-h-if-argz-h-does-not-exist.patch |   11 --
 ....6.4-add-errno-h-if-argz-h-does-not-exist.patch |   11 ++
 package/imagemagick/imagemagick.mk                 |  148 ++------------------
 3 files changed, 25 insertions(+), 145 deletions(-)
 delete mode 100644 package/imagemagick/imagemagick-6.3.4-add-errno-h-if-argz-h-does-not-exist.patch
 create mode 100644 package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch

diff --git a/package/imagemagick/imagemagick-6.3.4-add-errno-h-if-argz-h-does-not-exist.patch b/package/imagemagick/imagemagick-6.3.4-add-errno-h-if-argz-h-does-not-exist.patch
deleted file mode 100644
index a11fdd2..0000000
--- a/package/imagemagick/imagemagick-6.3.4-add-errno-h-if-argz-h-does-not-exist.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ImageMagick-6.3.4.old/configure	2007-05-12 05:49:25.000000000 +0200
-+++ ImageMagick-6.3.4.new/configure	2007-05-21 16:53:32.000000000 +0200
-@@ -9484,6 +9484,8 @@ cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #if HAVE_ARGZ_H
- #  include <argz.h>
-+#else
-+#  include <errno.h>
- #endif
- 
- typedef error_t ac__type_new_;
diff --git a/package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch b/package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch
new file mode 100644
index 0000000..66a6747
--- /dev/null
+++ b/package/imagemagick/imagemagick-6.6.4-add-errno-h-if-argz-h-does-not-exist.patch
@@ -0,0 +1,11 @@
+--- a/configure	2010-09-26 17:05:45.000000000 -0700
++++ b/configure	2010-09-30 23:47:09.000000000 -0700
+@@ -20354,6 +20354,8 @@ done
+ 
+ ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
+ #  include <argz.h>
++#else
++#  include <errno.h>
+ #endif
+ "
+ if test "x$ac_cv_type_error_t" = xyes; then :
diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk
index 9eb9d69..996abc7 100644
--- a/package/imagemagick/imagemagick.mk
+++ b/package/imagemagick/imagemagick.mk
@@ -3,50 +3,21 @@
 # imagemagick
 #
 #############################################################
-IMAGEMAGICK_MAJOR:=6.4.8
-IMAGEMAGICK_VERSION:=$(IMAGEMAGICK_MAJOR)-4
-IMAGEMAGICK_SOURCE:=ImageMagick-$(IMAGEMAGICK_VERSION).tar.bz2
-IMAGEMAGICK_SITE:=ftp://ftp.imagemagick.org/pub/ImageMagick
-IMAGEMAGICK_DIR:=$(BUILD_DIR)/ImageMagick-$(IMAGEMAGICK_VERSION)
-IMAGEMAGICK_CAT:=$(BZCAT)
-IMAGEMAGICK_LIB:=$(TARGET_DIR)/usr/lib/libMagickCore.so
+IMAGEMAGICK_MAJOR = 6.6.4
+IMAGEMAGICK_VERSION = $(IMAGEMAGICK_MAJOR)-8
+IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.bz2
+IMAGEMAGICK_SITE = ftp://ftp.imagemagick.org/pub/ImageMagick
+IMAGEMAGICK_INSTALL_STAGING = YES
 
-IMAGEMAGICK_TARGET_BINARIES:=$(TARGET_DIR)/usr/bin/animate
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/compare
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/composite
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/conjure
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/display
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/import
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/mogrify
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/montage
-IMAGEMAGICK_TARGET_BINARIES+=$(TARGET_DIR)/usr/bin/convert
-
-IMAGEMAGICK_COPY:=cp -df --preserve=mode,ownership
-$(DL_DIR)/$(IMAGEMAGICK_SOURCE):
-	$(call DOWNLOAD,$(IMAGEMAGICK_SITE),$(IMAGEMAGICK_SOURCE))
-
-$(IMAGEMAGICK_DIR)/.unpacked: $(DL_DIR)/$(IMAGEMAGICK_SOURCE)
-	$(IMAGEMAGICK_CAT) $(DL_DIR)/$(IMAGEMAGICK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(IMAGEMAGICK_DIR) package/imagemagick/ imagemagick-$(IMAGEMAGICK_VERSION)\*.patch\*
-	$(CONFIG_UPDATE) $(IMAGEMAGICK_DIR)/config
-	touch $@
+IMAGEMAGICK_DEPENDENCIES = jpeg tiff
 
 ifeq ($(BR2_LARGEFILE),y)
-IMAGEMAGICK_CONF_OPTS = ac_cv_sys_file_offset_bits=64
+IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64
 else
-IMAGEMAGICK_CONF_OPTS = ac_cv_sys_file_offset_bits=32
+IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=32
 endif
 
-$(IMAGEMAGICK_DIR)/.configured: $(IMAGEMAGICK_DIR)/.unpacked
-	(cd $(IMAGEMAGICK_DIR); rm -f config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--sysconfdir=/etc \
+IMAGEMAGICK_CONF_OPT = --program-transform-name='s,,,' \
 		--without-perl \
 		--without-wmf \
 		--without-xml \
@@ -60,101 +31,10 @@ $(IMAGEMAGICK_DIR)/.configured: $(IMAGEMAGICK_DIR)/.unpacked
 		--without-gslib \
 		--without-fpx \
 		--without-freetype \
-		--without-x \
-		$(IMAGEMAGICK_CONF_OPTS) \
-	)
-	touch $@
-
-$(IMAGEMAGICK_DIR)/.compiled: $(IMAGEMAGICK_DIR)/.configured
-	$(MAKE) -C $(IMAGEMAGICK_DIR)
-	touch $@
-
-$(STAGING_DIR)/usr/lib/libMagickCore.a: $(IMAGEMAGICK_DIR)/.compiled
-	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(IMAGEMAGICK_DIR) install
-	touch -c $@
-
-$(IMAGEMAGICK_LIB): $(STAGING_DIR)/usr/lib/libMagickCore.a
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/lib/libMagickWand.so* $(TARGET_DIR)/usr/lib/
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libMagickWand.so*
-	mkdir -p $(TARGET_DIR)/usr/lib/ImageMagick-$(IMAGEMAGICK_MAJOR)
-	$(IMAGEMAGICK_COPY) -r $(STAGING_DIR)/usr/lib/ImageMagick-$(IMAGEMAGICK_MAJOR) $(TARGET_DIR)/usr/lib
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/lib/libMagickCore.so* $(TARGET_DIR)/usr/lib/
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(IMAGEMAGICK_LIB)*
-	touch -c $@
-
-$(IMAGEMAGICK_DIR)/.libinstall: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_DIR)/libtool --finish $(TARGET_DIR)/usr/lib/ImageMagick-$(IMAGEMAGICK_MAJOR)/modules-Q16/coders
-	$(IMAGEMAGICK_DIR)/libtool --finish $(TARGET_DIR)/usr/lib/ImageMagick-$(IMAGEMAGICK_MAJOR)/modules-Q16/filters
-	touch $@
-
-$(TARGET_DIR)/usr/bin/animate: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-animate $(TARGET_DIR)/usr/bin/animate
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/animate
-	touch $@
-
-$(TARGET_DIR)/usr/bin/compare: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-compare $(TARGET_DIR)/usr/bin/compare
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/compare
-	touch $@
-
-$(TARGET_DIR)/usr/bin/composite: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-composite $(TARGET_DIR)/usr/bin/composite
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/composite
-	touch $@
-
-$(TARGET_DIR)/usr/bin/conjure: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-conjure $(TARGET_DIR)/usr/bin/conjure
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/conjure
-	touch $@
-
-$(TARGET_DIR)/usr/bin/display: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-display $(TARGET_DIR)/usr/bin/display
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/display
-	touch $@
-
-$(TARGET_DIR)/usr/bin/import: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-import $(TARGET_DIR)/usr/bin/import
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/import
-	touch $@
+		--without-x
 
-$(TARGET_DIR)/usr/bin/mogrify: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-mogrify $(TARGET_DIR)/usr/bin/mogrify
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/mogrify
-	touch $@
+define ICU_INSTALL_STAGING_CMDS
+	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
+endef
 
-$(TARGET_DIR)/usr/bin/montage: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-montage $(TARGET_DIR)/usr/bin/montage
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/montage
-	touch $@
-
-$(TARGET_DIR)/usr/bin/convert: $(IMAGEMAGICK_LIB)
-	$(IMAGEMAGICK_COPY) $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-convert $(TARGET_DIR)/usr/bin/convert
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/convert
-	touch $@
-
-imagemagick: jpeg tiff $(IMAGEMAGICK_LIB) \
-		$(IMAGEMAGICK_DIR)/.libinstall \
-		$(IMAGEMAGICK_TARGET_BINARIES)
-
-imagemagick-source: $(DL_DIR)/$(IMAGEMAGICK_SOURCE)
-
-imagemagick-unpacked:$(IMAGEMAGICK_DIR)/.unpacked
-
-imagemagick-clean:
-	for target_binary in $(IMAGEMAGICK_TARGET_BINARIES); do \
-		rm -f $$target_binary; \
-	done
-	rm -rf $(TARGET_DIR)/usr/lib/libMagick*
-	rm -rf $(TARGET_DIR)/usr/lib/ImageMagick-$(IMAGEMAGICK_MAJOR)
-	-$(MAKE) -C $(IMAGEMAGICK_DIR) clean
-
-imagemagick-dirclean:
-	rm -rf $(IMAGEMAGICK_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_IMAGEMAGICK),y)
-TARGETS+=imagemagick
-endif
+$(eval $(call AUTOTARGETS,package,imagemagick))
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 1/2] jpeg: bump to 8b
From: Martin Banky @ 2010-10-02 20:51 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286052682-22218-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/jpeg/jpeg-build.patch   |   99 ---------------------------------------
 package/jpeg/jpeg-libtool.patch |   66 --------------------------
 package/jpeg/jpeg.mk            |    7 +--
 3 files changed, 3 insertions(+), 169 deletions(-)
 delete mode 100644 package/jpeg/jpeg-build.patch
 delete mode 100644 package/jpeg/jpeg-libtool.patch

diff --git a/package/jpeg/jpeg-build.patch b/package/jpeg/jpeg-build.patch
deleted file mode 100644
index 9f3c5c2..0000000
--- a/package/jpeg/jpeg-build.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-- Respect options from configure (bindir/libdir/etc...)
-- Grab AR from the env instead of hardcoding to 'ar'
-- Fix install to respect $(DESTDIR)
-- Also install jpegint.h #64254
-
---- jpeg/makefile.cfg
-+++ jpeg/makefile.cfg
-@@ -11,13 +11,13 @@
- # Where to install the programs and man pages.
- prefix = @prefix@
- exec_prefix = @exec_prefix@
--bindir = $(exec_prefix)/bin
--libdir = $(exec_prefix)/lib
--includedir = $(prefix)/include
-+bindir = @bindir@
-+libdir = @libdir@
-+includedir = @includedir@
- binprefix =
- manprefix =
- manext = 1
--mandir = $(prefix)/man/man$(manext)
-+mandir = @mandir@/man$(manext)
- 
- # The name of your C compiler:
- CC= @CC@
-@@ -60,7 +60,8 @@
- # directory creation command
- MKDIR= mkdir
- # library (.a) file creation command
--AR= ar rc
-+AR = @AR@
-+ARFLAGS = rc
- # second step in .a creation (use "touch" if not needed)
- AR2= @RANLIB@
- # installation program
-@@ -163,7 +164,7 @@
- # without libtool:
- libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
- 	$(RM) libjpeg.a
--	$(AR) libjpeg.a  $(LIBOBJECTS)
-+	$(AR) $(ARFLAGS) libjpeg.a  $(LIBOBJECTS)
- 	$(AR2) libjpeg.a
- 
- # with libtool:
-@@ -191,25 +191,29 @@
- # Installation rules:
- 
- install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@
--	$(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
--	$(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
--	$(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
--	$(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
--	$(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
--	$(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
--	$(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
--	$(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
--	$(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
--	$(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
-+	mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
-+	$(INSTALL_PROGRAM) cjpeg $(DESTDIR)$(bindir)/$(binprefix)cjpeg
-+	$(INSTALL_PROGRAM) djpeg $(DESTDIR)$(bindir)/$(binprefix)djpeg
-+	$(INSTALL_PROGRAM) jpegtran $(DESTDIR)$(bindir)/$(binprefix)jpegtran
-+	$(INSTALL_PROGRAM) rdjpgcom $(DESTDIR)$(bindir)/$(binprefix)rdjpgcom
-+	$(INSTALL_PROGRAM) wrjpgcom $(DESTDIR)$(bindir)/$(binprefix)wrjpgcom
-+	$(INSTALL_DATA) $(srcdir)/cjpeg.1 $(DESTDIR)$(mandir)/$(manprefix)cjpeg.$(manext)
-+	$(INSTALL_DATA) $(srcdir)/djpeg.1 $(DESTDIR)$(mandir)/$(manprefix)djpeg.$(manext)
-+	$(INSTALL_DATA) $(srcdir)/jpegtran.1 $(DESTDIR)$(mandir)/$(manprefix)jpegtran.$(manext)
-+	$(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(DESTDIR)$(mandir)/$(manprefix)rdjpgcom.$(manext)
-+	$(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(DESTDIR)$(mandir)/$(manprefix)wrjpgcom.$(manext)
- 
- install-lib: libjpeg.$(A) install-headers
--	$(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)
-+	mkdir -p $(DESTDIR)$(libdir)
-+	$(INSTALL_LIB) libjpeg.$(A) $(DESTDIR)$(libdir)/$(binprefix)libjpeg.$(A)
- 
- install-headers: jconfig.h
--	$(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
--	$(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
--	$(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
--	$(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
-+	mkdir -p $(DESTDIR)$(includedir)
-+	$(INSTALL_DATA) jconfig.h $(DESTDIR)$(includedir)/jconfig.h
-+	$(INSTALL_DATA) $(srcdir)/jpegint.h $(DESTDIR)$(includedir)/jpegint.h
-+	$(INSTALL_DATA) $(srcdir)/jpeglib.h $(DESTDIR)$(includedir)/jpeglib.h
-+	$(INSTALL_DATA) $(srcdir)/jmorecfg.h $(DESTDIR)$(includedir)/jmorecfg.h
-+	$(INSTALL_DATA) $(srcdir)/jerror.h $(DESTDIR)$(includedir)/jerror.h
- 
- clean:
- 	$(RM) *.o *.lo libjpeg.a libjpeg.la
---- jpeg/configure
-+++ jpeg/configure
-@@ -1777,6 +1777,7 @@
- s%@CPP@%$CPP%g
- s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- s%@INSTALL_DATA@%$INSTALL_DATA%g
-+s%@AR@%${AR-ar}%g
- s%@RANLIB@%$RANLIB%g
- s%@LIBTOOL@%$LIBTOOL%g
- s%@O@%$O%g
diff --git a/package/jpeg/jpeg-libtool.patch b/package/jpeg/jpeg-libtool.patch
deleted file mode 100644
index 3c4b573..0000000
--- a/package/jpeg/jpeg-libtool.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- jpeg/configure
-+++ jpeg/configure
-@@ -1559,7 +1559,7 @@
-   if test "x$LTSTATIC" = xno; then
-     disable_static="--disable-static"
-   fi
--  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
-+  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh $CHOST
- fi
- 
- # Select memory manager depending on user input.
---- jpeg/ltconfig
-+++ jpeg/ltconfig
-@@ -299,6 +299,7 @@
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case "$host_os" in
- linux-gnu*) ;;
-+linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
- 
-@@ -553,7 +553,9 @@
-     # On HP-UX, both CC and GCC only warn that PIC is supported... then they
-     # create non-PIC objects.  So, if there were any warnings, we assume that
-     # PIC is not supported.
-+    # Make sure we only test warnings on HP-UX (pic_flag == +Z) or we can
-+    # easily break Linux builds http://bugs.gentoo.org/70947
--    if test -s conftest.err; then
-+    if test -s conftest.err -a "$pic_flag" = "+Z"; then
-       echo "$ac_t"no 1>&6
-       can_build_shared=no
-       pic_flag=
-@@ -1210,7 +1210,6 @@
-   else
-     # Only the GNU ld.so supports shared libraries on MkLinux.
-     case "$host_cpu" in
--    powerpc*) dynamic_linker=no ;;
-     *) dynamic_linker='Linux ld.so' ;;
-     esac
-   fi
-@@ -1259,6 +1260,25 @@
-   fi
-   ;;
- 
-+linux-uclibc*)
-+  version_type=linux
-+  need_lib_prefix=no
-+  need_version=no
-+  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
-+  soname_spec='${libname}${release}.so.$major'
-+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-+  shlibpath_var=LD_LIBRARY_PATH
-+  shlibpath_overrides_runpath=no
-+  deplibs_check_method=pass_all
-+  # This implies no fast_install, which is unacceptable.
-+  # Some rework will be needed to allow for fast_install
-+  # before this can be enabled.
-+  # Note: copied from linux-gnu, and may not be appropriate.
-+  hardcode_into_libs=yes
-+  # Assume using the uClibc dynamic linker.
-+  dynamic_linker="uClibc ld.so"
-+  ;;
-+
- netbsd* | openbsd*)
-   version_type=sunos
-   library_names_spec='${libname}${release}.so.$versuffix'
diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk
index 4f08534..1f408a0 100644
--- a/package/jpeg/jpeg.mk
+++ b/package/jpeg/jpeg.mk
@@ -20,13 +20,12 @@
 # License along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA
-JPEG_VERSION:=6b
-JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/
-JPEG_SOURCE=jpegsrc.v$(JPEG_VERSION).tar.gz
+JPEG_VERSION = 8b
+JPEG_SITE = http://www.ijg.org/files/
+JPEG_SOURCE = jpegsrc.v$(JPEG_VERSION).tar.gz
 JPEG_INSTALL_STAGING = YES
 JPEG_INSTALL_TARGET = YES
 JPEG_LIBTOOL_PATCH = NO
-JPEG_CONF_OPT = --without-x --enable-shared --enable-static
 
 define JPEG_REMOVE_USELESS_TOOLS
 	rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom wrjpgcom)
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 0/2] imagemagick: convert to autotargets and bump to 6.6.4
From: Martin Banky @ 2010-10-02 20:51 UTC (permalink / raw)
  To: buildroot

Both patches are needed for this to work properly.

Martin

[PATCH 1/2] jpeg: bump to 8b
[PATCH 2/2] imagemagick: convert to autotargets and bump to 6.6.4

^ permalink raw reply

* [Buildroot] libpng install question
From: H Hartley Sweeten @ 2010-10-01 16:33 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <AANLkTi=2p=Zesb=ruU5MVfQdJGy7nSG=OL1FPXMFEtd3@mail.gmail.com>

On Friday, October 01, 2010 1:14 AM, Lionel Landwerlin wrote:
>
> libpng12-config and libpng-config are part of the libpng package, so
> it is normal they are being installed on the target. However they
> shouldn't be installed unless you've selected to installed development
> files in the buildroot config.
> This might be a small regression introduced by this commit :
> http://git.buildroot.org/buildroot/commit/?id=55ade5c7964e15f9b1eba061ab840cc4c25e4e37
> Are you using a recent version of the buildroot's git repository ?

I don't think that commit is the problem.  It just changes the install step
from "make install-strip" to "make install".  But, I could be wrong...

Yesterday, after I noticed the files on my rootfs, I did a pull of the latest
buildroot git repository so I should be current.

I also just checked my .config and BR2_HAVE_DEVFILES is not selected.

It looks like something in the configure step for libpng is causing the
-config files to be built and installed on the target.  Also, is the old
library (libpng12) needed?  It appears that it can optionally be excluded
also.

Regards,
Hartley

^ permalink raw reply

* [Buildroot] [PATCH 2/2] toolchain: add new toolchain backend: crosstool-NG
From: Peter Korsgaard @ 2010-10-01 14:44 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1284926049-9882-3-git-send-email-yann.morin.1998@anciens.enib.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>

Committed, thanks a lot!

I fixed a few minor things (Config.in should be indented with tabs, we
normally don't use a seperate prompt ".." line, and shuffled the make
targets around slightly so they follow the logic flow
(download/extract/patch/configure/build/.. rather than the other way
around).

I've noticed that you're not propagating some of the toolchain options
(like wchar) to ct-ng, but we can add that later.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] toolchain/gdb: fix WCHAR typo
From: Peter Korsgaard @ 2010-10-01 14:41 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=11334624c1e30d3858e15724b57178fbb93136a0
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 toolchain/gdb/Config.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/toolchain/gdb/Config.in b/toolchain/gdb/Config.in
index edd8715..b45de9a 100644
--- a/toolchain/gdb/Config.in
+++ b/toolchain/gdb/Config.in
@@ -8,7 +8,7 @@ config BR2_PACKAGE_GDB
 	    Build the full gdb debugger to run on the target.
 
 comment "Gdb debugger for the target needs WCHAR support in toolchain"
-	depends on !BR2_USE_WHCAR
+	depends on !BR2_USE_WCHAR
 
 config BR2_PACKAGE_GDB_SERVER
 	bool "Build gdb server for the Target"
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] toolchain: add new toolchain backend: crosstool-NG
From: Yann E. MORIN @ 2010-10-01 14:41 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=10c1eec2c3351e8a7040431d3178b5a3104db5a2
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: indent Config.in, shuffle make targets around]
Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Patch is too large, so refusing to show it

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Gustavo Zacarias @ 2010-10-01 13:41 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100930234735.4ffdc3ea@surf>

On 09/30/10 18:47, Thomas Petazzoni wrote:

> I confirm that since Gustavo converted the package to autotargets, the
> previously existing build failures with external toolchain have
> disappeared. I just tested with a recent (a few days) Git, and net-snmp
> built just fine with an external ARM CodeSourcery toolchain.
> 
> Now, I have no idea if it actually works, since I don't know how to
> test it. But that's another story :-)
> 
> Regards,
> 
> Thomas

That's easy actually :)

Stick into say /tmp/snmpd.conf:
com2sec local localhost thepassword
group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation Unknown
syscontact Unknown

Run "snmpd -c /tmp/snmpd.conf".
And then run "snmpwalk -v 1 -c thepassword localhost".
You'll get loads of data if snmpd is working ok.
You can define additional ACLs (com2sec+group) to enable remote access.

^ permalink raw reply

* [Buildroot] [Bug 1357] Add bluez to buildroot system
From: bugzilla at busybox.net @ 2010-10-01 10:03 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <bug-1357-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=1357

Matthijs Benschop <m.benschop@hig.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1333|0                           |1
        is obsolete|                            |

--- Comment #3 from Matthijs Benschop <m.benschop@hig.nl>  ---
Created attachment 2545
  --> https://bugs.busybox.net/attachment.cgi?id=2545
Add bluez to buildroot

This is better patch, not having the i386 hardware dependency.

Tested on arm926.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Peter Korsgaard @ 2010-10-01  8:31 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100930234735.4ffdc3ea@surf>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> On Thu, 30 Sep 2010 21:47:42 +0200
 Thomas> Peter Korsgaard <jacmet@uclibc.org> wrote:

 >> Could someone using the external toolchain (Thomas?) give netsnmp a
 >> quick test?

 Thomas> I confirm that since Gustavo converted the package to autotargets, the
 Thomas> previously existing build failures with external toolchain have
 Thomas> disappeared. I just tested with a recent (a few days) Git, and net-snmp
 Thomas> built just fine with an external ARM CodeSourcery toolchain.

 Thomas> Now, I have no idea if it actually works, since I don't know how to
 Thomas> test it. But that's another story :-)

Thanks - Did you also build something using netsnmp
(E.G. BR2_PACKAGE_QUAGGA_SNMP)? The problem was afaik dependent packages
not finding netsnmp.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] libpng install question
From: Lionel Landwerlin @ 2010-10-01  8:14 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <0D753D10438DA54287A00B0270842697644545753B@AUSP01VMBX24.collaborationhost.net>

Hello,

libpng12-config and libpng-config are part of the libpng package, so
it is normal they are being installed on the target. However they
shouldn't be installed unless you've selected to installed development
files in the buildroot config.
This might be a small regression introduced by this commit :
http://git.buildroot.org/buildroot/commit/?id=55ade5c7964e15f9b1eba061ab840cc4c25e4e37
Are you using a recent version of the buildroot's git repository ?

--
Lionel Landwerlin

On Fri, Oct 1, 2010 at 2:51 AM, H Hartley Sweeten
<hartleys@visionengravers.com> wrote:
> Hello all,
>
> I was wondering why libpng12-config and libpng-config are installed to the target.
> I thought these were host tools?
>
> Regards,
> Hartley
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

^ permalink raw reply

* [Buildroot] CONFIG_BLK_DEV_INITRD deactivated on automatic build
From: Dennis Borgmann @ 2010-10-01  7:30 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20100930194624.62fdea0e@surf>

Thomas,

thank you!

Thomas Petazzoni schrieb:
> Hello Dennis,
>
> On Thu, 30 Sep 2010 13:23:46 +0200
> Dennis Borgmann <dennis.borgmann@googlemail.com> wrote:
>
>   
>> First of all - thank you for the work done for this project. It is
>> awesome and I really like it. Straightforward and quick to use.
>>
>> I think, I found a bug. If you download buildroot and start
>> configuring your project with "make menuconfig" and after that
>> configure the kernel with "make linux26-menuconfig", everything seems
>> to be ok. I did give it a custom kernel-config named
>> "/tmp/config-2.6.34".
>>
>> After running "make", everything seems to be ok, but the resulting
>> kernel does not contain the option "CONFIG_BLK_DEV_INITRD". I need to
>> manually do a "make linux26-menuconfig" again and rebuild the kernel
>> for the resulting kernel to contain this option.
>>
>> This was a really silly thing to find, took me around one week,
>> because you wouldn't think of such a mistake. Could it be, that this
>> is a bug? I am using buildroot-2010.08.
>>     
>
> Yes, it was a bug. When "initramfs" isn't used as the target filesystem
> format, we forcefully disabled the CONFIG_BLK_DEV_INITRD option. This
> has been fixed post-2010.08, by the following commit:
>
>  http://git.buildroot.net/buildroot/commit/?id=ee3f319249e146d92b093ad8c45a3a908d44236f
>
> So you can either apply this patch on top of 2010.08, or use the latest
> Buildroot git. We unfortunately do not maintain "stabilized" versions
> of Buildroot (such as 2010.08.x) for the moment.
>
> Regards,
>
> Thomas
>   

^ permalink raw reply

* [Buildroot] [PATCH 3/3] l2tp: convert to gentargets and change to xl2tp
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

l2tp is no longer being developed, and xl2tpd is forked from l2tpd and is
maintained by Xelerance Corporation.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/Config.in                              |    2 +-
 package/l2tp/Config.in                         |    7 ---
 package/l2tp/l2tp-legacy.patch                 |   14 ------
 package/l2tp/l2tp-no-gnu-extensions.patch      |   33 -------------
 package/l2tp/l2tp-sanity.patch                 |   49 -------------------
 package/l2tp/l2tp.mk                           |   60 ------------------------
 package/l2tp/l2tpd                             |   27 -----------
 package/xl2tp/Config.in                        |   11 ++++
 package/xl2tp/xl2tp-1.2.7-legacy.patch         |   14 ++++++
 package/xl2tp/xl2tp-1.2.7-makefile-flags.patch |   30 ++++++++++++
 package/xl2tp/xl2tp.mk                         |   33 +++++++++++++
 package/xl2tp/xl2tpd                           |   27 +++++++++++
 12 files changed, 116 insertions(+), 191 deletions(-)
 delete mode 100644 package/l2tp/Config.in
 delete mode 100644 package/l2tp/l2tp-legacy.patch
 delete mode 100644 package/l2tp/l2tp-no-gnu-extensions.patch
 delete mode 100644 package/l2tp/l2tp-sanity.patch
 delete mode 100644 package/l2tp/l2tp.mk
 delete mode 100755 package/l2tp/l2tpd
 create mode 100644 package/xl2tp/Config.in
 create mode 100644 package/xl2tp/xl2tp-1.2.7-legacy.patch
 create mode 100644 package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
 create mode 100644 package/xl2tp/xl2tp.mk
 create mode 100755 package/xl2tp/xl2tpd

diff --git a/package/Config.in b/package/Config.in
index 7a38e7d..94d330c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -370,7 +370,7 @@ source "package/ipsec-tools/Config.in"
 source "package/iptables/Config.in"
 source "package/iw/Config.in"
 source "package/kismet/Config.in"
-source "package/l2tp/Config.in"
+source "package/xl2tp/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/lighttpd/Config.in"
 endif
diff --git a/package/l2tp/Config.in b/package/l2tp/Config.in
deleted file mode 100644
index da4f589..0000000
--- a/package/l2tp/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_L2TP
-	bool "l2tp"
-	help
-	  Layer 2 Tunnelling Protocol (RFC2661).
-
-	  http://sourceforge.net/projects/l2tpd/
-
diff --git a/package/l2tp/l2tp-legacy.patch b/package/l2tp/l2tp-legacy.patch
deleted file mode 100644
index 39506d8..0000000
--- a/package/l2tp/l2tp-legacy.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- l2tpd-0.70-pre20031121.oorig/osport.h	2004-07-08 22:47:52.000000000 +0200
-+++ l2tpd-0.70-pre20031121/osport.h	2006-12-28 15:32:50.000000000 +0100
-@@ -37,4 +37,11 @@
- 
- #endif /* defined(SOLARIS) */
- 
-+#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS
-+# define index(x, y)        strchr(x, y)
-+# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN))
-+# define bzero(S1, LEN)     ((void)memset(S1,  0, LEN))
-+# define bcmp(S1,S2,LEN)    ((memcmp(S2, S1, LEN)==0)?0:1)
-+#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */
-+
- #endif /* _OSPORT_H_ */
diff --git a/package/l2tp/l2tp-no-gnu-extensions.patch b/package/l2tp/l2tp-no-gnu-extensions.patch
deleted file mode 100644
index ef07e26..0000000
--- a/package/l2tp/l2tp-no-gnu-extensions.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- l2tpd-0.70-pre20031121.oorig/avpsend.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/avpsend.c	2006-12-28 16:21:06.000000000 +0100
-@@ -98,19 +98,26 @@ int add_hostname_avp(struct buffer *buf,
- 	int sz = 0;
- 	if(t->lac && t->lac->hostname[0]) {
- 		strncpy(n,t->lac->hostname, sizeof(n));
--		sz = strnlen(t->lac->hostname, sizeof(t->lac->hostname));
-+		sz = strlen(t->lac->hostname);
-+		if (sz > sizeof(t->lac->hostname))
-+			sz = sizeof(t->lac->hostname);
- 	}
- 	else if(t->lns && t->lns->hostname[0]) {
- 		strncpy(n,t->lns->hostname, sizeof(n));
--		sz = strnlen(t->lns->hostname, sizeof(t->lns->hostname));
-+		sz = strlen(t->lns->hostname);
-+		if (sz > sizeof(t->lns->hostname))
-+			sz = sizeof(t->lns->hostname);
- 	}
- 	else {
- 		if(gethostname(n, STRLEN)) {
- 			strcpy(n,"eriwan");
- 			sz = 6;
- 		}
--		else
--			sz = strnlen(n, sizeof(n));
-+		else {
-+			sz = strlen(n);
-+			if (sz > sizeof(n))
-+				sz = sizeof(n);
-+		}
- 	}
- 	if(add_avp(buf, HOSTNAME_AVP, n, sz, 1))
- 		return 1;
diff --git a/package/l2tp/l2tp-sanity.patch b/package/l2tp/l2tp-sanity.patch
deleted file mode 100644
index 1d0533d..0000000
--- a/package/l2tp/l2tp-sanity.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -rdup l2tpd-0.70-pre20031121.oorig/avp.c l2tpd-0.70-pre20031121/avp.c
---- l2tpd-0.70-pre20031121.oorig/avp.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/avp.c	2006-12-28 16:06:43.000000000 +0100
-@@ -146,6 +146,7 @@ int validate_msgtype_avp(int attr,  stru
- 	u_int8_t *p = data + sizeof(struct avp_hdr);
- 	c->msgtype = get16(p);
- 
-+#ifdef SANITY
-     if (t->sanity)
-     {
-         /*
-@@ -293,6 +294,7 @@ int validate_msgtype_avp(int attr,  stru
-             return -EINVAL;
-         }
-     }
-+#endif
- 	return 0;
- }
- 
-@@ -301,7 +303,7 @@ int validate_gen_avp(int attr,  struct t
- 					 void *data, int datalen) {
- 	(void)data; (void)datalen;
- 	int i = 0, found = 0;
--
-+#ifdef SANITY
-     if(t->sanity) {
- 		for(i = 0; i < 8; i++) {
- 			if(c->msgtype == avps[attr].allowed_states[i])
-@@ -310,6 +312,7 @@ int validate_gen_avp(int attr,  struct t
- 		if(!found) 
- 			return -EINVAL;
- 	}
-+#endif
- 	return 0;
- }
- 
-diff -rdup l2tpd-0.70-pre20031121.oorig/l2tpd.c l2tpd-0.70-pre20031121/l2tpd.c
---- l2tpd-0.70-pre20031121.oorig/l2tpd.c	2006-12-28 16:00:26.000000000 +0100
-+++ l2tpd-0.70-pre20031121/l2tpd.c	2006-12-28 16:04:15.000000000 +0100
-@@ -748,7 +748,9 @@ struct tunnel *new_tunnel ()
-     tmp->peer.sin_family = AF_INET;
-     tmp->peer.sin_port = 0;
-     bzero (&(tmp->peer.sin_addr), sizeof (tmp->peer.sin_addr));
-+#ifdef SANITY
-     tmp->sanity = -1;
-+#endif
-     tmp->qtid = -1;
-     tmp->ourfc = ASYNC_FRAMING | SYNC_FRAMING;
-     tmp->ourbc = 0;
diff --git a/package/l2tp/l2tp.mk b/package/l2tp/l2tp.mk
deleted file mode 100644
index e8b4c79..0000000
--- a/package/l2tp/l2tp.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################
-#
-# l2tp
-#
-#############################################################
-L2TP_VERSION:=0.70-pre20031121
-L2TP_SOURCE:=l2tpd_$(L2TP_VERSION).orig.tar.gz
-L2TP_PATCH:=l2tpd_$(L2TP_VERSION)-2.2.diff.gz
-L2TP_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/l/l2tpd/
-L2TP_DIR:=$(BUILD_DIR)/l2tpd-$(L2TP_VERSION)
-L2TP_CAT:=$(ZCAT)
-L2TP_BINARY:=l2tpd
-L2TP_TARGET_BINARY:=usr/sbin/l2tpd
-
-$(DL_DIR)/$(L2TP_SOURCE):
-	$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_SOURCE))
-
-$(DL_DIR)/$(L2TP_PATCH):
-	$(call DOWNLOAD,$(L2TP_SITE),$(L2TP_PATCH))
-
-l2tp-source: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
-
-$(L2TP_DIR)/.unpacked: $(DL_DIR)/$(L2TP_SOURCE) $(DL_DIR)/$(L2TP_PATCH)
-	$(L2TP_CAT) $(DL_DIR)/$(L2TP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	-mv -f $(L2TP_DIR).orig $(L2TP_DIR)
-ifneq ($(L2TP_PATCH),)
-	(cd $(L2TP_DIR) && $(L2TP_CAT) $(DL_DIR)/$(L2TP_PATCH) | patch -p1)
-	if [ -d $(L2TP_DIR)/debian/patches ]; then \
-		toolchain/patch-kernel.sh $(L2TP_DIR) $(L2TP_DIR)/debian/patches \*.patch; \
-	fi
-endif
-	toolchain/patch-kernel.sh $(L2TP_DIR) package/l2tp/ l2tp\*.patch
-	touch $(L2TP_DIR)/.unpacked
-
-$(L2TP_DIR)/$(L2TP_BINARY): $(L2TP_DIR)/.unpacked
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(L2TP_DIR) \
-		DFLAGS= \
-		OSFLAGS="-DLINUX -UUSE_KERNEL $(TARGET_CFLAGS) -USANITY"
-
-$(TARGET_DIR)/$(L2TP_TARGET_BINARY): $(L2TP_DIR)/$(L2TP_BINARY)
-	cp -dpf $(L2TP_DIR)/$(L2TP_BINARY) $@
-	cp -dpf package/l2tp/l2tpd $(TARGET_DIR)/etc/init.d/
-	$(STRIPCMD) $@
-
-l2tp: $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
-
-l2tp-clean:
-	-$(MAKE) -C $(L2TP_DIR) clean
-	rm -f $(TARGET_DIR)/$(L2TP_TARGET_BINARY)
-
-l2tp-dirclean:
-	rm -rf $(L2TP_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_L2TP),y)
-TARGETS+=l2tp
-endif
diff --git a/package/l2tp/l2tpd b/package/l2tp/l2tpd
deleted file mode 100755
index 8bed72d..0000000
--- a/package/l2tp/l2tpd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-DAEMON=/usr/sbin/l2tpd
-PIDFILE=/var/run/l2tpd.pid
-
-test -f $DAEMON || exit 0
-
-case "$1" in
-  start)
-    start-stop-daemon -S  -p $PIDFILE -x $DAEMON -- -D &
-    ;;
-  stop)
-    start-stop-daemon -K  -p $PIDFILE -x $DAEMON
-    ;;
-  restart|force-reload)
-    start-stop-daemon -K  -p $PIDFILE -x $DAEMON 
-    sleep 1
-    start-stop-daemon -S  -p $PIDFILE -x $DAEMON
-    ;;
-  *)
-    echo "Usage: /etc/init.d/l2tdp {start|stop|restart|force-reload}"
-    exit 1
-    ;;
-esac
-
-exit 0
diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in
new file mode 100644
index 0000000..8f9d9b1
--- /dev/null
+++ b/package/xl2tp/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_XL2TP
+	bool "xl2tp"
+	select BR2_PACKAGE_LIBPCAP
+	help
+	  Layer 2 Tunnelling Protocol (RFC2661).
+
+	  xl2tpd is an open source implementation of the L2TP tunneling
+	  protocol. xl2tpd is forked from l2tpd and is maintained by
+	  Xelerance Corporation.
+
+	  http://www.xelerance.com/software/xl2tpd/
diff --git a/package/xl2tp/xl2tp-1.2.7-legacy.patch b/package/xl2tp/xl2tp-1.2.7-legacy.patch
new file mode 100644
index 0000000..39506d8
--- /dev/null
+++ b/package/xl2tp/xl2tp-1.2.7-legacy.patch
@@ -0,0 +1,14 @@
+--- l2tpd-0.70-pre20031121.oorig/osport.h	2004-07-08 22:47:52.000000000 +0200
++++ l2tpd-0.70-pre20031121/osport.h	2006-12-28 15:32:50.000000000 +0100
+@@ -37,4 +37,11 @@
+ 
+ #endif /* defined(SOLARIS) */
+ 
++#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS
++# define index(x, y)        strchr(x, y)
++# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN))
++# define bzero(S1, LEN)     ((void)memset(S1,  0, LEN))
++# define bcmp(S1,S2,LEN)    ((memcmp(S2, S1, LEN)==0)?0:1)
++#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */
++
+ #endif /* _OSPORT_H_ */
diff --git a/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
new file mode 100644
index 0000000..26ca592
--- /dev/null
+++ b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch
@@ -0,0 +1,30 @@
+--- xl2tp-1.2.7/Makefile-orig	2010-08-05 15:33:46.000000000 -0700
++++ xl2tp-1.2.7/Makefile	2010-09-30 22:34:54.000000000 -0700
+@@ -90,7 +90,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include
+ 
+ IPFLAGS?= -DIP_ALLOCATION
+ 
+-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
++COMPILE_FLAGS+= $(DFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
+ HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
+ OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o
+ SRCS=${OBJS:.o=.c} ${HDRS}
+@@ -105,6 +105,9 @@ MANDIR?=$(DESTDIR)${PREFIX}/share/man
+ 
+ all: $(EXEC) pfc
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ clean:
+ 	rm -f $(OBJS) $(EXEC) pfc.o pfc
+ 
+@@ -112,7 +115,7 @@ $(EXEC): $(OBJS) $(HDRS)
+ 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+ 
+ pfc:
+-	$(CC) $(CFLAGS) -c contrib/pfc.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c contrib/pfc.c
+ 	$(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o
+ 
+ romfs:
diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk
new file mode 100644
index 0000000..1cbd760
--- /dev/null
+++ b/package/xl2tp/xl2tp.mk
@@ -0,0 +1,33 @@
+#############################################################
+#
+# xl2tp
+#
+#############################################################
+XL2TP_VERSION = 1.2.7
+XL2TP_SOURCE = xl2tpd-$(XL2TP_VERSION).tar.gz
+XL2TP_SITE = ftp://ftp.xelerance.com/xl2tpd/
+
+XL2TP_DEPENDENCIES = pppd libpcap
+
+define XL2TP_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
+
+define XL2TP_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install
+endef
+
+define XL2TP_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/bin/pfc
+	rm -f $(TARGET_DIR)/usr/sbin/xl2tpd
+	rm -f $(TARGET_DIR)/usr/share/man/man1/pfc.1
+	rm -f $(TARGET_DIR)/usr/share/man/man8/xl2tpd.8
+	rm -f $(TARGET_DIR)/usr/share/man/man5/xl2tpd.conf.5
+	rm -f $(TARGET_DIR)/usr/share/man/man5/l2tp-secrets.5
+endef
+
+define XL2TP_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,xl2tp))
diff --git a/package/xl2tp/xl2tpd b/package/xl2tp/xl2tpd
new file mode 100755
index 0000000..36c12a2
--- /dev/null
+++ b/package/xl2tp/xl2tpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/xl2tpd
+PIDFILE=/var/run/xl2tpd.pid
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+  start)
+    start-stop-daemon -S  -p $PIDFILE -x $DAEMON -- -D &
+    ;;
+  stop)
+    start-stop-daemon -K  -p $PIDFILE -x $DAEMON
+    ;;
+  restart|force-reload)
+    start-stop-daemon -K  -p $PIDFILE -x $DAEMON 
+    sleep 1
+    start-stop-daemon -S  -p $PIDFILE -x $DAEMON
+    ;;
+  *)
+    echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 2/3] pppd: convert to gentargets
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/pppd/pppd-2.4.5-define-aligned_u64.patch |   13 +
 package/pppd/pppd-2.4.5-makefile-flags.patch     |  403 ++++++++++++++++++++++
 package/pppd/pppd-2.4.5-man-dir.patch            |   31 ++
 package/pppd/pppd-2.4.5-pppol2tp.patch           |   34 ++
 package/pppd/pppd.mk                             |  107 ++++---
 5 files changed, 540 insertions(+), 48 deletions(-)
 create mode 100644 package/pppd/pppd-2.4.5-define-aligned_u64.patch
 create mode 100644 package/pppd/pppd-2.4.5-makefile-flags.patch
 create mode 100644 package/pppd/pppd-2.4.5-man-dir.patch
 create mode 100644 package/pppd/pppd-2.4.5-pppol2tp.patch

diff --git a/package/pppd/pppd-2.4.5-define-aligned_u64.patch b/package/pppd/pppd-2.4.5-define-aligned_u64.patch
new file mode 100644
index 0000000..7eb0ad1
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-define-aligned_u64.patch
@@ -0,0 +1,13 @@
+Define aligned_u64, because it is not defined in the linux headers.
+--- a/pppd/sys-linux.c	2010-09-26 23:23:05.000000000 -0700
++++ b/pppd/sys-linux.c	2010-09-26 23:24:51.000000000 -0700
+@@ -118,6 +118,10 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
++#ifndef aligned_u64
++#define aligned_u64 unsigned long long __attribute__((aligned(8)))
++#endif
++ 
+ #include <linux/ppp_defs.h>
+ #include <linux/if_ppp.h>
diff --git a/package/pppd/pppd-2.4.5-makefile-flags.patch b/package/pppd/pppd-2.4.5-makefile-flags.patch
new file mode 100644
index 0000000..9fb457d
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-makefile-flags.patch
@@ -0,0 +1,403 @@
+Preserve the settings that we need, because buildroot clobbers
+the cflag settings in the various makefiles in pppd.
+--- a/chat/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/chat/Makefile.linux	2010-09-30 17:53:31.000000000 -0700
+@@ -21,7 +21,7 @@ chat:	chat.o
+ 	$(CC) -o chat chat.o
+ 
+ chat.o:	chat.c
+-	$(CC) -c $(CFLAGS) -o chat.o chat.c
++	$(CC) -c $(CDEFS) $(CFLAGS) -o chat.o chat.c
+ 
+ install: chat
+ 	mkdir -p $(BINDIR) $(MANDIR)
+
+--- a/pppd/Makefile.linux	2010-09-30 17:46:46.000000000 -0700
++++ b/pppd/Makefile.linux	2010-09-30 17:53:28.000000000 -0700
+@@ -77,26 +77,24 @@ MAXOCTETS=y
+ 
+ INCLUDE_DIRS= -I../include
+ 
+-COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
+-
+-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
++COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="@DESTDIR@"'
+ 
+ ifdef CHAPMS
+-CFLAGS   += -DCHAPMS=1
++COMPILE_FLAGS   += -DCHAPMS=1
+ NEEDDES=y
+ PPPDOBJS += md4.o chap_ms.o
+ HEADERS	+= md4.h chap_ms.h
+ ifdef MSLANMAN
+-CFLAGS   += -DMSLANMAN=1
++COMPILE_FLAGS   += -DMSLANMAN=1
+ endif
+ ifdef MPPE
+-CFLAGS   += -DMPPE=1
++COMPILE_FLAGS   += -DMPPE=1
+ endif
+ endif
+ 
+ # EAP SRP-SHA1
+ ifdef USE_SRP
+-CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
++COMPILE_FLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+ EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+@@ -113,12 +111,12 @@ PPPDOBJS += sha1.o
+ endif
+ 
+ ifdef HAS_SHADOW
+-CFLAGS   += -DHAS_SHADOW
++COMPILE_FLAGS   += -DHAS_SHADOW
+ #LIBS     += -lshadow $(LIBS)
+ endif
+ 
+ ifneq ($(wildcard /usr/include/crypt.h),)
+-CFLAGS  += -DHAVE_CRYPT_H=1
++COMPILE_FLAGS  += -DHAVE_CRYPT_H=1
+ LIBS	+= -lcrypt
+ endif
+ 
+@@ -126,7 +124,7 @@ ifdef NEEDDES
+ ifndef USE_CRYPT
+ LIBS     += -ldes $(LIBS)
+ else
+-CFLAGS   += -DUSE_CRYPT=1
++COMPILE_FLAGS   += -DUSE_CRYPT=1
+ endif
+ PPPDOBJS += pppcrypt.o
+ HEADERS += pppcrypt.h
+@@ -134,7 +132,7 @@ endif
+ 
+ # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
+ ifdef USE_PAM
+-CFLAGS   += -DUSE_PAM
++COMPILE_FLAGS   += -DUSE_PAM
+ LIBS     += -lpam -ldl
+ endif
+ 
+@@ -143,14 +141,14 @@ ifdef HAVE_MULTILINK
+ 	# Multilink implies the use of TDB
+ 	USE_TDB=y
+ 
+-	CFLAGS += -DHAVE_MULTILINK
++	COMPILE_FLAGS += -DHAVE_MULTILINK
+ 	PPPDSRCS += multilink.c
+ 	PPPDOBJS += multilink.o
+ endif
+ 
+ # TDB
+ ifdef USE_TDB
+-	CFLAGS += -DUSE_TDB=1
++	COMPILE_FLAGS += -DUSE_TDB=1
+ 	PPPDSRCS += tdb.c spinlock.c
+ 	PPPDOBJS += tdb.o spinlock.o
+ 	HEADERS += tdb.h spinlock.h
+@@ -159,11 +157,11 @@ endif
+ # Lock library binary for Linux is included in 'linux' subdirectory.
+ ifdef LOCKLIB
+ LIBS     += -llock
+-CFLAGS   += -DLOCKLIB=1
++COMPILE_FLAGS   += -DLOCKLIB=1
+ endif
+ 
+ ifdef PLUGIN
+-CFLAGS	+= -DPLUGIN
++COMPILE_FLAGS	+= -DPLUGIN
+ LDFLAGS	+= -Wl,-E
+ LIBS	+= -ldl
+ endif
+@@ -171,7 +169,7 @@ endif
+ ifdef FILTER
+ ifneq ($(wildcard /usr/include/pcap-bpf.h),)
+ LIBS    += -lpcap
+-CFLAGS  += -DPPP_FILTER
++COMPILE_FLAGS  += -DPPP_FILTER
+ endif
+ endif
+ 
+@@ -179,24 +177,27 @@ ifdef HAVE_INET6
+      PPPDSRCS += ipv6cp.c eui64.c
+      HEADERS  += ipv6cp.h eui64.h
+      PPPDOBJS += ipv6cp.o eui64.o
+-     CFLAGS   += -DINET6=1
++     COMPILE_FLAGS   += -DINET6=1
+ endif
+ 
+ ifdef CBCP
+      PPPDSRCS += cbcp.c
+      PPPDOBJS += cbcp.o
+-     CFLAGS += -DCBCP_SUPPORT
++     COMPILE_FLAGS += -DCBCP_SUPPORT
+      HEADERS += cbcp.h
+ endif
+ 
+ ifdef MAXOCTETS
+-     CFLAGS += -DMAXOCTETS
++     COMPILE_FLAGS += -DMAXOCTETS
+ endif
+ 
+ INSTALL= install
+ 
+ all: $(TARGETS)
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+@@ -206,10 +207,10 @@ install: pppd
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+ 
+ pppd: $(PPPDOBJS)
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+ 
+ srp-entry:	srp-entry.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
+ 
+ install-devel:
+ 	mkdir -p $(INCDIR)/pppd
+@@ -219,4 +220,4 @@ clean:
+ 	rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
+ 
+ depend:
+-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend
++	$(CPP) -M $(COMPILE_FLAGS) $(CFLAGS) $(PPPDSRCS) >.depend
+
+--- a/pppd/plugins/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,7 +1,7 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
+-LDFLAGS	= -shared
++COMPILE_FLAGS	= -I.. -I../../include -fPIC
++LINK_FLAGS	= -shared
+ INSTALL	= install
+ 
+ DESTDIR = $(INSTROOT)@DESTDIR@
+@@ -23,7 +23,7 @@ all:	$(PLUGINS)
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
+ 
+ %.so: %.c
+-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
++	$(CC) -o $@ $(LINK_FLAGS) $(COMPILE_FLAGS) $(CFLAGS) $^
+ 
+ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
+ 
+@@ -37,5 +37,5 @@ clean:
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
+ 
+ depend:
+-	$(CPP) -M $(CFLAGS) *.c >.depend
++	$(CPP) -M $(COMPILE_FLAGS) $(CFLAGS) *.c >.depend
+ 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
+
+--- a/pppd/plugins/pppoatm/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/pppoatm/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,6 +1,6 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I../.. -I../../../include -fPIC
++COMPILE_FLAGS	= -I../.. -I../../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install
+ 
+@@ -24,7 +24,7 @@ PLUGIN_OBJS := pppoatm.o
+ ifdef HAVE_LIBATM
+ LIBS := -latm
+ else
+-CFLAGS += -I.
++COMPILE_FLAGS += -I.
+ PLUGIN_OBJS += text2qos.o text2atm.o misc.o ans.o
+ LIBS := -lresolv
+ endif
+@@ -33,7 +33,7 @@ endif
+ all: $(PLUGIN)
+ 
+ $(PLUGIN): $(PLUGIN_OBJS)
+-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -43,4 +43,4 @@ clean:
+ 	rm -f *.o *.so
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
+
+--- a/pppd/plugins/pppol2tp/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/pppol2tp/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -1,6 +1,6 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I. -I../.. -I../../../include -fPIC
++COMPILE_FLAGS	= -I. -I../.. -I../../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install
+ 
+@@ -16,7 +16,7 @@ PLUGINS := pppol2tp.so openl2tp.so
+ all: $(PLUGINS)
+ 
+ %.so: %.o
+-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -26,4 +26,4 @@ clean:
+ 	rm -f *.o *.so
+ 
+ %.o: %.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ $<
+
+--- a/pppd/plugins/radius/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/radius/Makefile.linux	2010-09-30 18:29:31.000000000 -0700
+@@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/
+ INSTALL	= install
+ 
+ PLUGIN=radius.so radattr.so radrealms.so
+-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++COMPILE_FLAGS = -I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
+ 
+ # Uncomment the next line to include support for Microsoft's
+ # MS-CHAP authentication protocol.
+@@ -23,17 +23,20 @@ MPPE=y
+ MAXOCTETS=y
+ 
+ ifdef CHAPMS
+-CFLAGS += -DCHAPMS=1
++COMPILE_FLAGS += -DCHAPMS=1
+ ifdef MPPE
+-CFLAGS += -DMPPE=1
++COMPILE_FLAGS += -DMPPE=1
+ endif
+ endif
+ ifdef MAXOCTETS
+-CFLAGS += -DMAXOCTETS=1
++COMPILE_FLAGS += -DMAXOCTETS=1
+ endif
+ 
+ all: $(PLUGIN)
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+ 	$(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+@@ -43,13 +46,13 @@ install: all
+ 	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+ 
+ radius.so: radius.o libradiusclient.a
+-	$(CC) -o radius.so -shared radius.o libradiusclient.a
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radius.so -shared radius.o libradiusclient.a
+ 
+ radattr.so: radattr.o
+-	$(CC) -o radattr.so -shared radattr.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radattr.so -shared radattr.o
+ 
+ radrealms.so: radrealms.o
+-	$(CC) -o radrealms.so -shared radrealms.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o radrealms.so -shared radrealms.o
+ 
+ CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
+ 	clientid.o sendserver.o lock.o util.o md5.o
+
+--- a/pppd/plugins/rp-pppoe/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppd/plugins/rp-pppoe/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -26,20 +26,20 @@ INSTALL	= install
+ RP_VERSION=3.8p
+ 
+ COPTS=-O2 -g
+-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
++COMPILE_FLAGS= -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
+ all: rp-pppoe.so pppoe-discovery
+ 
+ pppoe-discovery: pppoe-discovery.o debug.o
+-	$(CC) -o pppoe-discovery pppoe-discovery.o debug.o
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
+ 
+ pppoe-discovery.o: pppoe-discovery.c
+-	$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
+ 
+ debug.o: debug.c
+-	$(CC) $(CFLAGS) -c -o debug.o debug.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o debug.o debug.c
+ 
+ rp-pppoe.so: plugin.o discovery.o if.o common.o
+-	$(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
++	$(CC) $(COMPILE_FLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+@@ -51,14 +51,14 @@ clean:
+ 	rm -f *.o *.so pppoe-discovery
+ 
+ plugin.o: plugin.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
+ 
+ discovery.o: discovery.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
+ 
+ if.o: if.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
+ 
+ common.o: common.c
+-	$(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
+ 
+
+--- a/pppdump/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppdump/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -2,15 +2,18 @@ DESTDIR = $(INSTROOT)@DESTDIR@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+ 
+-CFLAGS= -O -I../include/net
++COMPILE_FLAGS= -I../include/net
+ OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+ 
+ INSTALL= install
+ 
+ all:	pppdump
+ 
++%.o: %.c
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $<
++
+ pppdump: $(OBJS)
+-	$(CC) -o pppdump $(OBJS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppdump $(OBJS)
+ 
+ clean:
+ 	rm -f pppdump $(OBJS) *~
+
+--- a/pppstats/Makefile.linux	2009-11-16 15:26:07.000000000 -0700
++++ b/pppstats/Makefile.linux	2010-09-30 17:59:16.000000000 -0700
+@@ -26,11 +26,11 @@ install: pppstats
+ 	$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+ 
+ pppstats: $(PPPSTATSRCS)
+-	$(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
++	$(CC) $(COMPILE_FLAGS) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
+ 
+ clean:
+ 	rm -f pppstats *~ #* core
+ 
+ depend:
+-	cpp -M $(CFLAGS) $(PPPSTATSRCS) >.depend
++	cpp -M $(COMPILE_FLAGS) $(CFLAGS) $(PPPSTATSRCS) >.depend
+ #	makedepend $(CFLAGS) $(PPPSTATSRCS)
diff --git a/package/pppd/pppd-2.4.5-man-dir.patch b/package/pppd/pppd-2.4.5-man-dir.patch
new file mode 100644
index 0000000..c9434f6
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-man-dir.patch
@@ -0,0 +1,31 @@
+Change the MANDIR variable in the top makefile
+to match the rest of the makefiles
+--- a/linux/Makefile.top	2009-11-16 15:26:07.000000000 -0700
++++ b/linux/Makefile.top	2010-09-30 19:57:19.000000000 -0700
+@@ -3,7 +3,7 @@
+ DESTDIR = $(INSTROOT)@DESTDIR@
+ BINDIR = $(DESTDIR)/sbin
+ INCDIR = $(DESTDIR)/include
+-MANDIR = $(DESTDIR)/share/man
++MANDIR = $(DESTDIR)/share/man/man8
+ ETCDIR = $(INSTROOT)@SYSCONF@/ppp
+ 
+ # uid 0 = root
+@@ -16,7 +16,7 @@ all:
+ 	cd pppstats; $(MAKE) $(MFLAGS) all
+ 	cd pppdump; $(MAKE) $(MFLAGS) all
+ 
+-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
++install: $(BINDIR) $(MANDIR) install-progs install-devel
+ 
+ install-progs:
+ 	cd chat; $(MAKE) $(MFLAGS) install
+@@ -40,7 +40,7 @@ $(ETCDIR)/chap-secrets:
+ 
+ $(BINDIR):
+ 	$(INSTALL) -d -m 755 $@
+-$(MANDIR)/man8:
++$(MANDIR):
+ 	$(INSTALL) -d -m 755 $@
+ $(ETCDIR):
+ 	$(INSTALL) -d -m 755 $@
diff --git a/package/pppd/pppd-2.4.5-pppol2tp.patch b/package/pppd/pppd-2.4.5-pppol2tp.patch
new file mode 100644
index 0000000..249789a
--- /dev/null
+++ b/package/pppd/pppd-2.4.5-pppol2tp.patch
@@ -0,0 +1,34 @@
+Per Paul Howarth
+
+"...due to ppp bundling a copy of linux/if_pppol2tp.h and this being used in
+preference to the system one. A recent change in kernel-headers has added a
+definition of struct pppol2tpv3_addr to this header file, and that definition
+is needed by linux/if_pppox.h but isn't found when compiling ppp due to the
+presence of the bundled copy of linux/if_pppol2tp.h. Simplest fix is to add
+the definition of struct pppol2tpv3_addr to the bundled copy..."
+
+See https://bugzilla.redhat.com/show_bug.cgi?id=617625
+
+--- ppp-2.4.5/include/linux/if_pppol2tp.h	2009-11-16 22:26:07.000000000 +0000
++++ ppp-2.4.5/include/linux/if_pppol2tp.h	2010-07-16 22:35:22.000000000 +0100
+@@ -32,6 +32,20 @@
+ 	__u16 d_tunnel, d_session;	/* For sending outgoing packets */
+ };
+ 
++/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
++ * bits. So we need a different sockaddr structure.
++ */
++struct pppol2tpv3_addr {
++	pid_t	pid;			/* pid that owns the fd.
++					 * 0 => current */
++	int	fd;			/* FD of UDP or IP socket to use */
++
++	struct sockaddr_in addr;	/* IP address and port to send to */
++
++	__u32 s_tunnel, s_session;	/* For matching incoming packets */
++	__u32 d_tunnel, d_session;	/* For sending outgoing packets */
++};
++
+ /* Socket options:
+  * DEBUG	- bitmask of debug message categories
+  * SENDSEQ	- 0 => don't send packets with sequence numbers
diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk
index 35fd451..f1249ef 100644
--- a/package/pppd/pppd.mk
+++ b/package/pppd/pppd.mk
@@ -3,72 +3,83 @@
 # pppd
 #
 #############################################################
-
 PPPD_VERSION = 2.4.5
 PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz
 PPPD_SITE = ftp://ftp.samba.org/pub/ppp
+PPPD_INSTALL_STAGING = YES
+
+PPPD_MANPAGES = chat pppd pppdump pppstats
 PPPD_TARGET_BINS = chat pppd pppdump pppstats
-PPPD_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),chat pppd pppdump pppstats)
-PPPD_MAKE = $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_MAKE_OPT)
+
+PPPD_STAGING_INSTALL_OPTS = BINDIR=$(STAGING_DIR)/usr/sbin \
+		ETCDIR=$(STAGING_DIR)/etc/ppp \
+		INCDIR=$(STAGING_DIR)/usr/include \
+		LIBDIR=$(STAGING_DIR)/usr/lib/pppd/$(PPPD_VERSION) \
+		MANDIR=$(STAGING_DIR)/usr/share/man/man8
+
+PPPD_TARGET_INSTALL_OPTS = BINDIR=$(TARGET_DIR)/usr/sbin \
+		ETCDIR=$(TARGET_DIR)/etc/ppp \
+		INCDIR=$(TARGET_DIR)/usr/include \
+		LIBDIR=$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION) \
+		MANDIR=$(TARGET_DIR)/usr/share/man/man8
 
 ifeq ($(BR2_PACKAGE_PPPD_FILTER),y)
-	PPPD_DEPENDENCIES += libpcap
-	PPPD_MAKE_OPT += FILTER=y
+PPPD_DEPENDENCIES += libpcap
+else
+define PPPD_NO_FILTER
+	$(SED) 's/FILTER=y/#FILTER=y/' $(@D)/pppd/Makefile.linux
+endef
 endif
 
 ifeq ($(BR2_INET_IPV6),y)
-	PPPD_MAKE_OPT += HAVE_INET6=y
+PPPD_MAKE_OPTS += HAVE_INET6=y
 endif
 
-$(eval $(call AUTOTARGETS,package,pppd))
+define PPPD_CONFIGURE_CMDS
+	$(PPPD_NO_FILTER)
+	(cd $(@D); \
+		CFLAGS="$(TARGET_CFLAGS)" \
+		./configure \
+	)
+endef
 
-$(PPPD_HOOK_POST_EXTRACT):
-	$(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
-	$(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux
-	touch $@
+define PPPD_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" $(PPPD_MAKE_OPTS) -C $(@D)
+endef
 
-$(PPPD_TARGET_INSTALL_TARGET):
-	$(call MESSAGE,"Installing to target")
-	for sbin in $(PPPD_TARGET_BINS); do \
-		$(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \
-			$(TARGET_DIR)/usr/sbin/$$sbin; \
-	done
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/minconn.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/minconn.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passprompt.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passprompt.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passwordfd.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passwordfd.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppoatm/pppoatm.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppoatm.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/rp-pppoe.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery \
-		$(TARGET_DIR)/usr/sbin/pppoe-discovery
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/winbind.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/winbind.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/openl2tp.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so
-	$(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \
-		$(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so
+define PPPD_INSTALL_STAGING_CMDS
+	$(MAKE) $(PPPD_STAGING_INSTALL_OPTS) -C $(@D) install
+	$(MAKE) $(PPPD_STAGING_INSTALL_OPTS) -C $(@D) install-etcppp
+endef
+
+define PPPD_INSTALL_TARGET_CMDS
+	$(MAKE) $(PPPD_TARGET_INSTALL_OPTS) -C $(@D) install
+	$(MAKE) $(PPPD_TARGET_INSTALL_OPTS) -C $(@D) install-etcppp
+endef
+
+define PPPD_UNINSTALL_STAGING_CMDS
+	rm -f $(addprefix $(STAGING_DIR)/usr/sbin/, $(PPPD_TARGET_BINS))
 	for m in $(PPPD_MANPAGES); do \
-		$(INSTALL) -m 644 -D $(PPPD_DIR)/$$m/$$m.8 \
-			$(TARGET_DIR)/usr/share/man/man8/$$m.8; \
+		rm -f $(STAGING_DIR)/usr/share/man/man8/$$m.8; \
 	done
-	touch $@
+	rm -rf $(STAGING_DIR)/etc/ppp
+	rm -rf $(STAGING_DIR)/usr/include/pppd
+	rm -rf $(STAGING_DIR)/usr/lib/pppd
+endef
 
-$(PPPD_TARGET_UNINSTALL):
-	$(call MESSAGE,"Uninstalling")
+define PPPD_UNINSTALL_TARGET_CMDS
 	rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS))
-	rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery
 	for m in $(PPPD_MANPAGES); do \
 		rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \
 	done
+	rm -rf $(TARGET_DIR)/etc/ppp
+	rm -rf $(TARGET_DIR)/usr/include/pppd
 	rm -rf $(TARGET_DIR)/usr/lib/pppd
-	rm -f $(PPPD_TARGET_INSTALL_TARGET) $(PPPD_HOOK_POST_INSTALL)
+endef
+
+define PPPD_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(call GENTARGETS,package,pppd))
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 1/3] libpcap: bump to 1.1.1
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285914753-22744-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/libpcap/libpcap-1.0.0-wireless.patch |   26 --------------------------
 package/libpcap/libpcap.mk                   |    2 +-
 2 files changed, 1 insertions(+), 27 deletions(-)
 delete mode 100644 package/libpcap/libpcap-1.0.0-wireless.patch

diff --git a/package/libpcap/libpcap-1.0.0-wireless.patch b/package/libpcap/libpcap-1.0.0-wireless.patch
deleted file mode 100644
index 7bcfcda..0000000
--- a/package/libpcap/libpcap-1.0.0-wireless.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-[PATCH]: pcap-linux: fix build with wireless support
-
-Based on ba23aa7b upstream.
-
-linux/wireless.h includes linux/if.h, which conflicts with net/if.h as
-they both define if* structures. Fix build by simply using linux/if.h
-instead of net/if.h.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- pcap-linux.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: libpcap-1.0.0/pcap-linux.c
-===================================================================
---- libpcap-1.0.0.orig/pcap-linux.c
-+++ libpcap-1.0.0/pcap-linux.c
-@@ -93,7 +93,7 @@ static const char rcsid[] _U_ =
- #include <sys/ioctl.h>
- #include <sys/utsname.h>
- #include <sys/mman.h>
--#include <net/if.h>
-+#include <linux/if.h>
- #include <netinet/in.h>
- #include <linux/if_ether.h>
- #include <net/if_arp.h>
diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk
index b14a6f7..eebfc03 100644
--- a/package/libpcap/libpcap.mk
+++ b/package/libpcap/libpcap.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-LIBPCAP_VERSION:=1.0.0
+LIBPCAP_VERSION:=1.1.1
 LIBPCAP_SITE:=http://www.tcpdump.org/release
 LIBPCAP_SOURCE:=libpcap-$(LIBPCAP_VERSION).tar.gz
 LIBPCAP_INSTALL_STAGING:=YES
-- 
1.7.3

^ permalink raw reply related

* [Buildroot] [PATCH 0/3] change l2tp to xl2tp
From: Martin Banky @ 2010-10-01  6:32 UTC (permalink / raw)
  To: buildroot

I'm not sure what format pppd.mk was in, I think it might have been an
intermediate version, but it wouldn't compile. I heavily reworked this package
so that it would compile correctly, there were several issues with CFLAGS that
had to be fixed.

l2tp is no longer available on debian's site, but there is a fork called xl2tp
that is currently being maintained.

Each patch is dependant on the previous patch.

[PATCH 1/3] libpcap: bump to 1.1.1
[PATCH 2/3] pppd: convert to gentargets
[PATCH 3/3] l2tp: convert to gentargets and change to xl2tp

^ permalink raw reply

* [Buildroot] libpng install question
From: H Hartley Sweeten @ 2010-10-01  0:51 UTC (permalink / raw)
  To: buildroot

Hello all,

I was wondering why libpng12-config and libpng-config are installed to the target.
I thought these were host tools?

Regards,
Hartley

^ permalink raw reply

* [Buildroot] [SECURITY][PATCHv2] Bump quagga to 0.99.17
From: Thomas Petazzoni @ 2010-09-30 21:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87k4m3xbc1.fsf@macbook.be.48ers.dk>

On Thu, 30 Sep 2010 21:47:42 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

> Could someone using the external toolchain (Thomas?) give netsnmp a
> quick test?

I confirm that since Gustavo converted the package to autotargets, the
previously existing build failures with external toolchain have
disappeared. I just tested with a recent (a few days) Git, and net-snmp
built just fine with an external ARM CodeSourcery toolchain.

Now, I have no idea if it actually works, since I don't know how to
test it. But that's another story :-)

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* [Buildroot] [PATCH 1/2] host tools: create the host sed in $(O)/host/
From: Yann E. MORIN @ 2010-09-30 21:20 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87bp7fx7dw.fsf@macbook.be.48ers.dk>

Peter, All,

On Thursday 30 September 2010 23:12:59 Peter Korsgaard wrote:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:
>  Yann> The host sed does not belong to $(O)toolchain/ but
>  Yann> really belongs to $(O)/host/
> Thanks, but this is broken (and so was what we had), so I prefer to just
> get rid of it - It's not difficult to install a working sed on your
> build machine.

I was expecting we would have to get rid of the host sed stuff, but I did
not have time to properly do it before I submit the CT-NG backend, so this
little workaround in the meantime. Thanks for taking care of that!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply

* [Buildroot] [PATCH 1/2] host tools: create the host sed in $(O)/host/
From: Peter Korsgaard @ 2010-09-30 21:12 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1284926049-9882-2-git-send-email-yann.morin.1998@anciens.enib.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

 Yann> The host sed does not belong to $(O)toolchain/ but
 Yann> really belongs to $(O)/host/

Thanks, but this is broken (and so was what we had), so I prefer to just
get rid of it - It's not difficult to install a working sed on your
build machine.

-- 
Bye, Peter Korsgaard

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox