Le Mon, 15 Feb 2010 19:17:55 +0100,
[email protected] a écrit :

> On 15.02.2010 17:58, Raphaël HUCK wrote:
> > +MAKE_ARGS += CCOPT="$(TARGET_CFLAGS)"
> >  
> >  define Build/Compile/libupnp-sample
> >     $(MAKE) -C $(PKG_BUILD_DIR) \
> > -           CCOPT="$(TARGET_CFLAGS)" \
> >             DESTDIR="$(PKG_INSTALL_DIR)" \
> >             check
> > +   $(MAKE) -C $(PKG_BUILD_DIR)/upnp/sample \
> > +           upnp_tv_device upnp_tv_ctrlpt
> >  endef
> 
> 
> MAKE_ARGS is ignored, remember?

Yes you're right. I meant to put MAKE_FLAGS instead.

> Either CCOPT is not needed or you have
> to use MAKE_FLAGS .. But you have a Compile definition. Hence you have
> to add it manually to the make parameters. But you deleted the
> parameter with your patch.
> I guess the parameter is used during compiling and not with install.

$ grep -rn CCOPT libupnp-1.6.6
libupnp-1.6.6/build-aux/config.guess:634:                   (CCOPTS=
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
libupnp-1.6.6/build-aux/config.guess:651:           if echo __LP64__ |
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |

I don't know why CCOPT was added to the Makefile 3 years ago, and if
CCOPTS was meant instead
(https://dev.openwrt.org/changeset/6057/packages/libs/libupnp/Makefile).

I grepped libupnp 1.3.1 and found the same results.

So I guess we can safely remove it.

> check include/package-defaults.mk .. it really clears up things.

That's what I'm doing actually, don't know where I got MAKE_ARGS
from... :)


The attached patch fixes all this, and I also added PKG_FIXUP:=libtool,
and Build/InstallDev now also installs *.la files.

Thanks for pointing this out!

-Raphael
--- /data/workspace/openwrt/packages/libs/libupnp/Makefile	2010-02-16 11:54:24.000000000 +0100
+++ /home/rhk/workspace/neufbox/packages/libs/libupnp/Makefile	2010-02-16 15:42:31.482669067 +0100
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnp
 PKG_VERSION:=1.6.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=...@sf/pupnp
 PKG_MD5SUM:=8918dcf7428cd119d0c8275765ff2833
 
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libupnp/Default
@@ -31,11 +34,10 @@ define Package/libupnp
 endef
 
 define Package/libupnp/description
-        The portable SDK for UPnP Devices (libupnp) provides developers with an
-	API and open source code for building control points, devices, and
-	bridges that are compliant with Version 1.0 of the  Universal Plug and
-	Play Device Architecture Specification and support several operating
-	systems like Linux, *BSD, Solaris and others.
+The portable SDK for UPnP Devices (libupnp) provides developers with an API and
+open source code for building control points, devices, and bridges that are
+compliant with Version 1.0 of the  Universal Plug and Play Device Architecture
+Specification.
 endef
 
 define Package/libupnp-sample
@@ -45,8 +47,7 @@ define Package/libupnp-sample
 endef
 
 define Package/libupnp-sample/description
-	TVcontrolpoint & tvdevice sample applications
-	run inside /etc/upnp-tvdevice/
+TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
 endef
 
 define Build/Configure
@@ -58,26 +59,20 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CCOPT="$(TARGET_CFLAGS)" \
-		DESTDIR="$(PKG_INSTALL_DIR)" \
-		all install
-	$(MAKE) -C $(PKG_BUILD_DIR)/upnp/sample/ upnp_tv_device upnp_tv_ctrlpt
-endef
-
 define Build/Compile/libupnp-sample
 	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CCOPT="$(TARGET_CFLAGS)" \
 		DESTDIR="$(PKG_INSTALL_DIR)" \
 		check
+	$(MAKE) -C $(PKG_BUILD_DIR)/upnp/sample \
+		DESTDIR="$(PKG_INSTALL_DIR)" \
+		upnp_tv_device upnp_tv_ctrlpt
 endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
 	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} $(1)/usr/lib/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*,la} $(1)/usr/lib/
 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
 endef
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to