Author: NicolasPierron
Date: Sun Apr 17 08:27:22 2011
New Revision: 26864
URL: https://svn.nixos.org/websvn/nix/?rev=26864&sc=1

Log:
Fuppes: Fix support of faad2, backward compatibility macros were not
expanded in strings.

Added:
   
nixpkgs/trunk/pkgs/tools/networking/fuppes/fuppes-faad-exanpse-backward-symbols-macro.patch
Modified:
   nixpkgs/trunk/pkgs/tools/networking/fuppes/default.nix

Modified: nixpkgs/trunk/pkgs/tools/networking/fuppes/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/networking/fuppes/default.nix      Sun Apr 17 
08:27:16 2011        (r26863)
+++ nixpkgs/trunk/pkgs/tools/networking/fuppes/default.nix      Sun Apr 17 
08:27:22 2011        (r26864)
@@ -8,6 +8,10 @@
     sha256 = 
"1c385b29878927e5f1e55ae2c9ad284849d1522d9517a88e34feb92bd5195173";
   };
 
+  patches = [
+    ./fuppes-faad-exanpse-backward-symbols-macro.patch
+  ];
+
   buildInputs = [
     pkgconfig pcre libxml2 sqlite ffmpeg imagemagick exiv2 mp4v2 lame
     libvorbis flac libmad faad2
@@ -26,6 +30,11 @@
     "--enable-faad"
   ];
 
+  postFixup = ''
+    patchelf --set-rpath "$(patchelf --print-rpath 
$out/bin/fuppes):${faad2}/lib" $out/bin/fuppes
+    patchelf --set-rpath "$(patchelf --print-rpath 
$out/bin/fuppesd):${faad2}/lib" $out/bin/fuppesd
+  '';
+
   meta = {
     description = "UPnP A/V Media Server";
     longDescription = ''

Added: 
nixpkgs/trunk/pkgs/tools/networking/fuppes/fuppes-faad-exanpse-backward-symbols-macro.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
nixpkgs/trunk/pkgs/tools/networking/fuppes/fuppes-faad-exanpse-backward-symbols-macro.patch
 Sun Apr 17 08:27:22 2011        (r26864)
@@ -0,0 +1,91 @@
+diff -x _inst -x _build -x .svn -ur 
fuppes-0.660/src/lib/Transcoding/FaadWrapper.cpp 
fuppes-0.660.new/src/lib/Transcoding/FaadWrapper.cpp
+--- fuppes-0.660/src/lib/Transcoding/FaadWrapper.cpp   2009-11-19 
10:16:25.000000000 +0100
++++ fuppes-0.660.new/src/lib/Transcoding/FaadWrapper.cpp       2011-01-30 
22:25:34.171263052 +0100
+@@ -329,13 +329,19 @@
+   
+   CloseFile();
+ }
+-  
++
++// These macros are used to convert old function names to new ones based on
++// the #define declared in faad headers.  The two-level macro are used to
++// expanse the macro which are gave to to_str.
++#define to_str_(fun) #fun
++#define to_str(fun) to_str_(fun)
++
+ bool CFaadWrapper::LoadLib()
+ {
+   #ifdef WIN32 
+-  std::string sLibName = "libfaad-0.dll"; 
++  std::string sLibName = "libfaad-2.dll"; 
+   #else   
+-  std::string sLibName = "libfaad.so.0"; 
++  std::string sLibName = "libfaad.so.2"; 
+   #endif 
+    
+   if(!CSharedConfig::Shared()->FaadLibName().empty()) { 
+@@ -350,54 +356,54 @@
+     return false; 
+   }
+  
+-  m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecOpen"); 
++  m_faacDecOpen = (faacDecOpen_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecOpen)); 
+   if(!m_faacDecOpen) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecOpen'", 
__FILE__, __LINE__);    
+     return false; 
+   }
+ 
+-  m_faacDecGetErrorMessage = 
(faacDecGetErrorMessage_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecGetErrorMessage"); 
++  m_faacDecGetErrorMessage = 
(faacDecGetErrorMessage_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecGetErrorMessage)); 
+   if(!m_faacDecGetErrorMessage) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 
'faacDecGetErrorMessage'", __FILE__, __LINE__);    
+     return false; 
+   }
+   
+-  m_faacDecGetCurrentConfiguration = 
(faacDecGetCurrentConfiguration_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecGetCurrentConfiguration"); 
++  m_faacDecGetCurrentConfiguration = 
(faacDecGetCurrentConfiguration_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecGetCurrentConfiguration)); 
+   if(!m_faacDecGetCurrentConfiguration) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 
'faacDecGetCurrentConfiguration'", __FILE__, __LINE__);    
+   } 
+ 
+-  m_faacDecSetConfiguration = 
(faacDecSetConfiguration_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecSetConfiguration"); 
++  m_faacDecSetConfiguration = 
(faacDecSetConfiguration_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecSetConfiguration)); 
+   if(!m_faacDecSetConfiguration) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 
'faacDecSetConfiguration'", __FILE__, __LINE__);    
+   } 
+ 
+-  m_faacDecInit = (faacDecInit_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecInit"); 
++  m_faacDecInit = (faacDecInit_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecInit)); 
+   if(!m_faacDecInit) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecInit'", 
__FILE__, __LINE__);    
+   } 
+ 
+-  m_faacDecInit2 = (faacDecInit2_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecInit2"); 
++  m_faacDecInit2 = (faacDecInit2_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecInit2)); 
+   if(!m_faacDecInit2) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecInit2'", 
__FILE__, __LINE__);    
+     return false; 
+   }
+   
+-  m_faacDecDecode = (faacDecDecode_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecDecode"); 
++  m_faacDecDecode = (faacDecDecode_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecDecode)); 
+   if(!m_faacDecDecode) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecDecode'", 
__FILE__, __LINE__);    
+     return false; 
+   } 
+ 
+-  m_faacDecClose = (faacDecClose_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecClose"); 
++  m_faacDecClose = (faacDecClose_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecClose)); 
+   if(!m_faacDecClose) { 
+     CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 'faacDecClose'", 
__FILE__, __LINE__);    
+     return false; 
+   } 
+ 
+-  m_AudioSpecificConfig = 
(AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, 
"AudioSpecificConfig"); 
++  m_AudioSpecificConfig = 
(AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, 
to_str(AudioSpecificConfig)); 
+   if(!m_AudioSpecificConfig) {
+-              m_AudioSpecificConfig = 
(AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, 
"faacDecAudioSpecificConfig"); 
++              m_AudioSpecificConfig = 
(AudioSpecificConfig_t)FuppesGetProcAddress(m_LibHandle, 
to_str(faacDecAudioSpecificConfig)); 
+               if(!m_AudioSpecificConfig) {  
+         CSharedLog::Shared()->Log(L_EXT, "cannot load symbol 
'(faacDec)AudioSpecificConfig'", __FILE__, __LINE__);    
+       return false;
_______________________________________________
nix-commits mailing list
nix-comm...@cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to