* [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation
@ 2014-11-17 8:18 Baruch Siach
2014-11-17 8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Baruch Siach @ 2014-11-17 8:18 UTC (permalink / raw)
To: buildroot
Move include directories out of $(STAGING_DIR)/usr/include/live. This is
upstream choice, and is consistent with e.g. Debian. Update mplayer and vlc to
match.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/live555/live555.mk | 21 ++-------------------
package/mplayer/mplayer.mk | 2 +-
package/vlc/vlc.mk | 9 ++++-----
3 files changed, 7 insertions(+), 25 deletions(-)
diff --git a/package/live555/live555.mk b/package/live555/live555.mk
index e933faaeae01..8c31a086559b 100644
--- a/package/live555/live555.mk
+++ b/package/live555/live555.mk
@@ -23,6 +23,7 @@ define LIVE555_CONFIGURE_CMDS
echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux
echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux
echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux
+ echo 'PREFIX = /usr' >> $(@D)/config.linux
(cd $(@D); ./genMakefiles linux)
endef
@@ -30,31 +31,13 @@ define LIVE555_BUILD_CMDS
$(MAKE) -C $(@D) all
endef
-LIVE555_HEADERS_TO_INSTALL = \
- liveMedia/include \
- groupsock/include \
- UsageEnvironment/include \
- BasicUsageEnvironment/include
-
-LIVE555_LIBS_TO_INSTALL = \
- liveMedia/libliveMedia.a \
- groupsock/libgroupsock.a \
- UsageEnvironment/libUsageEnvironment.a \
- BasicUsageEnvironment/libBasicUsageEnvironment.a
-
LIVE555_FILES_TO_INSTALL-y =
LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_OPENRTSP) += testProgs/openRTSP
LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MEDIASERVER) += mediaServer/live555MediaServer
LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MPEG2_INDEXER) += testProgs/MPEG2TransportStreamIndexer
define LIVE555_INSTALL_STAGING_CMDS
- for i in $(LIVE555_HEADERS_TO_INSTALL); do \
- mkdir -p $(STAGING_DIR)/usr/include/live/`dirname $$i`; \
- cp -a $(@D)/$$i/* $(STAGING_DIR)/usr/include/live/`dirname $$i`; \
- done; \
- for i in $(LIVE555_LIBS_TO_INSTALL); do \
- $(INSTALL) -D -m 0755 $(@D)/$$i $(STAGING_DIR)/usr/lib/`basename $$i`; \
- done
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
endef
define LIVE555_INSTALL_TARGET_CMDS
diff --git a/package/mplayer/mplayer.mk b/package/mplayer/mplayer.mk
index dbde97767b35..b2530e4a1300 100644
--- a/package/mplayer/mplayer.mk
+++ b/package/mplayer/mplayer.mk
@@ -92,7 +92,7 @@ MPLAYER_DEPENDENCIES += live555
MPLAYER_CONF_OPTS += --enable-live
MPLAYER_LIVE555 = liveMedia groupsock UsageEnvironment BasicUsageEnvironment
MPLAYER_CFLAGS += \
- $(addprefix -I$(STAGING_DIR)/usr/include/live/,$(MPLAYER_LIVE555))
+ $(addprefix -I$(STAGING_DIR)/usr/include/,$(MPLAYER_LIVE555))
MPLAYER_LDFLAGS += $(addprefix -l,$(MPLAYER_LIVE555)) -lstdc++
else
MPLAYER_CONF_OPTS += --disable-live
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index 7e81d590e507..e2c81d6e8959 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -231,11 +231,10 @@ VLC_CONF_OPTS += --enable-live555
VLC_DEPENDENCIES += live555
VLC_CONF_ENV += \
LIVE555_CFLAGS="\
- -I$(STAGING_DIR)/usr/include/live \
- -I$(STAGING_DIR)/usr/include/live/BasicUsageEnvironment \
- -I$(STAGING_DIR)/usr/include/live/groupsock \
- -I$(STAGING_DIR)/usr/include/live/liveMedia \
- -I$(STAGING_DIR)/usr/include/live/UsageEnvironment \
+ -I$(STAGING_DIR)/usr/include/BasicUsageEnvironment \
+ -I$(STAGING_DIR)/usr/include/groupsock \
+ -I$(STAGING_DIR)/usr/include/liveMedia \
+ -I$(STAGING_DIR)/usr/include/UsageEnvironment \
" \
LIVE555_LIBS="-L$(STAGING_DIR)/usr/lib -lliveMedia"
else
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries
2014-11-17 8:18 [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Baruch Siach
@ 2014-11-17 8:18 ` Baruch Siach
2014-11-18 22:17 ` Thomas Petazzoni
2014-11-17 8:18 ` [Buildroot] [PATCH 3/3] vlc: allow dynamically linking live555 Baruch Siach
2014-11-18 22:15 ` [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Thomas Petazzoni
2 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2014-11-17 8:18 UTC (permalink / raw)
To: buildroot
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/live555/live555.mk | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/package/live555/live555.mk b/package/live555/live555.mk
index 8c31a086559b..b923388de0fd 100644
--- a/package/live555/live555.mk
+++ b/package/live555/live555.mk
@@ -13,18 +13,30 @@ LIVE555_INSTALL_STAGING = YES
LIVE555_CFLAGS = $(TARGET_CFLAGS)
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIVE555_CONFIG_TARGET = linux
+LIVE555_LIBRARY_LINK = $(TARGET_AR) cr
+else
+LIVE555_CONFIG_TARGET = linux-with-shared-libraries
+LIVE555_LIBRARY_LINK = $(TARGET_CC) -o
+endif
+
ifndef ($(BR2_ENABLE_LOCALE),y)
LIVE555_CFLAGS += -DLOCALE_NOT_USED
endif
define LIVE555_CONFIGURE_CMDS
- echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.linux
- echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.linux
- echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux
- echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux
- echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux
- echo 'PREFIX = /usr' >> $(@D)/config.linux
- (cd $(@D); ./genMakefiles linux)
+ echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+
+ echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link
+ # fails
+ echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
+ (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET))
endef
define LIVE555_BUILD_CMDS
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] vlc: allow dynamically linking live555
2014-11-17 8:18 [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Baruch Siach
2014-11-17 8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
@ 2014-11-17 8:18 ` Baruch Siach
2014-11-18 22:15 ` [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Thomas Petazzoni
2 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2014-11-17 8:18 UTC (permalink / raw)
To: buildroot
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/vlc/vlc.mk | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index e2c81d6e8959..19f1058dfa47 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -224,9 +224,7 @@ else
VLC_CONF_OPTS += --disable-libxml2
endif
-# live555 installs a static library only, and vlc tries to link it into a
-# shared library - which doesn't work. So only enable live555 if static.
-ifeq ($(BR2_PACKAGE_LIVE555)$(BR2_PREFER_STATIC_LIB),yy)
+ifeq ($(BR2_PACKAGE_LIVE555),y)
VLC_CONF_OPTS += --enable-live555
VLC_DEPENDENCIES += live555
VLC_CONF_ENV += \
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation
2014-11-17 8:18 [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Baruch Siach
2014-11-17 8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
2014-11-17 8:18 ` [Buildroot] [PATCH 3/3] vlc: allow dynamically linking live555 Baruch Siach
@ 2014-11-18 22:15 ` Thomas Petazzoni
2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2014-11-18 22:15 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Mon, 17 Nov 2014 10:18:14 +0200, Baruch Siach wrote:
> Move include directories out of $(STAGING_DIR)/usr/include/live. This is
> upstream choice, and is consistent with e.g. Debian. Update mplayer and vlc to
> match.
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> package/live555/live555.mk | 21 ++-------------------
> package/mplayer/mplayer.mk | 2 +-
> package/vlc/vlc.mk | 9 ++++-----
> 3 files changed, 7 insertions(+), 25 deletions(-)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries
2014-11-17 8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
@ 2014-11-18 22:17 ` Thomas Petazzoni
2014-11-19 5:54 ` Baruch Siach
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2014-11-18 22:17 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Mon, 17 Nov 2014 10:18:15 +0200, Baruch Siach wrote:
> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> +LIVE555_CONFIG_TARGET = linux
> +LIVE555_LIBRARY_LINK = $(TARGET_AR) cr
> +else
> +LIVE555_CONFIG_TARGET = linux-with-shared-libraries
> +LIVE555_LIBRARY_LINK = $(TARGET_CC) -o
> +endif
> +
> ifndef ($(BR2_ENABLE_LOCALE),y)
> LIVE555_CFLAGS += -DLOCALE_NOT_USED
> endif
>
> define LIVE555_CONFIGURE_CMDS
> - echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.linux
> - echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.linux
> - echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux
> - echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux
> - echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux
> - echo 'PREFIX = /usr' >> $(@D)/config.linux
> - (cd $(@D); ./genMakefiles linux)
> + echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> +
> + echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link
> + # fails
> + echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> + (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET))
I don't understand why you need a separate config.linux and
config.linux-with-shared-libraries. Since in Buildroot we will either
be building with BR2_PREFER_STATIC_LIB=y, or BR2_PREFER_STATIC_LIB
disabled, why not simply call the file config.linux, as it was called
before this patch?
Of course, the LIVE555_LIBRARY_LINK think is needed, but I don't see
why the other changes are needed.
Can you expand on this?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries
2014-11-18 22:17 ` Thomas Petazzoni
@ 2014-11-19 5:54 ` Baruch Siach
2014-11-19 9:03 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2014-11-19 5:54 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Tue, Nov 18, 2014 at 11:17:02PM +0100, Thomas Petazzoni wrote:
> On Mon, 17 Nov 2014 10:18:15 +0200, Baruch Siach wrote:
> > +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> > +LIVE555_CONFIG_TARGET = linux
> > +LIVE555_LIBRARY_LINK = $(TARGET_AR) cr
> > +else
> > +LIVE555_CONFIG_TARGET = linux-with-shared-libraries
> > +LIVE555_LIBRARY_LINK = $(TARGET_CC) -o
> > +endif
> > +
> > ifndef ($(BR2_ENABLE_LOCALE),y)
> > LIVE555_CFLAGS += -DLOCALE_NOT_USED
> > endif
> >
> > define LIVE555_CONFIGURE_CMDS
> > - echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.linux
> > - echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.linux
> > - echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux
> > - echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux
> > - echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux
> > - echo 'PREFIX = /usr' >> $(@D)/config.linux
> > - (cd $(@D); ./genMakefiles linux)
> > + echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > +
> > + echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link
> > + # fails
> > + echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET)
> > + (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET))
>
> I don't understand why you need a separate config.linux and
> config.linux-with-shared-libraries. Since in Buildroot we will either
> be building with BR2_PREFER_STATIC_LIB=y, or BR2_PREFER_STATIC_LIB
> disabled, why not simply call the file config.linux, as it was called
> before this patch?
>
> Of course, the LIVE555_LIBRARY_LINK think is needed, but I don't see
> why the other changes are needed.
>
> Can you expand on this?
Both config.linux and config.linux-with-shared-libraries already exist in
upstream code. We are only appending to these files to override some
variables. The linux-with-shared-libraries variant defines a few additional
variables needed for dynamic linking (library version, installation target).
Aligning to upstream build procedure should be more future proof, IMO.
Thanks for reviewing.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries
2014-11-19 5:54 ` Baruch Siach
@ 2014-11-19 9:03 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2014-11-19 9:03 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Wed, 19 Nov 2014 07:54:02 +0200, Baruch Siach wrote:
> > I don't understand why you need a separate config.linux and
> > config.linux-with-shared-libraries. Since in Buildroot we will either
> > be building with BR2_PREFER_STATIC_LIB=y, or BR2_PREFER_STATIC_LIB
> > disabled, why not simply call the file config.linux, as it was called
> > before this patch?
> >
> > Of course, the LIVE555_LIBRARY_LINK think is needed, but I don't see
> > why the other changes are needed.
> >
> > Can you expand on this?
>
> Both config.linux and config.linux-with-shared-libraries already exist in
> upstream code. We are only appending to these files to override some
> variables. The linux-with-shared-libraries variant defines a few additional
> variables needed for dynamic linking (library version, installation target).
> Aligning to upstream build procedure should be more future proof, IMO.
Thanks for the explanation, definitely makes sense. I've added part of
this paragraph of explanation to the commit log, and then applied both
this patch, as well as the patch that allows VLC to link dynamically
against live555 to the next branch.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-19 9:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 8:18 [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Baruch Siach
2014-11-17 8:18 ` [Buildroot] [PATCH 2/3] live555: add support for building dynamic libraries Baruch Siach
2014-11-18 22:17 ` Thomas Petazzoni
2014-11-19 5:54 ` Baruch Siach
2014-11-19 9:03 ` Thomas Petazzoni
2014-11-17 8:18 ` [Buildroot] [PATCH 3/3] vlc: allow dynamically linking live555 Baruch Siach
2014-11-18 22:15 ` [Buildroot] [PATCH 1/3] live555: use upstream install target for staging installation Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox