Hi,
updated patch attached, see inline ..
On 9/25/11 3:44 PM, Jonas Gorski wrote:
Hi,
On 25 September 2011 15:02, Alfred E. Heggestad<a...@db.org> wrote:
Hi,
a couple of weeks ago I released a new version of my open-source
VOIP projects, which is now at version 0.3.0:
http://www.creytiv.com/
this patch upgrades the following packages to v0.3.0:
baresip v0.3.0 (Portable and modular SIP User-Agent with audio and video
support)
restund v0.3.0 (Modular STUN/TURN server)
libre v0.3.0 (Generic library for real-time communications with async IO
support)
librem v0.3.0 (Audio and video processing media library)
Unless they depend on being the same version, these updates/adds
should be individual patches.
for now all projects are released as a bundle, but in the future I might release
maintenance releases of certain projects with only the patch-number bumped.
I have also removed the @BROKEN symbol, as all packages build fine here with
trunk r28297 for at least BRCM, AR7, x86 and UML architectures. I read on
the forum
that there was some problems building the programs but I did not find any
reports
on which architectures were failing or any build logs. would it be possible
to
get notified somehow if such a thing happens ?
If your programs needs NPTL/TLS, it might fail (to build) on some
platforms. I don't know whether this is the case. Look at the the
uclibc configuration for the targets; check if it has
LINUXTHREADS_OLD; you might want to try one of these targets.
thanks for your suggestion, and also thanks to Jo-Philipp for good feedback.
all issues should be fixed in this patch, and I hope that it will now build
on all supported platforms.
Please review and apply if OK. Thanks
Since these are yours, have you thought about applying for maintainership? ;-)
thanks for the offering, but I prefer to send patches to the mailing-list
for now. the code review is very much appreciated.
Signed-Off-By: Alfred E. Heggestad
This isn't a valid SOB, you are missing your email address (don't
worry, trac and the ml-archives will filter it out for the publicly
visible parts).
Signed-Off-By: Alfred E. Heggestad <a...@db.org>
Now on to the actual patch:
...
(snip)
Index: feeds/packages/net/baresip/Makefile
===================================================================
--- feeds/packages/net/baresip/Makefile (revision 28297)
+++ feeds/packages/net/baresip/Makefile (working copy)
(snip)
@@ -70,6 +70,7 @@
LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
LIBRE_INC=../re-$(PKG_VERSION)/include \
LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
+ LIBREM_PATH=../rem-$(PKG_VERSION) \
These look wrong; is there a reason for not doing it like restund:
LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
LIBRE_INC=$(STAGING_DIR)/usr/include/re \
fixed
Index: feeds/packages/libs/rem/Makefile
===================================================================
--- feeds/packages/libs/rem/Makefile (revision 0)
+++ feeds/packages/libs/rem/Makefile (revision 0)
(snip)
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ LIBRE_INC=../re-$(PKG_VERSION)/include \
Same comment as above.
fixed
Regards
Jonas
updated patch is attached, please review and apply if okay.
/alfred
Index: feeds/packages/net/restund/Makefile
===================================================================
--- feeds/packages/net/restund/Makefile (revision 28391)
+++ feeds/packages/net/restund/Makefile (working copy)
@@ -7,20 +7,20 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=restund
-PKG_VERSION:=0.2.0
+PKG_VERSION:=0.3.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.creytiv.com/pub/
-PKG_MD5SUM:=b8fa2ab40d7952fd78c5d72ab1742232
+PKG_MD5SUM:=e82bdb994b26b8c16d799b3dc8dd0008
include $(INCLUDE_DIR)/package.mk
define Package/restund
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libre @BROKEN
- TITLE:=libre stun server
+ DEPENDS:=+libre
+ TITLE:=Modular STUN/TURN server
URL:=http://www.creytiv.com/
endef
@@ -30,13 +30,16 @@
$(MAKE) -C $(PKG_BUILD_DIR) \
LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
LIBRE_INC=$(STAGING_DIR)/usr/include/re \
+ LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
$(PKG_MAKE_OPTS) \
SYSROOT="$(TOOLCHAIN_DIR)" \
SYSROOT_ALT="$(STAGING_DIR)/usr" \
RELEASE=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ OS=linux \
all install
endef
Index: feeds/packages/net/baresip/patches/100-loginname.patch
===================================================================
--- feeds/packages/net/baresip/patches/100-loginname.patch (revision 0)
+++ feeds/packages/net/baresip/patches/100-loginname.patch (revision 0)
@@ -0,0 +1,12 @@
+diff -Naur '--exclude=.svn' baresip-orig/src//os.c baresip/src//os.c
+--- baresip-orig/src//os.c 2011-09-25 10:24:45.000000000 +0200
++++ baresip/src//os.c 2011-09-25 10:22:46.000000000 +0200
+@@ -100,7 +100,7 @@
+ struct passwd *pw;
+ char *loginname = NULL;
+
+- loginname = getenv("LOGNAME");
++ loginname = getenv("USER");
+ if (!loginname) {
+ #ifdef HAVE_UNISTD_H
+ loginname = getlogin();
Index: feeds/packages/net/baresip/Makefile
===================================================================
--- feeds/packages/net/baresip/Makefile (revision 28391)
+++ feeds/packages/net/baresip/Makefile (working copy)
@@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=baresip
-PKG_VERSION:=0.2.0
+PKG_VERSION:=0.3.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.creytiv.com/pub/
-PKG_MD5SUM:=c4e160463b2bfb2e326e916089da1c4f
+PKG_MD5SUM:=871b876195b67c1147b60d2b663dba05
include $(INCLUDE_DIR)/package.mk
@@ -60,16 +60,17 @@
SECTION:=net
CATEGORY:=Network
SUBMENU:=Telephony
- DEPENDS:=+libre +libpthread $(EXTRA_DEPS)
- TITLE:=baresip Barebone SIP useragent
+ DEPENDS:=+libre +librem +libpthread $(EXTRA_DEPS)
+ TITLE:=Baresip is a portable and modular SIP User-Agent with audio and video
support
URL:=http://www.creytiv.com/
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
- LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
- LIBRE_INC=../re-$(PKG_VERSION)/include \
+ LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
+ LIBRE_INC=$(STAGING_DIR)/usr/include/re \
LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
+ LIBREM_PATH=../rem-$(PKG_VERSION) \
MOD_AUTODETECT= \
USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \
$(BARESIP_MODULES) \
@@ -80,6 +81,8 @@
SYSROOT="$(TOOLCHAIN_DIR)" \
SYSROOT_ALT="$(STAGING_DIR)/usr" \
RELEASE=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ OS=linux \
all install
endef
Index: feeds/packages/libs/re/patches/100-re.mk.patch
===================================================================
--- feeds/packages/libs/re/patches/100-re.mk.patch (revision 0)
+++ feeds/packages/libs/re/patches/100-re.mk.patch (revision 0)
@@ -0,0 +1,292 @@
+--- /Users/alfredh/src/re-0.3.0/mk/re.mk 2011-08-30 13:07:12.000000000
+0200
++++ re/mk/re.mk 2011-10-07 21:27:53.000000000 +0200
+@@ -5,34 +5,37 @@
+ #
+ # Imported variables:
+ #
+-# PROJECT Project name
+-# VERSION Version number
+-# CC Compiler
+-# GCOV If non-empty, enable GNU Coverage testing
+-# GPROF If non-empty, enable GNU Profiling
+-# OPT_SPEED If non-empty, optimize for speed
+-# OPT_SIZE If non-empty, optimize for size
+-# USE_OPENSSL If non-empty, link to libssl library
+-# USE_ZLIB If non-empty, link to libz library
+-# SYSROOT System root of library and include files
+-# SYSROOT_ALT Alternative system root of library and include files
+-# EXTRA_CFLAGS Extra compiler flags appended to CFLAGS
+-# EXTRA_LFLAGS Extra linker flags appended to LFLAGS
++# ARCH Target architecture
++# CC Compiler
++# CROSS_COMPILE Cross-compiler prefix (optional)
++# EXTRA_CFLAGS Extra compiler flags appended to CFLAGS
++# EXTRA_LFLAGS Extra linker flags appended to LFLAGS
++# GCOV If non-empty, enable GNU Coverage testing
++# GPROF If non-empty, enable GNU Profiling
++# OPT_SIZE If non-empty, optimize for size
++# OPT_SPEED If non-empty, optimize for speed
++# PROJECT Project name
++# RELEASE Release build
++# SYSROOT System root of library and include files
++# SYSROOT_ALT Alternative system root of library and include files
++# USE_OPENSSL If non-empty, link to libssl library
++# USE_ZLIB If non-empty, link to libz library
++# VERSION Version number
+ #
+ # Exported variables:
+ #
+-# CC Compiler
+-# CCACHE Compiler ccache tool
+-# CFLAGS Compiler flags
+-# DFLAGS Dependency generator flags
+-# LFLAGS Common linker flags
+-# SH_LFLAGS Linker flags for shared libraries
+-# MOD_LFLAGS Linker flags for dynamic modules
+-# APP_LFLAGS Linker flags for applications using modules
+-# LIBS Libraries to link against
+-# LIB_SUFFIX Suffix for shared libraries
+-# MOD_SUFFIX Suffix for dynamic modules
+-# BIN_SUFFIX Suffix for binary executables
++# APP_LFLAGS Linker flags for applications using modules
++# BIN_SUFFIX Suffix for binary executables
++# CC Compiler
++# CCACHE Compiler ccache tool
++# CFLAGS Compiler flags
++# DFLAGS Dependency generator flags
++# LFLAGS Common linker flags
++# LIBS Libraries to link against
++# LIB_SUFFIX Suffix for shared libraries
++# MOD_LFLAGS Linker flags for dynamic modules
++# MOD_SUFFIX Suffix for dynamic modules
++# SH_LFLAGS Linker flags for shared libraries
+ #
+
+
+@@ -177,65 +180,27 @@
+ #
+ # OS section
+ #
++
+ MACHINE := $(shell $(CC) -dumpmachine)
+-OS := $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
+-#ARCH := $(shell echo $(MACHINE) | sed -e 's/\([^-]*\)-.*/\1/')
+
+-# TODO get ARCH from first tuple in CC -dumpmachine which is more future proof
+-ifeq ($(MACHINE), i386-mingw32)
+- OS := win32
+- ARCH := i386
+-endif
+-ifeq ($(MACHINE), i486-mingw32)
+- OS := win32
+- ARCH := i486
++ifeq ($(CROSS_COMPILE),)
++OS := $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
+ endif
+-ifeq ($(MACHINE), i586-mingw32msvc)
++
++
++#
++# Try to guess the OS
++#
++
++ifneq ($(strip $(filter i386-mingw32 i486-mingw32 i586-mingw32msvc mingw32, \
++ $(MACHINE))),)
+ OS := win32
+- ARCH := i586
+-endif
+ ifeq ($(MACHINE), mingw32)
+- OS := win32
+- ARCH := i386
+ CROSS_COMPILE :=
+ endif
+-ifeq ($(MACHINE), i686-pc-cygwin)
+- OS := cygwin
+- ARCH := i686
+-endif
+-ifeq ($(MACHINE), mipsel-linux-uclibc)
+- OS := linux
+- ARCH := mipsel
+-endif
+-ifeq ($(MACHINE), bfin-linux-uclibc)
+- OS := linux
+- ARCH := bfin
+-endif
+-ifeq ($(MACHINE), bfin-uclinux)
+- OS := linux
+- ARCH := bfin
+-endif
+-ifeq ($(MACHINE), arm-apple-darwin)
+- OS := darwin
+- ARCH := arm
+- CROSS_COMPILE ?= $(MACHINE)-
+- CFLAGS += -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
+-endif
+-ifeq ($(MACHINE), arm-apple-darwin9)
+- OS := darwin
+- ARCH := arm
+- CROSS_COMPILE ?= $(MACHINE)-
+- ROOT := /Developer//Platforms/iPhoneOS.platform/Developer
+- SDK := $(ROOT)/SDKs/iPhoneOS3.0.sdk
+- CFLAGS += -F$(SDK)/System/Library/Frameworks/
+- CFLAGS += -I$(SDK)/usr/include
+- CFLAGS += -I$(SDK)/usr/lib/gcc/arm-apple-darwin9/4.2.1/include
+- CFLAGS += -isysroot $(SDK)
+- LFLAGS += -F$(SDK)/System/Library/Frameworks
+- LFLAGS += -L$(SDK)/usr/lib
+- LFLAGS += -L$(SDK)/usr/lib/gcc/arm-apple-darwin9/4.2.1/
+ endif
+
++
+ # default
+ LIB_SUFFIX := .so
+ MOD_SUFFIX := .so
+@@ -276,8 +241,6 @@
+ AR := ar
+ AFLAGS := cru
+ LIB_SUFFIX := .dylib
+- ARCH := $(shell echo $(MACHINE) | \
+- sed -e 's/\([^-]*\)-.*/\1/')
+ endif
+ ifeq ($(OS),netbsd)
+ CFLAGS += -fPIC -DNETBSD
+@@ -347,30 +310,121 @@
+ endif
+
+
++ifeq ($(OS),)
++$(warning Could not detect OS)
++endif
++
++
+ ##############################################################################
+ #
+ # Architecture section
+ #
++# detect $(HOST_ARCH) -- Host architecture
++# detect $(ARCH) -- Target architecture
++#
++
++
++#
++# detect $(HOST_ARCH)
++#
+
+ ifeq ($(OS),solaris)
++ GETARCH=isainfo -n
++ifeq ($(GETARCH),)
+ GETARCH=uname -p
++endif
+ else
+ GETARCH=uname -m
+ endif
+
++HOST_ARCH := $(shell $(GETARCH) |sed -e s/i.86/i386/ -e s/sun4[uv]/sparc64/ \
++ -e s/armv[3-5].*/arm/ -e s/armv6.*/arm6/ \
++ -e "s/Power Macintosh/ppc/" \
++ -e "s/cobalt/mips2/" \
++ -e s/amd64/x86_64/ -e s/sparcv9/sparc64/ )
++
++ifeq ($(HOST_ARCH),sparc)
++ifeq ($(shell uname -m),sun4u)
++ HOST_ARCH := sparc64
++endif
++ifeq ($(shell uname -m),sun4v)
++ HOST_ARCH := sparc64
++endif
++endif
++
++
++#
++# detect $(ARCH)
++#
++
+ ifeq ($(ARCH),)
+-ARCH := $(shell $(GETARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+- -e s/armv4l/arm/ -e "s/Power Macintosh/ppc/" \
+- -e "s/cobalt/mips2/" \
+- -e s/amd64/x86_64/ )
+-endif
+-# fix sparc -> sparc64
+-ifeq ($(ARCH),sparc)
+- ifeq ($(shell uname -m),sun4u)
+- ARCH := sparc64
+- endif
++ifeq ($(CC_NAME),gcc)
++PREDEF := $(shell $(CC) -dM -E -x c $(EXTRA_CFLAGS) $(CFLAGS)
/dev/null)
++
++ifneq ($(strip $(filter i386 __i386__ __i386 _M_IX86 __X86__ _X86_, \
++ $(PREDEF))),)
++ARCH := i386
+ endif
+
++ifneq ($(strip $(filter __i486__,$(PREDEF))),)
++ARCH := i486
++endif
++
++ifneq ($(strip $(filter __i586__,$(PREDEF))),)
++ARCH := i586
++endif
++
++ifneq ($(strip $(filter __i686__ ,$(PREDEF))),)
++ARCH := i686
++endif
++
++ifneq ($(strip $(filter __amd64__ __amd64 __x86_64__ __x86_64, \
++ $(PREDEF))),)
++ARCH := x86_64
++endif
++
++ifneq ($(strip $(filter __arm__ __thumb__,$(PREDEF))),)
++
++ifneq ($(strip $(filter __ARM_ARCH_6__,$(PREDEF))),)
++ARCH := arm6
++else
++ARCH := arm
++endif
++
++endif
++
++ifneq ($(strip $(filter __mips__ __mips, $(PREDEF))),)
++ARCH := mips
++endif
++
++ifneq ($(strip $(filter __powerpc __powerpc__ __POWERPC__ __ppc__ \
++ _ARCH_PPC, $(PREDEF))),)
++ARCH := ppc
++endif
++
++ifneq ($(strip $(filter __ppc64__ _ARCH_PPC64 , $(PREDEF))),)
++ARCH := ppc64
++endif
++
++ifneq ($(strip $(filter __sparc__ __sparc __sparcv8 , $(PREDEF))),)
++
++ifneq ($(strip $(filter __sparcv9 __sparc_v9__ , $(PREDEF))),)
++ARCH := sparc64
++else
++ARCH := sparc
++endif
++
++endif
++
++endif
++endif
++
++
++ifeq ($(ARCH),)
++$(warning Could not detect ARCH)
++endif
++
++
+ CFLAGS += -DARCH=\"$(ARCH)\"
+
+ ifeq ($(ARCH),mipsel)
+@@ -549,6 +603,7 @@
+ @echo " MODULES: $(MODULES)"
+ # @echo " SRCS: $(SRCS)"
+ @echo " MACHINE: $(MACHINE)"
++ @echo " HOST_ARCH: $(HOST_ARCH)"
+ @echo " ARCH: $(ARCH)"
+ @echo " OS: $(OS)"
+ @echo " BUILD: $(BUILD)"
Index: feeds/packages/libs/re/Makefile
===================================================================
--- feeds/packages/libs/re/Makefile (revision 28391)
+++ feeds/packages/libs/re/Makefile (working copy)
@@ -7,19 +7,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=re
-PKG_VERSION:=0.2.0
+PKG_VERSION:=0.3.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.creytiv.com/pub
-PKG_MD5SUM:=0aa00762fbee7694b9e5844675f5c57d
+PKG_MD5SUM:=1529ea90b141591504b30ac8d7c2af0e
include $(INCLUDE_DIR)/package.mk
define Package/libre
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libopenssl +libpthread @BROKEN
+ DEPENDS:=+libopenssl +libpthread
TITLE:=Generic library for real-time communications with async IO support
URL:=http://www.creytiv.com/
endef
@@ -40,6 +40,8 @@
SYSROOT="$(TOOLCHAIN_DIR)" \
SYSROOT_ALT="$(STAGING_DIR)/usr" \
RELEASE=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ OS=linux \
all install
endef
Index: feeds/packages/libs/rem/Makefile
===================================================================
--- feeds/packages/libs/rem/Makefile (revision 0)
+++ feeds/packages/libs/rem/Makefile (revision 0)
@@ -0,0 +1,68 @@
+#
+# Makefile
+#
+# Copyright (C) 2010 Alfred E. Heggestad
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rem
+PKG_VERSION:=0.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.creytiv.com/pub
+PKG_MD5SUM:=54022d8819c706ea460f6da9b5121ee4
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/librem
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libre +libpthread
+ TITLE:=Audio and video processing media library
+ URL:=http://www.creytiv.com/
+endef
+
+define Package/librem/description
+ Audio and video processing media library.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \
+ LIBRE_INC=$(STAGING_DIR)/usr/include/re \
+ LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
+ CC="$(TARGET_CC)" \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
+ EXTRA_LFLAGS="-lm" \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ SYSROOT="$(TOOLCHAIN_DIR)" \
+ SYSROOT_ALT="$(STAGING_DIR)/usr" \
+ RELEASE=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ OS=linux \
+ all install
+endef
+
+define Build/InstallDev
+ mkdir -p $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/rem $(1)/usr/include/
+ mkdir -p $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.{a,so*} $(1)/usr/lib/
+endef
+
+define Build/UninstallDev
+ rm -rf \
+ $(STAGING_DIR)/usr/include/rem \
+ $(STAGING_DIR)/usr/lib/librem.{a,so*}
+endef
+
+define Package/librem/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/librem.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,librem))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel