shairport: Update shairport to final version 1.0
authorFlorian Fainelli <florian@openwrt.org>
Thu, 8 May 2014 00:57:29 +0000 (00:57 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 8 May 2014 00:57:29 +0000 (00:57 +0000)
James Laird (abrasive), together with some other developers, has updated
shairport fixing several bugs and adding several improvements.
https://github.com/abrasive/shairport/tree/master

This patch changes the package source to his repo and deletes the unneeded IPv6
patch.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[florian: fix subject and reformat commit message]
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 40720

multimedia/shairport/Makefile
multimedia/shairport/files/shairport.init
multimedia/shairport/patches/001-fix_ipv6_fallback.patch [deleted file]

index 332c41aec07e2e5b48a8933b09fa24b1397a7715..b722dd429762e3012d9fd8d12aeed1c67f0432ba 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairport
-PKG_VERSION:=2012-10-20
+PKG_VERSION:=2013-10-26
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/albertz/shairport.git
+PKG_SOURCE_URL:=git://github.com/abrasive/shairport.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4746bb11395d171ee800f074f489c42020a84932
+PKG_SOURCE_VERSION:=b2c7bf111c1446739af9411d8a35acd9b6581b06
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 include $(INCLUDE_DIR)/package.mk
@@ -22,7 +22,8 @@ include $(INCLUDE_DIR)/package.mk
 define Package/shairport
   SECTION:=multimedia
   CATEGORY:=Multimedia
-  DEPENDS:=+libpthread +avahi-utils +libopenssl +libao
+  DEPENDS:=+libpthread +avahi-utils +libopenssl +libao +libavahi-client \
+       +alsa-utils
   TITLE:=ShairPort AirPort Express emulator
 endef
 
@@ -38,7 +39,7 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-LIBS:=-lao -lm -lcrypto -lpthread
+LIBS:=-lao -lm -lcrypto -lpthread -lavahi-common -lavahi-client -lasound
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
index f3aa75f6fa7252559c05568f9c2885a0561e1b0c..f05f7d6d06565f01983c429cf79c65dcf696e85d 100644 (file)
@@ -8,15 +8,13 @@ config_shairport() {
        local args=""
 
        config_get name "$cfg" name
-       config_get password "$cfg" password
        config_get port "$cfg" port
        config_get buffer "$cfg" buffer
 
        [ -z $name ] && name="AirPort"
        args="$args -a $name"
 
-       [ ! -z "$password" ] && args="$args -p $password"
-       [ ! -z "$port" ] && args="$args -o $port"
+       [ ! -z "$port" ] && args="$args -p $port"
 
        [ -z $buffer ] && buffer="256"
        args="$args -b $buffer"
diff --git a/multimedia/shairport/patches/001-fix_ipv6_fallback.patch b/multimedia/shairport/patches/001-fix_ipv6_fallback.patch
deleted file mode 100644 (file)
index 070742b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-diff --git a/socketlib.c b/socketlib.c
-index 9efdf22..eb44bcf 100644
---- a/socketlib.c
-+++ b/socketlib.c
-@@ -39,9 +39,11 @@
- #include <openssl/bio.h>
- #include <openssl/buffer.h>
--int common_setup(struct addrinfo *pAddrInfo)
--{  
-+int common_setup(struct addrinfo **ppAddrInfo, int pPort)
-+{
-   int tSock;
-+  struct addrinfo *pAddrInfo = *ppAddrInfo;
-+
-   //printAddrs(pAddrInfo);
-   tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0);
- #ifdef AF_INET6
-@@ -49,7 +51,17 @@ int common_setup(struct addrinfo *pAddrInfo)
-   {
-     //Fallback to ipv4
-     perror("Failed to create ipv6 socket. Trying ipv4");
--    pAddrInfo->ai_family = AF_INET;
-+    (*ppAddrInfo)->ai_family = AF_INET;
-+    if (pPort != -1)
-+    {
-+       char tService[SERVLEN];
-+       sprintf(tService, "%d", pPort); // copies port to string
-+       int tFamily = AF_INET;
-+       if(getAddr(NULL, tService, tFamily, SOCK_STREAM, ppAddrInfo))
-+       {
-+           return ERROR; // getAddr prints out error message
-+       }
-+    }
-     tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0);
-   }
- #endif
-@@ -63,7 +75,7 @@ int setup_client(struct addrinfo *server_host)
-   while(tIdx++ < RETRY_COUNT)
-   {
--    tSockDesc = common_setup(server_host);
-+    tSockDesc = common_setup(&server_host, -1);
-     if (tSockDesc < 0 && tIdx >= RETRY_COUNT)
-     {
-       perror("Error: Could not create socket");
-@@ -107,9 +119,23 @@ int getAddr(char *pHostname, char *pService, int pFamily, int pSockType, struct
-   return tError;
- }
--int setup_server(struct addrinfo *server_addr)
-+int setup_server(struct addrinfo *server_addr, int pPort)
- {
--  int tSock = common_setup(server_addr);
-+  char tService[SERVLEN];
-+  sprintf(tService, "%d", pPort); // copies port to string
-+  int tFamily = AF_INET;
-+  #ifdef AF_INET6
-+  //printf("Listening on IPv6 Socket\n");
-+  tFamily = AF_INET6;
-+  #else
-+  //printf("Listening on IPv4 Socket");
-+  #endif
-+  if(getAddr(NULL, tService, tFamily, SOCK_STREAM, &server_addr))
-+  {
-+     return ERROR; // getAddr prints out error message
-+  }
-+
-+  int tSock = common_setup(&server_addr, pPort);
-   if (tSock < 0)
-   {
-     perror("Error: Could not create server socket");
-@@ -154,21 +180,7 @@ int acceptClient(int pSock, struct addrinfo *server_addr)
- int setupListenServer(struct addrinfo **pAddrInfo, int pPort)
- {
--    char tService[SERVLEN];
--    sprintf(tService, "%d", pPort); // copies port to string
--    int tFamily = AF_INET;
--    #ifdef AF_INET6
--    //printf("Listening on IPv6 Socket\n");
--    tFamily = AF_INET6;
--    #else
--    //printf("Listening on IPv4 Socket");
--    #endif
--    if(getAddr(NULL, tService, tFamily, SOCK_STREAM, pAddrInfo))
--    {
--      return ERROR; // getAddr prints out error message
--    }
--
--    int tSocketDescriptor = setup_server(*pAddrInfo);
-+    int tSocketDescriptor = setup_server(*pAddrInfo, pPort);
-     char tAddr[INET6_ADDRSTRLEN];
-     socklen_t tSize = INET6_ADDRSTRLEN;
-     inet_ntop((*pAddrInfo)->ai_family, (*pAddrInfo)->ai_addr, tAddr, tSize);
-diff --git a/socketlib.h b/socketlib.h
-index 6d501f3..5cb1bf0 100644
---- a/socketlib.h
-+++ b/socketlib.h
-@@ -24,7 +24,7 @@
- #define DEFAULT_UNIX "/unix"
- int setup_client(struct addrinfo *server_info);
--int setup_server(struct addrinfo *server_address);
-+int setup_server(struct addrinfo *server_address, int pPort);
- int setupListenServer(struct addrinfo **pAddrInfo, int pPort);
- int acceptClient(int pSock, struct addrinfo *server_addr);
- void delay(long pMillisecs, struct timeval *pRes);