make libmad depending on CONFIG_BUILD_PATENTED
[openwrt/svn-archive/archive.git] / libs / ptlib / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=ptlib
10 PKG_VERSION:=2.2.1
11 PKG_RELEASE:=2
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
14 PKG_SOURCE_URL:=@SF/opalvoip
15 PKG_MD5SUM:=dc266ba315e130b304854592e6388725
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ptlib
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=+libexpat
25 TITLE:=Portable Tools library
26 URL:=http://www.opalvoip.org/
27 endef
28
29 define Package/ptlib/description
30 PTLib is a moderately large class library that has its genesis many years ago as
31 PWLib (portable Windows Library), a method to product applications to run on both
32 Microsoft Windows and Unix X-Windows systems. It also was to have a Macintosh port
33 as well but that never eventuated. The parts of the library relating to GUI
34 functions have long been removed as other class libraries such as wxWidgets were
35 much more advanced.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41 --enable-minsize \
42 --enable-opal \
43 --enable-internalregex \
44 --enable-audio \
45 --disable-alsa \
46 --disable-asn \
47 --disable-avc \
48 --enable-configfile \
49 --disable-dc \
50 --disable-dtmf \
51 --enable-expat \
52 --disable-ftp \
53 --disable-http \
54 --disable-httpsvc \
55 --disable-jabber \
56 --disable-odbc \
57 --disable-openldap \
58 --disable-openssl \
59 --disable-oss \
60 --disable-pipechan \
61 --disable-plugins \
62 --disable-pop3smtp \
63 --disable-remconn \
64 --enable-resolver \
65 --enable-qos \
66 --disable-sasl \
67 --disable-sdl \
68 --disable-serial \
69 --disable-shm-video \
70 --disable-snmp \
71 --disable-soap \
72 --disable-socks \
73 --enable-stun \
74 --disable-telnet \
75 --disable-tts \
76 --disable-v4l \
77 --disable-v4l2 \
78 --disable-bsdvideo \
79 --disable-video \
80 --disable-vxml \
81 --enable-wavfile \
82 --disable-xmlrpc \
83
84 CONFIGURE_VARS += \
85 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
86
87 CONFIGURE_CMD = ./configure
88
89 define Build/Configure/Default
90 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \
91 if [ -x $(CONFIGURE_CMD) ]; then \
92 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/$(3)/ && \
93 $(CONFIGURE_VARS) \
94 $(2) \
95 $(CONFIGURE_CMD) \
96 $(CONFIGURE_ARGS) \
97 $(1); \
98 fi; \
99 )
100 endef
101
102 MAKE_FLAGS += optnoshared
103
104 define Build/InstallDev
105 ln -sf $(PKG_NAME)_$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
106 $(SED) 's|//\(#include <ptlib/sound.h>\)|\1|' $(PKG_BUILD_DIR)/include/ptlib.h
107 endef
108
109 $(eval $(call BuildPackage,ptlib))